Bharat Devnani (Open ERP) has proposed merging
lp:~openerp-dev/openobject-addons/trunk-bug-897159-new-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-new-bde/+merge/86534
Hello Sir,
Converted type of data['journal_id'] from unicode to int in def get_out of
point_of_sale/wizard/pos_box_out.py.
Thanks & Regards,
Devnani Bharat R.
--
https://code.launchpad.net/~openerp-dev/openobject-addons/trunk-bug-897159-new-bde/+merge/86534
Your team OpenERP R&D Team is subscribed to branch
lp:~openerp-dev/openobject-addons/trunk-bug-897159-new-bde.
=== modified file 'point_of_sale/wizard/pos_box_out.py'
--- point_of_sale/wizard/pos_box_out.py 2011-12-20 17:53:58 +0000
+++ point_of_sale/wizard/pos_box_out.py 2011-12-21 10:54:31 +0000
@@ -75,20 +75,20 @@
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_ids = statement_obj.search(cr, uid, [('journal_id', '=', data['journal_id']), ('company_id', '=', curr_company), ('user_id', '=', uid), ('state', '=', 'open')], context=context)
+ statement_ids = 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)
+ done_statmt = statement_obj.search(cr, uid, [('date', '>=', monday+' 00:00:00'), ('date', '<=', sunday+' 23:59:59'), ('journal_id', '=', int(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 or product.categ_id.property_account_income_categ
if not acc_id:
raise osv.except_osv(_('Error !'), _('please check that account is set to %s')%(product.name))
if not statement_ids:
raise osv.except_osv(_('Error !'), _('You have to open at least one cashbox'))
vals['statement_id'] = statement_ids[0]
- vals['journal_id'] = data['journal_id']
+ vals['journal_id'] = int(data['journal_id'])
vals['account_id'] = acc_id.id
amount = data['amount'] or 0.0
if data['amount'] > 0:
_______________________________________________
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