-
-
Notifications
You must be signed in to change notification settings - Fork 314
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[16.0][MIG] sale_order_import_edifact: Migration to 16.0 #821
[16.0][MIG] sale_order_import_edifact: Migration to 16.0 #821
Conversation
58d1e64
to
1ccab24
Compare
Note:
|
|
||
@api.onchange("order_file") | ||
def order_file_change(self): | ||
if self.edifact_ok: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
see my comments on #816
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't understand this. We should leverage the call to super for loading defaults.
Also, here, the doc_type and the price_source are kind of hardcoded...
Shouldn't we rely on the parsing of the file as for the other formats?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is to be able to force from configuration.
sale_order_import:
price_source: order
confirm_order: false
wiz_ctx:
file_ext: 'edi'
release: 'd96a'
doc_type: 'rfq'
but yes, price_source
should be taken from context like doc_type
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
that's the point. Instead of having special keys, we can rely on the fact that defaults will be taken automatically.
In they yml example above I'd like to get rid of the special keys price_source
and confirm_order
.
In the wiz ctx we should see something like:
wiz_ctx:
default_file_ext: edi
default_release: d96a
default_doc_type: rfq
default_price_source: order
default_confirm_order: true
and if I'm not mistaken the only field missing here is confirm_order
which I'd like to add as a boolean in the sale.order.import wizard to automatically confirm it instead for relying on a custom machinery in edi_sale_oca.
TBH is my "fault". Is something that I didn't introduce in v 14 and now I'd like to clear it up.
Hope is clear 😉
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I created a PR for confirm_order
field in sale_order_import
module at #839
Could you have a look?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
1ccab24
to
bd5f7b1
Compare
Hi @simahawk , I updated |
|
||
@api.onchange("order_file") | ||
def order_file_change(self): | ||
if self.edifact_ok: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't understand this. We should leverage the call to super for loading defaults.
Also, here, the doc_type and the price_source are kind of hardcoded...
Shouldn't we rely on the parsing of the file as for the other formats?
3a201e2
to
652f5cd
Compare
I updated, but waiting for your reply to the comments above:
After that, I will force push again |
652f5cd
to
dcdcad4
Compare
dcdcad4
to
17ce326
Compare
_inherit = "business.document.import" | ||
|
||
@api.model | ||
def _hook_match_partner(self, partner_dict, chatter_msg, domain, order): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
matching a partner via gln should be a generic thing... what is really needed here that is specific to edifact?
IMO there's something "wrong" or "too rigid" here
schemeIDs = [ |
If you don't have time to solve it now, I would a TODO to refactor that piece of code and drop this one.
CC @jbaudoux
17ce326
to
901edc5
Compare
I updated |
901edc5
to
c3ae082
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Almost there! 🦾
Dependencies to drop and small remarks on the doc type.
1c31f90
to
204efcd
Compare
OK @simahawk , done here |
3bd9ed1
to
c251cc1
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LG
/ocabot rebase |
Congratulations, PR rebased to 16.0. |
c251cc1
to
a22cf47
Compare
/ocabot merge nobump |
On my way to merge this fine PR! |
Congratulations, your PR was merged at 0801b88. Thanks a lot for contributing to OCA. ❤️ |
Depends on: