Bharat Devnani (Open ERP) has proposed merging
lp:~openerp-dev/openobject-addons/trunk-bug-897159-bde into
lp:openobject-addons.
Requested reviews:
OpenERP Core Team (openerp)
Related bugs:
Bug #897159 in OpenERP Addons: "POS: Take Money Out wizard does not work"
https://bugs.launchpad.net/openobject-addons/+bug/897159
For more details, see:
https://code.launchpad.net/~openerp-dev/openobject-addons/trunk-bug-897159-bde/+merge/84434
Hello Sir,
I have applied the solution suggested by Mustufa Rangwala and also made some
other modification in point_of_sale/wizard/pos_box_out.py.
Thanks & Regards,
Devnani Bharat R.
--
https://code.launchpad.net/~openerp-dev/openobject-addons/trunk-bug-897159-bde/+merge/84434
Your team OpenERP R&D Team is subscribed to branch
lp:~openerp-dev/openobject-addons/trunk-bug-897159-bde.
=== modified file 'point_of_sale/wizard/pos_box_out.py'
--- point_of_sale/wizard/pos_box_out.py 2011-11-22 08:51:38 +0000
+++ point_of_sale/wizard/pos_box_out.py 2011-12-05 05:35:31 +0000
@@ -75,13 +75,13 @@
res_obj = self.pool.get('res.users')
for data in self.read(cr, uid, ids, context=context):
curr_company = res_obj.browse(cr, uid, uid, context=context).company_id.id
- statement_id = statement_obj.search(cr, uid, [('journal_id', '=', data['journal_id']), ('company_id', '=', curr_company), ('user_id', '=', uid), ('state', '=', 'open')], context=context)
+ statement_id = statement_obj.search(cr, uid, [('journal_id', '=', int(data['journal_id'])), ('company_id', '=', curr_company), ('user_id', '=', uid), ('state', '=', 'open')], context=context)
monday = (datetime.today() + relativedelta(weekday=0)).strftime('%Y-%m-%d')
sunday = (datetime.today() + relativedelta(weekday=6)).strftime('%Y-%m-%d')
done_statmt = statement_obj.search(cr, uid, [('date', '>=', monday+' 00:00:00'), ('date', '<=', sunday+' 23:59:59'), ('journal_id', '=', data['journal_id']), ('company_id', '=', curr_company), ('user_id', '=', uid)], context=context)
stat_done = statement_obj.browse(cr, uid, done_statmt, context=context)
am = 0.0
- product = product_obj.browse(cr, uid, data['product_id'], context=context)
+ product = product_obj.browse(cr, uid, int(data['product_id']), context=context)
acc_id = product.property_account_income
if not acc_id:
raise osv.except_osv(_('Error !'), _('please check that account is set to %s')%(product.name))
_______________________________________________
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