Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions ddmrp/models/stock_buffer.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,13 @@ def default_get(self, fields):
product_uom = fields.Many2one(
related="product_id.uom_id",
)
product_categ_id = fields.Many2one(
comodel_name="product.category",
string="Product Category",
related="product_id.categ_id",
store=True,
readonly=True,
)
# TODO: fix in method _compute_procure_recommended_qty.
# not sure maybe they are useful for tweak batches like in multi level mrp
procure_min_qty = fields.Float(
Expand Down
15 changes: 14 additions & 1 deletion ddmrp/views/stock_buffer_view.xml
Original file line number Diff line number Diff line change
Expand Up @@ -583,7 +583,13 @@
<field name="model">stock.buffer</field>
<field name="arch" type="xml">
<search>
<field name="name" />
<field
name="name"
string="Buffer"
filter_domain="[
'|', '|',
('name', 'ilike', self), ('product_id', 'ilike', self), ('location_id', 'ilike', self)]"
/>
<field name="buffer_profile_id" />
<field
name="warehouse_id"
Expand All @@ -593,6 +599,7 @@
<field name="main_supplier_id" />
<field name="company_id" groups="base.group_multi_company" />
<field name="product_id" />
<field name="product_categ_id" />
<field name="dlt" />
<field name="order_cycle" />
<field name="minimum_order_quantity" />
Expand Down Expand Up @@ -698,6 +705,12 @@
domain="[]"
context="{'group_by':'main_supplier_id'}"
/>
<filter
string="Product Category"
name="product_categ_id"
domain="[]"
context="{'group_by': 'product_categ_id'}"
/>
</group>
</search>
</field>
Expand Down