[19.0][IMP] l10n_eu_product_adr: migrate xml data files to csv - #290
[19.0][IMP] l10n_eu_product_adr: migrate xml data files to csv#290rrebollo wants to merge 3 commits into
Conversation
2631304 to
4ef3ca2
Compare
|
Thanks for the port! The data conversion itself checks out, I diffed the generated CSVs against the 19.0 XML record by record (2928 1. The label pictograms are lost
<field name="image" type="base64" file="l10n_eu_product_adr/static/img/ADR_1.svg"/>CSV can't express Could you keep 2. Don't let the duplicate UoM enter 19.0 in the first place19.0 never had it: It also can't load on 19, core dropped Simplest fix: don't add That's safe for upgrades, too. On 18→19 the So the migration is optional. If you'd like to keep it to also repoint user-created Minor: |
5b7d055 to
d2f9ec3
Compare
CSV cannot express type="base64" file="...", so data/adr.label.csv left image empty for all 22 labels and static/img/*.svg unreferenced. image is required=True and rendered in form/kanban. Keep data/adr_label.xml as XML (only 22 records) to preserve file= construct. Note 17.0/18.0 need same fix.
d2f9ec3 to
fae7bcd
Compare
V19 sheet uses grid where group colspan=4 col=4 with field colspan=4 overflows container for long ADR names. Use idiomatic Odoo pattern: default group maxCols=2 + field colspan=2 + class text-break (as in hr_leave_views.xml:406 and product_views.xml:137). Refine kanban image handling to avoid 103px wrapper overflow: move o_image_64_contain to img_class with mw-100 and alt, add centering wrapper and overflow-hidden. Let kanban naturally wrap responsive (2 per row desktop, 1 per row mobile) — Add Labels falls where it falls.
2250f82 to
b8902b7
Compare
|
@bosd I think is good to go now. |



Adapted port of #241 to 19.0 — not a pure port.
Genesis
Porting
l10n_eu_product_adrfrom 18.0 (XML) to 19.0 (CSV) as in #241, but 19.0 core already providesuom.product_uom_milliliterand the CSV port would have introduced a duplicatedata/uom.uom.csvthat cannot load on 19 (droppedcategory_id/factor/uom_type). Also the CSV conversion loses label pictograms and V19 grid overflows long ADR names.What this PR does vs #241 (pure XML→CSV):
data/adr_label.xmlas XML (22 records) instead of CSV. CSV cannot expresstype="base64" file="...", sodata/adr.label.csvleftimageempty andstatic/img/*.svgunreferenced (image required=True). Fix also needed on 17.0/18.0.data/uom.uom.csvat all.origin/19.0already points all 240adr.goodsrows to coreuom.product_uom_milliliter; not adding the duplicate keeps the branch installable.sheet>group colspan=4 col=4withfield colspan=4overflows for long ADR names. Uses idiomatic Odoo pattern (groupdefault +field colspan="2" class="text-break", as inhr_leave_views.xml:406,product_views.xml:137) instead of table-based colspan.Commits (3 on top of origin/19.0):
[IMP] l10n_eu_product_adr: migrate xml data files to csv(adapted, withoutuom.uom.csv, 240 refs to core)[FIX] l10n_eu_product_adr: restore label pictograms[FIX] l10n_eu_product_adr: fix name overflow in formVerification
grep -rn mililiter→ 0,grep -c uom.product_uom_milliliter data/adr.goods.csv→ 240grep -c file= data/adr_label.xml→ 22class="text-break"(no custom CSS)pre-commit run --all-files→ Passedinvoke test --cur-file l10n_eu_product_adr/tests/test_adr_goods.py→ 10 greenREADME.rst/static/description/index.htmlchanges@BinhexTeam T12289