mirror of
https://github.com/OCA/stock-logistics-warehouse.git
synced 2025-01-21 14:27:28 +02:00
[MIG] stock_orderpoint_uom: Migration to 14.0
This commit is contained in:
@@ -4,7 +4,7 @@
|
||||
"name": "Stock Orderpoint UoM",
|
||||
"summary": "Allows to create procurement orders in the UoM indicated in "
|
||||
"the orderpoint",
|
||||
"version": "13.0.1.0.0",
|
||||
"version": "14.0.1.0.0",
|
||||
"author": "ForgeFlow, Odoo Community Association (OCA)",
|
||||
"website": "https://github.com/OCA/stock-logistics-warehouse",
|
||||
"category": "Warehouse Management",
|
||||
|
||||
@@ -10,7 +10,7 @@ class ProcurementGroup(models.Model):
|
||||
_inherit = "procurement.group"
|
||||
|
||||
@api.model
|
||||
def run(self, procurements):
|
||||
def run(self, procurements, raise_user_error=True):
|
||||
# 'Procurement' is a 'namedtuple', which is not editable.
|
||||
# The 'procurement' which needs to be edited is created new
|
||||
# and the previous one is deleted.
|
||||
@@ -46,4 +46,4 @@ class ProcurementGroup(models.Model):
|
||||
for index in indexes_to_pop:
|
||||
procurements.pop(index)
|
||||
procurements.extend(new_procs)
|
||||
return super(ProcurementGroup, self).run(procurements)
|
||||
return super(ProcurementGroup, self).run(procurements, raise_user_error)
|
||||
|
||||
@@ -1 +1 @@
|
||||
Go to 'Inventory > Master Data > Reordering Rules' and indicate a Procurement UoM.
|
||||
Go to 'Inventory > Products > Products' and indicate both the unit of measure and the procurement unit of measure for the chosen product.
|
||||
|
||||
@@ -3,9 +3,9 @@
|
||||
<record id="view_warehouse_orderpoint_tree" model="ir.ui.view">
|
||||
<field name="name">stock.warehouse.orderpoint.tree</field>
|
||||
<field name="model">stock.warehouse.orderpoint</field>
|
||||
<field name="inherit_id" ref="stock.view_warehouse_orderpoint_tree" />
|
||||
<field name="inherit_id" ref="stock.view_warehouse_orderpoint_tree_editable" />
|
||||
<field name="arch" type="xml">
|
||||
<field name="product_uom" position="after">
|
||||
<field name="product_uom_name" position="after">
|
||||
<field name="procure_uom_id" groups="uom.group_uom" />
|
||||
</field>
|
||||
</field>
|
||||
|
||||
Reference in New Issue
Block a user