[IMP]: product: Changed xml_id of product in data file from product_product_0 to product_product_consultant to identify this record easily when accessing from py

bzr revid: rpa@tinyerp.com-20120726113914-gvpo9rx7fan77w3f
This commit is contained in:
Rucha (Open ERP) 2012-07-26 17:09:14 +05:30
parent e5f03f319e
commit 780bdb4a29
11 changed files with 28 additions and 28 deletions

View File

@ -46,7 +46,7 @@ class hr_employee(osv.osv):
def _getEmployeeProduct(self, cr, uid, context=None):
md = self.pool.get('ir.model.data')
try:
result = md.get_object_reference(cr, uid, 'product', 'product_product_0')
result = md.get_object_reference(cr, uid, 'product', 'product_product_consultant')
return result[1]
except ValueError:
pass

View File

@ -9,7 +9,7 @@
</record>
<record id="hr.employee" model="hr.employee">
<field name="product_id" ref="product.product_product_0"/>
<field name="product_id" ref="product.product_product_consultant"/>
<field name="journal_id" ref="analytic_journal"/>
</record>

View File

@ -3,13 +3,13 @@
<data noupdate="1">
<record id="hr.employee" model="hr.employee">
<field name="product_id" ref="product.product_product_0"/>
<field name="product_id" ref="product.product_product_consultant"/>
<field name="journal_id" ref="analytic_journal"/>
</record>
<!-- complete our example employee -->
<record id="hr.employee_fp" model="hr.employee">
<field name="product_id" ref="product.product_product_0"/>
<field name="product_id" ref="product.product_product_consultant"/>
<field name="journal_id" ref="analytic_journal"/>
</record>
<record id="account.analytic_administratif" model="account.analytic.account">
@ -30,7 +30,7 @@
<field name="user_id" ref="base.user_root"/>
<field eval="time.strftime('%Y-%m-%d')" name="date"/>
<field eval="2.00" name="unit_amount"/>
<field name="product_id" ref="product.product_product_0"/>
<field name="product_id" ref="product.product_product_consultant"/>
<field name="product_uom_id" ref="product.product_uom_hour"/>
<field name="account_id" ref="account.analytic_administratif"></field>
<field eval="-60.00" name="amount"/>
@ -43,7 +43,7 @@
<field name="user_id" ref="base.user_root"/>
<field eval="time.strftime('%Y-%m-%d')" name="date"/>
<field eval="1.00" name="unit_amount"/>
<field name="product_id" ref="product.product_product_0"/>
<field name="product_id" ref="product.product_product_consultant"/>
<field name="product_uom_id" ref="product.product_uom_hour"/>
<field name="account_id" ref="account.analytic_administratif"></field>
<field eval="-30.00" name="amount"/>
@ -56,7 +56,7 @@
<field name="user_id" ref="base.user_root"/>
<field eval="time.strftime('%Y-%m-%d')" name="date"/>
<field eval="03.00" name="unit_amount"/>
<field name="product_id" ref="product.product_product_0"/>
<field name="product_id" ref="product.product_product_consultant"/>
<field name="product_uom_id" ref="product.product_uom_hour"/>
<field name="account_id" ref="account.analytic_administratif"></field>
<field eval="-90.00" name="amount"/>
@ -69,7 +69,7 @@
<field name="user_id" ref="base.user_root"/>
<field eval="time.strftime('%Y-%m-%d')" name="date"/>
<field eval="01.00" name="unit_amount"/>
<field name="product_id" ref="product.product_product_0"/>
<field name="product_id" ref="product.product_product_consultant"/>
<field name="product_uom_id" ref="product.product_uom_hour"/>
<field name="account_id" ref="account.analytic_administratif"></field>
<field eval="-30.00" name="amount"/>
@ -82,7 +82,7 @@
<field name="user_id" ref="base.user_root"/>
<field eval="time.strftime('%Y-%m-%d')" name="date"/>
<field eval="01.00" name="unit_amount"/>
<field name="product_id" ref="product.product_product_0"/>
<field name="product_id" ref="product.product_product_consultant"/>
<field name="product_uom_id" ref="product.product_uom_hour"/>
<field name="account_id" ref="account.analytic_administratif"></field>
<field eval="-30.00" name="amount"/>

View File

@ -9,7 +9,7 @@
general_account_id: account.a_expense
journal_id: hr_timesheet.analytic_journal
name: develop yaml for hr module
product_id: product.product_product_0
product_id: product.product_product_consultant
product_uom_id: product.product_uom_hour
to_invoice: hr_timesheet_invoice.timesheet_invoice_factor2
unit_amount: 5.00
@ -37,7 +37,7 @@
date: 1
name: 1
price: 1
product: product.product_product_0
product: product.product_product_consultant
time: 1
-

View File

@ -10,7 +10,7 @@
I assign this product(Service on Timesheet) and journal(Timesheet Journal) to employee "Quentin Paolino"
-
!record {model: hr.employee, id: hr.employee_qdp}:
product_id: product.product_product_0
product_id: product.product_product_consultant
journal_id: hr_timesheet.analytic_journal
-
I create my current timesheet for employee "Quentin Paolinon".
@ -72,7 +72,7 @@
user_id: base.user_qdp
unit_amount: 6.00
amount: -90.00
product_id: product.product_product_0
product_id: product.product_product_consultant
general_account_id: account.a_expense
journal_id: hr_timesheet.analytic_journal
-
@ -99,7 +99,7 @@
unit_amount: 2.00
user_id: base.user_qdp
amount: -90.00
product_id: product.product_product_0
product_id: product.product_product_consultant
general_account_id: account.a_expense
journal_id: hr_timesheet.analytic_journal
-

