[IMP] Remove and clean product demo data

Remaining products :
- product_product_0 becomes service_order_01
- product_product_1b becomes service_cost_01
- product_product_43 becomes product_order_01
- product_product_47 becomes product_delivery_01
- prodcut_product becomes product_delivery_02
- Replace product_product_56 by service_delivery
- Replace product_product_59 by consu_delivery_01
- Replace product_product_58 by consu_delivery_02
- Replace product_product_57 by consu_delivery_03

Removed products :
- product_product_53, product_product_57, product_product_55, product_product_54, product_product_52,
  product_product_51, product_product_50, product_product_48, product_product_46, product_product_32,
  product_product_33, product_product_28, product_product_38, product_product_39, product_product_40,
  product_product_41, product_product_34, product_product_29, product_product_30, product_product_44,
  product_product_31, product_product_35, product_product_36, product_product_37, product_product_42,
  product_product_45, product_product_49, product_product_26, product_product_14, product_product_15,
  product_product_18, product_product_19, product_product_21, product_product_23

Removed corresponding binaries.

Removed all Bill of Materials demo data, that were ridiculous and replace them by 2 bom: A complete
computer, and a kit computer. Rewritten the tests accordingly.

Fixed tests :
- sale_mrp/test/cancellation_propagated.yml : The yaml ref function return a id, not a dictionnary
- sale_stock/tests/test_sale_stock.py : The service product invoiced on the delivered quantity was
  in fact not invoiced on delivery on the test. As we are in sale_stock, Without timesheet, we
  manually set the delivered qty for the product serv_del. If we don't do this, the invoice will
  never be fully invoiced.
- The pricelist rules choice is not based on the sequence anymore (Seems to be a bug, reported to
  online). By the way, I changed the product to avoid the overlap.
