Amit Patel (OpenERP) has proposed merging 
lp:~openerp-dev/openobject-addons/trunk-addons13-mrp-apa into 
lp:openobject-addons.

Requested reviews:
  OpenERP Core Team (openerp)

For more details, see:
https://code.launchpad.net/~openerp-dev/openobject-addons/trunk-addons13-mrp-apa/+merge/132266
-- 
https://code.launchpad.net/~openerp-dev/openobject-addons/trunk-addons13-mrp-apa/+merge/132266
Your team OpenERP R&D Team is subscribed to branch 
lp:~openerp-dev/openobject-addons/trunk-addons13-mrp-apa.
=== modified file 'mrp/mrp.py'
--- mrp/mrp.py	2012-10-16 05:25:13 +0000
+++ mrp/mrp.py	2012-10-31 09:36:28 +0000
@@ -471,7 +471,7 @@
             help="Location where the system will stock the finished products."),
 
         'date_planned_end': fields.function(_production_date_end, type='date', string='Scheduled End Date'),
-        'date_planned_date': fields.function(_production_date, type='date', string='Scheduled Date'),
+        'date_planned_date': fields.function(_production_date, type='date', string='Scheduled Date', store=True),
         'date_planned': fields.datetime('Scheduled Date', required=True, select=1, readonly=True, states={'draft':[('readonly',False)]}),
         'date_start': fields.datetime('Start Date', select=True, readonly=True),
         'date_finished': fields.datetime('End Date', select=True, readonly=True),

=== modified file 'mrp_repair/mrp_repair_view.xml'
--- mrp_repair/mrp_repair_view.xml	2012-10-26 09:58:21 +0000
+++ mrp_repair/mrp_repair_view.xml	2012-10-31 09:36:28 +0000
@@ -52,7 +52,7 @@
                             <field name="product_id" on_change="onchange_product_id(product_id)" domain="[('type','!=','service')]"/>
                             <field name="partner_id" on_change="onchange_partner_id(partner_id,address_id)" attrs="{'required':[('invoice_method','!=','none')]}"/>
                             <field name="address_id"  attrs="{'readonly':[('deliver_bool','=', False)]}" groups="sale.group_delivery_invoice_address"/>
-                            <field name="move_id" on_change="onchange_move_id(product_id, move_id)" context="{'default_product_id':product_id}"/>
+                            <field name="move_id" on_change="onchange_move_id(product_id, move_id)" context="{'default_product_id':product_id,'address_out_id': partner_id,'address_in_id': partner_id}"/>
                             <field name="location_id" attrs="{'readonly':[('deliver_bool','=', False)], 'required':[('deliver_bool','=', True)]}" groups="stock.group_locations"/>
                             <field name="prodlot_id" on_change="onchange_lot_id(prodlot_id,product_id)" groups="stock.group_production_lot" string="Serial Number"/>
                         </group>

=== modified file 'stock/stock.py'
--- stock/stock.py	2012-10-29 09:17:13 +0000
+++ stock/stock.py	2012-10-31 09:36:28 +0000
@@ -1766,13 +1766,10 @@
             property_out = self.pool.get('res.partner').browse(cr, uid, context['address_out_id'], context).property_stock_customer
             location_id = property_out and property_out.id or False
         else:
-            location_xml_id = False
-            if picking_type in ('in', 'internal'):
-                location_xml_id = 'stock_location_stock'
-            elif picking_type == 'out':
+            location_xml_id = 'stock_location_stock'
+            if picking_type == 'out':
                 location_xml_id = 'stock_location_customers'
-            if location_xml_id:
-                location_model, location_id = mod_obj.get_object_reference(cr, uid, 'stock', location_xml_id)
+            location_model, location_id = mod_obj.get_object_reference(cr, uid, 'stock', location_xml_id)
         return location_id
 
     def _default_location_source(self, cr, uid, context=None):
@@ -1795,13 +1792,10 @@
             if part_obj_add:
                 location_id = part_obj_add.property_stock_supplier.id
         else:
-            location_xml_id = False
+            location_xml_id = 'stock_location_stock'
             if picking_type == 'in':
                 location_xml_id = 'stock_location_suppliers'
-            elif picking_type in ('out', 'internal'):
-                location_xml_id = 'stock_location_stock'
-            if location_xml_id:
-                location_model, location_id = mod_obj.get_object_reference(cr, uid, 'stock', location_xml_id)
+            location_model, location_id = mod_obj.get_object_reference(cr, uid, 'stock', location_xml_id)
         return location_id
 
     def _default_destination_address(self, cr, uid, context=None):

=== modified file 'stock/stock_view.xml'
--- stock/stock_view.xml	2012-10-29 09:08:47 +0000
+++ stock/stock_view.xml	2012-10-31 09:36:28 +0000
@@ -1288,7 +1288,7 @@
                 <group>
                     <group>
                         <field name="name" invisible="1"/>
-                        <field name="product_id" on_change="onchange_product_id(product_id,location_id,location_dest_id, parent.partner_id)"/>
+                        <field name="product_id" on_change="onchange_product_id(product_id,location_id,location_dest_id)"/>
                         <field name="type" invisible="1"/>
                         <label for="product_qty"/>
                         <div>
@@ -1313,9 +1313,9 @@
                                 <field name="date_expected" on_change="onchange_date(date,date_expected)"/>
                             </group>
 
-                            <group string="Locations" groups="stock.group_locations">
+                            <group string="Locations">
                                 <field name="location_id" domain="[('usage','&lt;&gt;','view')]"/>
-                                <field name="location_dest_id" domain="[('usage','=','internal')]" groups="stock.group_locations"/>
+                                <field name="location_dest_id" domain="[('usage','=','internal')]"/>
                             </group>
 
                             <group groups="stock.group_tracking_lot" string="Traceability">

_______________________________________________
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