Skip to content

Commit 8cdbef7

Browse files
author
Andrea Barbato
committed
[MIG] l10n_it_delivery_note_customer_code: Migration to 18.0
1 parent 50e1070 commit 8cdbef7

File tree

3 files changed

+24
-35
lines changed

3 files changed

+24
-35
lines changed

l10n_it_delivery_note_customer_code/__manifest__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,14 @@
22
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html)
33
{
44
"name": "Product Customer code and name for delivery note",
5-
"version": "14.0.1.2.0",
5+
"version": "18.0.1.2.0",
66
"author": "Agile Business Group, Odoo Community Association (OCA)",
77
"website": "https://github.com/OCA/l10n-italy",
88
"license": "AGPL-3",
99
"category": "Stock",
1010
"maintainers": ["aleuffre", "renda-dev", "PicchiSeba"],
1111
"depends": [
12-
"product_supplierinfo_for_customer_picking",
12+
"product_customerinfo_picking",
1313
"l10n_it_delivery_note",
1414
],
1515
"data": [

l10n_it_delivery_note_customer_code/report/report_delivery_note.xml

Lines changed: 21 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -4,55 +4,44 @@
44
id="delivery_note_report_template_customer_code"
55
inherit_id="l10n_it_delivery_note.delivery_note_report_template"
66
>
7-
<xpath
8-
expr="//div[hasclass('page')]/table/thead/tr/th[1]"
9-
position="attributes"
10-
>
11-
<attribute name="style">display:none</attribute>
7+
<xpath expr="//table//th[@name='th_product']" position="attributes">
8+
<attribute name="style">display: none;</attribute>
129
</xpath>
13-
<xpath expr="//div[hasclass('page')]/table/thead/tr/th[1]" position="after">
14-
<th class="text-left">
15-
Code
16-
</th>
10+
<xpath expr="//table//th[@name='th_product']" position="after">
11+
<th name="th_customer_code" class="text-start">Code</th>
1712
</xpath>
18-
<xpath
19-
expr="//div[hasclass('page')]/table/thead/tr/th[3]"
20-
position="attributes"
21-
>
22-
<attribute name="style">display:none</attribute>
13+
<xpath expr="//table//th[@name='th_description']" position="attributes">
14+
<attribute name="style">display: none;</attribute>
2315
</xpath>
2416
<xpath expr="//div[hasclass('page')]/table/thead/tr/th[3]" position="after">
25-
<th class="text-left">
26-
Product Name
27-
</th>
17+
<th name="th_customer_name" class="text-start">Product Name</th>
2818
</xpath>
29-
<xpath
30-
expr="//div[hasclass('page')]//table/tbody/t/tr/t/td[1]/span"
31-
position="attributes"
32-
>
19+
<xpath expr="//table//td[@name='td_product']/span" position="attributes">
3320
<attribute name="t-if">not line.product_customer_code</attribute>
3421
</xpath>
3522
<xpath
36-
expr="//div[hasclass('page')]/table/tbody/t/tr/t/td[1]"
37-
position="inside"
23+
expr="//table//td[@name='td_product']/span[@t-field='line.product_id.default_code']"
24+
position="after"
3825
>
39-
<t t-if="line.product_customer_code">
40-
<span t-esc="line.product_customer_code" />
41-
</t>
26+
<span
27+
t-if="line.product_customer_code"
28+
t-out="line.product_customer_code"
29+
/>
4230
</xpath>
4331
<xpath
44-
expr="//div[hasclass('page')]//table/tbody/t/tr/t/td[2]/span"
32+
expr="//table//td[@name='td_name']/span[@t-field='line.name']"
4533
position="attributes"
4634
>
4735
<attribute name="t-if">not line.product_customer_name</attribute>
4836
</xpath>
4937
<xpath
50-
expr="//div[hasclass('page')]/table/tbody/t/tr/t/td[2]"
51-
position="inside"
38+
expr="//table//td[@name='td_name']/span[@t-field='line.name']"
39+
position="after"
5240
>
53-
<t t-if="line.product_customer_name">
54-
<span t-esc="line.product_customer_name" />
55-
</t>
41+
<span
42+
t-if="line.product_customer_name"
43+
t-out="line.product_customer_name"
44+
/>
5645
</xpath>
5746
</template>
5847
</odoo>

l10n_it_delivery_note_customer_code/views/stock_delivery_note_views.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
<field name="type">form</field>
1111
<field name="arch" type="xml">
1212
<xpath
13-
expr="//field[@name='line_ids']/tree/field[@name='name']"
13+
expr="//field[@name='line_ids']/list/field[@name='name']"
1414
position="after"
1515
>
1616
<field name="product_customer_code" optional="hide" />

0 commit comments

Comments
 (0)