Bharat Devnani (Open ERP) has proposed merging 
lp:~openerp-dev/openobject-addons/trunk-bug-866048-bde into 
lp:openobject-addons.

Requested reviews:
  OpenERP Core Team (openerp)
Related bugs:
  Bug #866048 in OpenERP Addons: "analytic_user_function- bad object naming 
convention"
  https://bugs.launchpad.net/openobject-addons/+bug/866048

For more details, see:
https://code.launchpad.net/~openerp-dev/openobject-addons/trunk-bug-866048-bde/+merge/78089

Hello Sir,

I have corrected the naming convention of class analytic_user_funct_grid in 
analytic_user_function.py and analytic_user_function_view.xml of 
analytic_user_function module.

Thanks & Regards,
Devnani Bharat R.
-- 
https://code.launchpad.net/~openerp-dev/openobject-addons/trunk-bug-866048-bde/+merge/78089
Your team OpenERP R&D Team is subscribed to branch 
lp:~openerp-dev/openobject-addons/trunk-bug-866048-bde.
=== modified file 'analytic_user_function/analytic_user_function.py'
--- analytic_user_function/analytic_user_function.py	2011-05-03 11:35:37 +0000
+++ analytic_user_function/analytic_user_function.py	2011-10-04 12:05:32 +0000
@@ -24,7 +24,7 @@
 
 class analytic_user_funct_grid(osv.osv):
 
-    _name="analytic_user_funct_grid"
+    _name="analytic.user.funct.grid"
     _description= "Relation table between users and products on a analytic account"
     _columns={
         'user_id': fields.many2one("res.users", "User", required=True,),
@@ -39,7 +39,7 @@
 
     _inherit = "account.analytic.account"
     _columns = {
-        'user_product_ids': fields.one2many('analytic_user_funct_grid', 'account_id', 'Users/Products Rel.'),
+        'user_product_ids': fields.one2many('analytic.user.funct.grid', 'account_id', 'Users/Products Rel.'),
     }
 
 account_analytic_account()
@@ -54,7 +54,7 @@
     # Take the first found... if nothing found => return False
     def _get_related_user_account_recursiv(self, cr, uid, user_id, account_id):
 
-        temp=self.pool.get('analytic_user_funct_grid').search(cr, uid, [('user_id', '=', user_id),('account_id', '=', account_id) ])
+        temp=self.pool.get('analytic.user.funct.grid').search(cr, uid, [('user_id', '=', user_id),('account_id', '=', account_id) ])
         account=self.pool.get('account.analytic.account').browse(cr, uid, account_id)
         if temp:
             return temp
@@ -81,7 +81,7 @@
             return super(hr_analytic_timesheet, self).on_change_account_id(cr, uid, ids, account_id)
         else:
             #get the old values from super and add the value from the new relation analytic_user_funct_grid
-            r = self.pool.get('analytic_user_funct_grid').browse(cr, uid, temp)[0]
+            r = self.pool.get('analytic.user.funct.grid').browse(cr, uid, temp)[0]
             res.setdefault('value',{})
             res['value']= super(hr_analytic_timesheet, self).on_change_account_id(cr, uid, ids, account_id)['value']
             res['value']['product_id'] = r.product_id.id
@@ -119,7 +119,7 @@
             temp = self._get_related_user_account_recursiv(cr, uid, user_id, account_id)
             if temp:
                 #add the value from the new relation analytic_user_funct_grid
-                r = self.pool.get('analytic_user_funct_grid').browse(cr, uid, temp)[0]
+                r = self.pool.get('analytic.user.funct.grid').browse(cr, uid, temp)[0]
                 res['value']['product_id'] = r.product_id.id
 
                 #the change of product has to impact the amount, uom and general_account_id

=== modified file 'analytic_user_function/analytic_user_function_view.xml'
--- analytic_user_function/analytic_user_function_view.xml	2011-01-14 00:11:01 +0000
+++ analytic_user_function/analytic_user_function_view.xml	2011-10-04 12:05:32 +0000
@@ -5,7 +5,7 @@
         <!-- analytic_user_funct_grid views -->
         <record model="ir.ui.view" id="analytic_user_funct_grid_tree">
             <field name="name">analytic_user_funct_grid.tree</field>
-            <field name="model">analytic_user_funct_grid</field>
+            <field name="model">analytic.user.funct.grid</field>
             <field name="type">tree</field>
             <field name="arch" type="xml">
                 <tree string="User's Product for this Analytic Account" editable="bottom">
@@ -17,7 +17,7 @@
 
         <record model="ir.ui.view" id="analytic_user_funct_grid_form">
             <field name="name">analytic_user_funct_grid.form</field>
-            <field name="model">analytic_user_funct_grid</field>
+            <field name="model">analytic.user.funct.grid</field>
             <field name="type">form</field>
             <field name="arch" type="xml">
                 <form string="User's Product for this Analytic Account">
@@ -55,7 +55,7 @@
                 </xpath>
             </field>
         </record>
-        
+
         <!-- hr_timesheet_sheet.sheet inherited view -->
         <record model="ir.ui.view" id="hr_timesheet_sheet_form_inherit1">
             <field name="name">hr.timesheet.sheet.form.form</field>

_______________________________________________
Mailing list: https://launchpad.net/~openerp-dev-gtk
Post to     : [email protected]
Unsubscribe : https://launchpad.net/~openerp-dev-gtk
More help   : https://help.launchpad.net/ListHelp

Reply via email to