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",
|
||||
"summary": "Add the putaway strategy method back, "
|
||||
"removed from the stock module in Odoo 12",
|
||||
"version": "12.0.1.0.0",
|
||||
"version": "14.0.1.0.0",
|
||||
"category": "Inventory",
|
||||
"website": "https://github.com/OCA/stock-logistics-warehouse",
|
||||
"author": "Camptocamp SA, " "Odoo Community Association (OCA)",
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
from odoo import api, fields, models
|
||||
|
||||
|
||||
class PutAwayStrategy(models.Model):
|
||||
_inherit = "product.putaway"
|
||||
class StockPutawayRule(models.Model):
|
||||
_inherit = "stock.putaway.rule"
|
||||
|
||||
method = fields.Selection(
|
||||
selection="_get_putaway_options",
|
||||
|
||||
@@ -8,5 +8,5 @@ class TestPutawayMethod(TransactionCase):
|
||||
|
||||
# Check if "fixed" is a valid putaway method
|
||||
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))
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
<odoo>
|
||||
|
||||
<record id="view_putaway" model="ir.ui.view">
|
||||
<field name="name">product.putaway.form.method</field>
|
||||
<field name="model">product.putaway</field>
|
||||
<field name="inherit_id" ref="stock.view_putaway" />
|
||||
<field name="name">stock.putaway.rule.form.method</field>
|
||||
<field name="model">stock.putaway.rule</field>
|
||||
<field name="inherit_id" ref="stock.stock_putaway_list" />
|
||||
<field name="arch" type="xml">
|
||||
<field name="name" position="after">
|
||||
<field name="location_out_id" position="after">
|
||||
<field name="method" />
|
||||
</field>
|
||||
<field name="fixed_location_ids" position="attributes">
|
||||
<field name="location_in_id" position="attributes">
|
||||
<attribute
|
||||
name="attrs"
|
||||
>{'invisible': [('method', '!=', 'fixed')]}</attribute>
|
||||
|
||||
Reference in New Issue
Block a user