[MIG] stock_inventory_preparation_filter: Migration to 14.0

[IMP] Improve stock inventory view

[IMP] Keep 'domain' filter last in the list (ux)
This commit is contained in:
Ivàn Todorovich
2020-12-28 16:11:29 -03:00
parent b5b89d5072
commit 5e0e1e9812
8 changed files with 27 additions and 23 deletions

View File

@@ -0,0 +1 @@
../../../../stock_inventory_preparation_filter

View File

@@ -0,0 +1,6 @@
import setuptools
setuptools.setup(
setup_requires=['setuptools-odoo'],
odoo_addon=True,
)

View File

@@ -5,11 +5,11 @@
{
"name": "Extended Inventory Preparation Filters",
"version": "13.0.1.0.0",
"version": "14.0.1.0.0",
"depends": ["stock"],
"author": "AvanzOSC," "Tecnativa," "Odoo Community Association (OCA)",
"category": "Inventory, Logistic, Storage",
"website": "http://github.com/OCA/stock-logistics-warehouse",
"website": "https://github.com/OCA/stock-logistics-warehouse",
"summary": "More filters for inventory adjustments",
"data": ["views/stock_inventory_view.xml"],
"installable": True,

View File

@@ -20,7 +20,7 @@ class StockInventory(models.Model):
("domain", _("Filtered Products")),
]
if self.user_has_groups("stock.group_production_lot"):
res_filter.append(("lots", _("Selected Lots")))
res_filter.insert(-1, ("lots", _("Selected Lots")))
return res_filter
filter = fields.Selection(

View File

@@ -6,3 +6,4 @@
* Sergio Teruel
* Xavier Jimenez <xavier.jimenez@qubiq.es>
* Iván Todorovich <ivan.todorovich@gmail.com>

View File

@@ -1,3 +0,0 @@
* The widget domain is not displayed correctly, but this issue is related to
Odoo. To avoid this malfunction, use the keyboard arrows to properly work
with the domain option.

View File

@@ -1,12 +1,12 @@
# Copyright 2015 AvanzOSC - Oihane Crucelaegi
# Copyright 2015 Tecnativa - Pedro M. Baeza
# Copyright 2020 Iván Todorovich
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from odoo.tests import common
@common.at_install(False)
@common.post_install(True)
@common.tagged("-at_install", "post_install")
class TestStockInventoryPreparationFilterCategories(common.TransactionCase):
def setUp(self):
super(TestStockInventoryPreparationFilterCategories, self).setUp()

View File

@@ -10,8 +10,8 @@
>{'invisible': [('filter', '!=', 'products')]}</attribute>
</field>
<xpath expr="//field[@name='location_ids']/../.." position="before">
<group>
<group>
<group name="preparation_filter">
<group name="preparation_filter_left">
<field
name="filter"
string="Inventory of"
@@ -19,30 +19,29 @@
attrs="{'readonly': [('state', '!=', 'draft')]}"
/>
</group>
<group name="preparation_filter_right">
<field
name="product_domain"
nolabel="1"
widget="domain"
attrs="{'invisible': [('filter', '!=', 'domain')]}"
options="{'model': 'product.product'}"
/>
</group>
</group>
</xpath>
<field name="location_ids" position="before">
<field name="product_ids" position="after">
<field
name="categ_ids"
widget="many2many_tags"
attrs="{'invisible':[('filter','!=','categories')]}"
/>
</field>
<field name="location_ids" position="before">
<field
name="lot_ids"
widget="many2many_tags"
attrs="{'invisible':[('filter','!=','lots')]}"
/>
</field>
<xpath expr="//field[@name='location_ids']/../.." position="after">
<field
name="product_domain"
widget="domain"
attrs="{'invisible': [('filter', '!=', 'domain')]}"
options="{'model': 'product.product'}"
/>
</xpath>
</field>
</record>
</odoo>