diff options
| -rw-r--r-- | addons/hr_timesheet/hr_timesheet.py | 2 | ||||
| -rw-r--r-- | addons/hr_timesheet/hr_timesheet_data.xml | 13 | ||||
| -rw-r--r-- | addons/hr_timesheet/hr_timesheet_demo.xml | 14 | ||||
| -rw-r--r-- | addons/hr_timesheet_invoice/test/test_hr_timesheet_invoice.yml | 6 | ||||
| -rw-r--r-- | addons/hr_timesheet_sheet/test/test_hr_timesheet_sheet.yml | 4 | ||||
| -rw-r--r-- | addons/product/product_data.xml | 14 | ||||
| -rw-r--r-- | addons/project_timesheet/project_timesheet_demo.xml | 14 | ||||
| -rw-r--r-- | addons/sale/sale.py | 2 |
8 files changed, 36 insertions, 33 deletions
diff --git a/addons/hr_timesheet/hr_timesheet.py b/addons/hr_timesheet/hr_timesheet.py index 4613c9251b5..a936a18a02d 100644 --- a/addons/hr_timesheet/hr_timesheet.py +++ b/addons/hr_timesheet/hr_timesheet.py @@ -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, 'hr_timesheet', 'product_consultant') + result = md.get_object_reference(cr, uid, 'product', 'product_consultant') return result[1] except ValueError: pass diff --git a/addons/hr_timesheet/hr_timesheet_data.xml b/addons/hr_timesheet/hr_timesheet_data.xml index e6130806b2e..5dc95cf9ddc 100644 --- a/addons/hr_timesheet/hr_timesheet_data.xml +++ b/addons/hr_timesheet/hr_timesheet_data.xml @@ -2,19 +2,8 @@ <openerp> <data> - <record id="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.uom_hour"/> - <field name="uom_po_id" ref="product.uom_hour"/> - <field name="name">Service on Timesheet</field> - <field name="categ_id" ref="product.cat0"/> - <field name="type">service</field> - <field eval="False" name="purchase_ok"/> - </record> - <record id="hr.employee" model="hr.employee"> - <field name="product_id" ref="product_consultant"/> + <field name="product_id" ref="product.product_consultant"/> </record> <record id="analytic_journal" model="account.analytic.journal"> diff --git a/addons/hr_timesheet/hr_timesheet_demo.xml b/addons/hr_timesheet/hr_timesheet_demo.xml index ab33c4218a5..f6f2729c4d4 100644 --- a/addons/hr_timesheet/hr_timesheet_demo.xml +++ b/addons/hr_timesheet/hr_timesheet_demo.xml @@ -3,13 +3,13 @@ <data noupdate="1"> <record id="hr.employee" model="hr.employee"> - <field name="product_id" ref="product_consultant"/> + <field name="product_id" ref="product.product_consultant"/> <field name="journal_id" ref="analytic_journal"/> </record> <!-- complete our example employee --> <record id="hr.employee1" model="hr.employee"> - <field name="product_id" ref="product_consultant"/> + <field name="product_id" ref="product.product_consultant"/> <field name="journal_id" ref="analytic_journal"/> </record> @@ -18,7 +18,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_consultant"/> + <field name="product_id" ref="product.product_consultant"/> <field name="product_uom_id" ref="product.uom_hour"/> <field name="account_id" model="account.analytic.account" search="[('code','=','1')]"></field> <field eval="-60.00" name="amount"/> @@ -31,7 +31,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_consultant"/> + <field name="product_id" ref="product.product_consultant"/> <field name="product_uom_id" ref="product.uom_hour"/> <field name="account_id" model="account.analytic.account" search="[('code','=','1')]"></field> <field eval="-30.00" name="amount"/> @@ -44,7 +44,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_consultant"/> + <field name="product_id" ref="product.product_consultant"/> <field name="product_uom_id" ref="product.uom_hour"/> <field name="account_id" model="account.analytic.account" search="[('code','=','1')]"></field> <field eval="-90.00" name="amount"/> @@ -57,7 +57,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_consultant"/> + <field name="product_id" ref="product.product_consultant"/> <field name="product_uom_id" ref="product.uom_hour"/> <field name="account_id" model="account.analytic.account" search="[('code','=','1')]"></field> <field eval="-30.00" name="amount"/> @@ -70,7 +70,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_consultant"/> + <field name="product_id" ref="product.product_consultant"/> <field name="product_uom_id" ref="product.uom_hour"/> <field name="account_id" model="account.analytic.account" search="[('code','=','1')]"></field> <field eval="-30.00" name="amount"/> diff --git a/addons/hr_timesheet_invoice/test/test_hr_timesheet_invoice.yml b/addons/hr_timesheet_invoice/test/test_hr_timesheet_invoice.yml index d7b59c02124..cf068ac9ce9 100644 --- a/addons/hr_timesheet_invoice/test/test_hr_timesheet_invoice.yml +++ b/addons/hr_timesheet_invoice/test/test_hr_timesheet_invoice.yml @@ -11,7 +11,7 @@ general_account_id: account.a_expense journal_id: hr_timesheet.analytic_journal name: develop yaml for hr module - product_id: hr_timesheet.product_consultant + product_id: product.product_consultant product_uom_id: product.uom_hour to_invoice: hr_timesheet_invoice.timesheet_invoice_factor2 unit_amount: 5.00 @@ -31,7 +31,7 @@ date: 1 name: 1 price: 1 - product: hr_timesheet.product_consultant + product: product.product_consultant time: 1 - @@ -67,7 +67,7 @@ I create final invoice for this analytic account. - !record {model: hr.timesheet.invoice.create.final, id: hr_timesheet_invoice_create_final_0}: - balance_product: hr_timesheet.product_consultant + balance_product: product.product_consultant date: 1 name: 1 price: 1 diff --git a/addons/hr_timesheet_sheet/test/test_hr_timesheet_sheet.yml b/addons/hr_timesheet_sheet/test/test_hr_timesheet_sheet.yml index 1808c325a07..405c6585cf9 100644 --- a/addons/hr_timesheet_sheet/test/test_hr_timesheet_sheet.yml +++ b/addons/hr_timesheet_sheet/test/test_hr_timesheet_sheet.yml @@ -97,7 +97,7 @@ name: 'Develop yaml for hr module' unit_amount: 3.00 amount: -90.00 - product_id: hr_timesheet.product_consultant + product_id: product_consultant general_account_id: account.a_expense user_id: base.user_root journal_id: hr_timesheet.analytic_journal @@ -128,7 +128,7 @@ name: 'Develop yaml for hr module' unit_amount: 2.0 amount: -90.00 - product_id: hr_timesheet.product_consultant + product_id: product_consultant general_account_id: account.a_expense user_id: base.user_root journal_id: hr_timesheet.analytic_journal diff --git a/addons/product/product_data.xml b/addons/product/product_data.xml index 023cb431382..fc085aab922 100644 --- a/addons/product/product_data.xml +++ b/addons/product/product_data.xml @@ -168,5 +168,19 @@ parameter) will see those record just disappear. <field name="name">Product UoS</field> <field name="digits" eval="3"/> </record> + + <!-- + Product + --> + <record id="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.uom_hour"/> + <field name="uom_po_id" ref="product.uom_hour"/> + <field name="name">Service on Timesheet</field> + <field name="categ_id" ref="product.cat0"/> + <field name="type">service</field> + <field eval="False" name="purchase_ok"/> + </record> </data> </openerp> diff --git a/addons/project_timesheet/project_timesheet_demo.xml b/addons/project_timesheet/project_timesheet_demo.xml index 8eec74bc9e5..8c3f4e2b72a 100644 --- a/addons/project_timesheet/project_timesheet_demo.xml +++ b/addons/project_timesheet/project_timesheet_demo.xml @@ -4,13 +4,13 @@ <!-- Example employee --> <record id="hr.employee2" model="hr.employee"> <field name="user_id" ref="project.res_users_technical_leader"/> - <field name="product_id" ref="hr_timesheet.product_consultant"/> + <field name="product_id" ref="product.product_consultant"/> <field name="journal_id" ref="hr_timesheet.analytic_journal"/> </record> <record id="hr.employee3" model="hr.employee"> <field name="user_id" ref="project.res_users_project_manager"/> - <field name="product_id" ref="hr_timesheet.product_consultant"/> + <field name="product_id" ref="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="project.res_users_analyst"/> <field name="category_ids" eval="[(6, 0, [ref('hr.category_employee')])]"/> - <field name="product_id" ref="hr_timesheet.product_consultant"/> + <field name="product_id" ref="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="project.res_users_developer"/> <field name="category_ids" eval="[(6, 0, [ref('hr.category_employee')])]"/> - <field name="product_id" ref="hr_timesheet.product_consultant"/> + <field name="product_id" ref="product.product_consultant"/> <field name="journal_id" ref="hr_timesheet.analytic_journal"/> </record> <record id="hr.employee6" model="hr.employee"> @@ -36,7 +36,7 @@ <field name="calendar_id" ref="resource.timesheet_group1"/> <field name="user_id" ref="project.res_users_designer"/> <field name="category_ids" eval="[(6, 0, [ref('hr.category_employee')])]"/> - <field name="product_id" ref="hr_timesheet.product_consultant"/> + <field name="product_id" ref="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="project.res_users_tester"/> <field name="category_ids" eval="[(6, 0, [ref('hr.category_employee')])]"/> - <field name="product_id" ref="hr_timesheet.product_consultant"/> + <field name="product_id" ref="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="project.res_users_finacial_manager"/> <field name="category_ids" eval="[(6, 0, [ref('hr.category_employee')])]"/> - <field name="product_id" ref="hr_timesheet.product_consultant"/> + <field name="product_id" ref="product.product_consultant"/> <field name="journal_id" ref="hr_timesheet.analytic_journal"/> </record> diff --git a/addons/sale/sale.py b/addons/sale/sale.py index f6392935988..37f4f7f29f8 100644 --- a/addons/sale/sale.py +++ b/addons/sale/sale.py @@ -1312,7 +1312,7 @@ class sale_config_picking_policy(osv.osv_memory): pooler.restart_pool(cr.dbname, update_module=True)[1] if wizard.time_unit: - prod_id = data_obj.get_object(cr, uid, 'hr_timesheet', 'product_consultant').id + prod_id = data_obj.get_object(cr, uid, 'product', 'product_consultant').id product_obj = self.pool.get('product.product') product_obj.write(cr, uid, prod_id, {'uom_id':wizard.time_unit.id, 'uom_po_id': wizard.time_unit.id}) |
