Remove _inherits
review670002
This commit is contained in:
1 parent
7e582dc84e
commit
3b201c51d1
3 files changed
+25
-19
No files matched your search
@@ -1666,7 +1666,6 @@ class OpenCustomer(Wizard):
|
||||
model_data, = ModelData.search([
|
||||
('fs_id', '=', 'act_open_customer'),
|
||||
('module', '=', 'sale'),
|
||||
('inherit', '=', None),
|
||||
], limit=1)
|
||||
wizard = Wizard(model_data.db_id)
|
||||
|
||||
|
||||
+24
-17
@@ -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([])
|
||||
@@ -153,19 +156,23 @@ 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.category = category
|
||||
>>> 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.category = category
|
||||
>>> 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::
|
||||
@@ -328,7 +335,7 @@ Check Return Shipments::
|
||||
>>> ShipmentReturn = Model.get('stock.shipment.out.return')
|
||||
>>> ShipmentReturn.receive([ship_return.id], config.context)
|
||||
>>> move_return, = ship_return.incoming_moves
|
||||
>>> move_return.product.name
|
||||
>>> move_return.product.rec_name
|
||||
u'product'
|
||||
>>> move_return.quantity
|
||||
4.0
|
||||
@@ -391,7 +398,7 @@ Checking Shipments::
|
||||
>>> config.user = stock_user.id
|
||||
>>> ShipmentReturn.receive([mix_returns.id], config.context)
|
||||
>>> move_return, = mix_returns.incoming_moves
|
||||
>>> move_return.product.name
|
||||
>>> move_return.product.rec_name
|
||||
u'product'
|
||||
>>> move_return.quantity
|
||||
2.0
|
||||
@@ -400,7 +407,7 @@ Checking Shipments::
|
||||
>>> ShipmentOut.pack([mix_shipments.id], config.context)
|
||||
>>> ShipmentOut.done([mix_shipments.id], config.context)
|
||||
>>> move_shipment, = mix_shipments.outgoing_moves
|
||||
>>> move_shipment.product.name
|
||||
>>> move_shipment.product.rec_name
|
||||
u'product'
|
||||
>>> move_shipment.quantity
|
||||
7.0
|
||||
@@ -468,7 +475,7 @@ Checking Shipments::
|
||||
>>> config.user = stock_user.id
|
||||
>>> ShipmentReturn.receive([mix_returns.id], config.context)
|
||||
>>> move_return, = mix_returns.incoming_moves
|
||||
>>> move_return.product.name
|
||||
>>> move_return.product.rec_name
|
||||
u'product'
|
||||
>>> move_return.quantity
|
||||
3.0
|
||||
@@ -476,7 +483,7 @@ Checking Shipments::
|
||||
True
|
||||
>>> ShipmentOut.pack([mix_shipments.id], config.context)
|
||||
>>> move_shipment, = mix_shipments.outgoing_moves
|
||||
>>> move_shipment.product.name
|
||||
>>> move_shipment.product.rec_name
|
||||
u'product'
|
||||
>>> move_shipment.quantity
|
||||
6.0
|
||||
@@ -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"/>
|
||||
|
||||
Reference in new issue
Block a user