mirror of
https://github.com/OCA/stock-logistics-warehouse.git
synced 2025-01-21 14:27:28 +02:00
[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:
@@ -0,0 +1 @@
|
||||
../../../../stock_inventory_preparation_filter
|
||||
6
setup/stock_inventory_preparation_filter/setup.py
Normal file
6
setup/stock_inventory_preparation_filter/setup.py
Normal file
@@ -0,0 +1,6 @@
|
||||
import setuptools
|
||||
|
||||
setuptools.setup(
|
||||
setup_requires=['setuptools-odoo'],
|
||||
odoo_addon=True,
|
||||
)
|
||||
@@ -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,
|
||||
|
||||
@@ -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(
|
||||
|
||||
@@ -6,3 +6,4 @@
|
||||
* Sergio Teruel
|
||||
|
||||
* Xavier Jimenez <xavier.jimenez@qubiq.es>
|
||||
* Iván Todorovich <ivan.todorovich@gmail.com>
|
||||
|
||||
@@ -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.
|
||||
@@ -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()
|
||||
|
||||
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user