← Back to team overview

openerp-dev-web team mailing list archive

[Merge] lp:~openerp-commiter/openobject-addons/trunk-dev-addons3-mtr1 into lp:~openerp-dev/openobject-addons/trunk-dev-addons3

 

Meera Trambadia (OpenERP) has proposed merging lp:~openerp-commiter/openobject-addons/trunk-dev-addons3-mtr1 into lp:~openerp-dev/openobject-addons/trunk-dev-addons3.

Requested reviews:
  OpenERP R&D Team (openerp-dev)
Related bugs:
  #600547 Invoice totals not updated when a line is moved (store={...} bug?)
  https://bugs.launchpad.net/bugs/600547
  #690895 copy account.move crash 
  https://bugs.launchpad.net/bugs/690895
  #694144 [6.0] sales manager dashboard - sales by month - sql query error, usabiliy
  https://bugs.launchpad.net/bugs/694144
  #695632 [RC1]Two same fields creating problem in web-client
  https://bugs.launchpad.net/bugs/695632

For more details, see:
https://code.launchpad.net/~openerp-commiter/openobject-addons/trunk-dev-addons3-mtr1/+merge/45979

[IMP] pos:solved the following yaml error:-

raise osv.except_osv(_('Message'), _('You can not open a Cashbox for "%s".\nPlease close its related cash register.') %(journal.name))
except_osv: ('warning', u'Message')
-- 
https://code.launchpad.net/~openerp-commiter/openobject-addons/trunk-dev-addons3-mtr1/+merge/45979
Your team OpenERP R&D Team is requested to review the proposed merge of lp:~openerp-commiter/openobject-addons/trunk-dev-addons3-mtr1 into lp:~openerp-dev/openobject-addons/trunk-dev-addons3.
=== modified file 'point_of_sale/test/point_of_sale_test.yml'
--- point_of_sale/test/point_of_sale_test.yml	2011-01-05 12:50:35 +0000
+++ point_of_sale/test/point_of_sale_test.yml	2011-01-12 12:31:06 +0000
@@ -327,9 +327,18 @@
   I open the statement.
 - 
   !python {model: pos.open.statement}: |
-    self.open_statement(cr, uid, [ref("pos_open_statement_0")], {"lang": "en_US", "active_model":
-      "ir.ui.menu", "active_ids": [ref("point_of_sale.menu_open_statement")], "tz":
-      False, "active_id": ref("point_of_sale.menu_open_statement"), })
+    jou_obj = self.pool.get('account.journal')
+    statement_obj = self.pool.get('account.bank.statement')
+    cr.execute("SELECT DISTINCT journal_id FROM pos_journal_users "
+                    "WHERE user_id = %s ORDER BY journal_id"% (uid, ))
+    jou_ids = map(lambda x1: x1[0], cr.fetchall())
+    journal_ids = jou_obj.search(cr, uid, [('auto_cash', '=', True), ('type', '=', 'cash'), ('id', 'in', jou_ids)], context=context)
+    for journal in jou_obj.browse(cr, uid, journal_ids, context=context):
+        ids = statement_obj.search(cr, uid, [('state', '=', 'open'), ('user_id', '=', uid), ('journal_id', '=', journal.id)], context=context)
+        if not ids:
+            self.open_statement(cr, uid, [ref("pos_open_statement_0")], {"lang": "en_US", "active_model":
+              "ir.ui.menu", "active_ids": [ref("point_of_sale.menu_open_statement")], "tz":
+              False, "active_id": ref("point_of_sale.menu_open_statement"), })
 -
   I click on the "Make Payment" wizard.  
 -