View File

@ -185,7 +185,7 @@ parameter) will see those record just disappear.
<!--
Product
-->
<record id="product_product_0" model="product.product">
<record id="product_product_consultant" model="product.product">
<field name="list_price">75.0</field>
<field name="standard_price">30.0</field>
<field name="uom_id" ref="product.product_uom_hour"/>

View File

@ -84,7 +84,7 @@
Resource: product.product
-->
<record id="product_product_0" model="product.product">
<record id="product_product_consultant" model="product.product">
<field name="categ_id" ref="product.product_category_15"/>
</record>

File diff suppressed because one or more lines are too long

View File

@ -4,13 +4,13 @@
<!-- Example employee -->
<record id="hr.employee_qdp" model="hr.employee">
<field name="user_id" ref="base.user_qdp"/>
<field name="product_id" ref="product.product_product_0"/>
<field name="product_id" ref="product.product_product_consultant"/>
<field name="journal_id" ref="hr_timesheet.analytic_journal"/>
</record>
<record id="hr.employee_al" model="hr.employee">
<field name="user_id" ref="base.user_al"/>
<field name="product_id" ref="product.product_product_0"/>
<field name="product_id" ref="product.product_product_consultant"/>
<field name="journal_id" ref="hr_timesheet.analytic_journal"/>
</record>
@ -19,7 +19,7 @@
<field name="calendar_id" ref="resource.timesheet_group1"/>
<field name="user_id" ref="base.user_niv"/>
<field name="category_ids" eval="[(6, 0, [ref('hr.category_employee')])]"/>
<field name="product_id" ref="product.product_product_0"/>
<field name="product_id" ref="product.product_product_consultant"/>
<field name="journal_id" ref="hr_timesheet.analytic_journal"/>
</record>
@ -28,7 +28,7 @@
<field name="calendar_id" ref="resource.timesheet_group1"/>
<field name="user_id" ref="base.user_fpi"/>
<field name="category_ids" eval="[(6, 0, [ref('hr.category_employee')])]"/>
<field name="product_id" ref="product.product_product_0"/>
<field name="product_id" ref="product.product_product_consultant"/>
<field name="journal_id" ref="hr_timesheet.analytic_journal"/>
</record>
<record id="hr.employee_jth" model="hr.employee">
@ -36,7 +36,7 @@
<field name="calendar_id" ref="resource.timesheet_group1"/>
<field name="user_id" ref="base.user_jth"/>
<field name="category_ids" eval="[(6, 0, [ref('hr.category_employee')])]"/>
<field name="product_id" ref="product.product_product_0"/>
<field name="product_id" ref="product.product_product_consultant"/>
<field name="journal_id" ref="hr_timesheet.analytic_journal"/>
</record>
<record id="hr.employee7" model="hr.employee">
@ -44,7 +44,7 @@
<field name="calendar_id" ref="resource.timesheet_group1"/>
<field name="user_id" ref="base.user_mit"/>
<field name="category_ids" eval="[(6, 0, [ref('hr.category_employee')])]"/>
<field name="product_id" ref="product.product_product_0"/>
<field name="product_id" ref="product.product_product_consultant"/>
<field name="journal_id" ref="hr_timesheet.analytic_journal"/>
</record>
<record id="hr.employee8" model="hr.employee">
@ -52,7 +52,7 @@
<field name="calendar_id" ref="resource.timesheet_group1"/>
<field name="user_id" ref="base.user_vad"/>
<field name="category_ids" eval="[(6, 0, [ref('hr.category_employee')])]"/>
<field name="product_id" ref="product.product_product_0"/>
<field name="product_id" ref="product.product_product_consultant"/>
<field name="journal_id" ref="hr_timesheet.analytic_journal"/>
</record>

View File

@ -119,7 +119,7 @@ class sale_configuration(osv.osv_memory):
user = self.pool.get('res.users').browse(cr, uid, uid, context)
res['time_unit'] = user.company_id.project_time_mode_id.id
else:
product = ir_model_data.get_object(cr, uid, 'product', 'product_product_0')
product = ir_model_data.get_object(cr, uid, 'product', 'product_product_consultant')
res['time_unit'] = product.uom_id.id
return res
@ -157,7 +157,7 @@ class sale_configuration(osv.osv_memory):
ir_values.set_default(cr, uid, 'sale.order', 'picking_policy', default_picking_policy)
if wizard.time_unit:
product = ir_model_data.get_object(cr, uid, 'product', 'product_product_0')
product = ir_model_data.get_object(cr, uid, 'product', 'product_product_consultant')
product.write({'uom_id': wizard.time_unit.id, 'uom_po_id': wizard.time_unit.id})
if wizard.module_project and wizard.time_unit:

View File

@ -55,7 +55,7 @@
<record id="sale_order_line_4" model="sale.order.line">
<field name="order_id" ref="sale_order_2"/>
<field name="name">Service on demand</field>
<field name="product_id" ref="product.product_product_0"/>
<field name="product_id" ref="product.product_product_consultant"/>
<field name="product_uom_qty">24</field>
<field name="product_uos_qty">24</field>
<field name="product_uom" ref="product.product_uom_hour"/>
@ -118,7 +118,7 @@
<record id="sale_order_line_8" model="sale.order.line">
<field name="order_id" ref="sale_order_4"/>
<field name="name">Service on demand</field>
<field name="product_id" ref="product.product_product_0"/>
<field name="product_id" ref="product.product_product_consultant"/>
<field name="product_uom_qty">16</field>
<field name="product_uos_qty">16</field>
<field name="product_uom" ref="product.product_uom_hour"/>