Replace category by categories on Template
issue5320 review23791002
This commit is contained in:
1 parent
765c2d1528
commit
5352b90576
2 files changed
-13
No files matched your search
@@ -66,12 +66,6 @@ Create customer::
|
||||
>>> customer = Party(name='Customer')
|
||||
>>> customer.save()
|
||||
|
||||
Create category::
|
||||
|
||||
>>> ProductCategory = Model.get('product.category')
|
||||
>>> category = ProductCategory(name='Category')
|
||||
>>> category.save()
|
||||
|
||||
Create products::
|
||||
|
||||
>>> ProductUom = Model.get('product.uom')
|
||||
@@ -81,7 +75,6 @@ Create products::
|
||||
>>> product = Product()
|
||||
>>> template = ProductTemplate()
|
||||
>>> template.name = 'Product'
|
||||
>>> template.category = category
|
||||
>>> template.default_uom = unit
|
||||
>>> template.type = 'goods'
|
||||
>>> template.salable = True
|
||||
@@ -94,7 +87,6 @@ Create products::
|
||||
>>> carrier_product = Product()
|
||||
>>> carrier_template = ProductTemplate()
|
||||
>>> carrier_template.name = 'Carrier Product'
|
||||
>>> carrier_template.category = category
|
||||
>>> carrier_template.default_uom = unit
|
||||
>>> carrier_template.type = 'service'
|
||||
>>> carrier_template.salable = True
|
||||
|
||||
@@ -24,7 +24,6 @@ class CarrierPercentageTestCase(ModuleTestCase):
|
||||
Uom = pool.get('product.uom')
|
||||
Template = pool.get('product.template')
|
||||
Product = pool.get('product.product')
|
||||
Category = pool.get('product.category')
|
||||
Carrier = pool.get('carrier')
|
||||
|
||||
party, = Party.create([{
|
||||
@@ -33,13 +32,9 @@ class CarrierPercentageTestCase(ModuleTestCase):
|
||||
uom, = Uom.search([
|
||||
('name', '=', 'Unit'),
|
||||
])
|
||||
category, = Category.create([{
|
||||
'name': 'Category',
|
||||
}])
|
||||
template, = Template.create([{
|
||||
'name': 'Carrier',
|
||||
'default_uom': uom.id,
|
||||
'category': category.id,
|
||||
'type': 'service',
|
||||
'list_price': Decimal(0),
|
||||
'cost_price': Decimal(0),
|
||||
|
||||
Reference in new issue
Block a user