[FIX]: Improved old product names with new

bzr revid: rpa@tinyerp.com-20120816084224-t12wf5vipd8u90a7
This commit is contained in:
Rucha (Open ERP) 2012-08-16 14:12:24 +05:30
parent 637ba6de59
commit 7a24bdb1f7
28 changed files with 63 additions and 63 deletions

View File

@ -7,7 +7,7 @@
currency_id: base.EUR
invoice_line:
- account_id: account.a_sale
name: '[PC1] Basic PC'
name: '[PCSC234] PC Assemble SC234'
price_unit: 450.0
quantity: 1.0
product_id: product.product_product_3

View File

@ -7,7 +7,7 @@
currency_id: base.EUR
invoice_line:
- account_id: account.a_sale
name: '[PC1] Basic PC'
name: '[PCSC234] PC Assemble SC234'
price_unit: 450.0
quantity: 1.0
product_id: product.product_product_3

View File

@ -20,7 +20,7 @@
currency_id: base.EUR
invoice_line:
- account_id: account.a_sale
name: '[PC3] Medium PC'
name: '[PC-DEM] PC on Demand'
price_unit: 900.0
quantity: 10.0
product_id: product.product_product_5

View File

@ -28,7 +28,7 @@
currency_id: base.EUR
invoice_line:
- account_id: account.a_expense
name: '[PC1] Basic PC'
name: '[PCSC234] PC Assemble SC234'
price_unit: 300.0
product_id: product.product_product_3
quantity: 10.0

View File

@ -24,7 +24,7 @@
uos_id: 1
quantity: 5.0
price_unit: 100.0
name: 'Medium PC'
name: 'PC on Demand'
account_id: account.a_pay
tax_line:
- name: sale tax
@ -104,9 +104,9 @@
"__model": "account.invoice.line",
"__id": "account:b22acf7a-ddcd-11e0-a4db-701a04e25543.account_invoice_line-1RP3so",
"uos_id": ["product:b22acf7a-ddcd-11e0-a4db-701a04e25543.product_uom_unit", "Unit"],
"name": "Basic PC",
"name": "PC Assemble SC234",
"price_unit": 10.0,
"product_id": ["product:b22acf7a-ddcd-11e0-a4db-701a04e25543.product_product_3", "[PC1] Basic PC"],
"product_id": ["product:b22acf7a-ddcd-11e0-a4db-701a04e25543.product_product_3", "[PCSC234] PC Assemble SC234"],
"quantity": 1.0
},
{
@ -114,9 +114,9 @@
"__model": "account.invoice.line",
"__id": "account:b22acf7a-ddcd-11e0-a4db-701a04e25543.account_invoice_line-u2XV5",
"uos_id": ["product:b22acf7a-ddcd-11e0-a4db-701a04e25543.product_uom_unit", "Unit"],
"name": "Medium PC",
"name": "PC on Demand",
"price_unit": 100.0,
"product_id": ["product:b22acf7a-ddcd-11e0-a4db-701a04e25543.product_product_5", "[PC3] Medium PC"],
"product_id": ["product:b22acf7a-ddcd-11e0-a4db-701a04e25543.product_product_5", "[PC-DEM] PC on Demand"],
"quantity": 5.0
}]
}
@ -137,12 +137,12 @@
assert invoice_new.type == 'in_invoice', "Invoice type was not set properly"
assert len(invoice_new.invoice_line) == 2, "invoice lines are not same"
for inv_line in invoice_new.invoice_line:
if inv_line.name == 'Basic PC':
if inv_line.name == 'PC Assemble SC234':
assert inv_line.uos_id.name == "Unit" , "uom is not same"
assert inv_line.price_unit == 10 , "price unit is not same"
assert inv_line.quantity == 1 , "product qty is not same"
assert inv_line.price_subtotal == 10, "price sub total is not same"
elif inv_line.name == 'Medium PC':
elif inv_line.name == 'PC on Demand':
assert inv_line.uos_id.name == "Unit" , "uom is not same"
assert inv_line.price_unit == 100 , "price unit is not same"
assert inv_line.quantity == 5 , "product qty is not same"

View File

@ -54,7 +54,7 @@
currency_id: base.EUR
journal_id: account.bank_journal
name: Voucher Axelor
narration: Basic PC
narration: PC Assemble SC234
line_dr_ids:
- account_id: account.cash
amount: 1000.0

View File

@ -6,7 +6,7 @@
company_id: base.main_company
journal_id: account.bank_journal
name: Voucher Axelor
narration: Basic PC
narration: PC Assemble SC234
amount: 1000.0
line_ids:
- account_id: account.cash

