Skip to content

Commit e59f5d4

Browse files
[MIG] stock_account_valuation_discrepancy_adjust: Migration to 18.0
1 parent a3fed6f commit e59f5d4

File tree

6 files changed

+10
-6
lines changed

6 files changed

+10
-6
lines changed

stock_account_valuation_discrepancy_adjust/__manifest__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
{
55
"name": "Account Valuation Discrepancy Adjust",
6-
"version": "16.0.1.0.0",
6+
"version": "18.0.1.0.0",
77
"summary": "Implements Wizard for Adjust "
88
"Discrepancies on Account Inventory Valuation",
99
"category": "Warehouse Management",

stock_account_valuation_discrepancy_adjust/models/product_product.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ def _adjustment_needed(self):
1919
qty_compare = float_compare(
2020
self.qty_at_date,
2121
self.account_qty_at_date,
22-
precision_digits=self.uom_id.rounding,
22+
precision_rounding=self.uom_id.rounding,
2323
)
2424
value_compare = float_compare(
2525
self.stock_value,

stock_account_valuation_discrepancy_adjust/tests/test_stock_account_valuation_discrepancy_adjust.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ def _create_account(self, acc_type, name, code, company):
8080
"name": name,
8181
"code": code,
8282
"account_type": acc_type,
83-
"company_id": company.id,
83+
"company_ids": [(6, 0, [company.id])],
8484
}
8585
)
8686
return account
@@ -107,9 +107,10 @@ def _create_product(self, standard_price, template, list_price):
107107
{
108108
"name": "test_product",
109109
"categ_id": self.product_ctg.id,
110-
"type": "product",
110+
"type": "consu",
111111
"standard_price": standard_price,
112112
"valuation": "real_time",
113+
"is_storable": True,
113114
}
114115
)
115116
return template.product_variant_ids[0]

stock_account_valuation_discrepancy_adjust/wizards/wizard_stock_discrepancy_adjustment.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,8 @@ def _prepare_counterpart_vals(self, product):
110110
product: The product.product record
111111
112112
Returns:
113-
list: A list containing the line values for the counterpart side of the entry
113+
list: A list containing the line values
114+
for the counterpart side of the entry
114115
"""
115116
return [
116117
(

stock_account_valuation_discrepancy_adjust/wizards/wizard_stock_discrepancy_adjustment_view.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
>
3535
<field name="name">Adjust Stock Valuation Account Discrepancies</field>
3636
<field name="res_model">wizard.stock.discrepancy.adjustment</field>
37-
<field name="binding_view_types">tree,form</field>
37+
<field name="binding_view_types">list,form</field>
3838
<field name="view_id" ref="wizard_stock_discrepancy_adjustment_view_form" />
3939
<field name="target">new</field>
4040
<field name="binding_model_id" ref="product.model_product_product" />

test-requirements.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
odoo_test_helper
2+
odoo-addon-stock_account_valuation_report @ git+https://github.com/OCA/stock-logistics-reporting.git@refs/pull/368/head#subdirectory=stock_account_valuation_report

0 commit comments

Comments
 (0)