diff --git a/addons/product_expiry/__terp__.py b/addons/product_expiry/__terp__.py index 1983088a484..2e44f2c6462 100644 --- a/addons/product_expiry/__terp__.py +++ b/addons/product_expiry/__terp__.py @@ -31,7 +31,7 @@ - removal date - alert date Used, for example, in food industries.''', - "update_xml" : ["product_expiry_view.xml", "report/report_stock_view.xml"], + "update_xml" : ["product_expiry_view.xml", "report/report_stock_view.xml", "wizard/stock_partial_view.xml"], "active": False, "installable": True } diff --git a/addons/product_expiry/wizard/stock_partial.py b/addons/product_expiry/wizard/stock_partial.py index 4edb01073e7..bc44628078c 100644 --- a/addons/product_expiry/wizard/stock_partial.py +++ b/addons/product_expiry/wizard/stock_partial.py @@ -62,3 +62,11 @@ class stock_partial_lot_picking(osv.osv_memory): return res stock_partial_lot_picking() +class stock_move_split_lines_exist(osv.osv_memory): + _name = "stock.move.split.lines.exist" + _inherit = "stock.move.split.lines.exist" + _columns = { + 'date': fields.date('Date'), + } + +stock_move_split_lines_exist() diff --git a/addons/product_expiry/wizard/stock_partial_view.xml b/addons/product_expiry/wizard/stock_partial_view.xml new file mode 100644 index 00000000000..fabc531cf14 --- /dev/null +++ b/addons/product_expiry/wizard/stock_partial_view.xml @@ -0,0 +1,19 @@ + + + + + + Split in lots + stock.move.split + form + + + + + + + + + + + diff --git a/addons/stock/__openerp__.py b/addons/stock/__openerp__.py index 32adb5e84d2..f0a03f9f2a5 100644 --- a/addons/stock/__openerp__.py +++ b/addons/stock/__openerp__.py @@ -50,6 +50,7 @@ Thanks to the double entry management, the inventory controlling is powerful and "wizard/stock_invoice_onshipping_view.xml", "wizard/stock_inventory_merge_view.xml", "wizard/stock_location_product_view.xml", + "wizard/stock_splitinto_view.xml", "wizard/stock_inventory_line_split_view.xml", "wizard/stock_change_standard_price_view.xml", "wizard/stock_traceability_view.xml", diff --git a/addons/stock/report/packing.rml b/addons/stock/report/packing.rml new file mode 100644 index 00000000000..c2cceb26238 --- /dev/null +++ b/addons/stock/report/packing.rml @@ -0,0 +1,317 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + [[ repeatIn(objects,'picking') ]] + + + + + + + + + + + + [[ (picking.address_id and picking.address_id.partner_id and picking.address_id.partner_id.title) or '' ]] [[ picking.address_id and picking.address_id.partner_id and picking.address_id.partner_id.name ]] + [[ picking.address_id and picking.address_id.street or '' ]] + [[ picking.address_id and picking.address_id.zip or '' ]] [[ picking.address_id and picking.address_id.city or '']] + + + + + + + + + + + + + + + + + [[ picking.sale_id and picking.sale_id.partner_shipping_id and 'Shipping Address :' or removeParentNode('para') ]] + [[ (picking.sale_id and picking.sale_id.partner_shipping_id and picking.sale_id.partner_shipping_id.title) or '' ]] [[ (picking.sale_id and picking.sale_id.partner_shipping_id and picking.sale_id.partner_shipping_id.name) or '' ]] + [[ (picking.sale_id and picking.sale_id.partner_shipping_id and picking.sale_id.partner_shipping_id.street) or '' ]] + [[ (picking.sale_id and picking.sale_id.partner_shipping_id and picking.sale_id.partner_shipping_id.zip) or '' ]] [[ (picking.sale_id and picking.sale_id.partner_shipping_id and picking.sale_id.partner_shipping_id.city) or '' ]] [[ (picking.address_id and picking.address_id.state_id and picking.address_id.state_id.name) or '' ]] + [[ (picking.address_id and picking.address_id.country_id and picking.address_id.country_id.name) or '' ]] + + + + + + + + + + + + + + + + Packing List: [[ picking.name ]] + + + + + + + + + + + + + Order(Origin) + + + Recipient + + + Expected Shipping Date + + + Weight + + + + + + + [[ picking.origin ]] + + + [[ (picking.sale_id and picking.sale_id.partner_shipping_id and picking.sale_id.partner_shipping_id and picking.sale_id.partner_shipping_id.title) or '' ]] [[ (picking.sale_id and picking.sale_id.partner_shipping_id and picking.sale_id.partner_shipping_id.name) or '' ]] + + + [[ formatLang(picking.min_date,date_time = True) ]] + + + [[ 'weight' in picking._columns.keys() and picking.weight or '']] + + + + + + + + + + Description + + + Tracking Lot + + + Lot + + + State + + + Quantity + + + Location + + + + + + + + + +
+ [[ repeatIn([line for line in picking.move_lines if (line.state == 'assigned' )],'move_lines') ]] + + + + [ [[ move_lines.product_id.default_code ]] ] [[ move_lines.product_id.name ]] [[ move_lines.product_id.variants or '']] + + + [[ move_lines.tracking_id and move_lines.tracking_id.name or '' ]] + + + [[ (move_lines.prodlot_id and move_lines.prodlot_id.name) or '' ]] + + + [[ move_lines.state ]] + + + [[ move_lines.product_qty ]] + + + [[ move_lines.product_uom.name ]] + + + [[ (move_lines.location_id and move_lines.location_id.name) or '' ]] + + + + + + +
+ [[ (line.state == 'done' or line.state == 'confirmed') and removeParentNode('para') ]] + Non Assigned Products: [[ ( line.state == 'assigned' or line.state == 'done' or line.state == 'confirmed' ) and removeParentNode('para') ]] + [[ (line.state == 'done' or line.state == 'confirmed') and removeParentNode('para') ]] +
+ [[ repeatIn([line for line in picking.move_lines if (line.state != 'assigned' )],'move_lines') ]] + + + + [ [[ move_lines.product_id.default_code ]] ] [[ move_lines.product_id.name ]] [[ move_lines.product_id.variants or '']] + + + [[ (move_lines.prodlot_id and move_lines.prodlot_id.name) or '' ]] + + + [[ move_lines.state ]] + + + [[ move_lines.product_qty ]] + + + [[ move_lines.product_uom.name ]] + + + [[ (move_lines.location_id and move_lines.location_id.name) or '' ]] + + + + + + +
+ + + + + + +
+
diff --git a/addons/stock/report/picking.py b/addons/stock/report/picking.py index 8ab08a5016c..4dcbac4b9a0 100644 --- a/addons/stock/report/picking.py +++ b/addons/stock/report/picking.py @@ -32,4 +32,5 @@ class picking(report_sxw.rml_parse): }) report_sxw.report_sxw('report.stock.picking.list','stock.picking','addons/stock/report/picking.rml',parser=picking) +report_sxw.report_sxw('report.stock.packing.list','stock.picking','addons/stock/report/packing.rml',parser=picking) # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/stock/stock.py b/addons/stock/stock.py index d6d3a23efa7..eefd359ab39 100644 --- a/addons/stock/stock.py +++ b/addons/stock/stock.py @@ -1392,7 +1392,8 @@ class stock_move(osv.osv): move_list = self.pool.get('stock.move').read(cr, uid, context['move_line'][0], ['location_dest_id']) return move_list and move_list['location_dest_id'][0] or False if context.get('address_out_id', False): - return self.pool.get('res.partner.address').browse(cr, uid, context['address_out_id'], context).partner_id.property_stock_customer.id + property_out = self.pool.get('res.partner.address').browse(cr, uid, context['address_out_id'], context).partner_id.property_stock_customer + return property_out and property_out.id or False return False def _default_location_source(self, cr, uid, context={}): diff --git a/addons/stock/stock_report.xml b/addons/stock/stock_report.xml index 3084e8527a7..547ed785cd1 100644 --- a/addons/stock/stock_report.xml +++ b/addons/stock/stock_report.xml @@ -3,6 +3,7 @@ + diff --git a/addons/stock/stock_view.xml b/addons/stock/stock_view.xml index 0e26df8bdf9..f9ac9622d56 100644 --- a/addons/stock/stock_view.xml +++ b/addons/stock/stock_view.xml @@ -313,6 +313,7 @@ + @@ -336,6 +337,7 @@ + @@ -616,7 +618,7 @@ - + @@ -624,6 +626,7 @@ + @@ -662,9 +665,12 @@ domain="[('product_id','=?',product_id)]" on_change="onchange_lot_id(prodlot_id,product_qty, location_id, product_id)"/> +