mirror of
https://github.com/OCA/stock-logistics-warehouse.git
synced 2025-01-21 14:27:28 +02:00
[MIG] stock_putaway_method: Migration to 14.0
This commit is contained in:
@@ -3,7 +3,7 @@
|
|||||||
"name": "Putaway strategy method",
|
"name": "Putaway strategy method",
|
||||||
"summary": "Add the putaway strategy method back, "
|
"summary": "Add the putaway strategy method back, "
|
||||||
"removed from the stock module in Odoo 12",
|
"removed from the stock module in Odoo 12",
|
||||||
"version": "12.0.1.0.0",
|
"version": "14.0.1.0.0",
|
||||||
"category": "Inventory",
|
"category": "Inventory",
|
||||||
"website": "https://github.com/OCA/stock-logistics-warehouse",
|
"website": "https://github.com/OCA/stock-logistics-warehouse",
|
||||||
"author": "Camptocamp SA, " "Odoo Community Association (OCA)",
|
"author": "Camptocamp SA, " "Odoo Community Association (OCA)",
|
||||||
|
|||||||
@@ -2,8 +2,8 @@
|
|||||||
from odoo import api, fields, models
|
from odoo import api, fields, models
|
||||||
|
|
||||||
|
|
||||||
class PutAwayStrategy(models.Model):
|
class StockPutawayRule(models.Model):
|
||||||
_inherit = "product.putaway"
|
_inherit = "stock.putaway.rule"
|
||||||
|
|
||||||
method = fields.Selection(
|
method = fields.Selection(
|
||||||
selection="_get_putaway_options",
|
selection="_get_putaway_options",
|
||||||
|
|||||||
@@ -8,5 +8,5 @@ class TestPutawayMethod(TransactionCase):
|
|||||||
|
|
||||||
# Check if "fixed" is a valid putaway method
|
# Check if "fixed" is a valid putaway method
|
||||||
def test_01_putaway_methods(self):
|
def test_01_putaway_methods(self):
|
||||||
field_method = self.env["product.putaway"]._fields.get("method")
|
field_method = self.env["stock.putaway.rule"]._fields.get("method")
|
||||||
self.assertIn("fixed", field_method.get_values(self.env))
|
self.assertIn("fixed", field_method.get_values(self.env))
|
||||||
|
|||||||
@@ -1,14 +1,14 @@
|
|||||||
<odoo>
|
<odoo>
|
||||||
|
|
||||||
<record id="view_putaway" model="ir.ui.view">
|
<record id="view_putaway" model="ir.ui.view">
|
||||||
<field name="name">product.putaway.form.method</field>
|
<field name="name">stock.putaway.rule.form.method</field>
|
||||||
<field name="model">product.putaway</field>
|
<field name="model">stock.putaway.rule</field>
|
||||||
<field name="inherit_id" ref="stock.view_putaway" />
|
<field name="inherit_id" ref="stock.stock_putaway_list" />
|
||||||
<field name="arch" type="xml">
|
<field name="arch" type="xml">
|
||||||
<field name="name" position="after">
|
<field name="location_out_id" position="after">
|
||||||
<field name="method" />
|
<field name="method" />
|
||||||
</field>
|
</field>
|
||||||
<field name="fixed_location_ids" position="attributes">
|
<field name="location_in_id" position="attributes">
|
||||||
<attribute
|
<attribute
|
||||||
name="attrs"
|
name="attrs"
|
||||||
>{'invisible': [('method', '!=', 'fixed')]}</attribute>
|
>{'invisible': [('method', '!=', 'fixed')]}</attribute>
|
||||||
|
|||||||
Reference in New Issue
Block a user