View File

@ -79,7 +79,7 @@
period_id: account.period_1
invoice_line:
- account_id: account.a_sale
name: '[PC1] Basic PC'
name: '[PCSC234] PC Assemble SC234'
price_unit: 200.0
quantity: 1.0
product_id: product.product_product_3
@ -112,7 +112,7 @@
period_id: account.period_2
invoice_line:
- account_id: account.a_sale
name: '[PC1] Basic PC'
name: '[PCSC234] PC Assemble SC234'
price_unit: 100.0
quantity: 1.0
product_id: product.product_product_3

View File

@ -50,7 +50,7 @@
period_id: account.period_1
invoice_line:
- account_id: account.a_expense
name: '[PC1] Basic PC'
name: '[PCSC234] PC Assemble SC234'
price_unit: 200.0
quantity: 1.0
product_id: product.product_product_3
@ -85,7 +85,7 @@
type : in_invoice
invoice_line:
- account_id: account.a_expense
name: '[PC1] Basic PC'
name: '[PCSC234] PC Assemble SC234'
price_unit: 100.0
quantity: 1.0
product_id: product.product_product_3

View File

@ -85,7 +85,7 @@
period_id: account.period_1
invoice_line:
- account_id: account.a_sale
name: '[PC1] Basic PC'
name: '[PCSC234] PC Assemble SC234'
price_unit: 200.0
quantity: 1.0
product_id: product.product_product_3
@ -118,7 +118,7 @@
period_id: account.period_2
invoice_line:
- account_id: account.a_sale
name: '[PC1] Basic PC'
name: '[PCSC234] PC Assemble SC234'
price_unit: 100.0
quantity: 1.0
product_id: product.product_product_3

View File

@ -85,7 +85,7 @@
period_id: account.period_1
invoice_line:
- account_id: account.a_sale
name: '[PC1] Basic PC'
name: '[PCSC234] PC Assemble SC234'
price_unit: 200.0
quantity: 1.0
product_id: product.product_product_3
@ -118,7 +118,7 @@
period_id: account.period_2
invoice_line:
- account_id: account.a_sale
name: '[PC1] Basic PC'
name: '[PCSC234] PC Assemble SC234'
price_unit: 100.0
quantity: 1.0
product_id: product.product_product_3

View File

@ -39,7 +39,7 @@
period_id: account.period_1
invoice_line:
- account_id: account.a_sale
name: '[PC1] Basic PC'
name: '[PCSC234] PC Assemble SC234'
price_unit: 150.0
quantity: 1.0
product_id: product.product_product_3
@ -72,7 +72,7 @@
period_id: account.period_1
invoice_line:
- account_id: account.a_sale
name: '[PC1] Basic PC'
name: '[PCSC234] PC Assemble SC234'
price_unit: 80.0
quantity: 1.0
product_id: product.product_product_3

View File

@ -73,7 +73,7 @@
period_id: account.period_1
invoice_line:
- account_id: account.a_sale
name: '[PC1] Basic PC'
name: '[PCSC234] PC Assemble SC234'
price_unit: 200.0
quantity: 1.0
product_id: product.product_product_3

View File

@ -52,7 +52,7 @@
period_id: account.period_1
invoice_line:
- account_id: account.a_sale
name: '[PC1] Basic PC'
name: '[PCSC234] PC Assemble SC234'
price_unit: 1000.0
quantity: 1.0
product_id: product.product_product_3

View File

@ -7,7 +7,7 @@
currency_id: base.EUR
invoice_line:
- account_id: account.a_sale
name: '[PC1] Basic PC'
name: '[PCSC234] PC Assemble SC234'
price_unit: 450.0
quantity: 1.0
product_id: product.product_product_3

View File

@ -25,7 +25,7 @@
-
!record {model: account.invoice.line, id: dta_invoice_line, view: False}:
account_id: account.a_expense
name: '[PC1] Basic PC'
name: '[PCSC234] PC Assemble SC234'
price_unit: 700.0
quantity: 10.0
product_id: product.product_product_3

View File

@ -26,7 +26,7 @@
-
!record {model: account.invoice.line, id: v11_test_invoice_line, view: False}:
account_id: account.a_expense
name: '[PC1] Basic PC'
name: '[PCSC234] PC Assemble SC234'
price_unit: 888.00
quantity: 1.0
product_id: product.product_product_3

View File

