Turkesh Patel (openERP) has proposed merging 
lp:~openerp-dev/openobject-addons/trunk-addons20-stock-tpa into 
lp:openobject-addons.

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

For more details, see:
https://code.launchpad.net/~openerp-dev/openobject-addons/trunk-addons20-stock-tpa/+merge/133190

                        stock
================================================================
--> [IMP] in the product form, select an existing product, go to inventory tab, 
click on update, create a serial number from there: the Product field of 
"Create: Serial Number" will automatically filled with the name of the Product.

--> [IMP] Incoming Shipment form => Receive (dialog opens) => create a serial 
number from there: the Product automatically applied to the Serial Number 
creation dialog.

--> [IMP] Sale order: when creating a serial number after clicking on Deliver, 
the Product field will filled automatically with the appropriate name.

--> [IMP] Receipt slip report on incoming shipments
when its printed its name is coming as Delivery Slip, the name should be 
consistent with report name
take "Delivery Slip".

--> [FIX] On changing customer/supplier/partner in delivery orders/incoming 
shipments/internal moves respectively gives traceback.

--> [IMP] Improve Typo in separator string of stock move "Tracability" => 
"Traceability".

--> [IMP] Its not possible to search records by Reference/Source fields from 
Warehouse > Traceability > Stock Moves list view.

--> [IMP] Receipt slip report on incoming shipments

    1) remove traceback.
    2)  the description is not what we have in related SO/PO/picking, it 
displays product name with code but different than product name in o2m lines: [ 
CD ] Blank CD instead of [CD] Blank CD => removed space before and after code 
(in the brackets)
    3) change column header Lot to Serial number
    4) rename Expected Shipping Date => Scheduled Date
    5) column for recipient in the report removed
    6) add phone/email detail. 


-- 
https://code.launchpad.net/~openerp-dev/openobject-addons/trunk-addons20-stock-tpa/+merge/133190
Your team OpenERP R&D Team is subscribed to branch 
lp:~openerp-dev/openobject-addons/trunk-addons20-stock-tpa.
=== modified file 'stock/report/picking.py'
--- stock/report/picking.py	2012-06-11 08:46:28 +0000
+++ stock/report/picking.py	2012-11-07 06:47:22 +0000
@@ -29,7 +29,13 @@
         super(picking, self).__init__(cr, uid, name, context=context)
         self.localcontext.update({
             'time': time,
+            'get_product_desc':self.get_product_desc
         })
+    def get_product_desc(self,move_line):
+        desc = move_line.product_id.name
+        if move_line.product_id.default_code:
+            desc = '[' + move_line.product_id.default_code + ']' + ' ' + desc
+        return [desc]
 
 report_sxw.report_sxw('report.stock.picking.list','stock.picking','addons/stock/report/picking.rml',parser=picking)
 # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

=== modified file 'stock/report/picking.rml'
--- stock/report/picking.rml	2012-06-11 07:08:45 +0000
+++ stock/report/picking.rml	2012-11-07 06:47:22 +0000
@@ -162,12 +162,14 @@
           <para style="terp_default_Bold_9">Customer Address : [[ (picking.type == 'out' or removeParentNode('para')) and '' ]]</para>
           <para style="terp_default_Bold_9">Warehouse Address : [[ (picking.type == 'internal' or removeParentNode('para')) and '' ]]</para>
           <para style="terp_default_9">[[ (picking.partner_id and picking.partner_id.id and picking.partner_id.title.name) or '' ]] [[ picking.partner_id and picking.partner_id.id and picking.partner_id.name ]]</para>
-          <para style="terp_default_9">[[ picking.partner_id and display_address(picking.partner_id,'delivery') ]]</para>
+          <para style="terp_default_9">[[ picking.partner_id and display_address(picking.partner_id) ]]</para>
+          <para style="terp_default_9">[[ picking.partner_id.phone or picking.partner_id.email]]</para>
         </td>
         <td>
           <para style="terp_default_Bold_9">Contact Address :</para>
           <para style="terp_default_9">[[ picking.partner_id and picking.partner_id.title.name or '' ]] [[ picking.partner_id and picking.partner_id.name or '' ]]</para>
