Ravish(OpenERP) has proposed merging 
lp:~openerp-dev/openobject-addons/trunk-bug-976233-rmu into 
lp:openobject-addons.

Requested reviews:
  Amit Parik (OpenERP) (amp-openerp)

For more details, see:
https://code.launchpad.net/~openerp-dev/openobject-addons/trunk-bug-976233-rmu/+merge/104086

Hello,

I have improve in hr_timesheet_create_ invoice wizard that it will select 
product in case of no product in account analytic line and also in validation 
message .

Thanks!!
-- 
https://code.launchpad.net/~openerp-dev/openobject-addons/trunk-bug-976233-rmu/+merge/104086
Your team OpenERP R&D Team is subscribed to branch 
lp:~openerp-dev/openobject-addons/trunk-bug-976233-rmu.
=== modified file 'hr_timesheet_invoice/wizard/hr_timesheet_invoice_create.py'
--- hr_timesheet_invoice/wizard/hr_timesheet_invoice_create.py	2012-03-21 12:25:37 +0000
+++ hr_timesheet_invoice/wizard/hr_timesheet_invoice_create.py	2012-04-30 10:40:26 +0000
@@ -97,9 +97,11 @@
                     "GROUP BY product_id,to_invoice,product_uom_id", (account.id, tuple(ids),))
 
             for product_id, factor_id, qty, uom in cr.fetchall():
+                if not product_id and data['product']:
+                     product_id = data['product'][0]
                 product = product_obj.browse(cr, uid, product_id, context2)
                 if not product:
-                    raise osv.except_osv(_('Error'), _('At least one line has no product !'))
+                    raise osv.except_osv(_('Error'), _(' Please select product for at least one line !'))
                 factor_name = ''
                 factor = invoice_factor_obj.browse(cr, uid, factor_id, context2)
                 if not data.get('product', False):

_______________________________________________
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