@ -27,7 +27,7 @@
-
!record {model: account.invoice.line, id: v11_part_test_invoice_line, view: False}:
account_id: account.a_expense
name: '[PC1] Basic PC'
name: '[PCSC234] PC Assemble SC234'
price_unit: 250.00
quantity: 1.0
product_id: product.product_product_3

View File

@ -5,7 +5,7 @@
date_expected: !eval datetime.today().strftime("%Y-%m-%d %H:%M:%S")
location_dest_id: stock.stock_location_14
location_id: stock.stock_location_stock
name: '[PC1] Basic PC'
name: '[PCSC234] PC Assemble SC234'
product_id: product.product_product_3
product_qty: 1.0
product_uom: product.product_uom_unit
@ -23,7 +23,7 @@
operations:
- location_dest_id: stock.location_production
location_id: stock.stock_location_stock
name: '[HDD1] HDD Seagate 7200.8 80GB'
name: '[M-Las] Mouse, Laser'
price_unit: 50.0
product_id: product.product_product_11
product_uom: product.product_uom_unit
@ -32,7 +32,7 @@
to_invoice: 1
type: add
fees_lines:
- name: 'HDD1 Seagate repair fees'
- name: 'Mouse repair fees'
product_id: product.product_product_11
product_uom_qty: 1.0
product_uom: product.product_uom_unit
@ -46,7 +46,7 @@
date_expected: !eval datetime.today().strftime("%Y-%m-%d %H:%M:%S")
location_dest_id: stock.stock_location_14
location_id: stock.stock_location_stock
name: '[PC3] Medium PC'
name: '[PC-DEM] PC on Demand'
product_id: product.product_product_5
product_qty: 1.0
product_uom: product.product_uom_unit
@ -64,7 +64,7 @@
operations:
- location_dest_id: stock.location_production
location_id: stock.stock_location_stock
name: '[HDD2] HDD Seagate 7200.8 120GB'
name: '[M-Wir] Mouse, Wireless'
price_unit: 50.0
product_id: product.product_product_12
product_uom: product.product_uom_unit
@ -73,7 +73,7 @@
to_invoice: 1
type: add
fees_lines:
- name: 'HDD2 Seagate repair fees'
- name: 'Mouse Seagate repair fees'
product_id: product.product_product_12
product_uom_qty: 1.0
product_uom: product.product_uom_unit
@ -87,7 +87,7 @@
date_expected: !eval datetime.today().strftime("%Y-%m-%d %H:%M:%S")
location_dest_id: stock.stock_location_14
location_id: stock.stock_location_stock
name: '[PC4] Customizable PC'
name: '[LCD15] 15” LCD Monitor'
product_id: product.product_product_6
product_qty: 1.0
product_uom: product.product_uom_unit
@ -105,7 +105,7 @@
operations:
- location_dest_id: stock.location_production
location_id: stock.stock_location_stock
name: '[HDD3] HDD Seagate 7200.8 160GB'
name: '[RAM-SR5] RAM DDR SR5'
price_unit: 50.0
product_id: product.product_product_13
product_uom: product.product_uom_unit
@ -114,7 +114,7 @@
to_invoice: 1
type: add
fees_lines:
- name: 'HDD3 Seagate repair fees'
- name: 'RAM fees'
product_id: product.product_product_13
product_uom_qty: 1.0
product_uom: product.product_uom_unit

View File

@ -1,6 +1,6 @@
-
In order to test the cancel flow of mrp_repair module,
I start by creating new copy Repair order for "Basic PC" product.
I start by creating new copy Repair order for "PC Assemble SC234" product.
-
!python {model: mrp.repair}: |
copy_id = self.copy(cr, uid, ref("mrp_repair_rmrp1"))

View File

@ -12,7 +12,7 @@
account_collected_id: account.iva
price_include: 1
-
I assign this 10 percent tax on the PC1 product as a sale tax
I assign this 10 percent tax on the [PCSC234] PC Assemble SC234 product as a sale tax
-
!record {model: product.product, id: product.product_product_3}:
taxes_id: [account_tax_10_incl]
@ -27,7 +27,7 @@
account_collected_id: account.iva
price_include: 0
-
I assign this 5 percent tax on the PC2 product as a sale tax
I assign this 5 percent tax on the PCSC349 product as a sale tax
-
!record {model: product.product, id: product.product_product_4}:
taxes_id: [account_tax_05_incl]
@ -52,7 +52,7 @@
-
!workflow {model: pos.session, action: open, ref: pos_order_session0}
-
I create a PoS order with 2 units of PC1 at 450 EUR (Tax Incl) and 3 units of PC2 at 300 EUR. (Tax Excl)
I create a PoS order with 2 units of PCSC234 at 450 EUR (Tax Incl) and 3 units of PCSC349 at 300 EUR. (Tax Excl)
-
!record {model: pos.order, id: pos_order_pos0}:
company_id: base.main_company