-          <para style="terp_default_9">[[ picking.partner_id and display_address(picking.partner_id,'default') ]] </para>
+          <para style="terp_default_9">[[ picking.partner_id and display_address(picking.partner_id) ]] </para>
+          <para style="terp_default_9">[[ picking.partner_id.phone or picking.partner_id.email]]</para>
         </td>
       </tr>
     </blockTable>
@@ -189,7 +191,7 @@
     <para style="terp_default_5cm_Above_Space">
       <font color="white"> </font>
     </para>
-    <blockTable colWidths="100.0,100.0,108.0,107.0,109.0" style="Header_Order_Reference_Tbl">
+    <blockTable colWidths="100.0,154.0,161.0,109.0" style="Header_Order_Reference_Tbl">
       <tr>
         <td>
           <para style="terp_tblheader_General_Centre">Journal</para>
@@ -198,17 +200,14 @@
           <para style="terp_tblheader_General_Centre">Order(Origin)</para>
         </td>
         <td>
-          <para style="terp_tblheader_General_Centre">Recipient</para>
-        </td>
-        <td>
-          <para style="terp_tblheader_General_Centre">Expected Shipping Date </para>
+          <para style="terp_tblheader_General_Centre">Schedule Date</para>
         </td>
         <td>
           <para style="terp_tblheader_General_Centre">Weight</para>
         </td>
       </tr>
     </blockTable>
-    <blockTable colWidths="100.0,100.0,108.0,107.0,109.0" style="Content_Order_Reference_Table">
+    <blockTable colWidths="100.0,154.0,162.0,109.0" style="Content_Order_Reference_Table">
       <tr>
         <td>
           <para style="terp_default_Centre_8">[[ picking.stock_journal_id.name]]</para>
@@ -217,9 +216,6 @@
           <para style="terp_default_Centre_8">[[ picking.origin or '']]</para>
         </td>
         <td>
-          <para style="terp_default_Centre_8">[[ (picking.partner_id and picking.partner_id.title.name) or '' ]] [[ (picking.partner_id and picking.partner_id.name) or '' ]] </para>
-        </td>
-        <td>
           <para style="terp_default_Centre_8">[[ formatLang(picking.min_date,date_time = True) ]]</para>
         </td>
         <td>
@@ -236,7 +232,7 @@
           <para style="terp_tblheader_Details">Description</para>
         </td>
         <td>
-          <para style="terp_tblheader_Details_Centre">Lot</para>
+          <para style="terp_tblheader_Details_Centre">Serial Number</para>
         </td>
         <td>
           <para style="terp_tblheader_Details_Centre">Status</para>
@@ -255,7 +251,8 @@
       <blockTable colWidths="256.0,74.0,58.0,60.0,73.0" style="Move_Line_Contect_Assign_State">
         <tr>
           <td>
-            <para style="terp_default_9"><font face="Helvetica" size="9.0">[ [[ (move_lines.product_id.default_code) or removeParentNode('font') ]] ]</font> [[ move_lines.product_id.name ]] [[ move_lines.product_id.variants or '']] </para>
+            <para style="terp_default_2">[[ repeatIn(get_product_desc(move_lines),'desc') ]]</para>
+            <para style="terp_default_9"><font face="Helvetica" size="9.0">[[ desc ]] </font></para>
           </td>
           <td>
             <para style="terp_default_Centre_9">[[ (move_lines.prodlot_id and move_lines.prodlot_id.name) or '' ]]</para>
@@ -280,7 +277,8 @@
       <blockTable colWidths="256.0,74.0,57.0,61.0,72.0" style="Table1">
         <tr>
           <td>
-            <para style="terp_default_9"><font face="Helvetica" size="9.0">[ [[ (move_lines.product_id.default_code) or removeParentNode('font') ]] ]</font> [[ move_lines.product_id.name ]] [[ move_lines.product_id.variants or '']]</para>
+           <para style="terp_default_2">[[ repeatIn(get_product_desc(move_lines),'desc') ]]</para>
+           <para style="terp_default_9"><font face="Helvetica" size="9.0">[[ desc ]] </font></para>
           </td>
           <td>
             <para style="terp_default_Centre_9">[[ (move_lines.prodlot_id and move_lines.prodlot_id.name) or '' ]]</para>

