Remove _inherits

review670002
This commit is contained in:
Cédric Krier
2013-03-20 22:51:16 +01:00
parent f8657957a3
commit 73452fdebc
3 changed files with 17 additions and 10 deletions
+4 -4
View File
@@ -3,10 +3,10 @@
this repository contains the full copyright notices and license terms. -->
<tryton>
<data>
<record model="ir.ui.view" id="product_view_form">
<field name="model">product.product</field>
<field name="inherit" ref="product.product_view_form"/>
<field name="name">product_form</field>
<record model="ir.ui.view" id="template_view_form">
<field name="model">product.template</field>
<field name="inherit" ref="product.template_view_form"/>
<field name="name">template_form</field>
</record>
</data>
</tryton>
+13 -6
View File
@@ -31,10 +31,13 @@ Create company::
>>> Currency = Model.get('currency.currency')
>>> CurrencyRate = Model.get('currency.currency.rate')
>>> 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
>>> currencies = Currency.find([('code', '=', 'EUR')])
>>> if not currencies:
... currency = Currency(name='Euro', symbol=u'€', code='EUR',
@@ -63,14 +66,18 @@ Create customer::
Create product::
>>> ProductUom = Model.get('product.uom')
>>> ProductTemplate = Model.get('product.template')
>>> Product = Model.get('product.product')
>>> unit, = ProductUom.find([('name', '=', 'Unit')])
>>> product = Product()
>>> product.name = 'Product'
>>> product.default_uom = unit
>>> product.type = 'goods'
>>> product.list_price = Decimal('20')
>>> product.cost_price = Decimal('8')
>>> template = ProductTemplate()
>>> template.name = 'Product'
>>> template.default_uom = unit
>>> template.type = 'goods'
>>> template.list_price = Decimal('20')
>>> template.cost_price = Decimal('8')
>>> template.save()
>>> product.template = template
>>> product.save()
Get stock locations::