[19.0][MIG] edi_exchange_template_oca: Migration to 19.0#250
Conversation
|
/ocabot migration edi_exchange_template |
|
/ocabot rebase |
|
@etobella The rebase process failed, because command |
|
/ocabot migration edi_exchange_template_oca |
44d0990 to
23ff6e9
Compare
All the other main methods start with 'exchange_'. Make generate respect this convention.
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate. Translation: edi-framework-18.0/edi-framework-18.0-edi_exchange_template_oca Translate-URL: https://translation.odoo-community.org/projects/edi-framework-18-0/edi-framework-18-0-edi_exchange_template_oca/
Currently translated at 100.0% (35 of 35 strings) Translation: edi-framework-18.0/edi-framework-18.0-edi_exchange_template_oca Translate-URL: https://translation.odoo-community.org/projects/edi-framework-18-0/edi-framework-18-0-edi_exchange_template_oca/it/
If no explicit code is passed, it must use the code of the type otherwise it will lookup for the 1st matching template by backend type.
Relying on the code by convention was fragile for many reasons. Most important: 1. users have to remember about this convention 2. is not clear which template is going to be used by a specific type With this change we make it more clear and deprecate the old behavior.
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate. Translation: edi-framework-18.0/edi-framework-18.0-edi_exchange_template_oca Translate-URL: https://translation.odoo-community.org/projects/edi-framework-18-0/edi-framework-18-0-edi_exchange_template_oca/
Currently translated at 100.0% (41 of 41 strings) Translation: edi-framework-18.0/edi-framework-18.0-edi_exchange_template_oca Translate-URL: https://translation.odoo-community.org/projects/edi-framework-18-0/edi-framework-18-0-edi_exchange_template_oca/it/
Fix the behavior according to the feature ported from v14 and drop the deprecated lookup by code.
It slows down test suites by creating too many things when not needed.
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate. Translation: edi-framework-18.0/edi-framework-18.0-edi_exchange_template_oca Translate-URL: https://translation.odoo-community.org/projects/edi-framework-18-0/edi-framework-18-0-edi_exchange_template_oca/
Currently translated at 100.0% (42 of 42 strings) Translation: edi-framework-18.0/edi-framework-18.0-edi_exchange_template_oca Translate-URL: https://translation.odoo-community.org/projects/edi-framework-18-0/edi-framework-18-0-edi_exchange_template_oca/it/
23ff6e9 to
f33e03a
Compare
f33e03a to
6f08f49
Compare
| def _prettify_xml(self, xml_string): | ||
| return etree.tostring(etree.fromstring(xml_string), pretty_print=True) | ||
|
|
||
| def _get_info_provider(self, exchange_record, work_ctx=None, usage=None, **kw): |
There was a problem hiding this comment.
@etobella this slipped out of our reviews when moving away from components: it's dead code w/o edi_component_oca.
In fact, this is a part that I wanted to remove anyway because the snippet already allow you to prepare data from where you want w/o needing to define a specific component.
The original idea was to be able to define default "info" components that could be reused.
@sergijPf pls get rid of it in a separate commit. Something like
[REM] edi_exchange_template_oca: get rid of dead code
Meant to work with components only.
| from lxml import etree | ||
|
|
||
|
|
||
| def xml_purge_nswrapper(xml_content): |
There was a problem hiding this comment.
@sergijPf may I ask you you to test one thing?
The nswrapper trick should be superflous today because to define namespaces you can use this approach
<t xmlns:cac="urn:oasis:names:specification:ubl:schema:xsd:CommonAggregateComponents-2">
<cac:DeliveryParty>
[...]
</cac:DeliveryParty>
</t>
If this works, we can leave behind this trick.
few changes done as per 19.0: