Merge lp:~openerp-dev/openobject-addons/7.0-bug-1167878-sgo into lp:openobject-addons/7.0

Proposed by Sanjay Gohel (Open ERP)
Status: Needs review
Proposed branch: lp:~openerp-dev/openobject-addons/7.0-bug-1167878-sgo
Merge into: lp:openobject-addons/7.0
Diff against target: 49 lines (+17/-17)
1 file modified
project_timesheet/project_timesheet.py (+17/-17)
To merge this branch: bzr merge lp:~openerp-dev/openobject-addons/7.0-bug-1167878-sgo
Reviewer Review Type Date Requested Status
OpenERP Core Team Pending
Review via email: mp+159762@code.launchpad.net

Description of the change

Hello,

       Improve indentation and make it 4 space instead of 3 space.

Thank You.
Sanjay Gohel(SGO)

To post a comment you must log in.

Unmerged revisions

9040. By Sanjay Gohel (Open ERP)

[IMP]make 4 space identation insted of 3 space as per gud coding convention

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'project_timesheet/project_timesheet.py'
--- project_timesheet/project_timesheet.py 2012-12-18 22:50:15 +0000
+++ project_timesheet/project_timesheet.py 2013-04-19 06:33:29 +0000
@@ -270,29 +270,29 @@
270res_partner()270res_partner()
271271
272class account_analytic_line(osv.osv):272class account_analytic_line(osv.osv):
273 _inherit = "account.analytic.line"273 _inherit = "account.analytic.line"
274274
275 def get_product(self, cr, uid, context=None):275 def get_product(self, cr, uid, context=None):
276 emp_obj = self.pool.get('hr.employee')276 emp_obj = self.pool.get('hr.employee')
277 emp_ids = emp_obj.search(cr, uid, [('user_id', '=', uid)], context=context)277 emp_ids = emp_obj.search(cr, uid, [('user_id', '=', uid)], context=context)
278 if emp_ids:278 if emp_ids:
279 employee = emp_obj.browse(cr, uid, emp_ids, context=context)[0]279 employee = emp_obj.browse(cr, uid, emp_ids, context=context)[0]
280 if employee.product_id:return employee.product_id.id280 if employee.product_id:return employee.product_id.id
281 return False281 return False
282 282
283 _defaults = {'product_id': get_product,}283 _defaults = {'product_id': get_product,}
284 284
285 def on_change_account_id(self, cr, uid, ids, account_id):285 def on_change_account_id(self, cr, uid, ids, account_id):
286 res = {}286 res = {}
287 if not account_id:287 if not account_id:
288 return res288 return res
289 res.setdefault('value',{})289 res.setdefault('value',{})
290 acc = self.pool.get('account.analytic.account').browse(cr, uid, account_id)290 acc = self.pool.get('account.analytic.account').browse(cr, uid, account_id)
291 st = acc.to_invoice.id291 st = acc.to_invoice.id
292 res['value']['to_invoice'] = st or False292 res['value']['to_invoice'] = st or False
293 if acc.state == 'close' or acc.state == 'cancelled':293 if acc.state == 'close' or acc.state == 'cancelled':
294 raise osv.except_osv(_('Invalid Analytic Account !'), _('You cannot select a Analytic Account which is in Close or Cancelled state.'))294 raise osv.except_osv(_('Invalid Analytic Account !'), _('You cannot select a Analytic Account which is in Close or Cancelled state.'))
295 return res295 return res
296296
297account_analytic_line()297account_analytic_line()
298298