Skip to content

Commit

Permalink
Merge PR #451 into 16.0
Browse files Browse the repository at this point in the history
Signed-off-by LoisRForgeFlow
  • Loading branch information
OCA-git-bot committed May 8, 2024
2 parents b98d366 + 20bfe9b commit 6e5ec6c
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 0 deletions.
1 change: 1 addition & 0 deletions ddmrp_report_part_flow_index/__manifest__.py
Expand Up @@ -15,6 +15,7 @@
],
"data": [
"security/ir.model.access.csv",
"security/report_ddmrp_part_plan_flow_index_security.xml",
"reports/report_ddmrp_part_plan_flow_index_views.xml",
"views/ddmrp_flow_index_group_views.xml",
"views/stock_buffer_view.xml",
Expand Down
Expand Up @@ -10,6 +10,7 @@ class ReportDdmrpPartsPlanFlowIndex(models.Model):
buffer_id = fields.Many2one("stock.buffer", string="Buffer", readonly=True)
product_id = fields.Many2one("product.product", string="Product", readonly=True)
location_id = fields.Many2one("stock.location", string="Location", readonly=True)
company_id = fields.Many2one("res.company", string="Company", readonly=True)
adu = fields.Float(
string="Average Daily Usage (ADU)",
default=0.0,
Expand All @@ -30,6 +31,7 @@ def _sub_select(self):
id,
product_id,
location_id,
company_id,
adu,
flow_index_group_id,
green_zone_qty,
Expand All @@ -46,6 +48,7 @@ def _select(self):
a.id as buffer_id,
a.product_id as product_id,
a.location_id as location_id,
a.company_id as company_id,
a.adu as adu,
a.flow_index_group_id as flow_index_group_id,
a.green_zone_qty as green_zone_qty,
Expand Down
Expand Up @@ -38,6 +38,11 @@
<field name="order_frequency" />
<field name="order_frequency_group" />
<field name="order_frequency_group_count" />
<field
name="company_id"
groups="base.group_multi_company"
optional="hide"
/>
</tree>
</field>
</record>
Expand Down
@@ -0,0 +1,10 @@
<odoo>
<record model="ir.rule" id="report_ddmrp_part_plan_flow_index_comp_rule">
<field name="name">Report DDMRP Part Plan Flow Index multi-company</field>
<field name="model_id" ref="model_report_ddmrp_part_plan_flow_index" />
<field name="global" eval="True" />
<field
name="domain_force"
>['|',('company_id','=',False),('company_id', 'in', company_ids)]</field>
</record>
</odoo>

0 comments on commit 6e5ec6c

Please sign in to comment.