Skip to content

Commit 0d0d18f

Browse files
committed
[MIG] supplier_calendar: Migration to 14.0
1 parent 1331129 commit 0d0d18f

3 files changed

Lines changed: 15 additions & 5 deletions

File tree

supplier_calendar/__manifest__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
{
44
"name": "Supplier Calendar",
55
"summary": "Supplier Calendar",
6-
"version": "13.0.1.0.0",
6+
"version": "14.0.1.0.0",
77
"website": "https://github.com/OCA/purchase-workflow",
88
"category": "Purchase Management",
99
"author": "ForgeFlow, Odoo Community Association (OCA)",

supplier_calendar/tests/test_supplier_calendar.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ def test_01_purchase_order_with_supplier_calendar(self):
7878
"product_uom_qty": 80.0,
7979
"procure_method": "make_to_order",
8080
"picking_id": customer_picking.id,
81-
"date_expected": "2097-01-14 09:00:00", # Monday
81+
"date": "2097-01-14 09:00:00", # Monday
8282
}
8383
)
8484

@@ -114,15 +114,15 @@ def test_02_purchase_order_supplier_calendar_global_leaves(self):
114114
# With calendar
115115
result = self.company_partner.supplier_plan_days(reference, 3).date()
116116
next_wednesday = fields.Date.to_date("2097-01-23")
117-
self.assertEquals(result, next_wednesday)
117+
self.assertEqual(result, next_wednesday)
118118
reference_2 = "2097-01-11 12:00:00" # friday
119119
result = self.company_partner.supplier_plan_days(reference_2, 3).date()
120-
self.assertEquals(result, next_wednesday)
120+
self.assertEqual(result, next_wednesday)
121121
# Without calendar
122122
self.company_partner.write(
123123
{"delay_calendar_type": "natural", "factory_calendar_id": False}
124124
)
125125
reference_3 = "2097-01-25 12:00:00" # friday
126126
result = self.company_partner.supplier_plan_days(reference_3, 3).date()
127127
monday = fields.Date.to_date("2097-01-28")
128-
self.assertEquals(result, monday)
128+
self.assertEqual(result, monday)

supplier_calendar/views/product_view.xml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,14 @@
1212
</xpath>
1313
</field>
1414
</record>
15+
<record id="product_supplierinfo_supplier_calendar_tree_view" model="ir.ui.view">
16+
<field name="name">product.supplierinfo.supplier_calendar.tree.view</field>
17+
<field name="model">product.supplierinfo</field>
18+
<field name="inherit_id" ref="product.product_supplierinfo_tree_view" />
19+
<field name="arch" type="xml">
20+
<xpath expr="//field[@name='delay']" position="after">
21+
<field name="delay_calendar_type" optional="hide" />
22+
</xpath>
23+
</field>
24+
</record>
1525
</odoo>

0 commit comments

Comments
 (0)