Remove _inherits

review670002
This commit is contained in:
Cédric Krier committed 2013-03-20 22:51:02 +01:00
1 parent 06c6ca3c5c
commit 64c5bdb64e
3 files changed
+22 -16

No files matched your search

-1
View File
@@ -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)
+21 -14
View File
@@ -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
+1 -1
View File
@@ -2,7 +2,7 @@
<!-- This file is part of Tryton. The COPYRIGHT file at the top level of
this repository contains the full copyright notices and license terms. -->
<tree string="Products">
<field name="name"/>
<field name="template"/>
<field name="code"/>
<field name="list_price_uom"/>
<field name="cost_price_uom"/>