- sale_mrp/test/sale_mrp.yml: The yaml ref function return a id, not a dictionnary
- mrp : Rewritten the tests to be coherent with the new bom data
This commit is contained in:
Yannick Tivisse
2016-01-07 16:07:28 +01:00
parent ddff754303
commit e03943a8df
70 changed files with 402 additions and 1767 deletions
+16 -38
View File
@@ -10,12 +10,12 @@
type: 'out_invoice'
date_invoice: !eval time.strftime('%Y-%m')+'-01'
invoice_line_ids:
- name: 'Dell Inspiron Laptop without OS'
product_id: product.product_product_49
- name: ''
product_id: product.consu_delivery_02
price_unit: 642.0
quantity: 5
- name: 'Linutop'
product_id: product.product_product_50
- name: ''
product_id: product.consu_delivery_03
price_unit: 280.0
quantity: 5.0
-
@@ -27,12 +27,12 @@
type: 'out_invoice'
date_invoice: !eval time.strftime('%Y-%m')+'-08'
invoice_line_ids:
- name: '8-port Switch'
product_id: product.product_product_51
- name: ''
product_id: product.consu_delivery_03
price_unit: 50.0
quantity: 3
- name: '30m RJ45 wire'
product_id: product.product_product_52
- name: ''
product_id: product.consu_delivery_01
price_unit: 25
quantity: 20
-
@@ -44,38 +44,16 @@
type: 'out_invoice'
date_invoice: !eval time.strftime('%Y-%m')+'-08'
invoice_line_ids:
- name: 'TypeMatrix Dvorak Keyboard'
product_id: product.product_product_53
- name: ''
product_id: product.consu_delivery_01
price_unit: 90.0
quantity: 5
- name: 'Ergonomic Mouse'
product_id: product.product_product_54
- name: ''
product_id: product.consu_delivery_03
price_unit: 15.0
quantity: 5.0
-
!workflow {model: account.invoice, action: invoice_open, ref: demo_invoice_3}
-
!record {model: account.invoice, id: demo_invoice_invest_sale}:
company_id: base.main_company
partner_id: base.res_partner_3
type: 'out_invoice'
date_invoice: !eval time.strftime('%Y-%m')+'-08'
-
!python {model: ir.model.data} : |
account_id = self.pool.get('account.account').search(cr, uid, [('tag_ids', 'in', [ref('account.demo_sale_of_land_account')])])
line_vals = {
'invoice_id': ref('demo_invoice_invest_sale'),
'name': "Land located at '50.635336,4.863298'",
'price_unit': 210600,
}
if account_id:
line_vals['account_id'] = account_id[0]
tax_id = self.pool.get('account.tax').search(cr, uid, [('type_tax_use', '=', 'sale'), ('amount', '>', 0)])
if tax_id:
line_vals['invoice_line_tax_ids'] = [(6, 0, [tax_id[0]])]
self._update(cr, uid, 'account.invoice.line', 'account', line_vals, 'sale_of_land_line')
self.pool.get('account.invoice').browse(cr, uid, ref('demo_invoice_invest_sale'))._onchange_invoice_line_ids()
self.pool.get('account.invoice').signal_workflow(cr, uid, [ref('demo_invoice_invest_sale')], 'invoice_open')
-
Set the context for supplier bills because the 'type' field is readonly in invoice form views, so it value won't be considered by the yaml import
-
@@ -91,15 +69,15 @@
type: 'in_invoice'
date_invoice: !eval time.strftime('%Y-%m')+'-01'
invoice_line_ids:
- name: 'Toner Cartridge'
- name: ''
price_unit: 10.0
quantity: 1.0
product_id: product.product_product_39
product_id: product.product_delivery_01
uom_id: product.product_uom_unit
- name: 'Zed+ Antivirus'
- name: ''
price_unit: 4.0
quantity: 1.0
product_id: product.product_product_43
product_id: product.product_order_01
uom_id: product.product_uom_unit
-
!record {model: account.invoice, id: demo_invoice_january_wages}:
@@ -5,7 +5,7 @@
company_id: base.main_company
currency_id: base.EUR
invoice_line_ids:
- name: '[PCSC234] PC Assemble SC234'
- name: 'Computer SC234'
price_unit: 450.0
quantity: 1.0
product_id: product.product_product_3
+2 -2
View File
@@ -20,7 +20,7 @@
</record>
<record id="test_invoice_1_line_1" model="account.invoice.line">
<field name="name">Basic computer with Dvorak keyboard and left-handed mouse</field>
<field name="product_id" ref="product.product_product_57"/>
<field name="product_id" ref="product.consu_delivery_03"/>
<field name="invoice_id" ref="test_invoice_1"/>
<field name="price_unit">250</field>
<field name="quantity">1</field>
@@ -28,7 +28,7 @@
</record>
<record id="test_invoice_1_line_2" model="account.invoice.line">
<field name="name">Little server with raid 1 and 512ECC ram</field>
<field name="product_id" ref="product.product_product_58"/>
<field name="product_id" ref="product.consu_delivery_02"/>
<field name="invoice_id" ref="test_invoice_1"/>
<field name="price_unit">800</field>
<field name="quantity">2</field>
+7 -19
View File
@@ -2,36 +2,24 @@
<openerp>
<data>
<!-- Demo Data for Memberships -->
<record id="membership_0" model="product.product">
<!-- Demo Data for Memberships -->
<record id="product.membership_0" model="product.product">
<field name="membership">True</field>
<field eval="time.strftime('%Y-01-01')" name="membership_date_from"/>
<field eval="time.strftime('%Y-12-31')" name="membership_date_to"/>
<field name="name">Gold Membership</field>
<field name="list_price">180</field>
<field name="categ_id" ref="product.product_category_1"/>
<field name="type">service</field>
<field name="image" type="base64" file="membership/static/img/membership_0-image.jpg"/>
<field name="active" eval="True"/>
</record>
<record id="membership_1" model="product.product">
<record id="product.membership_1" model="product.product">
<field name="membership">True</field>
<field eval="time.strftime('%Y-01-01')" name="membership_date_from"/>
<field eval="time.strftime('%Y-12-31')" name="membership_date_to"/>
<field name="name">Silver Membership</field>
<field name="categ_id" ref="product.product_category_1"/>
<field name="list_price">80</field>
<field name="type">service</field>
<field name="image" type="base64" file="membership/static/img/membership_1-image.jpg"/>
<field name="active" eval="True"/>
</record>
<record id="membership_2" model="product.product">
<record id="product.membership_2" model="product.product">
<field name="membership">True</field>
<field eval="time.strftime('%Y-01-01')" name="membership_date_from"/>
<field eval="time.strftime('%Y-12-31')" name="membership_date_to"/>
<field name="name">Basic Membership</field>
<field name="categ_id" ref="product.product_category_1"/>
<field name="list_price">40</field>
<field name="type">service</field>
<field name="image" type="base64" file="membership/static/img/membership_2-image.jpg"/>
<field name="active" eval="True"/>
</record>
</data>
+100 -406
View File
@@ -238,467 +238,161 @@
<!-- Resource: mrp.bom -->
<record id="product.product_product_18_product_template" model="product.template">
<record id="product.product_product_3_product_template" model="product.template">
<field name="route_ids" eval="[(6, 0, [ref('stock.route_warehouse0_mto'), ref('mrp.route_warehouse0_manufacture')])]"/>
</record>
<record id="mrp_bom_1" model="mrp.bom">
<field name="product_tmpl_id" ref="product.product_product_18_product_template"/>
<record id="mrp_bom_manufacture" model="mrp.bom">
<field name="product_tmpl_id" ref="product.product_product_3_product_template"/>
<field name="product_uom" ref="product.product_uom_unit"/>
<field name="sequence">5</field>
<field name="sequence">10</field>
<field name="routing_id" ref="mrp_routing_0"/>
<field name="property_ids" eval="[(6,0,[ref('mrp_property_4')])]"/>
</record>
<record id="mrp_bom_line_1" model="mrp.bom.line">
<field name="product_id" ref="product.product_product_17"/>
<field name="product_qty">2</field>
<field name="product_uom" ref="product.product_uom_unit"/>
<field name="sequence">5</field>
<field name="bom_id" ref="mrp_bom_1"/>
</record>
<record id="product.product_product_19_product_template" model="product.template">
<field name="route_ids" eval="[(6, 0, [ref('mrp.route_warehouse0_manufacture')])]"/>
</record>
<record id="mrp_bom_2" model="mrp.bom">
<field name="product_tmpl_id" ref="product.product_product_19_product_template"/>
<field name="product_uom" ref="product.product_uom_unit"/>
<field name="sequence">5</field>
<field name="routing_id" ref="mrp_routing_1"/>
</record>
<record id="mrp_bom_line_2" model="mrp.bom.line">
<field name="product_id" ref="product.product_product_18"/>
<field name="product_qty">4</field>
<field name="product_uom" ref="product.product_uom_unit"/>
<field name="sequence">5</field>
<field name="bom_id" ref="mrp_bom_2"/>
</record>
<record id="mrp_bom_3" model="mrp.bom">
<field name="product_tmpl_id" ref="product.product_product_19_product_template"/>
<field name="product_uom" ref="product.product_uom_unit"/>
<field name="sequence">10</field>
</record>
<record id="mrp_bom_line_3" model="mrp.bom.line">
<field name="product_id" ref="product.product_product_17"/>
<field name="product_qty">1</field>
<field name="product_uom" ref="product.product_uom_unit"/>
<field name="sequence">5</field>
<field name="bom_id" ref="mrp_bom_3"/>
</record>
<record id="product.product_product_27_product_template" model="product.template">
<field name="route_ids" eval="[(6, 0, [ref('mrp.route_warehouse0_manufacture')])]"/>
</record>
<record id="mrp_bom_4" model="mrp.bom">
<field name="product_tmpl_id" ref="product.product_product_27_product_template"/>
<field name="product_uom" ref="product.product_uom_unit"/>
<field name="sequence">5</field>
<field name="routing_id" ref="mrp_routing_1"/>
</record>
<record id="mrp_bom_line_4" model="mrp.bom.line">
<field name="product_id" ref="product.product_product_40"/>
<field name="product_qty">1</field>
<field name="product_uom" ref="product.product_uom_unit"/>
<field name="sequence">2</field>
<field name="bom_id" ref="mrp_bom_4"/>
</record>
<record id="mrp_bom_line_5" model="mrp.bom.line">
<field name="product_id" ref="product.product_product_8"/>
<field name="product_qty">1</field>
<field name="product_uom" ref="product.product_uom_unit"/>
<field name="sequence">4</field>
<field name="bom_id" ref="mrp_bom_4"/>
</record>
<record id="mrp_bom_line_6" model="mrp.bom.line">
<record id="mrp_bom_manufacture_line_1" model="mrp.bom.line">
<field name="product_id" ref="product.product_product_12"/>
<field name="product_qty">1</field>
<field name="product_uom" ref="product.product_uom_unit"/>
<field name="sequence">6</field>
<field name="bom_id" ref="mrp_bom_4"/>
<field name="sequence">5</field>
<field name="bom_id" ref="mrp_bom_manufacture"/>
</record>
<record id="mrp_bom_5" model="mrp.bom">
<field name="product_tmpl_id" ref="product.product_product_27_product_template"/>
<field name="product_uom" ref="product.product_uom_unit"/>
<field name="sequence">10</field>
</record>
<record id="mrp_bom_line_7" model="mrp.bom.line">
<field name="product_id" ref="product.product_product_40"/>
<record id="mrp_bom_manufacture_line_2" model="mrp.bom.line">
<field name="product_id" ref="product.product_product_13"/>
<field name="product_qty">1</field>
<field name="product_uom" ref="product.product_uom_unit"/>
<field name="sequence">2</field>
<field name="bom_id" ref="mrp_bom_5"/>
</record>
<record id="mrp_bom_line_8" model="mrp.bom.line">
<field name="product_id" ref="product.product_product_9"/>
<field name="product_qty">1</field>
<field name="product_uom" ref="product.product_uom_unit"/>
<field name="sequence">4</field>
<field name="bom_id" ref="mrp_bom_5"/>
</record>
<record id="mrp_bom_line_9" model="mrp.bom.line">
<field name="product_id" ref="product.product_product_11"/>
<field name="product_qty">1</field>
<field name="product_uom" ref="product.product_uom_unit"/>
<field name="sequence">6</field>
<field name="bom_id" ref="mrp_bom_5"/>
</record>
<record id="product.product_product_16_product_template" model="product.template">
<field name="route_ids" eval="[(6, 0, [ref('mrp.route_warehouse0_manufacture')])]"/>
</record>
<record id="mrp_bom_6" model="mrp.bom">
<field name="product_tmpl_id" ref="product.product_product_16_product_template"/>
<field name="product_uom" ref="product.product_uom_unit"/>
<field name="sequence">5</field>
<field name="bom_id" ref="mrp_bom_manufacture"/>
</record>
<record id="mrp_bom_line_10" model="mrp.bom.line">
<field name="product_id" ref="product.product_product_23"/>
<record id="mrp_bom_manufacture_line_3" model="mrp.bom.line">
<field name="product_id" ref="product.product_product_16"/>
<field name="product_qty">1</field>
<field name="product_uom" ref="product.product_uom_unit"/>
<field name="sequence">4</field>
<field name="bom_id" ref="mrp_bom_6"/>
<field name="sequence">5</field>
<field name="bom_id" ref="mrp_bom_manufacture"/>
</record>
<record id="mrp_bom_line_11" model="mrp.bom.line">
<record id="mrp_bom_manufacture_line_4" model="mrp.bom.line">
<field name="product_id" ref="product.product_product_17"/>
<field name="product_qty">1</field>
<field name="product_uom" ref="product.product_uom_unit"/>
<field name="sequence">5</field>
<field name="bom_id" ref="mrp_bom_manufacture"/>
</record>
<record id="mrp_bom_manufacture_line_5" model="mrp.bom.line">
<field name="product_id" ref="product.product_product_20"/>
<field name="product_qty">1</field>
<field name="product_uom" ref="product.product_uom_unit"/>
<field name="sequence">6</field>
<field name="bom_id" ref="mrp_bom_6"/>
<field name="sequence">5</field>
<field name="bom_id" ref="mrp_bom_manufacture"/>
</record>
<record id="mrp_bom_line_12" model="mrp.bom.line">
<field name="product_id" ref="product.product_product_17"/>
<field name="product_qty">1</field>
<field name="product_uom" ref="product.product_uom_unit"/>
<field name="sequence">8</field>
<field name="bom_id" ref="mrp_bom_6"/>
</record>
<record id="mrp_bom_7" model="mrp.bom">
<field name="product_tmpl_id" ref="product.product_product_16_product_template"/>
<field name="product_uom" ref="product.product_uom_unit"/>
<field name="sequence">10</field>
</record>
<record id="mrp_bom_line_13" model="mrp.bom.line">
<record id="mrp_bom_manufacture_line_6" model="mrp.bom.line">
<field name="product_id" ref="product.product_product_22"/>
<field name="product_qty">1</field>
<field name="product_uom" ref="product.product_uom_unit"/>
<field name="sequence">2</field>
<field name="bom_id" ref="mrp_bom_7"/>
<field name="sequence">5</field>
<field name="bom_id" ref="mrp_bom_manufacture"/>
</record>
<record id="mrp_bom_line_14" model="mrp.bom.line">
<field name="product_id" ref="product.product_product_21"/>
<field name="product_qty">1</field>
<field name="product_uom" ref="product.product_uom_unit"/>
<field name="sequence">4</field>
<field name="bom_id" ref="mrp_bom_7"/>
</record>
<record id="mrp_bom_line_15" model="mrp.bom.line">
<field name="product_id" ref="product.product_product_18"/>
<field name="product_qty">1</field>
<field name="product_uom" ref="product.product_uom_unit"/>
<field name="sequence">6</field>
<field name="bom_id" ref="mrp_bom_7"/>
</record>
<record id="mrp_bom_line_16" model="mrp.bom.line">
<record id="mrp_bom_manufacture_line_7" model="mrp.bom.line">
<field name="product_id" ref="product.product_product_24"/>
<field name="product_qty">1</field>
<field name="product_uom" ref="product.product_uom_unit"/>
<field name="sequence">10</field>
<field name="bom_id" ref="mrp_bom_7"/>
</record>
<record id="product.product_product_3_product_template" model="product.template">
<field name="route_ids" eval="[(6, 0, [ref('mrp.route_warehouse0_manufacture')])]"/>
</record>
<record id="mrp_bom_8" model="mrp.bom">
<field name="product_tmpl_id" ref="product.product_product_3_product_template"/>
<field name="product_uom" ref="product.product_uom_unit"/>
<field name="sequence">5</field>
</record>
<record id="mrp_bom_property_0" model="mrp.bom">
<field name="product_tmpl_id" ref="product.product_product_3_product_template"/>
<field name="product_uom" ref="product.product_uom_unit"/>
<field name="sequence">5</field>
<field name="property_ids" eval="[(6,0,[ref('mrp_property_0')])]"/>
</record>
<record id="mrp_bom_no_property_line" model="mrp.bom">
<field name="product_id" ref="product.product_product_14"/>
<field name="product_tmpl_id" ref="product.product_product_14_product_template"/>
<field name="product_uom" ref="product.product_uom_unit"/>
<field name="sequence">5</field>
<field name="code">default</field>
<field name="type">phantom</field>
</record>
<record id="mrp_bom_line_no_prop_1" model="mrp.bom.line">
<field name="product_id" ref="product.product_product_13"/>
<field name="product_qty">1</field>
<field name="product_uom" ref="product.product_uom_unit"/>
<field name="sequence">1</field>
<field name="bom_id" ref="mrp_bom_no_property_line"/>
</record>
<record id="mrp_bom_line_no_prop_2" model="mrp.bom.line">
<field name="product_id" ref="product.product_product_12"/>
<field name="product_qty">1</field>
<field name="product_uom" ref="product.product_uom_unit"/>
<field name="sequence">1</field>
<field name="bom_id" ref="mrp_bom_no_property_line"/>
</record>
<record id="mrp_bom_line_no_prop_3" model="mrp.bom.line">
<field name="product_id" ref="product.product_product_11"/>
<field name="product_qty">1</field>
<field name="product_uom" ref="product.product_uom_unit"/>
<field name="sequence">1</field>
<field name="bom_id" ref="mrp_bom_no_property_line"/>
</record>
<record id="mrp_bom_property_line" model="mrp.bom">
<field name="product_id" ref="product.product_product_14"/>
<field name="product_tmpl_id" ref="product.product_product_14_product_template"/>
<field name="product_uom" ref="product.product_uom_unit"/>
<field name="sequence">5</field>
<field name="type">phantom</field>
<field name="property_ids" eval="[(6,0,[ref('mrp_property_0')])]"/>
</record>
<record id="mrp_bom_line_17" model="mrp.bom.line">
<field name="product_id" ref="product.product_product_6"/>
<field name="product_qty">1</field>
<field name="product_uom" ref="product.product_uom_unit"/>
<field name="sequence">2</field>
<field name="bom_id" ref="mrp_bom_8"/>
</record>
<record id="mrp_bom_line_18" model="mrp.bom.line">
<field name="product_id" ref="product.product_product_16"/>
<field name="product_qty">1</field>
<field name="product_uom" ref="product.product_uom_unit"/>
<field name="sequence">4</field>
<field name="bom_id" ref="mrp_bom_8"/>
</record>
<record id="mrp_bom_line_19" model="mrp.bom.line">
<field name="product_id" ref="product.product_product_11"/>
<field name="product_qty">1</field>
<field name="product_uom" ref="product.product_uom_unit"/>
<field name="sequence">6</field>
<field name="bom_id" ref="mrp_bom_8"/>
</record>
<record id="mrp_bom_line_20" model="mrp.bom.line">
<field name="product_id" ref="product.product_product_8"/>
<field name="product_qty">1</field>
<field name="product_uom" ref="product.product_uom_unit"/>
<field name="sequence">8</field>
<field name="bom_id" ref="mrp_bom_8"/>
</record>
<record id="mrp_bom_line_21" model="mrp.bom.line">
<field name="product_id" ref="product.product_product_15"/>
<field name="product_qty">2</field>
<field name="product_uom" ref="product.product_uom_unit"/>
<field name="sequence">10</field>
<field name="bom_id" ref="mrp_bom_8"/>
</record>
<record id="mrp_bom_9" model="mrp.bom">
<field name="product_tmpl_id" ref="product.product_product_3_product_template"/>
<field name="product_uom" ref="product.product_uom_unit"/>
<field name="sequence">4</field>
<field name="routing_id" ref="mrp_routing_2"/>
<field name="type">phantom</field>
</record>
<record id="mrp_bom_line_22" model="mrp.bom.line">
<field name="product_id" ref="product.product_product_7"/>
<field name="product_qty">1</field>
<field name="product_uom" ref="product.product_uom_unit"/>
<field name="sequence">2</field>
<field name="bom_id" ref="mrp_bom_9"/>
</record>
<record id="mrp_bom_line_23" model="mrp.bom.line">
<field name="product_id" ref="product.product_product_16"/>
<field name="product_qty">1</field>
<field name="product_uom" ref="product.product_uom_unit"/>
<field name="sequence">4</field>
<field name="bom_id" ref="mrp_bom_9"/>
</record>
<record id="mrp_bom_line_24" model="mrp.bom.line">
<field name="product_id" ref="product.product_product_11"/>
<field name="product_qty">1</field>
<field name="product_uom" ref="product.product_uom_unit"/>
<field name="sequence">6</field>
<field name="bom_id" ref="mrp_bom_9"/>
</record>
<record id="mrp_bom_line_25" model="mrp.bom.line">
<field name="product_id" ref="product.product_product_8"/>
<field name="product_qty">1</field>
<field name="product_uom" ref="product.product_uom_unit"/>
<field name="sequence">8</field>
<field name="bom_id" ref="mrp_bom_9"/>
</record>
<record id="mrp_bom_line_26" model="mrp.bom.line">
<field name="product_id" ref="product.product_product_13"/>
<field name="product_qty">1</field>
<field name="product_uom" ref="product.product_uom_unit"/>
<field name="sequence">10</field>
<field name="bom_id" ref="mrp_bom_9"/>
<field name="bom_id" ref="mrp_bom_manufacture"/>
</record>
<record id="product.product_product_5_product_template" model="product.template">
<field name="route_ids" eval="[(6, 0, [ref('mrp.route_warehouse0_manufacture')])]"/>
<field name="route_ids" eval="[(6, 0, [ref('stock.route_warehouse0_mto'), ref('mrp.route_warehouse0_manufacture')])]"/>
</record>
<record id="mrp_bom_10" model="mrp.bom">
<record id="mrp_bom_kit" model="mrp.bom">
<field name="product_tmpl_id" ref="product.product_product_5_product_template"/>
<field name="product_uom" ref="product.product_uom_unit"/>
<field name="sequence">5</field>
<field name="sequence">15</field>
<field name="routing_id" ref="mrp_routing_2"/>
<field name="type">phantom</field>
</record>
<record id="mrp_bom_line_27" model="mrp.bom.line">
<field name="product_id" ref="product.product_product_6"/>
<field name="product_qty">1</field>
<field name="product_uom" ref="product.product_uom_unit"/>
<field name="sequence">2</field>
<field name="bom_id" ref="mrp_bom_10"/>
</record>
<record id="mrp_bom_line_28" model="mrp.bom.line">
<field name="product_id" ref="product.product_product_16"/>
<field name="product_qty">1</field>
<field name="product_uom" ref="product.product_uom_unit"/>
<field name="sequence">4</field>
<field name="bom_id" ref="mrp_bom_10"/>
</record>
<record id="mrp_bom_line_29" model="mrp.bom.line">
<field name="product_id" ref="product.product_product_13"/>
<field name="product_qty">1</field>
<field name="product_uom" ref="product.product_uom_unit"/>
<field name="sequence">6</field>
<field name="bom_id" ref="mrp_bom_10"/>
</record>
<record id="mrp_bom_line_30" model="mrp.bom.line">
<field name="product_id" ref="product.product_product_11"/>
<field name="product_qty">1</field>
<field name="product_uom" ref="product.product_uom_unit"/>
<field name="sequence">8</field>
<field name="bom_id" ref="mrp_bom_10"/>
</record>
<record id="mrp_bom_line_31" model="mrp.bom.line">
<field name="product_id" ref="product.product_product_8"/>
<field name="product_qty">1</field>
<field name="product_uom" ref="product.product_uom_unit"/>
<field name="sequence">10</field>
<field name="bom_id" ref="mrp_bom_10"/>
</record>
<record id="product.product_product_4_product_template" model="product.template">
<field name="route_ids" eval="[(6, 0, [ref('mrp.route_warehouse0_manufacture')])]"/>
</record>
<record id="mrp_bom_11" model="mrp.bom">
<field name="product_tmpl_id" ref="product.product_product_4_product_template"/>
<field name="product_uom" ref="product.product_uom_unit"/>
<field name="sequence">1</field>
</record>
<record id="mrp_bom_line_32" model="mrp.bom.line">
<field name="product_id" ref="product.product_product_14"/>
<field name="product_qty">1</field>
<field name="product_uom" ref="product.product_uom_unit"/>
<field name="sequence">1</field>
<field name="attribute_value_ids" eval="[(6,0,[ref('product.product_attribute_value_1')])]"/>
<field name="bom_id" ref="mrp_bom_11"/>
</record>
<record id="mrp_bom_line_33" model="mrp.bom.line">
<field name="product_id" ref="product.product_product_15"/>
<field name="product_qty">1</field>
<field name="product_uom" ref="product.product_uom_unit"/>
<field name="sequence">2</field>
<field name="attribute_value_ids" eval="[(6,0,[ref('product.product_attribute_value_2')])]"/>
<field name="bom_id" ref="mrp_bom_11"/>
</record>
<record id="mrp_bom_line_34" model="mrp.bom.line">
<field name="product_id" ref="product.product_product_23"/>
<field name="product_qty">1</field>
<field name="product_uom" ref="product.product_uom_unit"/>
<field name="sequence">3</field>
<field name="bom_id" ref="mrp_bom_11"/>
</record>
<record id="mrp_bom_line_prop_1" model="mrp.bom.line">
<field name="product_id" ref="product.product_product_13"/>
<field name="product_qty">1</field>
<field name="product_uom" ref="product.product_uom_unit"/>
<field name="sequence">1</field>
<field name="property_ids" eval="[(6,0,[ref('mrp_property_8')])]"/>
<field name="bom_id" ref="mrp_bom_property_line"/>
</record>
<record id="mrp_bom_line_prop_2" model="mrp.bom.line">
<record id="mrp_bom_kit_line_1" model="mrp.bom.line">
<field name="product_id" ref="product.product_product_12"/>
<field name="product_qty">1</field>
<field name="product_uom" ref="product.product_uom_unit"/>
<field name="sequence">1</field>
<field name="property_ids" eval="[(6,0,[ref('mrp_property_0')])]"/>
<field name="bom_id" ref="mrp_bom_property_line"/>
<field name="sequence">5</field>
<field name="bom_id" ref="mrp_bom_kit"/>
</record>
<record id="mrp_bom_line_prop_3" model="mrp.bom.line">
<field name="product_id" ref="product.product_product_11"/>
<record id="mrp_bom_kit_line_2" model="mrp.bom.line">
<field name="product_id" ref="product.product_product_13"/>
<field name="product_qty">1</field>
<field name="product_uom" ref="product.product_uom_unit"/>
<field name="sequence">1</field>
<field name="bom_id" ref="mrp_bom_property_line"/>
<field name="sequence">5</field>
<field name="bom_id" ref="mrp_bom_kit"/>
</record>
<record id="mrp_bom_kit_line_3" model="mrp.bom.line">
<field name="product_id" ref="product.product_product_16"/>
<field name="product_qty">1</field>
<field name="product_uom" ref="product.product_uom_unit"/>
<field name="sequence">5</field>
<field name="bom_id" ref="mrp_bom_kit"/>
</record>
<record id="mrp_production_1" model="mrp.production">
<field name="product_id" ref="product.product_product_3"/>
<field name="product_uom" ref="product.product_uom_unit"/>
<field name="product_qty">3</field>
<field name="location_src_id" ref="stock.stock_location_stock"/>
<field name="location_dest_id" ref="stock.stock_location_output"/>
<field name="bom_id" ref="mrp_bom_8"/>
<field name="routing_id" ref="mrp.mrp_routing_2"/>
</record>
<record id="mrp_bom_kit_line_4" model="mrp.bom.line">
<field name="product_id" ref="product.product_product_17"/>
<field name="product_qty">1</field>
<field name="product_uom" ref="product.product_uom_unit"/>
<field name="sequence">5</field>
<field name="bom_id" ref="mrp_bom_kit"/>
</record>
<record id="mrp_production_2" model="mrp.production">
<field name="product_id" ref="product.product_product_27"/>
<field name="product_uom" ref="product.product_uom_unit"/>
<field name="location_src_id" ref="stock.stock_location_stock"/>
<field name="location_dest_id" ref="stock.stock_location_output"/>
<field name="bom_id" ref="mrp.mrp_bom_4"/>
<field name="routing_id" ref="mrp.mrp_routing_1"/>
</record>
<workflow action="button_confirm" model="mrp.production" ref="mrp_production_1"/>
<record id="mrp_bom_kit_line_5" model="mrp.bom.line">
<field name="product_id" ref="product.product_product_20"/>
<field name="product_qty">1</field>
<field name="product_uom" ref="product.product_uom_unit"/>
<field name="sequence">5</field>
<field name="bom_id" ref="mrp_bom_kit"/>
</record>
<!-- Run Scheduler -->
<function model="procurement.order" name="run_scheduler"/>
<record id="mrp_bom_kit_line_6" model="mrp.bom.line">
<field name="product_id" ref="product.product_product_22"/>
<field name="product_qty">1</field>
<field name="product_uom" ref="product.product_uom_unit"/>
<field name="sequence">5</field>
<field name="bom_id" ref="mrp_bom_kit"/>
</record>
<record id="mrp_bom_kit_line_7" model="mrp.bom.line">
<field name="product_id" ref="product.product_product_24"/>
<field name="product_qty">1</field>
<field name="product_uom" ref="product.product_uom_unit"/>
<field name="sequence">5</field>
<field name="bom_id" ref="mrp_bom_kit"/>
</record>
<record id="mrp_production_1" model="mrp.production">
<field name="product_id" ref="product.product_product_3"/>
<field name="product_uom" ref="product.product_uom_unit"/>
<field name="product_qty">3</field>
<field name="location_src_id" ref="stock.stock_location_stock"/>
<field name="location_dest_id" ref="stock.stock_location_output"/>
<field name="bom_id" ref="mrp_bom_manufacture"/>
<field name="routing_id" ref="mrp.mrp_routing_2"/>
</record>
<record id="mrp_production_2" model="mrp.production">
<field name="product_id" ref="product.product_product_5"/>
<field name="product_uom" ref="product.product_uom_unit"/>
<field name="location_src_id" ref="stock.stock_location_stock"/>
<field name="location_dest_id" ref="stock.stock_location_output"/>
<field name="bom_id" ref="mrp.mrp_bom_kit"/>
<field name="routing_id" ref="mrp.mrp_routing_1"/>
</record>
<workflow action="button_confirm" model="mrp.production" ref="mrp_production_1"/>
<!-- Run Scheduler -->
<function model="procurement.order" name="run_scheduler"/>
</data>
</openerp>
@@ -12,13 +12,14 @@
- product_id: product.product_product_2
product_uom: product.product_uom_unit
product_qty: 1.0
- product_id: product.product_product_44
- product_id: product.consu_delivery_01
product_uom: product.product_uom_unit
product_qty: 1.0
-
I make the production order using BoM having one service type product and one consumable product.
-
!record {model: mrp.production, id: mrp_production_servicetype_mo1}:
name: 'MO-Test'
product_id: product.product_product_3
product_qty: 1.0
bom_id: mrp_bom_test1
+2 -2
View File
@@ -4,14 +4,14 @@
!context
uid: 'res_users_mrp_user'
-
I create Production Order of PC Assemble SC349 to produce 5.0 Unit.
I create Production Order of Computer SC234 to produce 5.0 Unit.
-
!record {model: mrp.production, id: mrp_production_test1}:
product_id: product.product_product_3
product_qty: 5.0
location_src_id: stock.stock_location_14
location_dest_id: stock.stock_location_output
bom_id: mrp_bom_9
bom_id: mrp_bom_kit
routing_id: mrp.mrp_routing_1
+1 -1
View File
@@ -14,7 +14,7 @@
-
!python {model: mrp.production}: |
order = self.browse(cr, uid, ref("mrp_production_test1"), context=context)
assert len(order.product_lines) == 5, "Production lines are not generated proper."
assert len(order.product_lines) == 7, "Production lines are not generated proper."
-
Now I check workcenter lines.
-
+7 -7
View File
@@ -4,11 +4,11 @@
-
I add a sub product in Bill of material for product External Hard Disk.
-
!record {model: mrp.bom, id: mrp.mrp_bom_9}:
product_id: product.product_product_28
!record {model: mrp.bom, id: mrp.mrp_bom_kit}:
product_id: product.product_delivery_02
product_uom: product.product_uom_unit
sub_products:
- product_id: product.product_product_33
- product_id: product.product_delivery_01
product_uom: product.product_uom_unit
product_qty: 2.0
subproduct_type: fixed
@@ -16,10 +16,10 @@
I create a production order for External Hard Disk.
-
!record {model: mrp.production, id: mrp_production_mo0}:
product_id: product.product_product_28
product_id: product.product_delivery_02
product_qty: 2.0
product_uom: product.product_uom_unit
bom_id: mrp.mrp_bom_9
bom_id: mrp.mrp_bom_kit
location_src_id: stock.stock_location_stock
-
I compute the data of production order.
@@ -40,7 +40,7 @@
This move is created automatically when I confirmed the production order.
-
!python {model: stock.move}: |
move_ids = self.search(cr, uid, [('product_id','=',ref('product.product_product_33'))])
move_ids = self.search(cr, uid, [('product_id','=',ref('product.product_delivery_01'))])
assert move_ids, 'No moves are created !'
-
I want to start the production so I force the reservation of products.
@@ -74,6 +74,6 @@
-
!python {model: stock.move}: |
production_order = self.pool.get('mrp.production').browse(cr, uid, ref("mrp_production_mo0"))
move_ids = self.search(cr, uid, [('origin','=',production_order.name), ('product_id','in',[ref("product.product_product_28"),ref("product.product_product_33")])])
move_ids = self.search(cr, uid, [('origin','=',production_order.name), ('product_id','in',[ref("product.product_delivery_02"),ref("product.product_delivery_01")])])
moves = self.browse(cr, uid, move_ids)
assert all(move.state == 'done' for move in moves), 'Moves are not done!'
+8 -13
View File
@@ -1,7 +1,7 @@
-
!record {model: mrp.production, id: mrp_production_op}:
location_src_id: stock.stock_location_stock
product_id: product.product_product_5
product_id: product.product_product_3
product_qty: 5.0
allow_reorder: True
-
@@ -10,15 +10,10 @@
product_id: product.product_product_5
product_qty: 2.0
-
!function {model: mrp.production, name: action_compute, id: mrp_production_op1}:
- model: mrp.production
eval: "[obj(ref('mrp_production_op1')).id]"
-
!workflow {model: mrp.production, action: button_confirm, ref: mrp_production_op1}
-
!record {model: mrp.production, id: mrp_production_mo1}:
location_src_id: stock.stock_location_stock
product_id: product.product_product_16
product_qty: 5.0
-
!workflow {model: mrp.production, action: button_confirm, ref: mrp_production_mo1}
!python {model: mrp.production}: |
# test compute, then confirm
self.action_compute(cr, uid, ref('mrp_production_op1'), properties=[self.pool['ir.model.data'].xmlid_to_res_id(cr, uid, 'mrp.mrp_property_4')], context=context)
self.action_confirm(cr, uid, ref('mrp_production_op1'), context=context)
self.action_compute(cr, uid, ref('mrp_production_op'), properties=[self.pool['ir.model.data'].xmlid_to_res_id(cr, uid, 'mrp.mrp_property_4')], context=context)
self.action_confirm(cr, uid, ref('mrp_production_op'), context=context)
+10 -39
View File
@@ -553,53 +553,24 @@
<record id="product.product_product_11" model="product.product"> <field name="available_in_pos" eval="False"/> </record>
<record id="product.product_product_12" model="product.product"> <field name="available_in_pos" eval="False"/> </record>
<record id="product.product_product_13" model="product.product"> <field name="available_in_pos" eval="False"/> </record>
<record id="product.product_product_14" model="product.product"> <field name="available_in_pos" eval="False"/> </record>
<record id="product.product_product_15" model="product.product"> <field name="available_in_pos" eval="False"/> </record>
<record id="product.product_product_16" model="product.product"> <field name="available_in_pos" eval="False"/> </record>
<record id="product.product_product_17" model="product.product"> <field name="available_in_pos" eval="False"/> </record>
<record id="product.product_product_18" model="product.product"> <field name="available_in_pos" eval="False"/> </record>
<record id="product.product_product_19" model="product.product"> <field name="available_in_pos" eval="False"/> </record>
<record id="product.product_product_20" model="product.product"> <field name="available_in_pos" eval="False"/> </record>
<record id="product.product_product_21" model="product.product"> <field name="available_in_pos" eval="False"/> </record>
<record id="product.product_product_22" model="product.product"> <field name="available_in_pos" eval="False"/> </record>
<record id="product.product_product_23" model="product.product"> <field name="available_in_pos" eval="False"/> </record>
<record id="product.product_product_24" model="product.product"> <field name="available_in_pos" eval="False"/> </record>
<record id="product.product_product_25" model="product.product"> <field name="available_in_pos" eval="False"/> </record>
<record id="product.product_product_26" model="product.product"> <field name="available_in_pos" eval="False"/> </record>
<record id="product.product_product_27" model="product.product"> <field name="available_in_pos" eval="False"/> </record>
<record id="product.product_product_28" model="product.product"> <field name="available_in_pos" eval="False"/> </record>
<record id="product.product_product_29" model="product.product"> <field name="available_in_pos" eval="False"/> </record>
<record id="product.product_product_30" model="product.product"> <field name="available_in_pos" eval="False"/> </record>
<record id="product.product_product_31" model="product.product"> <field name="available_in_pos" eval="False"/> </record>
<record id="product.product_product_32" model="product.product"> <field name="available_in_pos" eval="False"/> </record>
<record id="product.product_product_33" model="product.product"> <field name="available_in_pos" eval="False"/> </record>
<record id="product.product_product_34" model="product.product"> <field name="available_in_pos" eval="False"/> </record>
<record id="product.product_product_35" model="product.product"> <field name="available_in_pos" eval="False"/> </record>
<record id="product.product_product_36" model="product.product"> <field name="available_in_pos" eval="False"/> </record>
<record id="product.product_product_37" model="product.product"> <field name="available_in_pos" eval="False"/> </record>
<record id="product.product_product_38" model="product.product"> <field name="available_in_pos" eval="False"/> </record>
<record id="product.product_product_39" model="product.product"> <field name="available_in_pos" eval="False"/> </record>
<record id="product.product_product_40" model="product.product"> <field name="available_in_pos" eval="False"/> </record>
<record id="product.product_product_41" model="product.product"> <field name="available_in_pos" eval="False"/> </record>
<record id="product.product_product_42" model="product.product"> <field name="available_in_pos" eval="False"/> </record>
<record id="product.product_product_43" model="product.product"> <field name="available_in_pos" eval="False"/> </record>
<record id="product.product_product_44" model="product.product"> <field name="available_in_pos" eval="False"/> </record>
<record id="product.product_product_45" model="product.product"> <field name="available_in_pos" eval="False"/> </record>
<record id="product.product_product_46" model="product.product"> <field name="available_in_pos" eval="False"/> </record>
<record id="product.product_product_47" model="product.product"> <field name="available_in_pos" eval="False"/> </record>
<record id="product.product_product_48" model="product.product"> <field name="available_in_pos" eval="False"/> </record>
<record id="product.product_product_49" model="product.product"> <field name="available_in_pos" eval="False"/> </record>
<record id="product.product_product_50" model="product.product"> <field name="available_in_pos" eval="False"/> </record>
<record id="product.product_product_51" model="product.product"> <field name="available_in_pos" eval="False"/> </record>
<record id="product.product_product_52" model="product.product"> <field name="available_in_pos" eval="False"/> </record>
<record id="product.product_product_53" model="product.product"> <field name="available_in_pos" eval="False"/> </record>
<record id="product.product_product_54" model="product.product"> <field name="available_in_pos" eval="False"/> </record>
<record id="product.product_product_55" model="product.product"> <field name="available_in_pos" eval="False"/> </record>
<record id="product.product_product_56" model="product.product"> <field name="available_in_pos" eval="False"/> </record>
<record id="product.product_product_57" model="product.product"> <field name="available_in_pos" eval="False"/> </record>
<record id="product.product_product_58" model="product.product"> <field name="available_in_pos" eval="False"/> </record>
<record id="product.product_product_59" model="product.product"> <field name="available_in_pos" eval="False"/> </record>
<record id="product.product_delivery_02" model="product.product"> <field name="available_in_pos" eval="False"/> </record>
<record id="product.product_delivery_01" model="product.product"> <field name="available_in_pos" eval="False"/> </record>
<record id="product.product_order_01" model="product.product"> <field name="available_in_pos" eval="False"/> </record>
<record id="product.service_delivery" model="product.product"> <field name="available_in_pos" eval="False"/> </record>
<record id="product.consu_delivery_03" model="product.product"> <field name="available_in_pos" eval="False"/> </record>
<record id="product.consu_delivery_02" model="product.product"> <field name="available_in_pos" eval="False"/> </record>
<record id="product.consu_delivery_01" model="product.product"> <field name="available_in_pos" eval="False"/> </record>
<record id="sale.advance_product_0" model="product.product"> <field name="available_in_pos" eval="False"/> </record>
<record id="product.membership_0" model="product.product"> <field name="available_in_pos" eval="False"/> </record>
<record id="product.membership_1" model="product.product"> <field name="available_in_pos" eval="False"/> </record>
<record id="product.membership_2" model="product.product"> <field name="available_in_pos" eval="False"/> </record>
+1 -1
View File
@@ -4,7 +4,7 @@
!record {model: procurement.order, id: procurement_order0}:
company_id: base.main_company
name: Procurement Test
product_id: product.product_product_32
product_id: product.product_delivery_01
product_qty: 15.0
product_uom: product.product_uom_unit
-
File diff suppressed because it is too large Load Diff
File diff suppressed because one or more lines are too long
+2 -2
View File
@@ -20,13 +20,13 @@
- name: 1 surchange on Laptop
applied_on : '1_product'
sequence: 1
product_id: product_product_25
product_id: product_delivery_01
compute_price: 'formula'
base: 'list_price'
price_surcharge: 1
- name: 5% Discount on all Computer related products
applied_on : '2_product_category'
sequence: 1
sequence: 4
min_quantity: 2
compute_price: 'formula'
base: 'list_price'

