[MERGE] demo data branch

bzr revid: qdp-launchpad@openerp.com-20120822160856-k308a270wx2wnsj6
This commit is contained in:
Quentin (OpenERP) 2012-08-22 18:08:56 +02:00
commit a0679e6e4f
32 changed files with 215 additions and 106 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

@ -16,6 +16,14 @@
<field name="name">Off-site Meeting</field>
</record>
<record model="crm.meeting.type" id="categ_meet4">
<field name="name">Open Discussion</field>
</record>
<record model="crm.meeting.type" id="categ_meet5">
<field name="name">Feedback Meeting</field>
</record>
<record model="res.request.link" id="request_link_meeting">
<field name="name">Meeting</field>
<field name="object">crm.meeting</field>

View File

@ -49,7 +49,6 @@ Can you send details,</field>
<field name="section_id" ref="crm_case_section_3"/>
<field name="user_id" ref="base.user_admin"/>
<field name="stage_id" ref="stage_lead1"/>
<field name="description">Want to know features and benifits to use the new software.</field>
<field eval="1" name="active"/>
</record>
@ -550,53 +549,86 @@ Andrew</field>
<!-- Some messages linked to the previous opportunity -->
<record id="message_email0" model="mail.message">
<field name="subject">Kitchen design</field>
<field name="subject">Plan to buy a Laptop</field>
<field name="model">crm.lead</field>
<field name="res_id" ref="crm_case_15"/>
<field name="content_subtype">html</field>
<field name="body_html"><![CDATA[Email0 inquiry]]></field>
<field name="type">email</field>
<field name="state">sent</field>
<field name="user_id" ref="base.user_root"></field>
</record>
<record id="message_note0" model="mail.message">
<field name="subject">Reply</field>
<field name="model">crm.lead</field>
<field name="res_id" ref="crm_case_15"/>
<field name="content_subtype">html</field>
<field name="body_html"><![CDATA[Internal note0]]></field>
<field name="type">comment</field>
<field name="user_id" ref="base.user_root"></field>
</record>
<record id="message_note0_comment0" model="mail.message">
<field name="subject">Reply</field>
<field name="model">crm.lead</field>
<field name="res_id" ref="crm_case_15"/>
<field name="content_subtype">html</field>
<field name="body_html"><![CDATA[comment on note0]]></field>
<field name="parent_id" ref="message_note0"/>
<field name="type">comment</field>
<field name="user_id" ref="base.user_root"></field>
</record>
<record id="message_note0_comment1" model="mail.message">
<field name="subject">Reply</field>
<field name="model">crm.lead</field>
<field name="res_id" ref="crm_case_15"/>
<field name="content_subtype">html</field>
<field name="body_html"><![CDATA[comment1 on note0]]></field>
<field name="parent_id" ref="message_note0"/>
<field name="type">comment</field>
<field name="user_id" ref="base.user_root"></field>
</record>
<record id="message_email1" model="mail.message">
<field name="subject">Your inquiry</field>
<field name="model">crm.lead</field>
<field name="res_id" ref="crm_case_15"/>
<field name="content_subtype">html</field>
<field name="body_html"><![CDATA[hello, outgoing email]]></field>
<field name="body_html">&lt;![CDATA[Email0 inquiry]]&gt;&lt;div&gt;&lt;font size="2"&gt;Hello,&lt;/font&gt;&lt;/div&gt;&lt;div&gt;&lt;font size="2"&gt;&lt;br&gt;&lt;/font&gt;&lt;/div&gt;&lt;div&gt;&lt;font size="2"&gt;I am interested in your company's product and I plan to buy a new laptop having latest technologies and affordable price.&lt;/font&gt;&lt;/div&gt;&lt;div&gt;&lt;font size="2"&gt;Can you please send me product catalogue?&lt;/font&gt;&lt;/div&gt;</field>
<field name="type">email</field>
<field name="state">received</field>
<field name="user_id" ref="base.user_root"></field>
<field name="user_id" ref="base.user_demo"/>
</record>
<record id="message_note0" model="mail.message">
<field name="subject">Re: Plan to buy a Laptop</field>
<field name="model">crm.lead</field>
<field name="res_id" ref="crm_case_15"/>
<field name="parent_id" ref="message_email0"/>
<field name="content_subtype">plain</field>
<field name="body_text">Dear Customer,
Thanks for showing interest in our products.
We have attached the catalogue,
We would like to know your interests, Let us know if we can call you for more details.
Thanks</field>
<field name="type">email</field>
<field name="user_id" ref="base.user_root"/>
<field name="state">sent</field>
</record>
<record id="message_note0_comment0" model="mail.message">
<field name="subject">Re: Plan to buy a Laptop</field>
<field name="model">crm.lead</field>
<field name="res_id" ref="crm_case_15"/>
<field name="content_subtype">html</field>
<field name="body_html">&lt;div&gt;Thanks for the information,&lt;/div&gt;&lt;div&gt;I will visit the store soon.&lt;/div&gt;</field>
<field name="parent_id" ref="message_note0"/>
<field name="type">email</field>
<field name="user_id" ref="base.user_demo"/>
<field name="state">received</field>
</record>
<record id="message_note0_comment1" model="mail.message">
<field name="subject">Re: Plan to buy a Laptop</field>
<field name="model">crm.lead</field>
<field name="res_id" ref="crm_case_15"/>
<field name="content_subtype">html</field>
<field name="body_html">&lt;font color="#1f1f1f"&gt;Can you tell me if the store is open at 9:00 PM?&lt;/b&gt;&lt;/font&gt;</field>
<field name="parent_id" ref="message_note0"/>
<field name="type">email</field>
<field name="state">received</field>
<field name="user_id" ref="base.user_demo"/>
</record>
<record id="message_email1" model="mail.message">
<field name="subject">Re: Plan to buy a Laptop</field>
<field name="model">crm.lead</field>
<field name="res_id" ref="crm_case_15"/>
<field name="content_subtype">plain</field>
<field name="body_text">Yes, its open till 10:00 PM, you are welcome!</field>
<field name="type">email</field>
<field name="state">sent</field>
<field name="user_id" ref="base.user_root"/>
</record>
<record id="message_email_12" model="mail.message">
<field name="subject">Inquiry</field>
<field name="model">crm.lead</field>
<field name="res_id" ref="crm_case_1"/>
<field name="content_subtype">plain</field>
<field name="body_text">Hello,
I am Jason from Le Club SARL,
I am intertested to attend Training organized in your company,
Can you send details,</field>
<field name="type">email</field>
<field name="state">received</field>
<field name="user_id" ref="base.user_demo"/>
</record>
<record id="message_email_13" model="mail.message">
<field name="subject">Need Details</field>
<field name="model">crm.lead</field>
<field name="res_id" ref="crm_case_2"/>
<field name="content_subtype">plain</field>
<field name="body_text">Want to know features and benifits to use the new software.</field>
<field name="type">comment</field>
<field name="user_id" ref="base.user_demo"/>
</record>

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

