← Back to team overview

openerp-dev-web team mailing list archive

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

 

pso (Open ERP) has proposed merging lp:~openerp-dev/openobject-addons/pso-dev-addons3 into lp:~openerp-dev/openobject-addons/trunk-dev-addons3.

Requested reviews:
  OpenERP R&D Team (openerp-dev)
Related bugs:
  #617974 trunk - hr payment - rounding issue payment slip
  https://bugs.launchpad.net/bugs/617974
  #663585 [6.0rc1] suggested improvements to PO and SO form view
  https://bugs.launchpad.net/bugs/663585
  #663967 [RC1] SO -History - can delete related invoice
  https://bugs.launchpad.net/bugs/663967
  #666592 save and close crash adding product in point of sale
  https://bugs.launchpad.net/bugs/666592
  #669360 hr_timeeshet_sheet : installation fails on 1st (and probably last) date of the month.
  https://bugs.launchpad.net/bugs/669360
  #669533 [hr_timesheet] Employee timesheet reports confuse employee id and user id
  https://bugs.launchpad.net/bugs/669533


Hello,

I have fixed https://bugs.launchpad.net/openobject-addons/+bug/666592.

I have improved view file and wizard py files of point_of_sale.

Thanks,
pso.
-- 
https://code.launchpad.net/~openerp-dev/openobject-addons/pso-dev-addons3/+merge/40868
Your team OpenERP R&D Team is requested to review the proposed merge of lp:~openerp-dev/openobject-addons/pso-dev-addons3 into lp:~openerp-dev/openobject-addons/trunk-dev-addons3.
=== modified file 'point_of_sale/point_of_sale_view.xml'
--- point_of_sale/point_of_sale_view.xml	2010-10-27 05:09:08 +0000
+++ point_of_sale/point_of_sale_view.xml	2010-11-15 14:10:02 +0000
@@ -48,8 +48,9 @@
                             </group>
 
                             <separator colspan="4"/>
-                            <group colspan="4" col="6">
+                            <group colspan="4" col="8">
                                 <field name="state" />
+                                <button name="%(action_add_product)d" string="Add product" type="action" icon="gtk-ok" states="draft"/>
                                 <button name="%(action_pos_payment)d" string="Make Payment" icon="terp-dolar" type="action" states="draft,advance" />
                                 <button name="%(action_report_pos_receipt)d" string="Reprint" icon="gtk-print" type="action" states="paid,done,invoiced"/>
                                 <button name="set_to_draft" string="Set to draft" states="paid" icon="gtk-execute" type="object" />

=== modified file 'point_of_sale/wizard/pos_add_product.py'
--- point_of_sale/wizard/pos_add_product.py	2010-10-26 05:37:43 +0000
+++ point_of_sale/wizard/pos_add_product.py	2010-11-15 14:10:02 +0000
@@ -76,21 +76,22 @@
             context = {}
         record_id = context and context.get('active_id', False)
         order_obj= self.pool.get('pos.order')
+        this = self.browse(cr, uid, ids[0], context)
+        order_obj.add_product(cr, uid, record_id, this.product_id.id, this.quantity, context=context)
+
         obj = order_obj.browse(cr, uid, record_id, context=context)
         order_obj.write(cr, uid, [record_id], {'state': 'done'}, context=context)
-        if obj.amount_total != obj.amount_paid:
-            return {
-                'name': _('Make Payment'),
-                'context': context and context.get('active_id', False),
-                'view_type': 'form',
-                'view_mode': 'form',
-                'res_model': 'pos.make.payment',
-                'view_id': False,
-                'target': 'new',
-                'views': False,
-                'type': 'ir.actions.act_window',
-            }
-        return {}
+        return {
+            'name': _('Make Payment'),
+            'context': context and context.get('active_id', False),
+            'view_type': 'form',
+            'view_mode': 'form',
+            'res_model': 'pos.make.payment',
+            'view_id': False,
+            'target': 'new',
+            'views': False,
+            'type': 'ir.actions.act_window',
+        }
 
 add_product()
 

=== modified file 'point_of_sale/wizard/pos_return.py'
--- point_of_sale/wizard/pos_return.py	2010-10-15 13:26:40 +0000
+++ point_of_sale/wizard/pos_return.py	2010-11-15 14:10:02 +0000
@@ -340,8 +340,11 @@
         date_cur=time.strftime('%Y-%m-%d %H:%M:%S')
         uom_obj = self.pool.get('product.uom')
         return_boj=self.pool.get('pos.return')
-        return_id=return_boj.search(cr,uid,[])
-        data=return_boj.read(cr,uid,return_id,[])[0]
+        return_id = return_boj.search(cr,uid,[])
+        data = {}
+        if return_id:
+            data = return_boj.read(cr,uid,return_id,[])[0]
+
         wf_service = netsvc.LocalService("workflow")
         self_data = self.read(cr, uid, ids)[0]
         order_obj.add_product(cr, uid, active_ids[0], self_data['product_id'], self_data['quantity'], context=context)


Follow ups