=== modified file 'stock/report/picking.sxw'
Binary files stock/report/picking.sxw	2012-06-11 07:08:45 +0000 and stock/report/picking.sxw	2012-11-07 06:47:22 +0000 differ
=== modified file 'stock/stock.py'
--- stock/stock.py	2012-11-06 15:04:31 +0000
+++ stock/stock.py	2012-11-07 06:47:22 +0000
@@ -730,7 +730,7 @@
                 model,view_id = mod_obj.get_object_reference(cr, uid, 'stock', 'view_picking_out_form')
         return super(stock_picking,self).fields_view_get(cr, uid, view_id=view_id, view_type=view_type, context=context, toolbar=toolbar, submenu=submenu)
 
-    def onchange_partner_in(self, cr, uid, context=None, partner_id=None):
+    def onchange_partner_in(self, cr, uid, ids, partner_id=None, context=None):
         return {}
 
     def action_explode(self, cr, uid, moves, context=None):

=== modified file 'stock/stock_report.xml'
--- stock/stock_report.xml	2012-05-16 16:01:15 +0000
+++ stock/stock_report.xml	2012-11-07 06:47:22 +0000
@@ -3,7 +3,7 @@
     <data>
         <report auto="False" id="report_product_history" model="product.product" name="stock.product.history" string="Stock Level Forecast"/>
         <report id="report_picking_list" model="stock.picking" name="stock.picking.list" string="Picking Slip" rml="stock/report/picking.rml"/>
-        <report id="report_picking_list_in" model="stock.picking.in" name="stock.picking.list" string="Receipt Slip" rml="stock/report/picking.rml"/>
+        <report id="report_picking_list_in" model="stock.picking.in" name="stock.picking.list" string="Delivery Slip" rml="stock/report/picking.rml"/>
         <report id="report_picking_list_out" model="stock.picking.out" name="stock.picking.list" string="Delivery Slip" rml="stock/report/picking.rml"/>
         <report id="report_move_labels" model="stock.move" name="stock.move.label" string="Item Labels" xml="stock/report/lot_move_label.xml" xsl="stock/report/lot_move_label.xsl"/>
         <report auto="False"  id="report_location_overview" model="stock.location" name="lot.stock.overview" string="Location Inventory Overview" rml="stock/report/lot_overview.rml"/>

=== modified file 'stock/stock_view.xml'
--- stock/stock_view.xml	2012-10-30 04:49:18 +0000
+++ stock/stock_view.xml	2012-11-07 06:47:22 +0000
@@ -1246,7 +1246,7 @@
                             <field name="date_expected" on_change="onchange_date(date,date_expected)"/>
                             <field name="date" groups="base.group_no_one"/>
                         </group>
-                        <group string="Tracability"
+                        <group string="Traceability"
                             groups="stock.group_tracking_lot">
                             <label for="tracking_id" groups="stock.group_tracking_lot"/>
                             <div groups="stock.group_tracking_lot">
@@ -1352,7 +1352,7 @@
             <field eval="3" name="priority"/>
             <field name="arch" type="xml">
                 <search string="Stock Moves">
-                    <field name="origin" domain="['|',('origin','ilike',self),('picking_id','ilike',self)]" string="Reference"/>
+                    <field name="origin" string="Reference"/>
                     <field name="date" groups="base.group_no_one"/>
 
                     <filter icon="terp-camera_test" string="Ready" name="ready" domain="[('state','=','assigned')]" help="Stock moves that are Available (Ready to process)"/>

=== modified file 'stock/wizard/stock_change_product_qty_view.xml'
--- stock/wizard/stock_change_product_qty_view.xml	2012-09-14 05:01:30 +0000
+++ stock/wizard/stock_change_product_qty_view.xml	2012-11-07 06:47:22 +0000
@@ -10,7 +10,7 @@
                         <field name="new_quantity" />
                         <field name="product_id" invisible="1"/>
                         <field name="location_id" groups="stock.group_locations"/>
-                        <field name="prodlot_id" groups="stock.group_tracking_lot"/>
+                        <field name="prodlot_id" context="{'product_id':product_id}" groups="stock.group_tracking_lot"/>
                     </group>
                     <footer>
                         <button name="change_product_qty" string="_Apply" type="object" class="oe_highlight"/>