@ -438,5 +438,40 @@
<function model="project.project" name="schedule_tasks"
eval="[ref('project_project_3'), ref('project_project_4'), ref('project_project_5')], {'install_mode': True}"/>
<record id="message_task_1" model="mail.message">
<field name="model">project.task</field>
<field name="res_id" ref="project_task_22"/>
<field name="content_subtype">plain</field>
<field name="body_text">Hello Quentin,
There is a change in customer requirement.
Can you check the document from customer again.
Thanks,</field>
<field name="type">comment</field>
<field name="user_id" ref="base.user_root"/>
</record>
<record id="message_task_2" model="mail.message">
<field name="model">project.task</field>
<field name="res_id" ref="project_task_22"/>
<field name="parent_id" ref="message_task_1"/>
<field name="content_subtype">plain</field>
<field name="body_text">Ok, I have checked the mail,
I will update the document and let you know.</field>
<field name="type">comment</field>
<field name="user_id" ref="base.user_qdp"/>
</record>
<record id="message_task_3" model="mail.message">
<field name="model">project.task</field>
<field name="res_id" ref="project_task_22"/>
<field name="parent_id" ref="message_task_2"/>
<field name="content_subtype">plain</field>
<field name="body_text">Fine!
Send it ASAP, its urgent.</field>
<field name="type">comment</field>
<field name="user_id" ref="base.user_root"/>
</record>
</data>
</openerp>

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

@ -301,6 +301,40 @@
<workflow action="order_confirm" model="sale.order" ref="sale_order_5"/>
<workflow action="order_confirm" model="sale.order" ref="sale_order_7"/>
<record id="message_sale_1" model="mail.message">
<field name="model">sale.order</field>
<field name="res_id" ref="sale_order_2"/>
<field name="content_subtype">plain</field>
<field name="body_text">Hi,
I have a confusion for pricing of Services, I have heard there is a discount above 25 hours.
Can you clarify please?</field>
<field name="type">comment</field>
<field name="user_id" ref="base.user_demo"/>
</record>
<record id="message_sale_2" model="mail.message">
<field name="model">sale.order</field>
<field name="res_id" ref="sale_order_2"/>
<field name="parent_id" ref="message_sale_1"/>
<field name="content_subtype">plain</field>
<field name="body_text">Hello,
Sorry but that scheme is not available for now,
We would like to know if you confirm the quotation with pricing we sent to you.
Thanks,
Sales Department</field>
<field name="type">comment</field>
<field name="user_id" ref="base.user_root"/>
</record>
<record id="message_sale_3" model="mail.message">
<field name="model">sale.order</field>
<field name="res_id" ref="sale_order_2"/>
<field name="parent_id" ref="message_sale_2"/>
<field name="content_subtype">plain</field>
<field name="body_text">Ok, fine, we will intimate you after discussing with our team.</field>
<field name="type">comment</field>
<field name="user_id" ref="base.user_demo"/>
</record>
<!-- sale advance demo.. -->
<!-- Demo Data for Product -->

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