View File

@ -1,5 +1,5 @@
-
I create a new PoS order with 2 units of PC1 at 450 EUR (Tax Incl) and 3 units of PC2 at 300 EUR. (Tax Excl)
I create a new PoS order with 2 units of PC1 at 450 EUR (Tax Incl) and 3 units of PCSC349 at 300 EUR. (Tax Excl)
-
!record {model: pos.order, id: pos_order_pos1}:
company_id: base.main_company

View File

@ -6,7 +6,7 @@
to_date: !eval "'%s-12-31' %(datetime.now().year)"
invoice_state: open_paid
-
I open margin for PC3
I open margin for PC-DEM
-
!python {model: product.margin}: |
self.action_open_window(cr, uid, [ref("product_margin_wiz0")], {"lang": 'en_US',

View File

@ -86,13 +86,13 @@
"__model": "sale.order.line",
"__import_module": "purchase",
"__import_model": "purchase.order.line",
"name": "Basic PC",
"name": "PC Assemble SC234",
"product_uom": ["product:724f93ec-ddd0-11e0-88ec-701a04e25543.product_uom_unit", "Unit"],
"product_qty": 1.0,
"date_planned": "2011-09-30",
"sequence": 10,
"price_unit": 150.0,
"product_id": ["product:724f93ec-ddd0-11e0-88ec-701a04e25543.product_product_3", "[PC1] Basic PC"],
"product_id": ["product:724f93ec-ddd0-11e0-88ec-701a04e25543.product_product_3", "[PCSC234] PC Assemble SC234"],
},
{
"__id": "sale:724f93ec-ddd0-11e0-88ec-701a04e25543.sale_order_line-LXEqeadasdad",
@ -100,13 +100,13 @@
"__model": "sale.order.line",
"__import_module": "purchase",
"__import_model": "purchase.order.line",
"name": "Medium PC",
"name": "PC on Demand",
"product_uom": ["product:724f93ec-ddd0-11e0-88ec-701a04e25543.product_uom_unit", "Unit"],
"product_qty": 10.0,
"sequence": 11,
"date_planned": "2011-09-15",
"price_unit": 20.0,
"product_id": ["product:724f93ec-ddd0-11e0-88ec-701a04e25543.product_product_5", "[PC3] Medium PC"],
"product_id": ["product:724f93ec-ddd0-11e0-88ec-701a04e25543.product_product_5", "[PC-DEM] PC on Demand"],
}],
}
new_purchase_order_id = purchase_order_pool.edi_import(cr, uid, edi_document, context=context)
@ -123,11 +123,11 @@
assert order_new.amount_untaxed == 350, "untaxed amount is not same"
assert len(order_new.order_line) == 2, "Purchase order lines number mismatch"
for purchase_line in order_new.order_line:
if purchase_line.name == 'Basic PC':
if purchase_line.name == 'PC Assemble SC234':
assert purchase_line.product_uom.name == "Unit" , "uom is not same"
assert purchase_line.price_unit == 150 , "unit price is not same, got %s, expected 150"%(purchase_line.price_unit,)
assert purchase_line.product_qty == 1 , "product qty is not same"
elif purchase_line.name == 'Medium PC':
elif purchase_line.name == 'PC on Demand':
assert purchase_line.product_uom.name == "Unit" , "uom is not same"
assert purchase_line.price_unit == 20 , "unit price is not same, got %s, expected 20"%(purchase_line.price_unit,)
assert purchase_line.product_qty == 10 , "product qty is not same"

View File

@ -37,7 +37,7 @@
<record id="rfq1_line" model="purchase.order.line">
<field name="order_id" ref="rfq1"/>
<field name="name">[HDD3] HDD Seagate 7200.8 160GB</field>
<field name="name">[RAM-SR5] RAM DDR SR5</field>
<field name="date_planned" eval="time.strftime('%Y/%m/10')"/>
<field name="product_id" ref="product.product_product_13"/>
<field name="product_uom" ref="product.product_uom_unit"/>
@ -54,7 +54,7 @@
<record id="rfq2_line" model="purchase.order.line">
<field name="order_id" ref="rfq2"/>
<field name="name">[HDD3] HDD Seagate 7200.8 160GB</field>
<field name="name">[RAM-SR5] RAM DDR SR5</field>
<field name="date_planned" eval="time.strftime('%Y/%m/15')"/>
<field name="product_id" ref="product.product_product_13"/>
<field name="product_uom" ref="product.product_uom_unit"/>

