Sanjay Gohel (Open ERP) has proposed merging 
lp:~openerp-dev/openobject-addons/trunk-improve-warehouse-sgo into 
lp:openobject-addons.

Requested reviews:
  Amit Patel (OpenERP) (apa-tiny)

For more details, see:
https://code.launchpad.net/~openerp-dev/openobject-addons/trunk-improve-warehouse-sgo/+merge/143873

Hello,

       I have improved warehouse invoice wizard view as When invoicing based on 
shipments (reception or delivery)
The option "group by partner" in incoming shipment should only appear if you 
select several shipments in list view.

Thank You.
Sanjay Gohel
-- 
https://code.launchpad.net/~openerp-dev/openobject-addons/trunk-improve-warehouse-sgo/+merge/143873
Your team OpenERP R&D Team is subscribed to branch 
lp:~openerp-dev/openobject-addons/trunk-improve-warehouse-sgo.
=== modified file 'stock/wizard/stock_invoice_onshipping.py'
--- stock/wizard/stock_invoice_onshipping.py	2012-12-06 14:56:32 +0000
+++ stock/wizard/stock_invoice_onshipping.py	2013-01-18 12:49:30 +0000
@@ -145,6 +145,16 @@
               type = inv_type,
               context=context)
         return res
+        
+    def fields_view_get(self, cr, uid, view_id=None, view_type="form", context=None, toolbar=False, submenu=False):
+        if context is None:
+            context = {}
+        ids_length = False
+        if context.get('active_ids'):
+            if len(context.get('active_ids')) == 1:
+                ids_length = True
+        context.update({'ids_length' : ids_length})
+        return super(stock_invoice_onshipping, self).fields_view_get(cr, uid, view_id=view_id, view_type=view_type, context=context, toolbar=toolbar, submenu=submenu)
 
 stock_invoice_onshipping()
 

=== modified file 'stock/wizard/stock_invoice_onshipping_view.xml'
--- stock/wizard/stock_invoice_onshipping_view.xml	2012-11-29 22:26:45 +0000
+++ stock/wizard/stock_invoice_onshipping_view.xml	2013-01-18 12:49:30 +0000
@@ -8,7 +8,7 @@
               <form string="Create invoice" version="7.0">
                   <group string="Create Invoice">
                       <field name="journal_id"/>
-                      <field name="group"/>
+                      <field name="group" invisible="context.get('ids_length', False)"/>
                       <field name="invoice_date" />
                   </group>
                   <footer>

_______________________________________________
Mailing list: https://launchpad.net/~openerp-dev-gtk
Post to     : openerp-dev-gtk@lists.launchpad.net
Unsubscribe : https://launchpad.net/~openerp-dev-gtk
More help   : https://help.launchpad.net/ListHelp

Reply via email to