From 64c5bdb64eaad9637970e66264381ec76e776a35 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Wed, 20 Mar 2013 22:51:02 +0100 Subject: [PATCH] Remove _inherits review670002 --- purchase.py | 1 - tests/scenario_purchase.rst | 35 +++++++++++++++++------------ view/product_list_purchase_line.xml | 2 +- 3 files changed, 22 insertions(+), 16 deletions(-) diff --git a/purchase.py b/purchase.py index 1fb587e326..a6fcaa91a8 100644 --- a/purchase.py +++ b/purchase.py @@ -1803,7 +1803,6 @@ class OpenSupplier(Wizard): model_data, = ModelData.search([ ('fs_id', '=', 'act_open_supplier'), ('module', '=', 'purchase'), - ('inherit', '=', None), ], limit=1) wizard = Wizard(model_data.db_id) diff --git a/tests/scenario_purchase.rst b/tests/scenario_purchase.rst index 0ca1b77bf0..72fc513687 100644 --- a/tests/scenario_purchase.rst +++ b/tests/scenario_purchase.rst @@ -38,10 +38,13 @@ Create company:: ... else: ... currency, = currencies >>> Company = Model.get('company.company') + >>> Party = Model.get('party.party') >>> company_config = Wizard('company.company.config') >>> company_config.execute('company') >>> company = company_config.form - >>> company.name = 'B2CK' + >>> party = Party(name='B2CK') + >>> party.save() + >>> company.party = party >>> company.currency = currency >>> company_config.execute('add') >>> company, = Company.find([]) @@ -147,18 +150,22 @@ Create product:: >>> ProductUom = Model.get('product.uom') >>> unit, = ProductUom.find([('name', '=', 'Unit')]) + >>> ProductTemplate = Model.get('product.template') >>> Product = Model.get('product.product') >>> product = Product() - >>> product.name = 'product' - >>> product.default_uom = unit - >>> product.type = 'goods' - >>> product.purchasable = True - >>> product.salable = True - >>> product.list_price = Decimal('10') - >>> product.cost_price = Decimal('5') - >>> product.cost_price_method = 'fixed' - >>> product.account_expense = expense - >>> product.account_revenue = revenue + >>> template = ProductTemplate() + >>> template.name = 'product' + >>> template.default_uom = unit + >>> template.type = 'goods' + >>> template.purchasable = True + >>> template.salable = True + >>> template.list_price = Decimal('10') + >>> template.cost_price = Decimal('5') + >>> template.cost_price_method = 'fixed' + >>> template.account_expense = expense + >>> template.account_revenue = revenue + >>> template.save() + >>> product.template = template >>> product.save() Create payment term:: @@ -323,7 +330,7 @@ Check Return Shipments:: >>> ship_return.state u'waiting' >>> move_return, = ship_return.moves - >>> move_return.product.name + >>> move_return.product.rec_name u'product' >>> move_return.quantity 4.0 @@ -407,7 +414,7 @@ Checking Shipments:: True >>> ShipmentReturn.done([mix_returns.id], config.context) >>> move_return, = mix_returns.moves - >>> move_return.product.name + >>> move_return.product.rec_name u'product' >>> move_return.quantity 2.0 @@ -493,7 +500,7 @@ Checking Shipments:: True >>> ShipmentReturn.done([mix_returns.id], config.context) >>> move_return, = mix_returns.moves - >>> move_return.product.name + >>> move_return.product.rec_name u'product' >>> move_return.quantity 3.0 diff --git a/view/product_list_purchase_line.xml b/view/product_list_purchase_line.xml index 838edaf199..5c638ca215 100644 --- a/view/product_list_purchase_line.xml +++ b/view/product_list_purchase_line.xml @@ -2,7 +2,7 @@ - +