[ADD] stock: packing report

bzr revid: nel@tinyerp.com-20100615084644-5qdod7k6vg7c79ty
This commit is contained in:
nel@tinyerp.com 2010-06-15 10:46:44 +02:00
parent 0bd31a32e3
commit dd20f9ff47
10 changed files with 409 additions and 35 deletions

View File

@ -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
}

View File

@ -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()

View File

@ -0,0 +1,19 @@
<?xml version="1.0"?>
<openerp>
<data>
<record id="view_split_in_lots" model="ir.ui.view">
<field name="name">Split in lots</field>
<field name="model">stock.move.split</field>
<field name="type">form</field>
<field name="inherit_id" ref="stock.view_split_in_lots"/>
<field name="arch" type="xml">
<data>
<xpath expr="//form/group/field[@name='line_exist_ids']/tree/field[@name='quantity']" position="after">
<field name="date"/>
</xpath>
</data>
</field>
</record>
</data>
</openerp>

View File

@ -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",

View File

@ -0,0 +1,317 @@
<?xml version="1.0"?>
<document filename="test.pdf">
<template pageSize="(595.0,842.0)" title="Test" author="Martin Simon" allowSplitting="20">
<pageTemplate id="first">
<frame id="first" x1="0.0" y1="57.0" width="538" height="728"/>
</pageTemplate>
</template>
<stylesheet>
<blockTableStyle id="Standard_Outline">
<blockAlignment value="LEFT"/>
<blockValign value="TOP"/>
</blockTableStyle>
<blockTableStyle id="Table_Address_detail">
<blockAlignment value="LEFT"/>
<blockValign value="TOP"/>
</blockTableStyle>
<blockTableStyle id="Table_Title_String">
<blockAlignment value="LEFT"/>
<blockValign value="TOP"/>
</blockTableStyle>
<blockTableStyle id="Header_Order_Reference_Tbl">
<blockAlignment value="LEFT"/>
<blockValign value="TOP"/>
<lineStyle kind="LINEBEFORE" colorName="#e6e6e6" start="0,0" stop="0,-1"/>
<lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="0,0" stop="0,0"/>
<lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="0,-1" stop="0,-1"/>
<lineStyle kind="LINEBEFORE" colorName="#e6e6e6" start="1,0" stop="1,-1"/>
<lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="1,0" stop="1,0"/>
<lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="1,-1" stop="1,-1"/>
<lineStyle kind="LINEBEFORE" colorName="#e6e6e6" start="2,0" stop="2,-1"/>
<lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="2,0" stop="2,0"/>
<lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="2,-1" stop="2,-1"/>
<lineStyle kind="LINEBEFORE" colorName="#e6e6e6" start="3,0" stop="3,-1"/>
<lineStyle kind="LINEAFTER" colorName="#e6e6e6" start="3,0" stop="3,-1"/>
<lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="3,0" stop="3,0"/>
<lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="3,-1" stop="3,-1"/>
</blockTableStyle>
<blockTableStyle id="Content_Order_Reference_Table">
<blockAlignment value="LEFT"/>
<blockValign value="TOP"/>
<lineStyle kind="LINEBEFORE" colorName="#e6e6e6" start="0,0" stop="0,-1"/>
<lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="0,0" stop="0,0"/>
<lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="0,-1" stop="0,-1"/>
<lineStyle kind="LINEBEFORE" colorName="#e6e6e6" start="1,0" stop="1,-1"/>
<lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="1,0" stop="1,0"/>
<lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="1,-1" stop="1,-1"/>
<lineStyle kind="LINEBEFORE" colorName="#e6e6e6" start="2,0" stop="2,-1"/>
<lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="2,0" stop="2,0"/>
<lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="2,-1" stop="2,-1"/>
<lineStyle kind="LINEBEFORE" colorName="#e6e6e6" start="3,0" stop="3,-1"/>
<lineStyle kind="LINEAFTER" colorName="#e6e6e6" start="3,0" stop="3,-1"/>
<lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="3,0" stop="3,0"/>
<lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="3,-1" stop="3,-1"/>
</blockTableStyle>
<blockTableStyle id="Move_Line_Header">
<blockAlignment value="LEFT"/>
<blockValign value="TOP"/>
<lineStyle kind="LINEBELOW" colorName="#000000" start="0,-1" stop="0,-1"/>
<lineStyle kind="LINEBELOW" colorName="#000000" start="1,-1" stop="1,-1"/>
<lineStyle kind="LINEBELOW" colorName="#000000" start="2,-1" stop="2,-1"/>
<lineStyle kind="LINEBELOW" colorName="#000000" start="3,-1" stop="3,-1"/>
<lineStyle kind="LINEBELOW" colorName="#000000" start="4,-1" stop="4,-1"/>
<lineStyle kind="LINEBELOW" colorName="#000000" start="5,-1" stop="5,-1"/>
</blockTableStyle>
<blockTableStyle id="Move_Line_Contect_Assign_State">
<blockAlignment value="LEFT"/>
<blockValign value="TOP"/>
<lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="0,-1" stop="0,-1"/>
<lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="1,-1" stop="1,-1"/>
<lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="2,-1" stop="2,-1"/>
<lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="3,-1" stop="3,-1"/>
<lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="4,-1" stop="4,-1"/>
<lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="5,-1" stop="5,-1"/>
<lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="6,-1" stop="6,-1"/>
</blockTableStyle>
<blockTableStyle id="Move_Line_Content_Other_State">
<blockAlignment value="LEFT"/>
<blockValign value="TOP"/>
<lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="0,-1" stop="0,-1"/>
<lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="1,-1" stop="1,-1"/>
<lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="2,-1" stop="2,-1"/>
<lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="3,-1" stop="3,-1"/>
<lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="4,-1" stop="4,-1"/>
<lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="5,-1" stop="5,-1"/>
</blockTableStyle>
<initialize>
<paraStyle name="all" alignment="justify"/>
</initialize>
<paraStyle name="Standard" fontName="Times-Roman"/>
<paraStyle name="Heading" fontName="Helvetica" fontSize="14.0" leading="17" spaceBefore="12.0" spaceAfter="6.0"/>
<paraStyle name="Text body" fontName="Times-Roman" spaceBefore="0.0" spaceAfter="6.0"/>
<paraStyle name="List" fontName="Times-Roman" spaceBefore="0.0" spaceAfter="6.0"/>
<paraStyle name="Caption" fontName="Times-Italic" fontSize="12.0" leading="15" spaceBefore="6.0" spaceAfter="6.0"/>
<paraStyle name="Index" fontName="Times-Roman"/>
<paraStyle name="terp_header" fontName="Helvetica-Bold" fontSize="12.0" leading="15" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="terp_header_Centre" fontName="Helvetica-Bold" fontSize="12.0" leading="15" alignment="CENTER" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="terp_default_8" fontName="Helvetica" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="terp_default_Bold_8" fontName="Helvetica-Bold" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="terp_tblheader_Details" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="terp_tblheader_Details_Centre" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="CENTER" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="terp_default_Centre_8" fontName="Helvetica" fontSize="8.0" leading="10" alignment="CENTER" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="terp_default_Centre_9" fontName="Helvetica" fontSize="9.0" leading="11" alignment="CENTER" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="terp_tblheader_General" fontName="Helvetica-Bold" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="6.0" spaceAfter="6.0"/>
<paraStyle name="terp_tblheader_General_Centre" fontName="Helvetica-Bold" fontSize="8.0" leading="10" alignment="CENTER" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="Table Contents" fontName="Times-Roman"/>
<paraStyle name="Footer" fontName="Times-Roman"/>
<paraStyle name="Table Heading" fontName="Times-Roman" alignment="CENTER"/>
<paraStyle name="Horizontal Line" fontName="Times-Roman" fontSize="6.0" leading="8" spaceBefore="0.0" spaceAfter="14.0"/>
<paraStyle name="Heading 9" fontName="Helvetica-Bold" fontSize="75%" leading="NaN" spaceBefore="12.0" spaceAfter="6.0"/>
<paraStyle name="terp_tblheader_General_Right" fontName="Helvetica-Bold" fontSize="8.0" leading="10" alignment="RIGHT" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="terp_tblheader_Details_Right" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="RIGHT" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="terp_default_Right_8" fontName="Helvetica" fontSize="8.0" leading="10" alignment="RIGHT" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="terp_header_Right" fontName="Helvetica-Bold" fontSize="15.0" leading="19" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="terp_default_address" fontName="Helvetica" fontSize="10.0" leading="13" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="terp_default_9" fontName="Helvetica" fontSize="9.0" leading="11" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="terp_default_Bold_9" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="terp_default_Right_9" fontName="Helvetica" fontSize="9.0" leading="11" alignment="RIGHT" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="terp_default_2" fontName="Helvetica" fontSize="2.0" leading="3" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="terp_default_5cm_Above_Space" fontName="Helvetica" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="6.0" spaceAfter="0.0"/>
<paraStyle name="terp_default_1cm_above_space" fontName="Helvetica" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="3.0" spaceAfter="0.0"/>
</stylesheet>
<images/>
<story>
<para style="terp_default_8">[[ repeatIn(objects,'picking') ]] </para>
<para style="terp_default_9">
<font color="white"> </font>
</para>
<blockTable colWidths="269.0,269.0" style="Table_Address_detail">
<tr>
<td>
<para style="terp_default_9">
<font color="white"> </font>
</para>
</td>
<td>
<para style="terp_default_9">[[ (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 ]]</para>
<para style="terp_default_9">[[ picking.address_id and picking.address_id.street or '' ]]</para>
<para style="terp_default_9">[[ picking.address_id and picking.address_id.zip or '' ]] [[ picking.address_id and picking.address_id.city or '']]</para>
<para style="terp_default_2">
<font color="white"> </font>
</para>
<para style="terp_default_2">
<font color="white"> </font>
</para>
</td>
</tr>
<tr>
<td>
<para style="terp_default_9">
<font color="white"> </font>
</para>
</td>
<td>
<para style="terp_tblheader_Details">[[ picking.sale_id and picking.sale_id.partner_shipping_id and 'Shipping Address :' or removeParentNode('para') ]] </para>
<para style="terp_default_9">[[ (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 '' ]] </para>
<para style="terp_default_9">[[ (picking.sale_id and picking.sale_id.partner_shipping_id and picking.sale_id.partner_shipping_id.street) or '' ]] </para>
<para style="terp_default_9">[[ (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 '' ]] </para>
<para style="terp_default_9">[[ (picking.address_id and picking.address_id.country_id and picking.address_id.country_id.name) or '' ]]</para>
</td>
</tr>
</blockTable>
<para style="terp_default_5cm_Above_Space">
<font color="white"> </font>
</para>
<para style="terp_default_5cm_Above_Space">
<font color="white"> </font>
</para>
<para style="terp_default_5cm_Above_Space">
<font color="white"> </font>
</para>
<blockTable colWidths="538.0" style="Table_Title_String">
<tr>
<td>
<para style="terp_header">Packing List: [[ picking.name ]]</para>
</td>
</tr>
</blockTable>
<para style="terp_default_5cm_Above_Space">
<font color="white"> </font>
</para>
<para style="terp_default_5cm_Above_Space">
<font color="white"> </font>
</para>
<blockTable colWidths="123.0,134.0,133.0,134.0" style="Header_Order_Reference_Tbl">
<tr>
<td>
<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>
</td>
<td>
<para style="terp_tblheader_General_Centre"> Weight</para>
</td>
</tr>
</blockTable>
<blockTable colWidths="123.0,134.0,133.0,134.0" style="Content_Order_Reference_Table">
<tr>
<td>
<para style="terp_default_Centre_8">[[ picking.origin ]]</para>
</td>
<td>
<para style="terp_default_Centre_8">[[ (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 '' ]] </para>
</td>
<td>
<para style="terp_default_Centre_8">[[ formatLang(picking.min_date,date_time = True) ]]</para>
</td>
<td>
<para style="terp_default_Centre_8">[[ 'weight' in picking._columns.keys() and picking.weight or '']] </para>
</td>
</tr>
</blockTable>
<para style="terp_default_5cm_Above_Space">
<font color="white"> </font>
</para>
<blockTable colWidths="196.0,68.0,56.0,61.0,73.0,70.0" repeatRows="1" style="Move_Line_Header">
<tr>
<td>
<para style="terp_tblheader_Details">Description</para>
</td>
<td>
<para style="terp_tblheader_Details_Centre">Tracking Lot</para>
</td>
<td>
<para style="terp_tblheader_Details_Centre">Lot</para>
</td>
<td>
<para style="terp_tblheader_Details">State</para>
</td>
<td>
<para style="terp_tblheader_Details_Centre">Quantity</para>
</td>
<td>
<para style="terp_tblheader_Details">Location</para>
</td>
</tr>
</blockTable>
<para style="terp_default_2">
<font color="white"> </font>
</para>
<para style="terp_default_2">
<font color="white"> </font>
</para>
<section>
<para style="terp_default_8">[[ repeatIn([line for line in picking.move_lines if (line.state == 'assigned' )],'move_lines') ]]</para>
<blockTable colWidths="197.0,68.0,61.0,57,46.0,26.0,74.0" style="Move_Line_Contect_Assign_State">
<tr>
<td>
<para style="terp_default_9">[ [[ move_lines.product_id.default_code ]] ] [[ move_lines.product_id.name ]] [[ move_lines.product_id.variants or '']] </para>
</td>
<td>
<para style="terp_default_9">[[ move_lines.tracking_id and move_lines.tracking_id.name or '' ]]</para>
</td>
<td>
<para style="terp_default_9">[[ (move_lines.prodlot_id and move_lines.prodlot_id.name) or '' ]]</para>
</td>
<td>
<para style="terp_default_9">[[ move_lines.state ]]</para>
</td>
<td>
<para style="terp_default_Right_9">[[ move_lines.product_qty ]] </para>
</td>
<td>
<para style="terp_default_9">[[ move_lines.product_uom.name ]]</para>
</td>
<td>
<para style="terp_default_9">[[ (move_lines.location_id and move_lines.location_id.name) or '' ]]</para>
</td>
</tr>
</blockTable>
<para style="terp_default_2">
<font color="white"> </font>
</para>
</section>
<para style="terp_default_5cm_Above_Space">[[ (line.state == 'done' or line.state == 'confirmed') and removeParentNode('para') ]]</para>
<para style="terp_default_Bold_9">Non Assigned Products: [[ ( line.state == 'assigned' or line.state == 'done' or line.state == 'confirmed' ) and removeParentNode('para') ]]</para>
<para style="terp_default_1cm_above_space">[[ (line.state == 'done' or line.state == 'confirmed') and removeParentNode('para') ]]</para>
<section>
<para style="terp_default_8">[[ repeatIn([line for line in picking.move_lines if (line.state != 'assigned' )],'move_lines') ]]</para>
<blockTable colWidths="257.0,57.0,62.0,46.0,26.0,74.0" style="Move_Line_Content_Other_State">
<tr>
<td>
<para style="terp_default_9">[ [[ move_lines.product_id.default_code ]] ] [[ move_lines.product_id.name ]] [[ move_lines.product_id.variants or '']]</para>
</td>
<td>
<para style="terp_default_9">[[ (move_lines.prodlot_id and move_lines.prodlot_id.name) or '' ]]</para>
</td>
<td>
<para style="terp_default_9">[[ move_lines.state ]]</para>
</td>
<td>
<para style="terp_default_Right_9">[[ move_lines.product_qty ]] </para>
</td>
<td>
<para style="terp_default_9">[[ move_lines.product_uom.name ]]</para>
</td>
<td>
<para style="terp_default_9">[[ (move_lines.location_id and move_lines.location_id.name) or '' ]]</para>
</td>
</tr>
</blockTable>
<para style="terp_default_2">
<font color="white"> </font>
</para>
</section>
<para style="terp_default_9">
<font color="white"> </font>
</para>
<para style="Standard">
<font color="white"> </font>
</para>
</story>
</document>

View File

@ -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:

View File

@ -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={}):

View File

@ -3,6 +3,7 @@
<data>
<report auto="False" id="report_product_history" model="product.product" name="stock.product.history" string="Future Stock Forecast"/>
<report id="report_picking_list" model="stock.picking" name="stock.picking.list" string="Picking list" rml="stock/report/picking.rml"/>
<report id="report_packing_list" model="stock.picking" name="stock.packing.list" string="Packing list" rml="stock/report/packing.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 Overview" rml="stock/report/lot_overview.rml" groups="base.group_extended"/>
<report auto="False" id="report_lot_location" model="stock.location" name="lot.location" rml="stock/report/lot_location.rml" string="Lots by location"/>

View File

@ -313,6 +313,7 @@
<field name="product_qty" />
<field name="product_uom" string="UOM"/>
<field name="prodlot_id" groups="base.group_extended"/>
<field groups="base.group_extended" name="tracking_id"/>
<field name="product_packaging" domain="[('product_id','=',product_id)]" groups="base.group_extended"/>
<field name="picking_id"/>
<field name="location_id" />
@ -336,6 +337,7 @@
<field name="product_qty" />
<field name="product_uom" string="UOM"/>
<field name="prodlot_id" groups="base.group_extended"/>
<field groups="base.group_extended" name="tracking_id"/>
<field name="product_packaging" domain="[('product_id','=',product_id)]" groups="base.group_extended"/>
<field name="picking_id"/>
<field name="location_id" />
@ -616,7 +618,7 @@
</group>
<notebook colspan="4">
<page string="General Information">
<field colspan="4" name="move_lines" nolabel="1" widget="one2many_list" default_get="{'move_line':move_lines, 'address_out_id': address_id}">
<field colspan="4" name="move_lines" nolabel="1" widget="one2many_list" default_get="{'move_line':move_lines, 'address_out_id': address_id}" editable="top">
<tree colors="grey:state in ('cancel')" string="Stock Moves">
<field name="name" string="Move Name"/>
<field name="product_id"/>
@ -624,6 +626,7 @@
<field name="product_uom" string="UOM"/>
<field name="picking_id"/>
<field name="prodlot_id" groups="base.group_extended"/>
<field groups="base.group_extended" name="tracking_id"/>
<field name="location_id"/>
<field name="location_dest_id"/>
<field name="date_planned"/>
@ -662,9 +665,12 @@
domain="[('product_id','=?',product_id)]"
on_change="onchange_lot_id(prodlot_id,product_qty, location_id, product_id)"/>
<field groups="base.group_extended" name="tracking_id"/>
<newline/>
<label/>
<button name="%(track_line)d" string="Split in production lots" type="action" icon="terp-stock_effects-object-colorize"/>
<button name="%(split_into)d" string="Split into" type="action"
icon="terp-stock_effects-object-colorize" />
<button name="%(move_scrap)d" string="Scrap Move Line" type="action" icon="gtk-justify-fill"/>
<separator colspan="4" string="Move State"/>
<field name="state"/>
@ -774,6 +780,10 @@
<field name="product_uom" string="UOM"/>
<field name="picking_id" />
<field name="prodlot_id" groups="base.group_extended"/>
<field groups="base.group_extended" name="tracking_id"/>
<button name="%(split_into)d" string="Split into" type="action"
icon="terp-stock_effects-object-colorize" attrs="{'invisible': [('tracking_id','&lt;&gt;',False)]}"
states="draft,assigned,confirmed,done"/>
<field name="location_id"/>
<field name="location_dest_id"/>
<field name="date_planned"/>
@ -811,6 +821,9 @@
domain="[('product_id','=?',product_id)]"
on_change="onchange_lot_id(prodlot_id,product_qty, location_id, product_id)"/>
<field groups="base.group_extended" name="tracking_id"/>
<button name="%(split_into)d" string="Split into" type="action"
icon="terp-stock_effects-object-colorize"
states="draft,assigned,confirmed,done"/>
<separator colspan="4" string="Move State"/>
<field name="state"/>
<group colspan="2">
@ -944,7 +957,7 @@
<notebook colspan="4">
<page string="General Information">
<field colspan="4" name="move_lines" nolabel="1" widget="one2many_list" default_get="{'move_line':move_lines, 'address_out_id': address_id}">
<tree colors="grey:state in ('cancel')" string="Stock Moves">
<tree colors="grey:state in ('cancel')" string="Stock Moves" editable="top">
<field name="product_id"/>
<field name="product_qty" on_change="onchange_quantity(product_id, product_qty, product_uom, product_uos)"/>
<field name="product_uom" string="UOM"/>
@ -953,23 +966,17 @@
icon="gtk-convert" context="{'scrap': True}"
states="draft,waiting,confirmed,assigned" />
<field name="prodlot_id" groups="base.group_extended"/>
<button name="%(track_line)d" string="Split" type="action"
<button name="%(track_line)d" string="Split in production lots" type="action"
icon="gtk-justify-fill" attrs="{'invisible': [('prodlot_id','&lt;&gt;',False)]}"
states="assigned,confirmed,done"
groups="base.group_extended"/>
<field name="tracking_id" groups="base.group_extended"/>
<button name="%(split_into)d" string="Split into" type="action"
icon="terp-stock_effects-object-colorize" attrs="{'invisible': [('tracking_id','&lt;&gt;',False)]}"
states="draft,assigned,confirmed,done"/>
<field name="location_id"/>
<field name="date_planned"/>
<field name="state"/>
<button
name="%(stock.track_line)d"
string="Split in production lots"
type="action" icon="terp-stock_effects-object-colorize"
states="draft,waiting,confirmed,assigned" />
<button
name="%(stock.move_scrap)d"
string="Scrap Products" type="action"
icon="gtk-convert"
states="draft,waiting,confirmed,assigned" />
<button name="%(action_partial_move)d" string="Partial" type="action" states="confirmed,assigned" icon="gtk-justify-fill"/>
<button name="action_done" states="confirmed,assigned" string="Done" type="object" icon="gtk-jump-to"/>
</tree>
@ -994,6 +1001,9 @@
domain="[('product_id','=?',product_id)]"
on_change="onchange_lot_id(prodlot_id,product_qty, location_id, product_id)"/>
<field groups="base.group_extended" name="tracking_id"/>
<button name="%(split_into)d" string="Split into" type="action"
icon="terp-stock_effects-object-colorize" attrs="{'invisible': [('tracking_id','&lt;&gt;',False)]}"
states="draft,assigned,confirmed,done"/>
<label/>
<button name="%(track_line)d" string="Split in production lots" type="action" icon="terp-stock_effects-object-colorize"/>
<separator colspan="4" string="Move State"/>
@ -1130,19 +1140,24 @@
<notebook colspan="4">
<page string="General Information">
<field colspan="4" name="move_lines" nolabel="1" widget="one2many_list" default_get="{'move_line':move_lines, 'address_in_id': address_id}">
<tree colors="grey:state in ('cancel')" string="Stock Moves">
<tree colors="grey:state in ('cancel')" string="Stock Moves" editable="top">
<field name="product_id"/>
<field name="product_qty"/>
<field name="product_uom" string="Product Unit of Measure"/>
<field name="location_dest_id"/>
<field name="prodlot_id" groups="base.group_extended"/>
<field name="state"/>
<button
<button
name="%(stock.track_line)d"
string="Split in production lots"
type="action" icon="terp-stock_effects-object-colorize"
states="draft,waiting,confirmed,assigned" />
<button name="%(stock.move_scrap)d"
<field name="tracking_id" groups="base.group_extended"/>
<button name="%(split_into)d" string="Split into" type="action"
icon="terp-stock_effects-object-colorize" attrs="{'invisible': [('tracking_id','&lt;&gt;',False)]}"
states="draft,assigned,confirmed,done"/>
<field name="state"/>
<button name="%(stock.move_scrap)d"
string="Scrap Products" type="action"
icon="gtk-convert" context="{'scrap': True}"
states="draft,waiting,confirmed,assigned" />
@ -1156,23 +1171,21 @@
<field colspan="4" context="location=location_id" name="product_id" on_change="onchange_product_id(product_id, location_id, location_dest_id, parent.address_id)"/>
<field name="product_qty" on_change="onchange_quantity(product_id, product_qty, product_uom, product_uos)"/>
<field name="product_uom"/>
<field groups="product.group_uos" name="product_uos" on_change="onchange_quantity(product_id, product_qty, product_uom, product_uos)"/>
<field groups="product.group_uos" name="product_uos_qty"/>
<field colspan="4" invisible="1" name="name" />
<field groups="base.group_extended" name="date_planned"/>
<field name="date_expected" groups="base.group_extended" string="Date Expected"/>
<field name="date_expected" groups="base.group_extended" string="Date Expected"/>
<field groups="product.group_uos" name="product_uos" on_change="onchange_quantity(product_id, product_qty, product_uom, product_uos)"/>
<newline/>
<newline/>
<field groups="base.group_extended" name="product_packaging" domain="[('product_id','=',product_id)]"/>
<newline/>
<field name="prodlot_id" groups="base.group_extended"
context="{'location_id':location_id, 'product_id':product_id}"
domain="[('product_id','=?',product_id)]"
on_change="onchange_lot_id(prodlot_id,product_qty, location_id, product_id)"/>
<field name="prodlot_id" groups="base.group_extended" context="{'location_id':location_id, 'product_id':product_id}" domain="[('product_id','=?',product_id)]" on_change="onchange_lot_id(prodlot_id,product_qty, location_id, product_id)"/>
<field groups="base.group_extended" name="tracking_id"/>
<newline/>
<newline/>
<label/>
<button groups="base.group_extended" name="%(track_line)d" string="Split in production lots" type="action" icon="terp-stock_effects-object-colorize"/>
<button groups="base.group_extended" name="267" string="Split in production lots" type="action" icon="terp-stock_effects-object-colorize"/>
<button name="275" string="Split Stock Moves" type="action" icon="terp-stock_effects-object-colorize" attrs="{'invisible': [('tracking_id','&lt;&gt;',False)]}" states="draft,assigned,confirmed,done"/>
<separator colspan="4" string="Move State"/>
<field name="state"/>
<group colspan="2">
@ -1309,7 +1322,7 @@
<field name="type">tree</field>
<field eval="6" name="priority"/>
<field name="arch" type="xml">
<tree colors="grey:state in ('cancel');red:(state not in ('cancel','done')) and date_planned > current_date" string="Moves">
<tree colors="grey:state in ('cancel');red:(state not in ('cancel','done')) and date_planned > current_date" string="Moves" editable="top">
<field name="picking_id" select="1"/>
<field name="product_id"/>
<field name="product_qty" on_change="onchange_quantity(product_id, product_qty, product_uom, product_uos)"/>
@ -1323,6 +1336,10 @@
icon="gtk-justify-fill" attrs="{'invisible': [('prodlot_id','&lt;&gt;',False)]}"
states="assigned,confirmed"
groups="base.group_extended"/>
<field groups="base.group_extended" name="tracking_id"/>
<button name="%(split_into)d" string="Split into" type="action"
icon="terp-stock_effects-object-colorize" attrs="{'invisible': [('tracking_id','&lt;&gt;',False)]}"
states="draft,assigned,confirmed,done"/>
<field name="location_id"/>
<field name="location_dest_id"/>
<field name="date_planned"/>
@ -1378,6 +1395,9 @@
domain="[('product_id','=?',product_id)]"
on_change="onchange_lot_id(prodlot_id,product_qty, location_id, product_id)"/>
<button name="%(track_line)d" string="Split in production lots" type="action" icon="terp-stock_effects-object-colorize" colspan="2" />
<button name="%(split_into)d" string="Split Stock Moves" type="action"
icon="terp-stock_effects-object-colorize" attrs="{'invisible': [('tracking_id','&lt;&gt;',False)]}"
states="draft,assigned,confirmed,done"/>
</group>
</page>
</notebook>
@ -1460,17 +1480,19 @@
icon="gtk-convert" context="{'scrap': True}"
states="draft,waiting,confirmed,assigned" />
<field name="prodlot_id" groups="base.group_extended"/>
<button name="%(track_line)d" string="Split" type="action"
icon="gtk-justify-fill" attrs="{'invisible': [('prodlot_id','&lt;&gt;',False)]}"
<button name="%(track_line)d" string="Split in production lots" type="action"
icon="terp-stock_effects-object-colorize" attrs="{'invisible': [('prodlot_id','&lt;&gt;',False)]}"
states="assigned,confirmed,done"
context="{'default_use_exist': picking_id.type=='in'}"
groups="base.group_extended"/>
<field name="tracking_id" groups="base.group_extended"/>
<button name="%(split_into)d" string="Split Stock Moves" type="action"
icon="terp-stock_effects-object-colorize" attrs="{'invisible': [('tracking_id','&lt;&gt;',False)]}"
states="draft,assigned,confirmed,done"/>
<field name="date_planned"/>
<field name="backorder_id" groups="base.group_extended"/>
<field name="state"/>
<button name="%(track_line)d" string="Split in production lots" type="action" icon="terp-stock_effects-object-colorize" states="draft,waiting,confirmed,assigned"/>
<button name="%(action_partial_move)d" string="Partial" type="action" states="assigned" icon="gtk-justify-fill"/>
<button name="action_assign" states="confirmed" string="Set Available" type="object" icon="gtk-yes"/>
<button name="action_done" states="assigned" string="Done" type="object" icon="gtk-jump-to"/>
</tree>
</field>
</record>
@ -1506,7 +1528,10 @@
context="{'location_id':location_id, 'product_id':product_id}"
domain="[('product_id','=?',product_id)]"
on_change="onchange_lot_id(prodlot_id,product_qty, location_id, product_id)"/>
<field name="tracking_id"/>
<field groups="base.group_extended" name="tracking_id"/>
<button name="%(split_into)d" string="Split Stock Moves" type="action"
icon="terp-stock_effects-object-colorize" attrs="{'invisible': [('tracking_id','&lt;&gt;',False)]}"
states="draft,assigned,confirmed,done"/>
<newline/>
<group col="2" colspan="2">
<label/>

View File

@ -21,6 +21,7 @@
import stock_traceability
import stock_move
import stock_splitinto
import stock_partial_picking
import stock_partial_move
import stock_replacement