View File

@ -13,7 +13,7 @@
<!-- Resource: sale.order.line -->
<record id="test_order_1_line_1" model="sale.order.line">
<field name="order_id" ref="test_order_1"/>
<field name="name">[PC1] Basic PC</field>
<field name="name">[PCSC234] PC Assemble SC234</field>
<field name="product_id" ref="product.product_product_3"/>
<field name="product_uom" ref="product.product_uom_unit"/>
<field name="price_unit">450</field>
@ -23,7 +23,7 @@
</record>
<record id="test_order_1_line_3" model="sale.order.line">
<field name="order_id" ref="test_order_1"/>
<field name="name">[RAM512] DDR 512MB PC400</field>
<field name="name">[HDD-SH2] HDD SH-2</field>
<field name="product_id" ref="product.product_product_18"/>
<field name="product_uom" ref="product.product_uom_unit"/>
<field name="price_unit">90</field>

View File

@ -11,13 +11,13 @@
product_uom_qty: 1.0
product_uom: 1
price_unit: 150.0
name: 'Basic pc'
name: 'PC Assemble SC234'
order_line:
- product_id: product.product_product_5
product_uom_qty: 10.0
product_uom: 1
price_unit: 200.0
name: 'Medium pc'
name: 'PC Assemble + Custom (PC on Demand)'
-
I confirm the sale order
-
@ -72,10 +72,10 @@
"__model": "purchase.order.line",
"__import_module": "sale",
"__import_model": "sale.order.line",
"name": "Basic PC",
"name": "PC Assemble SC234",
"date_planned": "2011-09-30",
"price_unit": 150.0,
"product_id": ["product:5af1272e-dd26-11e0-b65e-701a04e25543.product_product_3", "[PC1] Basic PC"],
"product_id": ["product:5af1272e-dd26-11e0-b65e-701a04e25543.product_product_3", "[PCSC234] PC Assemble SC234"],
"product_qty": 1.0,
"product_uom": ["product:5af1272e-dd26-11e0-b65e-701a04e25543.product_uom_unit", "Unit"],
},
@ -85,10 +85,10 @@
"__model": "purchase.order.line",
"__import_module": "sale",
"__import_model": "sale.order.line",
"name": "Medium PC",
"name": "PC on Demand",
"date_planned": "2011-09-15",
"price_unit": 100.0,
"product_id": ["product:5af1272e-dd26-11e0-b65e-701a04e25543.product_product_5", "[PC3] Medium PC"],
"product_id": ["product:5af1272e-dd26-11e0-b65e-701a04e25543.product_product_5", "[PC-DEM] PC on Demand"],
"product_qty": 2.0,
"product_uom": ["product:5af1272e-dd26-11e0-b65e-701a04e25543.product_uom_unit", "Unit"],
}],
@ -107,12 +107,12 @@
assert order_new.amount_untaxed == 350, "Untaxed amount is wrong"
assert len(order_new.order_line) == 2, "Sale order lines mismatch"
for sale_line in order_new.order_line:
if sale_line.name == 'Basic PC':
if sale_line.name == 'PC Assemble SC234':
assert sale_line.delay == 18 , "incorrect delay: got %s, expected 18"%(sale_line.delay,)
assert sale_line.product_uom.name == "Unit" , "uom is not same"
assert sale_line.price_unit == 150 , "unit price is not same, got %s, expected 150"%(sale_line.price_unit,)
assert sale_line.product_uom_qty == 1 , "product qty is not same"
elif sale_line.name == 'Medium PC':
elif sale_line.name == 'PC on Demand':
assert sale_line.delay == 3 , "incorrect delay: got %s, expected 3"%(sale_line.delay,)
assert sale_line.product_uom.name == "Unit" , "uom is not same"
assert sale_line.price_unit == 100 , "unit price is not same, got %s, expected 100"%(sale_line.price_unit,)

View File

@ -9,7 +9,7 @@
invoice_quantity: order
name: Test_SO011
order_line:
- name: '[KEYA] Keyboard - AZERTY'
- name: '[CARD] Graphics Card'
price_unit: 7.0
product_uom: product.product_uom_unit
product_uom_qty: 100.0