=== modified file 'stock/wizard/stock_partial_picking_view.xml'
--- stock/wizard/stock_partial_picking_view.xml	2012-09-13 05:41:36 +0000
+++ stock/wizard/stock_partial_picking_view.xml	2012-11-07 06:47:22 +0000
@@ -23,7 +23,7 @@
                             <field name="quantity" />
                             <field name="product_uom" groups="product.group_uom"/>
                             <field name="tracking" invisible="1"/>
-                            <field name="prodlot_id" domain="[('product_id', '=', product_id)]" invisible="context.get('hide_tracking',False)" attrs="{'required':[('tracking','=',True)]}" groups="stock.group_production_lot"/>
+                            <field name="prodlot_id" context="{'product_id':product_id}" domain="[('product_id', '=', product_id)]" invisible="context.get('hide_tracking',False)" attrs="{'required':[('tracking','=',True)]}" groups="stock.group_production_lot"/>
                             <!-- Removed as this feature is not logic: price must be updated upon reception of invoice -->
                             <field name="update_cost" invisible="1"/>
                             <field name="cost"  invisible="1"/>

=== modified file 'warning/warning.py'
--- warning/warning.py	2012-09-26 07:07:43 +0000
+++ warning/warning.py	2012-11-07 06:47:22 +0000
@@ -149,7 +149,7 @@
 class stock_picking(osv.osv):
     _inherit = 'stock.picking'
 
-    def onchange_partner_in(self, cr, uid, context, partner_id=None):
+    def onchange_partner_in(self, cr, uid, ids, partner_id=None, context=None):
         if not partner_id:
             return {}
         partner = self.pool.get('res.partner').browse(cr, uid, partner_id, context=context)
@@ -165,7 +165,7 @@
                 'title': title,
                 'message': message
             }
-        result =  super(stock_picking, self).onchange_partner_in(cr, uid, context, partner_id)
+        result =  super(stock_picking, self).onchange_partner_in(cr, uid, ids, partner_id, context)
         if result.get('warning',False):
             warning['title'] = title and title +' & '+ result['warning']['title'] or result['warning']['title']
             warning['message'] = message and message + ' ' + result['warning']['message'] or result['warning']['message']
@@ -179,7 +179,7 @@
 class stock_picking_in(osv.osv):
     _inherit = 'stock.picking.in'
 
-    def onchange_partner_in(self, cr, uid, context, partner_id=None):
+    def onchange_partner_in(self, cr, uid, ids, partner_id=None, context=None):
         if not partner_id:
             return {}
         partner = self.pool.get('res.partner').browse(cr, uid, partner_id, context=context)
@@ -195,7 +195,7 @@
                 'title': title,
                 'message': message
             }
-        result =  super(stock_picking_in, self).onchange_partner_in(cr, uid, context, partner_id)
+        result =  super(stock_picking_in, self).onchange_partner_in(cr, uid, ids, partner_id, context)
         if result.get('warning',False):
             warning['title'] = title and title +' & '+ result['warning']['title'] or result['warning']['title']
             warning['message'] = message and message + ' ' + result['warning']['message'] or result['warning']['message']
@@ -205,7 +205,7 @@
 class stock_picking_out(osv.osv):
     _inherit = 'stock.picking.out'
 
-    def onchange_partner_in(self, cr, uid, context, partner_id=None):
+    def onchange_partner_in(self, cr, uid, ids, partner_id=None, context=None):
         if not partner_id:
             return {}
         partner = self.pool.get('res.partner').browse(cr, uid, partner_id, context=context)
@@ -221,7 +221,7 @@
                 'title': title,
                 'message': message
             }
-        result =  super(stock_picking_out, self).onchange_partner_in(cr, uid, context, partner_id)
+        result =  super(stock_picking_out, self).onchange_partner_in(cr, uid, ids, partner_id, context)
         if result.get('warning',False):
             warning['title'] = title and title +' & '+ result['warning']['title'] or result['warning']['title']
             warning['message'] = message and message + ' ' + result['warning']['message'] or result['warning']['message']

_______________________________________________
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