Before

Width:  |  Height:  |  Size: 3.7 KiB

After

Width:  |  Height:  |  Size: 3.7 KiB

Before

Width:  |  Height:  |  Size: 3.1 KiB

After

Width:  |  Height:  |  Size: 3.1 KiB

Before

Width:  |  Height:  |  Size: 3.6 KiB

After

Width:  |  Height:  |  Size: 3.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 12 KiB

+2 -2
View File
@@ -13,7 +13,7 @@
-
!python {model: product.product}: |
from openerp.tools import float_compare
product = self.browse(cr, uid, ref("product_product_25"), context=context)
product = self.browse(cr, uid, ref("product_delivery_01"), context=context)
assert float_compare(product.price, product.lst_price + 1, precision_digits=2) == 0, "Wrong sale price: Laptop."
-
I check sale price of IT component.
@@ -28,7 +28,7 @@
!python {model: product.product}: |
from openerp.tools import float_compare
context.update({'quantity':5})
product = self.browse(cr, uid, ref("product_product_26"), context=context)
product = self.browse(cr, uid, ref("product_product_25"), context=context)
assert float_compare(product.price, product.lst_price-product.lst_price*(0.05), precision_digits=2) == 0, "Wrong sale price: IT component if more than 3 Unit."
-
I check sale price of LCD Monitor.
+2 -2
View File
@@ -11,8 +11,8 @@ class TestPricelist(TransactionCase):
self.product_pricelist = self.registry('product.pricelist')
self.uom = self.registry('product.uom')
self.usb_adapter_id = self.ir_model_data.get_object_reference(cr, uid, 'product', 'product_product_48')[1]
self.datacard_id = self.ir_model_data.get_object_reference(cr, uid, 'product', 'product_product_46')[1]
self.usb_adapter_id = self.ir_model_data.get_object_reference(cr, uid, 'product', 'product_delivery_01')[1]
self.datacard_id = self.ir_model_data.get_object_reference(cr, uid, 'product', 'product_delivery_02')[1]
self.unit_id = self.ir_model_data.get_object_reference(cr, uid, 'product', 'product_uom_unit')[1]
self.dozen_id = self.ir_model_data.get_object_reference(cr, uid, 'product', 'product_uom_dozen')[1]
self.tonne_id = self.ir_model_data.xmlid_to_res_id(cr, uid, 'product.product_uom_ton')
+2 -14
View File
@@ -10,23 +10,11 @@
<field eval="1.0" name="po_lead"/>
</record>
<record id="product.product_product_48" model="product.product">
<record id="product.product_delivery_01" model="product.product">
<field name="route_ids" eval="[(4,ref('route_warehouse0_buy'))]"></field>
</record>
<record id="product.product_product_36" model="product.product">
<field name="route_ids" eval="[(4,ref('route_warehouse0_buy'))]"></field>
</record>
<record id="product.product_product_28" model="product.product">
<field name="route_ids" eval="[(4,ref('route_warehouse0_buy'))]"></field>
</record>
<record id="product.product_product_46" model="product.product">
<field name="route_ids" eval="[(4,ref('route_warehouse0_buy'))]"></field>
</record>
<record id="product.product_product_23" model="product.product">
<record id="product.product_delivery_02" model="product.product">
<field name="route_ids" eval="[(4,ref('route_warehouse0_buy'))]"></field>
</record>
+8 -8
View File
@@ -6,7 +6,7 @@
-
!record {model: purchase.order.line, id: purchase_order_line_1}:
order_id: purchase.purchase_order_1
product_id: product.product_product_15
product_id: product.product_delivery_01
name: RAM SR3
price_unit: 79.80
product_qty: 15.0
@@ -36,13 +36,13 @@
!record {model: purchase.order, id: purchase_order_2}:
partner_id: base.res_partner_3
order_line:
- product_id: product.product_product_31
- product_id: product.product_delivery_02
name: Multimedia Speakers
price_unit: 132.50
product_qty: 20.0
product_uom: product.product_uom_unit
date_planned: !eval time.strftime('%Y-%m-%d')
- product_id: product.product_product_29
- product_id: product.product_delivery_01
name: Pen drive, SP-2
price_unit: 89
product_qty: 5
@@ -64,7 +64,7 @@
!record {model: purchase.order, id: purchase_order_4}:
partner_id: base.res_partner_4
order_line:
- product_id: product.product_product_14
- product_id: product.product_delivery_02
name: RAM SR2 (kit)
price_unit: 85.50
product_qty: 6.0
@@ -104,19 +104,19 @@
!record {model: purchase.order, id: purchase_order_6}:
partner_id: base.res_partner_1
order_line:
- product_id: product.product_product_38
- product_id: product.product_delivery_02
name: Ink Cartridge
price_unit: 58
product_qty: 9
product_uom: product.product_uom_unit
date_planned: !eval time.strftime('%Y-%m-%d')
- product_id: product.product_product_39
- product_id: product.product_delivery_01
name: Toner Cartridge
product_qty: 3
price_unit: 65
product_uom: product.product_uom_unit
date_planned: !eval time.strftime('%Y-%m-%d')
- product_id: product.product_product_44
- product_id: product.consu_delivery_01
name: GrapWorks Software
product_qty: 4
price_unit: 154.5
@@ -133,7 +133,7 @@
price_unit: 13.5
product_uom: product.product_uom_unit
date_planned: !eval time.strftime('%Y-%m-%d')
- product_id: product.product_product_34
- product_id: product.product_delivery_02
name: Webcam
product_qty: 15
price_unit: 38.0
+10 -28
View File
@@ -32,7 +32,7 @@
<record id="sale_order_line_2" model="sale.order.line">
<field name="order_id" ref="sale_order_1"/>
<field name="name">Pen drive, 16GB</field>
<field name="product_id" ref="product.product_product_30"/>
<field name="product_id" ref="product.product_delivery_02"/>
<field name="product_uom_qty">5</field>
<field name="product_uom" ref="product.product_uom_unit"/>
<field name="price_unit">145.00</field>
@@ -41,7 +41,7 @@
<record id="sale_order_line_3" model="sale.order.line">
<field name="order_id" ref="sale_order_1"/>
<field name="name">Headset USB</field>
<field name="product_id" ref="product.product_product_33"/>
<field name="product_id" ref="product.product_delivery_01"/>
<field name="product_uom_qty">2</field>
<field name="product_uom" ref="product.product_uom_unit"/>
<field name="price_unit">65.00</field>
@@ -96,7 +96,7 @@
<record id="sale_order_line_7" model="sale.order.line">
<field name="order_id" ref="sale_order_3"/>
<field name="name">Toner Cartridge</field>
<field name="product_id" ref="product.product_product_39"/>
<field name="product_id" ref="product.product_delivery_01"/>
<field name="product_uom_qty">1</field>
<field name="product_uom" ref="product.product_uom_unit"/>
<field name="price_unit">70.00</field>
@@ -123,7 +123,7 @@
<record id="sale_order_line_9" model="sale.order.line">
<field name="order_id" ref="sale_order_4"/>
<field name="name">Webcam</field>
<field name="product_id" ref="product.product_product_34"/>
<field name="product_id" ref="product.product_delivery_02"/>
<field name="product_uom_qty">10</field>
<field name="product_uom" ref="product.product_uom_unit"/>
<field name="price_unit">45.00</field>
@@ -132,7 +132,7 @@
<record id="sale_order_line_10" model="sale.order.line">
<field name="order_id" ref="sale_order_4"/>
<field name="name">Multimedia Speakers</field>
<field name="product_id" ref="product.product_product_31"/>
<field name="product_id" ref="product.consu_delivery_02"/>
<field name="product_uom_qty">3</field>
<field name="product_uom" ref="product.product_uom_unit"/>
<field name="price_unit">150.00</field>
@@ -141,7 +141,7 @@
<record id="sale_order_line_11" model="sale.order.line">
<field name="order_id" ref="sale_order_4"/>
<field name="name">Switch, 24 ports</field>
<field name="product_id" ref="product.product_product_47"/>
<field name="product_id" ref="product.product_delivery_01"/>
<field name="product_uom_qty">2</field>
<field name="product_uom" ref="product.product_uom_unit"/>
<field name="price_unit">70.00</field>
@@ -160,30 +160,12 @@
<record id="sale_order_line_12" model="sale.order.line">
<field name="order_id" ref="sale_order_5"/>
<field name="name">External Hard disk</field>
<field name="product_id" ref="product.product_product_28"/>
<field name="product_id" ref="product.product_delivery_02"/>
<field name="product_uom_qty">1</field>
<field name="product_uom" ref="product.product_uom_unit"/>
<field name="price_unit">405.00</field>
</record>
<record id="sale_order_line_13" model="sale.order.line">
<field name="order_id" ref="sale_order_5"/>
<field name="name">Blank DVD-RW</field>
<field name="product_id" ref="product.product_product_36"/>
<field name="product_uom_qty">3</field>
<field name="product_uom" ref="product.product_uom_dozen"/>
<field name="price_unit">24.00</field>
</record>
<record id="sale_order_line_14" model="sale.order.line">
<field name="order_id" ref="sale_order_5"/>
<field name="name">Printer, All-in-one</field>
<field name="product_id" ref="product.product_product_37"/>
<field name="product_uom_qty">1</field>
<field name="product_uom" ref="product.product_uom_unit"/>
<field name="price_unit">4410.00</field>
</record>
<record id="sale_order_6" model="sale.order">
<field name="partner_id" ref="base.res_partner_18"/>
<field name="partner_invoice_id" ref="base.res_partner_18"/>
@@ -225,7 +207,7 @@
<record id="sale_order_line_17" model="sale.order.line">
<field name="order_id" ref="sale_order_7"/>
<field name="name">GrapWorks Software</field>
<field name="product_id" ref="product.product_product_44"/>
<field name="product_id" ref="product.consu_delivery_01"/>
<field name="product_uom_qty">1</field>
<field name="product_uom" ref="product.product_uom_unit"/>
<field name="price_unit">173.00</field>
@@ -234,7 +216,7 @@
<record id="sale_order_line_18" model="sale.order.line">
<field name="order_id" ref="sale_order_7"/>
<field name="name">Datacard</field>
<field name="product_id" ref="product.product_product_46"/>
<field name="product_id" ref="product.product_delivery_02"/>
<field name="product_uom_qty">1</field>
<field name="product_uom" ref="product.product_uom_unit"/>
<field name="price_unit">40.00</field>
@@ -243,7 +225,7 @@
<record id="sale_order_line_19" model="sale.order.line">
<field name="order_id" ref="sale_order_7"/>
<field name="name">USB Adapter</field>
<field name="product_id" ref="product.product_product_48"/>
<field name="product_id" ref="product.product_delivery_01"/>
<field name="product_uom_qty">1</field>
<field name="product_uom" ref="product.product_uom_unit"/>
<field name="price_unit">18.00</field>
+8 -8
View File
@@ -32,8 +32,8 @@
self._update(cr, uid, 'account.invoice', 'sale', vals, 'test_crm_sale_invoice_2')
if account_sale_id:
vals = {
'name': 'Basic computer with Dvorak keyboard and left-handed mouse',
'product_id': ref('product.product_product_57'),
'name': '',
'product_id': ref('product.consu_delivery_03'),
'invoice_id': ref('test_crm_sale_invoice_1'),
'price_unit': 250,
'quantity': 1,
@@ -41,8 +41,8 @@
}
self._update(cr, uid, 'account.invoice.line', 'sale', vals, 'test_crm_sale_invoice_1_line_1')
vals = {
'name': 'Little server with raid 1 and 512ECC ram',
'product_id': ref('product.product_product_58'),
'name': '',
'product_id': ref('product.consu_delivery_02'),
'invoice_id': ref('test_crm_sale_invoice_1'),
'price_unit': 800,
'quantity': 2,
@@ -50,8 +50,8 @@
}
self._update(cr, uid, 'account.invoice.line', 'sale', vals, 'test_crm_sale_invoice_1_line_2')
vals = {
'name': 'Server with raid 10 and 2048ECC ram',
'product_id': ref('product.product_product_59'),
'name': '',
'product_id': ref('product.consu_delivery_01'),
'invoice_id': ref('test_crm_sale_invoice_1'),
'price_unit': 4800,
'quantity': 4,
@@ -59,8 +59,8 @@
}
self._update(cr, uid, 'account.invoice.line', 'sale', vals, 'test_crm_sale_invoice_1_line_3')
vals = {
'name': 'Basic formation with Dvorak',
'product_id': ref('product.product_product_53'),
'name': '',
'product_id': ref('product.consu_delivery_01'),
'invoice_id': ref('test_crm_sale_invoice_2'),
'price_unit': 500,
'quantity': 1,
+12 -128
View File
@@ -1,131 +1,43 @@
<?xml version="1.0" encoding="utf-8"?>
<openerp>
<data noupdate="1">
<record id="product.product_product_59" model="product.product">
<record id="product.consu_delivery_01" model="product.product">
<field name="invoice_policy">delivery</field>
</record>
<record id="product.product_product_58" model="product.product">
<record id="product.consu_delivery_02" model="product.product">
<field name="invoice_policy">delivery</field>
</record>
<record id="product.product_product_57" model="product.product">
<record id="product.consu_delivery_03" model="product.product">
<field name="invoice_policy">delivery</field>
</record>
<record id="product.product_product_56" model="product.product">
<record id="product.service_delivery" model="product.product">
<field name="invoice_policy">delivery</field>
</record>
<record id="product.product_product_55" model="product.product">
<record id="product.product_delivery_01" model="product.product">
<field name="invoice_policy">delivery</field>
</record>
<record id="product.product_product_54" model="product.product">
<record id="product.product_delivery_02" model="product.product">
<field name="invoice_policy">delivery</field>
</record>
<record id="product.product_product_53" model="product.product">
<field name="invoice_policy">delivery</field>
</record>
<record id="product.product_product_52" model="product.product">
<field name="invoice_policy">delivery</field>
</record>
<record id="product.product_product_51" model="product.product">
<field name="invoice_policy">delivery</field>
</record>
<record id="product.product_product_50" model="product.product">
<field name="invoice_policy">delivery</field>
</record>
<record id="product.product_product_49" model="product.product">
<field name="invoice_policy">delivery</field>
</record>
<record id="product.product_product_48" model="product.product">
<field name="invoice_policy">delivery</field>
</record>
<record id="product.product_product_47" model="product.product">
<field name="invoice_policy">delivery</field>
</record>
<record id="product.product_product_46" model="product.product">
<field name="invoice_policy">delivery</field>
</record>
<record id="product.product_product_45" model="product.product">
<field name="invoice_policy">delivery</field>
</record>
<record id="product.product_product_44" model="product.product">
<field name="invoice_policy">delivery</field>
</record>
<record id="product.product_product_43" model="product.product">
<record id="product.product_order_01" model="product.product">
<field name="invoice_policy">order</field>
</record>
<record id="product.product_product_42" model="product.product">
<record id="product.product_delivery_02" model="product.product">
<field name="invoice_policy">delivery</field>
</record>
<record id="product.product_product_41" model="product.product">
<record id="product.product_delivery_01" model="product.product">
<field name="invoice_policy">delivery</field>
</record>
<record id="product.product_product_40" model="product.product">
<field name="invoice_policy">delivery</field>
</record>
<record id="product.product_product_39" model="product.product">
<field name="invoice_policy">delivery</field>
</record>
<record id="product.product_product_38" model="product.product">
<field name="invoice_policy">delivery</field>
</record>
<record id="product.product_product_37" model="product.product">
<field name="invoice_policy">delivery</field>
</record>
<record id="product.product_product_36" model="product.product">
<field name="invoice_policy">delivery</field>
</record>
<record id="product.product_product_35" model="product.product">
<field name="invoice_policy">delivery</field>
</record>
<record id="product.product_product_34" model="product.product">
<field name="invoice_policy">delivery</field>
</record>
<record id="product.product_product_33" model="product.product">
<field name="invoice_policy">delivery</field>
</record>
<record id="product.product_product_32" model="product.product">
<field name="invoice_policy">delivery</field>
</record>
<record id="product.product_product_31" model="product.product">
<field name="invoice_policy">delivery</field>
</record>
<record id="product.product_product_30" model="product.product">
<field name="invoice_policy">delivery</field>
</record>
<record id="product.product_product_29" model="product.product">
<field name="invoice_policy">delivery</field>
</record>
<record id="product.product_product_28" model="product.product">
<record id="product.product_delivery_02" model="product.product">
<field name="invoice_policy">delivery</field>
</record>
@@ -133,10 +45,6 @@
<field name="invoice_policy">delivery</field>
</record>
<record id="product.product_product_26" model="product.product">
<field name="invoice_policy">delivery</field>
</record>
<record id="product.product_product_25" model="product.product">
<field name="invoice_policy">delivery</field>
</record>
@@ -145,30 +53,14 @@
<field name="invoice_policy">delivery</field>
</record>
<record id="product.product_product_23" model="product.product">
<field name="invoice_policy">delivery</field>
</record>
<record id="product.product_product_22" model="product.product">
<field name="invoice_policy">delivery</field>
</record>
<record id="product.product_product_21" model="product.product">
<field name="invoice_policy">delivery</field>
</record>
<record id="product.product_product_20" model="product.product">
<field name="invoice_policy">delivery</field>
</record>
<record id="product.product_product_19" model="product.product">
<field name="invoice_policy">delivery</field>
</record>
<record id="product.product_product_18" model="product.product">
<field name="invoice_policy">delivery</field>
</record>
<record id="product.product_product_17" model="product.product">
<field name="invoice_policy">delivery</field>
</record>
@@ -177,14 +69,6 @@
<field name="invoice_policy">delivery</field>
</record>
<record id="product.product_product_15" model="product.product">
<field name="invoice_policy">delivery</field>
</record>
<record id="product.product_product_14" model="product.product">
<field name="invoice_policy">delivery</field>
</record>
<record id="product.product_product_13" model="product.product">
<field name="invoice_policy">delivery</field>
</record>
@@ -261,11 +145,11 @@
<field name="invoice_policy">delivery</field>
</record>
<record id="product.product_product_1b" model="product.product">
<record id="product.service_cost_01" model="product.product">
<field name="invoice_policy">cost</field>
</record>
<record id="product.product_product_0" model="product.product">
<record id="product.service_order_01" model="product.product">
<field name="invoice_policy">order</field>
</record>
+2 -2
View File
@@ -20,8 +20,8 @@
</record>
<record id="test_order_1_line_3" model="sale.order.line">
<field name="order_id" ref="test_order_1"/>
<field name="name">[HDD-SH2] HDD SH-2</field>
<field name="product_id" ref="product.product_product_18"/>
<field name="name">Switch, 24 ports</field>
<field name="product_id" ref="product.product_delivery_01"/>
<field name="product_uom" ref="product.product_uom_unit"/>
<field name="price_unit">90</field>
<field name="product_uom_qty">3</field>
+4 -4
View File
@@ -29,10 +29,10 @@ class TestSale(AccountingTestCase):
})
# create quotation with differend kinds of products (all possible combinations)
self.products = {
'prod_order': self.env.ref('product.product_product_43'),
'prod_del': self.env.ref('product.product_product_47'),
'serv_order': self.env.ref('product.product_product_0'),
'serv_del': self.env.ref('product.product_product_56'),
'prod_order': self.env.ref('product.product_order_01'),
'prod_del': self.env.ref('product.product_delivery_01'),
'serv_order': self.env.ref('product.service_order_01'),
'serv_del': self.env.ref('product.service_delivery'),
}
self.partner = self.env.ref('base.res_partner_1')
+1 -1
View File
@@ -103,7 +103,7 @@ class TestSaleOrder(TestSale):
def test_cost_invoicing(self):
""" Test confirming a vendor invoice to reinvoice cost on the so """
serv_cost = self.env.ref('product.product_product_1b')
serv_cost = self.env.ref('product.service_cost_01')
prod_gap = self.env.ref('product.product_product_1')
so = self.env['sale.order'].create({
'partner_id': self.partner.id,
@@ -18,14 +18,6 @@
<field name="purchase_price">390.00</field>
</record>
<record id="sale.sale_order_line_13" model="sale.order.line">
<field name="purchase_price">21.60</field>
</record>
<record id="sale.sale_order_line_14" model="sale.order.line">
<field name="purchase_price">4258.00</field>
</record>
<record id="sale.sale_order_line_16" model="sale.order.line">
<field name="purchase_price">2870.00</field>
</record>
@@ -26,7 +26,7 @@
product_qty: 1.0
type: normal
bom_line_ids:
- product_id: product.product_product_44
- product_id: product.consu_delivery_01
product_uom: product.product_uom_unit
product_qty: 1.0
-
@@ -54,7 +54,7 @@
Confirm sales order
-
!python {model: sale.order}: |
self.action_confirm(cr, uid, ref("sale_order_product_manu"), context=context)
self.action_confirm(cr, uid, [ref("sale_order_product_manu")], context=context)
-
I run scheduler.
-
+1 -1
View File
@@ -80,7 +80,7 @@
I confirm the sale order
-
!python {model: sale.order}: |
self.action_confirm(cr, uid, ref("sale_order_so0"), context=context)
self.action_confirm(cr, uid, [ref("sale_order_so0")], context=context)
-
I verify that a procurement has been generated for sale order
-
+27 -24
View File
@@ -15,25 +15,31 @@ class TestMoveExplode(common.TransactionCase):
self.Product = self.env['product.product']
#product that has a phantom bom
self.product_bom = self.env.ref('product.product_product_3')
self.product_bom = self.env.ref('product.product_product_5')
#bom with that product
self.bom = self.env.ref('mrp.mrp_bom_9')
self.bom = self.env.ref('mrp.mrp_bom_kit')
#partner agrolait
self.partner = self.env.ref('base.res_partner_1')
#bom: PC Assemble (with property: DDR 512MB)
self.bom_prop = self.env.ref('mrp.mrp_bom_property_0')
#bom: (with property: DDR 512MB)
self.bom_prop = self.env.ref('mrp.mrp_bom_manufacture')
self.bom_prop.write({'property_ids': [(6,0,[self.env['ir.model.data'].xmlid_to_res_id('mrp.mrp_property_8')])]})
self.template = self.env.ref('product.product_product_3_product_template')
#property: DDR 512MB
self.mrp_property = self.env.ref('mrp.mrp_property_0')
#product: RAM SR2
self.product_bom_prop = self.env.ref('product.product_product_14')
#phantom bom for RAM SR2 with three lines containing properties
self.bom_prop_line = self.env.ref('mrp.mrp_bom_property_line')
#product: iPod included in the phantom bom
self.product_A = self.env.ref('product.product_product_11')
#product: Mouse, Wireless included in the phantom bom
self.product_B = self.env.ref('product.product_product_12')
self.mrp_property = self.env.ref('mrp.mrp_property_8')
self.product_bom_prop = self.env.ref('product.product_product_5')
#phantom bom for 17 with seven lines containing properties
self.bom_prop_line = self.env.ref('mrp.mrp_bom_kit')
# write different properties on the bom and on 2 bom lines
self.bom_prop_line.write({'property_ids': [(6,0,[self.env['ir.model.data'].xmlid_to_res_id('mrp.mrp_property_0')])], 'product_id': self.env['ir.model.data'].xmlid_to_res_id('product.product_product_5')})
#product: Motherboard included in the phantom bom
self.product_A = self.env.ref('product.product_product_20')
#product: 24 Graphic card in the phantom bom
self.product_B = self.env.ref('product.product_product_24')
for bom_line in self.bom_prop_line.bom_line_ids:
if bom_line.product_id.id in [self.env.ref('product.product_product_20').id, self.env.ref('product.product_product_24').id]:
bom_line.write({'property_ids': [(6, 0, [self.env['ir.model.data'].xmlid_to_res_id('mrp.mrp_property_8')])]})
else:
bom_line.write({'property_ids': [(6, 0, [self.env['ir.model.data'].xmlid_to_res_id('mrp.mrp_property_0')])]})
#pricelist
self.pricelist = self.env.ref('product.list0')
@@ -41,28 +47,25 @@ class TestMoveExplode(common.TransactionCase):
def test_00_sale_move_explode(self):
"""check that when creating a sale order with a product that has a phantom BoM, move explode into content of the
BoM"""
#create sale order with one sale order line containing product with a phantom bom
# Remove properties on the bom an on the bom lines
self.bom.write({'property_ids': [(6,0,[])]})
for line in self.bom.bom_line_ids:
line.write({'property_ids': [(6,0,[])]})
# Create sale order with one sale order line containing product with a phantom bom
so_vals = {
'partner_id': self.partner.id,
'partner_invoice_id': self.partner.id,
'partner_shipping_id': self.partner.id,
'order_line': [(0, 0, {'name': self.product_bom.name, 'product_id': self.product_bom.id, 'product_uom_qty': 1, 'product_uom': self.product_bom.uom_id.id})],
'pricelist_id': self.pricelist.id,
}
self.so = self.SaleOrder.create(vals=so_vals)
sol_vals = {
'order_id': self.so.id,
'name': self.product_bom.name,
'product_id': self.product_bom.id,
'product_uom': self.product_bom.uom_id.id,
'product_uom_qty': 1.0,
}
self.SaleOrderLine.create(values=sol_vals)
#confirm sale order
self.so.action_confirm()
#get all move associated to that sale_order
move_ids = self.so.picking_ids.mapped('move_lines').ids
#we should have same amount of move as the component in the phatom bom
bom_component_length = self.MrpBom._bom_explode(self.bom, self.product_bom, 1.0, [])
bom_component_length = self.MrpBom._bom_explode(self.bom, self.product_bom, 1.0, properties=[])
self.assertEqual(len(move_ids), len(bom_component_length[0]))
def test_00_bom_find(self):
+1 -1
View File
@@ -341,7 +341,7 @@ class TestSaleMrpFlow(common.TransactionCase):
""" Test delivered quantity on SO based on delivered quantity in pickings."""
# intial so
self.partner = self.env.ref('base.res_partner_1')
self.product = self.env.ref('product.product_product_3')
self.product = self.env.ref('product.product_product_5')
so_vals = {
'partner_id': self.partner.id,
'partner_invoice_id': self.partner.id,
@@ -24,7 +24,6 @@ class TestSaleService(TestSale):
task = project.task_ids.filtered(lambda t: t.name == '%s:%s' % (so.name, prod_task.name))
self.assertTrue(task, 'Sale Service: task is not created')
self.assertEqual(task.partner_id, so.partner_id, 'Sale Service: customer should be the same on task and on SO')
# register timesheet on task
self.env['account.analytic.line'].create({
'name': 'Test Line',
+3 -2
View File
@@ -55,7 +55,8 @@ class TestSaleStock(TestSale):
del_qties = [sol.qty_delivered for sol in self.so.order_line]
del_qties_truth = [2.0 if sol.product_id.type in ['product', 'consu'] else 0.0 for sol in self.so.order_line]
self.assertEqual(del_qties, del_qties_truth, 'Sale Stock: delivered quantities are wrong after complete delivery')
# invoice on delivery
# Without timesheet, we manually set the delivered qty for the product serv_del
self.so.order_line[1]['qty_delivered'] = 2.0
inv_id = self.so.action_invoice_create()
self.assertEqual(self.so.invoice_status, 'invoiced',
'Sale Stock: so invoice_status should be "fully invoiced" after complete delivery and invoicing')
@@ -111,7 +112,7 @@ class TestSaleStock(TestSale):
"""
# intial so
self.partner = self.env.ref('base.res_partner_1')
self.product = self.env.ref('product.product_product_47')
self.product = self.env.ref('product.product_delivery_01')
so_vals = {
'partner_id': self.partner.id,
'partner_invoice_id': self.partner.id,
@@ -2,7 +2,7 @@
<openerp>
<data noupdate="1">
<record id="product.product_product_0" model="product.product">
<record id="product.service_order_01" model="product.product">
<field name="track_service">timesheet</field>
</record>
<record id="product.product_product_2" model="product.product">
@@ -9,7 +9,7 @@ class TestSaleTimesheet(TestSale):
def test_timesheet_order(self):
""" Test timesheet invoicing with 'invoice on order' timetracked products """
# intial so
prod_ts = self.env.ref('product.product_product_0')
prod_ts = self.env.ref('product.service_order_01')
so_vals = {
'partner_id': self.partner.id,
'partner_invoice_id': self.partner.id,
+2 -87
View File
@@ -50,14 +50,6 @@
<field name="type">product</field>
</record>
<record id="product.product_product_14" model="product.product">
<field name="type">product</field>
</record>
<record id="product.product_product_15" model="product.product">
<field name="type">product</field>
</record>
<record id="product.product_product_16" model="product.product">
<field name="type">product</field>
</record>
@@ -66,30 +58,14 @@
<field name="type">product</field>
</record>
<record id="product.product_product_18" model="product.product">
<field name="type">product</field>
</record>
<record id="product.product_product_19" model="product.product">
<field name="type">product</field>
</record>
<record id="product.product_product_20" model="product.product">
<field name="type">product</field>
</record>
<record id="product.product_product_21" model="product.product">
<field name="type">product</field>
</record>
<record id="product.product_product_22" model="product.product">
<field name="type">product</field>
</record>
<record id="product.product_product_23" model="product.product">
<field name="type">product</field>
</record>
<record id="product.product_product_24" model="product.product">
<field name="type">product</field>
</record>
@@ -98,76 +74,15 @@
<field name="type">product</field>
</record>
<record id="product.product_product_26" model="product.product">
<field name="type">product</field>
</record>
<record id="product.product_product_27" model="product.product">
<field name="type">product</field>
</record>
<record id="product.product_product_28" model="product.product">
<record id="product.product_delivery_02" model="product.product">
<field name="type">product</field>
</record>
<record id="product.product_product_29" model="product.product">
<field name="type">product</field>
</record>
<record id="product.product_product_30" model="product.product">
<field name="type">product</field>
</record>
<record id="product.product_product_31" model="product.product">
<field name="type">product</field>
</record>
<record id="product.product_product_32" model="product.product">
<field name="type">product</field>
</record>
<record id="product.product_product_33" model="product.product">
<field name="type">product</field>
</record>
<record id="product.product_product_34" model="product.product">
<field name="type">product</field>
</record>
<record id="product.product_product_35" model="product.product">
<field name="type">product</field>
</record>
<record id="product.product_product_36" model="product.product">
<field name="type">product</field>
</record>
<record id="product.product_product_37" model="product.product">
<field name="type">product</field>
</record>
<record id="product.product_product_38" model="product.product">
<field name="type">product</field>
</record>
<record id="product.product_product_39" model="product.product">
<field name="type">product</field>
</record>
<record id="product.product_product_45" model="product.product">
<field name="type">product</field>
</record>
<record id="product.product_product_46" model="product.product">
<field name="type">product</field>
</record>
<record id="product.product_product_47" model="product.product">
<field name="type">product</field>
</record>
<record id="product.product_product_48" model="product.product">
<record id="product.product_delivery_01" model="product.product">
<field name="type">product</field>
</record>
-21
View File
@@ -101,20 +101,6 @@
<field name="product_qty">26.0</field>
<field name="location_id" ref="stock_location_components"/>
</record>
<record id="stock_inventory_line_7" model="stock.inventory.line">
<field name="product_id" ref="product.product_product_14"/>
<field name="product_uom_id" ref="product.product_uom_unit"/>
<field name="inventory_id" ref="stock_inventory_0"/>
<field name="product_qty">32.0</field>
<field name="location_id" ref="stock_location_components"/>
</record>
<record id="stock_inventory_line_8" model="stock.inventory.line">
<field name="product_id" ref="product.product_product_15"/>
<field name="product_uom_id" ref="product.product_uom_unit"/>
<field name="inventory_id" ref="stock_inventory_0"/>
<field name="product_qty">37.0</field>
<field name="location_id" ref="stock_location_components"/>
</record>
<record id="stock_inventory_line_9" model="stock.inventory.line">
<field name="product_id" ref="product.product_product_17"/>
<field name="product_uom_id" ref="product.product_uom_unit"/>
@@ -122,13 +108,6 @@
<field name="product_qty">39.0</field>
<field name="location_id" ref="stock_location_components"/>
</record>
<record id="stock_inventory_line_10" model="stock.inventory.line">
<field name="product_id" ref="product.product_product_18"/>
<field name="product_uom_id" ref="product.product_uom_unit"/>
<field name="inventory_id" ref="stock_inventory_0"/>
<field name="product_qty">45.0</field>
<field name="location_id" ref="stock_location_components"/>
</record>
<record id="stock_inventory_line_11" model="stock.inventory.line">
<field name="product_id" ref="product.product_product_12"/>
<field name="product_uom_id" ref="product.product_uom_unit"/>
+7 -7
View File
@@ -106,7 +106,7 @@
location_id: stock.stock_location_stock
location_dest_id: stock.stock_location_customers
move_lines:
- product_id: product.product_product_31
- product_id: product.product_delivery_02
product_uom: product.product_uom_unit
product_uom_qty: 45.0
picking_type_id: stock.picking_type_out
@@ -151,7 +151,7 @@
location_id: stock.stock_location_suppliers
location_dest_id: stock.stock_location_stock
move_lines:
- product_id: product.product_product_48
- product_id: product.product_delivery_01
product_uom: product.product_uom_unit
product_uom_qty: 35.0
picking_type_id: stock.picking_type_in
@@ -193,7 +193,7 @@
location_id: stock.stock_location_suppliers
location_dest_id: stock.stock_location_stock
move_lines:
- product_id: product.product_product_31
- product_id: product.product_delivery_02
product_uom: product.product_uom_unit
product_uom_qty: 50.0
picking_type_id: stock.picking_type_in
@@ -224,7 +224,7 @@
location_id: stock.stock_location_suppliers
location_dest_id: stock.stock_location_shop0
move_lines:
- product_id: product.product_product_48
- product_id: product.product_delivery_01
product_uom: product.product_uom_unit
product_uom_qty: 180.0
picking_type_id: chi_picking_type_in
@@ -232,7 +232,7 @@
location_dest_id: stock.stock_location_shop0
state: done
pack_operation_ids:
- product_id: product.product_product_48
- product_id: product.product_delivery_01
product_qty: 100
product_uom_id: product.product_uom_unit
location_id: stock.stock_location_suppliers
@@ -245,7 +245,7 @@
location_id: stock.stock_location_suppliers
location_dest_id: stock.stock_location_shop0
move_lines:
- product_id: product.product_product_32
- product_id: product.product_delivery_01
product_uom: product.product_uom_unit
product_uom_qty: 45.0
picking_type_id: chi_picking_type_in
@@ -310,7 +310,7 @@
location_id: stock.stock_location_shop0
location_dest_id: stock.stock_location_customers
move_lines:
- product_id: product.product_product_31
- product_id: product.product_delivery_02
product_uom: product.product_uom_unit
product_uom_qty: 45.0
picking_type_id: chi_picking_type_out
+2 -26
View File
@@ -3,20 +3,12 @@
<!-- Resource: stock.warehouse.orderpoint -->
<record id="stock_warehouse_orderpoint_0" model="stock.warehouse.orderpoint">
<field name="product_max_qty">25.0</field>
<field name="product_min_qty">5.0</field>
<field name="product_uom" ref="product.product_uom_dozen"/>
<field model="stock.warehouse" name="warehouse_id" search="[]"/>
<field name="product_id" ref="product.product_product_36"/>
<!-- <field name="location_id" ref="stock.stock_location_stock"/> -->
</record>
<record id="stock_warehouse_orderpoint_1" model="stock.warehouse.orderpoint">
<field name="product_max_qty">10.0</field>
<field name="product_min_qty">5.0</field>
<field name="product_uom" ref="product.product_uom_unit"/>
<field model="stock.warehouse" name="warehouse_id" search="[]"/>
<field name="product_id" ref="product.product_product_28"/>
<field name="product_id" ref="product.product_delivery_02"/>
<!-- <field name="location_id" ref="stock.stock_location_stock"/> -->
</record>
<record id="stock_warehouse_orderpoint_2" model="stock.warehouse.orderpoint">
@@ -27,28 +19,12 @@
<field name="product_id" ref="product.product_product_20"/>
<!-- <field name="location_id" ref="stock.stock_location_stock"/> -->
</record>
<record id="stock_warehouse_orderpoint_3" model="stock.warehouse.orderpoint">
<field name="product_max_qty">50.0</field>
<field name="product_min_qty">10.0</field>
<field name="product_uom" ref="product.product_uom_unit"/>
<field model="stock.warehouse" name="warehouse_id" search="[]"/>
<field name="product_id" ref="product.product_product_46"/>
<!-- <field name="location_id" ref="stock.stock_location_stock"/> -->
</record>
<record id="stock_warehouse_orderpoint_4" model="stock.warehouse.orderpoint">
<field name="product_max_qty">15.0</field>
<field name="product_min_qty">5.0</field>
<field name="product_uom" ref="product.product_uom_unit"/>
<field model="stock.warehouse" name="warehouse_id" search="[]"/>
<field name="product_id" ref="product.product_product_23"/>
<!-- <field name="location_id" ref="stock.stock_location_stock"/> -->
</record>
<record id="stock_warehouse_orderpoint_5" model="stock.warehouse.orderpoint">
<field name="product_max_qty">5.0</field>
<field name="product_min_qty">3.0</field>
<field name="product_uom" ref="product.product_uom_unit"/>
<field model="stock.warehouse" name="warehouse_id" search="[]"/>
<field name="product_id" ref="product.product_product_48"/>
<field name="product_id" ref="product.product_delivery_01"/>
<!-- <field name="location_id" ref="stock.stock_location_stock"/> -->
</record>
</data>
@@ -6,13 +6,13 @@
<record id="base.res_partner_2" model="res.partner">
<field name="website_published" eval="True"/>
</record>
<record id="membership.membership_0" model="product.product">
<record id="product.membership_0" model="product.product">
<field name="website_published" eval="True"/>
</record>
<record id="membership.membership_1" model="product.product">
<record id="product.membership_1" model="product.product">
<field name="website_published" eval="True"/>
</record>
<record id="membership.membership_2" model="product.product">
<record id="product.membership_2" model="product.product">
<field name="website_published" eval="True"/>
</record>
</data>
+2 -2
View File
@@ -25,7 +25,7 @@
<record id="sale_order_line_2" model="sale.order.line">
<field name="order_id" ref="sale_order_1"/>
<field name="name">Pen drive, 16GB</field>
<field name="product_id" ref="product.product_product_30"/>
<field name="product_id" ref="product.product_delivery_02"/>
<field name="product_uom_qty">5</field>
<field name="product_uom" ref="product.product_uom_unit"/>
<field name="price_unit">145.00</field>
@@ -34,7 +34,7 @@
<record id="sale_order_line_3" model="sale.order.line">
<field name="order_id" ref="sale_order_1"/>
<field name="name">Headset USB</field>
<field name="product_id" ref="product.product_product_33"/>
<field name="product_id" ref="product.product_delivery_01"/>
<field name="product_uom_qty">2</field>
<field name="product_uom" ref="product.product_uom_unit"/>
<field name="price_unit">65.00</field>
+3 -78
View File
@@ -676,109 +676,34 @@ Weight: 31 grams</field>
<record id="product.product_product_13_product_template" model="product.template">
<field name="public_categ_ids" eval="[(6,0,[ref('product.Components')])]"/>
</record>
<record id="product.product_product_14_product_template" model="product.template">
<field name="public_categ_ids" eval="[(6,0,[ref('product.Components')])]"/>
</record>
<record id="product.product_product_15_product_template" model="product.template">
<field name="public_categ_ids" eval="[(6,0,[ref('product.Components')])]"/>
</record>
<record id="product.product_product_16_product_template" model="product.template">
<field name="public_categ_ids" eval="[(6,0,[ref('product.Components')])]"/>
</record>
<record id="product.product_product_17_product_template" model="product.template">
<field name="public_categ_ids" eval="[(6,0,[ref('product.Components')])]"/>
</record>
<record id="product.product_product_18_product_template" model="product.template">
<field name="public_categ_ids" eval="[(6,0,[ref('product.Components')])]"/>
</record>
<record id="product.product_product_19_product_template" model="product.template">
<field name="public_categ_ids" eval="[(6,0,[ref('product.Components')])]"/>
</record>
<record id="product.product_product_20_product_template" model="product.template">
<field name="public_categ_ids" eval="[(6,0,[ref('product.Components')])]"/>
</record>
<record id="product.product_product_21_product_template" model="product.template">
<field name="public_categ_ids" eval="[(6,0,[ref('product.Components')])]"/>
</record>
<record id="product.product_product_22_product_template" model="product.template">
<field name="public_categ_ids" eval="[(6,0,[ref('product.Components')])]"/>
</record>
<record id="product.product_product_23_product_template" model="product.template">
<field name="public_categ_ids" eval="[(6,0,[ref('product.Components')])]"/>
</record>
<record id="product.product_product_24_product_template" model="product.template">
<field name="public_categ_ids" eval="[(6,0,[ref('product.Components')])]"/>
</record>
<record id="product.product_product_25_product_template" model="product.template">
<field name="public_categ_ids" eval="[(6,0,[ref('product.laptops')])]"/>
</record>
<record id="product.product_product_26_product_template" model="product.template">
<field name="public_categ_ids" eval="[(6,0,[ref('product.laptops')])]"/>
</record>
<record id="product.product_product_27_product_template" model="product.template">
<field name="public_categ_ids" eval="[(6,0,[ref('product.laptops')])]"/>
</record>
<record id="product.product_product_28_product_template" model="product.template">
<record id="product.product_delivery_02_product_template" model="product.template">
<field name="public_categ_ids" eval="[(6,0,[ref('product.External_Hard_Drive')])]"/>
</record>
<record id="product.product_product_29_product_template" model="product.template">
<field name="public_categ_ids" eval="[(6,0,[ref('product.Pen_Drive')])]"/>
</record>
<record id="product.product_product_30_product_template" model="product.template">
<field name="public_categ_ids" eval="[(6,0,[ref('product.Pen_Drive')])]"/>
</record>
<record id="product.product_product_31_product_template" model="product.template">
<field name="public_categ_ids" eval="[(6,0,[ref('product.Speakers')])]"/>
</record>
<record id="product.product_product_32_product_template" model="product.template">
<field name="public_categ_ids" eval="[(6,0,[ref('product.Headset')])]"/>
</record>
<record id="product.product_product_33_product_template" model="product.template">
<field name="public_categ_ids" eval="[(6,0,[ref('product.Headset')])]"/>
</record>
<record id="product.product_product_34_product_template" model="product.template">
<field name="public_categ_ids" eval="[(6,0,[ref('product.Components')])]"/>
</record>
<record id="product.product_product_35_product_template" model="product.template">
<field name="public_categ_ids" eval="[(6,0,[ref('product.Components')])]"/>
</record>
<record id="product.product_product_36_product_template" model="product.template">
<field name="public_categ_ids" eval="[(6,0,[ref('product.Components')])]"/>
</record>
<record id="product.product_product_37_product_template" model="product.template">
<field name="public_categ_ids" eval="[(6,0,[ref('product.printer')])]"/>
</record>
<record id="product.product_product_38_product_template" model="product.template">
<field name="public_categ_ids" eval="[(6,0,[ref('product.printer')])]"/>
</record>
<record id="product.product_product_39_product_template" model="product.template">
<field name="public_categ_ids" eval="[(6,0,[ref('product.printer')])]"/>
</record>
<record id="product.product_product_40_product_template" model="product.template">
<record id="product.product_order_01_product_template" model="product.template">
<field name="public_categ_ids" eval="[(6,0,[ref('product.Software')])]"/>
</record>
<record id="product.product_product_41_product_template" model="product.template">
<field name="public_categ_ids" eval="[(6,0,[ref('product.Software')])]"/>
</record>
<record id="product.product_product_42_product_template" model="product.template">
<field name="public_categ_ids" eval="[(6,0,[ref('product.Software')])]"/>
</record>
<record id="product.product_product_43_product_template" model="product.template">
<field name="public_categ_ids" eval="[(6,0,[ref('product.Software')])]"/>
</record>
<record id="product.product_product_44_product_template" model="product.template">
<field name="public_categ_ids" eval="[(6,0,[ref('product.Software')])]"/>
</record>
<record id="product.product_product_45_product_template" model="product.template">
<field name="public_categ_ids" eval="[(6,0,[ref('product.network')])]"/>
</record>
<record id="product.product_product_46_product_template" model="product.template">
<field name="public_categ_ids" eval="[(6,0,[ref('product.Pen_Drive')])]"/>
</record>
<record id="product.product_product_47_product_template" model="product.template">
<field name="public_categ_ids" eval="[(6,0,[ref('product.network')])]"/>
</record>
<record id="product.product_product_48_product_template" model="product.template">
<record id="product.product_delivery_01_product_template" model="product.template">
<field name="public_categ_ids" eval="[(6,0,[ref('product.Components')])]"/>
</record>
+1 -1
View File
@@ -29,7 +29,7 @@
<field name="default_code">W0001</field>
<field name="attribute_value_ids" eval="[(6,0,[ref('product_attribute_value_1')])]"/>
</record>
<record id="product_product_1b" model="product.product">
<record id="service_cost_01" model="product.product">
<field name="default_code">W0002</field>
<field name="product_tmpl_id" ref="product_product_1_product_template"/>
<field name="attribute_value_ids" eval="[(6,0,[ref('product_attribute_value_2')])]"/>