Divyesh Makwana(OpenERP) has proposed merging 
lp:~openerp-dev/openobject-addons/trunk-addons_issue_stock-mdi into 
lp:openobject-addons.

Requested reviews:
  OpenERP Core Team (openerp)

For more details, see:
https://code.launchpad.net/~openerp-dev/openobject-addons/trunk-addons_issue_stock-mdi/+merge/116463

Hello Sir,

I have done the following things:

1. Fix the Error : assert context.get('active_model') in ('stock.picking', 
'stock.picking.in', 'stock.picking.out'), 'Bad context propagation'.

2. Rename 'Partner' into 'Contact'.

3. If the user creates a new recod, the invoice control should be 'To Be 
Invoiced' by default (only  for Sales/Invoicing/ Deliveries to Invoice).

Thanks,
Divyesh
-- 
https://code.launchpad.net/~openerp-dev/openobject-addons/trunk-addons_issue_stock-mdi/+merge/116463
Your team OpenERP R&D Team is subscribed to branch 
lp:~openerp-dev/openobject-addons/trunk-addons_issue_stock-mdi.
=== modified file 'sale/stock_view.xml'
--- sale/stock_view.xml	2012-07-18 07:25:11 +0000
+++ sale/stock_view.xml	2012-07-24 12:36:21 +0000
@@ -10,6 +10,9 @@
                 <field name="move_type" position="before">
                     <field name="sale_id"/>
                 </field>
+                <label for="partner_id" position="replace">
+                    <label for="partner_id" class="oe_edit_only" string="Contact"/>
+                </label>
             </field>
         </record>
 
@@ -71,7 +74,7 @@
             <field name="view_type">form</field>
             <field name="view_mode">tree,form,calendar</field>
             <field name="domain">[('type','=','out')]</field>
-            <field name="context">{'default_type': 'out', 'contact_display': 'partner_address', 'search_default_to_invoice': 1, 'search_default_done': 1}</field>
+            <field name="context">{'default_type': 'out', 'contact_display': 'partner_address', 'search_default_to_invoice': 1, 'search_default_done': 1, 'default_invoice_state': '2binvoiced'}</field>
             <field name="search_view_id" ref="stock.view_picking_out_search"/>
         </record>
         <menuitem action="outgoing_picking_list_to_invoice" id="menu_action_picking_list_to_invoice" parent="base.menu_invoiced" groups="sale.group_invoice_deli_orders" sequence="20"/>

=== modified file 'stock/wizard/stock_partial_picking.py'
--- stock/wizard/stock_partial_picking.py	2012-05-16 16:01:15 +0000
+++ stock/wizard/stock_partial_picking.py	2012-07-24 12:36:21 +0000
@@ -96,8 +96,11 @@
 
     def default_get(self, cr, uid, fields, context=None):
         if context is None: context = {}
+        picking_ids = context.get('active_ids', [])
+        if context['active_model'] == 'purchase.order':
+            for purchase_order in self.pool.get('purchase.order').browse(cr, uid, picking_ids, context=context):
+                picking_ids = [picking.id for picking in purchase_order.picking_ids]
         res = super(stock_partial_picking, self).default_get(cr, uid, fields, context=context)
-        picking_ids = context.get('active_ids', [])
         if not picking_ids or len(picking_ids) != 1:
             # Partial Picking Processing may only be done for one picking at a time
             return res
@@ -105,7 +108,7 @@
         # (already seen in previous bug where context passed was containing ir.ui.menu as active_model and the menu 
         # ID as active_id). Though this should be fixed in clients now, this place is sensitive enough to ensure the
         # consistancy of the context.
-        assert context.get('active_model') in ('stock.picking', 'stock.picking.in', 'stock.picking.out'), 'Bad context propagation'
+        assert context.get('active_model') in ('stock.picking', 'stock.picking.in', 'stock.picking.out', 'purchase.order'), 'Bad context propagation'
         picking_id, = picking_ids
         if 'picking_id' in fields:
             res.update(picking_id=picking_id)

_______________________________________________
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

Reply via email to