From ef5cc53a001807c2ce2e54f9505d514152811035 Mon Sep 17 00:00:00 2001 From: Albert Cervera i Areny Date: Sat, 16 Nov 2013 00:39:12 +0100 Subject: [PATCH] Rename product.cost.plan.bom to product.cost.plan.bom_line. --- plan.py | 5 +-- plan.xml | 36 +++++++++---------- ...m_form.xml => cost_plan_bom_line_form.xml} | 0 ...m_list.xml => cost_plan_bom_line_list.xml} | 0 4 files changed, 21 insertions(+), 20 deletions(-) rename view/{cost_plan_bom_form.xml => cost_plan_bom_line_form.xml} (100%) rename view/{cost_plan_bom_list.xml => cost_plan_bom_line_list.xml} (100%) diff --git a/plan.py b/plan.py index bad1506..bf555ef 100644 --- a/plan.py +++ b/plan.py @@ -12,7 +12,8 @@ class Plan(Workflow, ModelSQL, ModelView): product = fields.Many2One('product.product', 'Product', required=True) bom = fields.Many2One('production.bom', 'BOM', on_change_with=['product'], required=True) - boms = fields.One2Many('product.cost.plan.bom', 'plan', 'BOMs', states={ + boms = fields.One2Many('product.cost.plan.bom_line', 'plan', 'BOMs', + states={ 'readonly': Eval('state') != 'draft', }, depends=['state'], on_change_with=['bom']) quantity = fields.Float('Quantity', required=True) @@ -82,7 +83,7 @@ class Plan(Workflow, ModelSQL, ModelView): class PlanBOM(ModelSQL, ModelView): 'Product Cost Plan BOM' - __name__ = 'product.cost.plan.bom' + __name__ = 'product.cost.plan.bom_line' plan = fields.Many2One('product.cost.plan', 'Plan', required=True) product = fields.Many2One('product.product', 'Product', required=True) bom = fields.Many2One('production.bom', 'BOM') diff --git a/plan.xml b/plan.xml index b81f754..1cb8827 100644 --- a/plan.xml +++ b/plan.xml @@ -63,39 +63,39 @@ - - product.cost.plan.bom + + product.cost.plan.bom_line form - cost_plan_bom_form + cost_plan_bom_line_form - - product.cost.plan.bom + + product.cost.plan.bom_line tree - cost_plan_bom_list + cost_plan_bom_line_list - + Product Cost Plan BOM - product.cost.plan.bom + product.cost.plan.bom_line - + - - + + - + - - + + - - + + - - + + diff --git a/view/cost_plan_bom_form.xml b/view/cost_plan_bom_line_form.xml similarity index 100% rename from view/cost_plan_bom_form.xml rename to view/cost_plan_bom_line_form.xml diff --git a/view/cost_plan_bom_list.xml b/view/cost_plan_bom_line_list.xml similarity index 100% rename from view/cost_plan_bom_list.xml rename to view/cost_plan_bom_line_list.xml