-
-
Notifications
You must be signed in to change notification settings - Fork 311
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
[14.0] edi: refactor model rules w/ specific model #797
Conversation
Hi @etobella, |
@etobella can you please have a look? I know you might have existing implementations for Spanish localization that rely on form btns and I'd like not to break them if possible :) |
0b586d2
to
941e046
Compare
I did not override that function, but the change might break installation, as the fields might be used on data 🤔 https://github.com/OCA/l10n-spain/blob/14.0/l10n_es_facturae_face/data/edi.xml#L16-L21 |
I see. What would you suggest? Can't we update those files? Shouldn't be that hard. Other options:
I would like to avoid both of them honestly 😜 |
My suggestion would be to leave them for 14, 15 and 16, but make them non storable and store the data properly on the new table. We need to make an inverse and compute in order to fill the data and fields properly 🤔 I know it is much harder, but it is probably cleaner, WDYT? |
Ok for 14 and 15 but definitely not for 16 (which is not even ready yet). I'm not in favor of keeping full support for the old style tho:
Sounds good? |
@etobella ping :) |
Good for me @simahawk If it is not merged on 16, we can remove the old way there 😉 |
de25b3b
to
310b935
Compare
@etobella backward compat layer added. Tests included. Could you please test on your side when you have time? |
310b935
to
a4814fd
Compare
a4814fd
to
4e3bfc7
Compare
4e3bfc7
to
a60dca5
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.
Hi @simahawk ,
I am encountering an error during testing in runboat, as I am unable to create Exchange Type Rules, since the field type_id is required but is not displayed within the form view.
Sorry, I missed a commit. Pushed now |
@etobella could you drop a review here pls? |
I will test it this weekend 😁 |
Hey Simone, I said I will also look at it this weekend but at the moment I will leave it to Etobella, I was checking runboat and used the existing form button rule for sales orders and so far I am not seeing the button. So, I was working mostly on the output direction for EDI and I am struggling to understand how to test it manually. But as far as I understand it, I think the change is really good. |
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.
Tested locally against l10n-spain tests and all worked properly except for the comment.
Good for me then 😄
b86c6ed
to
61748bb
Compare
You are right, thanks for your feedback. |
Long awaited improvement. Allows to decouple rules by model giving much more flexibility. Migration steps included.
You can now customize and translate labels and tooltips for EDI automatic buttons.
61748bb
to
ee7a7e8
Compare
If there's more than a backend and the exchange type has not a backend set, | ||
a wizard will appear asking to select a backend to be used for the exchange. | ||
|
||
In case of "Custom" kind, you'll have to define your own logic to do something. |
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.
Much clearer now, thanks!
/ocabot merge nobump |
On my way to merge this fine PR! |
Congratulations, your PR was merged at 1c2033f. Thanks a lot for contributing to OCA. ❤️ |
Long awaited improvement.
Allows to decouple rules by model giving much more flexibility.
Migration steps included.
Backward compat kept.