[MERGE]: Merged with trunk-dev-addons1.

bzr revid: uco@tinyerp.com-20100513114114-7d1rlr7cq0fcb7im
This commit is contained in:
uco (OpenERP)
2010-05-13 17:11:14 +05:30
25 changed files with 615 additions and 428 deletions
+12 -11
View File
@@ -249,7 +249,7 @@
<newline/>
<field name="product_uom"/>
<field name="product_qty"/>
<field name="routing_id" groups="base.group_extended"/>
<field name="routing_id" groups="base.group_extended" select="1"/>
<newline/>
<field name="product_uos" groups="product.group_uos"/>
<field name="product_uos_qty" groups="product.group_uos"/>
@@ -471,10 +471,10 @@
<field name="arch" type="xml">
<form string="Manufacturing Orders">
<group colspan="4" col="6">
<field name="name" select="1" string="Reference"/>
<field name="date_planned" select="1"/>
<field name="origin" select="1"/>
<field name="product_id" on_change="product_id_change(product_id)" select="1"/>
<field name="name" string="Reference"/>
<field name="date_planned"/>
<field name="origin"/>
<field name="product_id" on_change="product_id_change(product_id)"/>
<field name="product_qty"/>
<group colspan="2" col="3">
<field name="product_uom"/>
@@ -493,7 +493,7 @@
<notebook colspan="4">
<page string="Consumed Products">
<field name="bom_id" domain="[('product_id','=',product_id),('bom_id','=',False)]" on_change="bom_id_change(bom_id)"/>
<field name="routing_id" groups="base.group_extended" select="1"/>
<field name="routing_id" groups="base.group_extended"/>
<field name="location_src_id" domain="[('usage','=','internal')]" on_change="location_id_change(location_src_id,location_dest_id)"/>
<field name="location_dest_id" domain="[('usage','=','internal')]"/>
<separator string="" colspan="4"/>
@@ -592,8 +592,8 @@
<page string="Work Orders" groups="base.group_extended">
<field colspan="4" name="workcenter_lines" nolabel="1">
<form string="Production Work Centers">
<field colspan="4" name="name" select="1"/>
<field colspan="4" name="workcenter_id" select="1"/>
<field colspan="4" name="name"/>
<field colspan="4" name="workcenter_id"/>
<field name="sequence"/>
<field name="cycle"/>
<field name="hour"/>
@@ -611,7 +611,7 @@
<field colspan="4" name="product_lines" nolabel="1" widget="one2many_list"/>
</page>
<page string="Extra Information">
<field name="company_id" select="1" groups="base.group_multi_company" widget="selection"/>
<field name="company_id" groups="base.group_multi_company" widget="selection"/>
<field name="priority" groups="base.group_extended"/>
<newline/>
<field name="date_start"/>
@@ -636,8 +636,7 @@
<filter icon="terp-mrp" string="Draft"
domain="[('state','=','draft')]"
help="Non confirmed manufacturing orders"/>
<filter icon="terp-mrp" string="Current"
default="1"
<filter icon="terp-mrp" name="current" string="Current"
domain="[('state','in',('confirmed','ready'))]"
help="Manufacturing Orders which are waiting for raw materials"/>
<filter icon="terp-mrp" string="Ready"
@@ -674,6 +673,7 @@
<field name="res_model">mrp.production</field>
<field name="view_type">form</field>
<field name="view_mode">tree,form,calendar,graph,gantt</field>
<field name="context">{'search_default_current':1}</field>
<field name="view_id" eval="False"/>
<field name="search_view_id" ref="view_mrp_production_filter"/>
</record>
@@ -799,6 +799,7 @@
</xpath>
</field>
</record>
<act_window
id="action_product_bom_structure"
name="Product BoM Structure"
@@ -48,8 +48,8 @@
<field name="arch" type="xml">
<search string="Search">
<group col="16" colspan="6">
<filter string="This Year" icon="terp-mrp" domain="[('name','=',time.localtime()[0])]" default="1" />
<filter string="This Month" icon="terp-mrp" domain="[('month','=',time.strftime('%%m'))]" default="1"/>
<filter string="This Year" name="this_year" icon="terp-mrp" domain="[('name','=',time.localtime()[0])]"/>
<filter string="This Month" name="this_month" icon="terp-mrp" domain="[('month','=',time.strftime('%%m'))]"/>
<separator orientation="vertical"/>
<filter string="Current" icon="terp-mrp" domain="[('state','in',('open','draft'))]"/>
<separator orientation="vertical"/>
@@ -101,7 +101,7 @@
<field name="view_mode">tree,graph</field>
<field name="view_id" ref="view_report_mrp_production_order_tree"/>
<field name="search_view_id" ref="view_report_mrp_production_order_filter"/>
<field name="context">{'search_default_Product': 1}</field>
<field name="context">{'search_default_Product': 1,'search_default_this_year':1,'search_default_this_month':1}</field>
</record>
+81 -14
View File
@@ -135,19 +135,36 @@
<lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="3,-1" stop="3,-1"/>
<lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="4,-1" stop="4,-1"/>
</blockTableStyle>
<blockTableStyle id="Table7">
<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"/>
</blockTableStyle>
<blockTableStyle id="Table10">
<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"/>
</blockTableStyle>
<initialize>
<paraStyle name="all" alignment="justify"/>
</initialize>
<paraStyle name="Standard" fontName="Times-Roman"/>
<paraStyle name="Text body" fontName="Times-Roman" spaceBefore="0.0" spaceAfter="6.0"/>
<paraStyle name="Standard" fontName="Helvetica"/>
<paraStyle name="Text body" fontName="Helvetica" spaceBefore="0.0" spaceAfter="6.0"/>
<paraStyle name="Heading" fontName="Helvetica" fontSize="14.0" leading="17" spaceBefore="12.0" spaceAfter="6.0"/>
<paraStyle name="List" fontName="Times-Roman" spaceBefore="0.0" spaceAfter="6.0"/>
<paraStyle name="Table Contents" fontName="Times-Roman"/>
<paraStyle name="Table Heading" fontName="Times-Roman" alignment="CENTER"/>
<paraStyle name="Caption" fontName="Times-Roman" fontSize="12.0" leading="15" spaceBefore="6.0" spaceAfter="6.0"/>
<paraStyle name="Index" fontName="Times-Roman"/>
<paraStyle name="Footer" fontName="Times-Roman"/>
<paraStyle name="Horizontal Line" fontName="Times-Roman" fontSize="6.0" leading="8" spaceBefore="0.0" spaceAfter="14.0"/>
<paraStyle name="List" fontName="Helvetica" spaceBefore="0.0" spaceAfter="6.0"/>
<paraStyle name="Table Contents" fontName="Helvetica"/>
<paraStyle name="Table Heading" fontName="Helvetica" alignment="CENTER"/>
<paraStyle name="Caption" fontName="Helvetica" fontSize="12.0" leading="15" spaceBefore="6.0" spaceAfter="6.0"/>
<paraStyle name="Index" fontName="Helvetica"/>
<paraStyle name="Footer" fontName="Helvetica"/>
<paraStyle name="Horizontal Line" fontName="Helvetica" fontSize="6.0" leading="8" spaceBefore="0.0" spaceAfter="14.0"/>
<paraStyle name="terp_header" fontName="Helvetica-Bold" fontSize="15.0" leading="19" alignment="LEFT" spaceBefore="12.0" spaceAfter="6.0"/>
<paraStyle name="Heading 9" fontName="Helvetica-Bold" fontSize="75%" leading="NaN" spaceBefore="12.0" spaceAfter="6.0"/>
<paraStyle name="terp_tblheader_General" fontName="Helvetica-Bold" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="6.0" spaceAfter="6.0"/>
@@ -172,6 +189,7 @@
</stylesheet>
<images/>
<story>
<section>
<para style="terp_default_8">[[ repeatIn(objects,'o') ]] </para>
<para style="terp_default_8">
<font color="white"> </font>
@@ -313,7 +331,10 @@
<para style="terp_default_8">
<font color="white"> </font>
</para>
<section>
<para style="terp_default_Bold_9">Products to Consume</para>
<blockTable colWidths="235.0,82.0,107.0,104.0" style="Table8">
<para> <font color="white"> [[ o.move_lines ==[] and removeParentNode('section')]]</font></para>
<tr>
<td>
<para style="terp_tblheader_Details">Product </para>
@@ -329,9 +350,10 @@
</td>
</tr>
</blockTable>
</section>
<section>
<para style="terp_default_8">[[ repeatIn(o.move_lines,'line') ]]</para>
<blockTable colWidths="235.0,47.0,34.0,108.0,104.0" style="Table9">
<para style="terp_default_8">[[ repeatIn(o.move_lines,'line') ]]</para>
<tr>
<td>
<para style="terp_default_9">[[ line.product_id.code ]] [[ line.product_id.name ]]</para>
@@ -350,9 +372,54 @@
</td>
</tr>
</blockTable>
<para style="terp_default_2">
<font color="white"> </font>
</para>
</section>
<para style="terp_default_space">
<font color="white"> </font>
</para>
<section>
<para style="terp_default_Bold_9">Consumed Products</para>
<blockTable colWidths="235.0,82.0,107.0,104.0" style="Table7">
<para> <font color="white"> [[ o.move_lines2 ==[] and removeParentNode('section')]]</font></para>
<tr>
<td>
<para style="terp_tblheader_Details">Product </para>
</td>
<td>
<para style="terp_tblheader_Details_Centre">Quantity</para>
</td>
<td>
<para style="terp_tblheader_Details_Centre">Source Location</para>
</td>
<td>
<para style="terp_tblheader_Details_Centre">Destination Location</para>
</td>
</tr>
</blockTable>
</section>
<section>
<blockTable colWidths="235.0,47.0,34.0,108.0,104.0" style="Table10">
<para style="terp_default_8">[[ repeatIn(o.move_lines2,'line2') ]]</para>
<tr>
<td>
<para style="terp_default_9">[[ line2.product_id.code ]] [[ line2.product_id.name ]]</para>
</td>
<td>
<para style="terp_default_Right_9">[[ formatLang( line2.product_qty) ]] </para>
</td>
<td>
<para style="terp_default_9">[[line2.product_uom.name]]</para>
</td>
<td>
<para style="terp_default_Centre_9">[[ line2.location_id.name ]]</para>
</td>
<td>
<para style="terp_default_Centre_9">[[ line2.location_dest_id.name ]]</para>
</td>
</tr>
</blockTable>
</section>
</section>
</story>
</document>
</document>
+11 -10
View File
@@ -29,20 +29,20 @@
<form string="Procurement">
<group col="2" colspan="2">
<separator colspan="2" string="References"/>
<field name="name" select="1" string="Procurement Reason"/>
<field name="name" string="Procurement Reason"/>
<field name="origin"/>
<field name="company_id" select="1" groups="base.group_multi_company" widget="selection"/>
<field name="company_id" groups="base.group_multi_company" widget="selection"/>
</group>
<group col="2" colspan="2">
<separator colspan="2" string="Planification"/>
<field name="date_planned" select="1"/>
<field name="date_planned"/>
<field name="procure_method"/>
<field name="priority" groups="base.group_extended"/>
</group>
<notebook colspan="4">
<page string="Procurement Details">
<separator colspan="4" string="Product &amp; Location"/>
<field name="product_id" select="1" on_change="onchange_product_id(product_id)"/>
<field name="product_id" on_change="onchange_product_id(product_id)"/>
<field name="location_id" domain="[('usage','=','internal')]"/>
<field name="product_qty"/>
<field name="product_uom"/>
@@ -85,7 +85,7 @@
<field name="arch" type="xml">
<search string="Search Procurement">
<group col='10' colspan='4'>
<filter icon="terp-mrp" string="Current" domain="[('state','in',('draft','confirmed'))]" default="1" help="Procurement Orders in draft or open state."/>
<filter icon="terp-mrp" string="Current" domain="[('state','in',('draft','confirmed'))]" name="current" help="Procurement Orders in draft or open state."/>
<filter icon="terp-mrp" string="Exceptions" domain="[('state','=','exception')]" help="Procurement Orders with exceptions"/>
<filter icon="terp-mrp" string="Late"
domain="['&amp;', ('date_planned::date','&lt;', current_date), ('state', 'in', ('draft', 'confirmed'))]"
@@ -112,6 +112,7 @@
<field name="res_model">mrp.procurement</field>
<field name="view_type">form</field>
<field name="view_id" eval="False"/>
<field name="context">{'search_default_current':1}</field>
<field name="search_view_id" ref="view_mrp_procurement_filter"/>
</record>
@@ -179,11 +180,11 @@
<field name="arch" type="xml">
<search string="Minimum Stock Rules Search">
<group col="10" colspan="4">
<field name="name" select="1" />
<field name="warehouse_id" select="1" widget="selection"/>
<field name="location_id" select="1" />
<field name="company_id" select="1" widget="selection"/>
<field name="product_id" select="1"/>
<field name="name"/>
<field name="warehouse_id" widget="selection"/>
<field name="location_id"/>
<field name="company_id" widget="selection"/>
<field name="product_id"/>
</group>
<newline/>
<group expand="1" string="Group By..." colspan="4" col="10">
+12 -12
View File
@@ -13,7 +13,7 @@
<group colspan="4" col="6">
<field name="user_salesman_id" />
<field name="partner_id" on_change="onchange_partner_pricelist(partner_id)"/>
<field name="contract_number" select="1" groups="base.group_extended"/>
<field name="contract_number" groups="base.group_extended"/>
</group>
<field name="lines" colspan="4" nolabel="1">
<tree string="Order lines" editable="bottom">
@@ -60,7 +60,7 @@
</group>
<separator colspan="4" string="Actions"/>
<group colspan="4" col="6">
<field name="state" select="1"/>
<field name="state"/>
<button name="%(action_pos_payment)d" string="Ma_ke Payment" icon="gtk-ok" type="action" states="draft,advance" />
<button name="%(action_report_pos_receipt)d" string="_Reprint" icon="gtk-print" type="action" states="paid,done,invoiced"/>
<button name="set_to_draft" string="Set to draft" states="paid" icon="gtk-execute" type="object" />
@@ -74,16 +74,16 @@
<separator string="Order Information" colspan="4"/>
<field name="company_id"/>
<field name="shop_id" widget="selection" />
<field name="name" select="1"/>
<field name="name"/>
<field name="user_id" />
<field name="sale_manager" />
<field name="price_type" />
</group>
<group colspan="2" col="2" name="Type">
<separator string="Dates" colspan="4"/>
<field name="date_order" select="1" />
<field name="date_validation" select="1" />
<field name="date_payment" select="1" groups="base.group_extended"/>
<field name="date_order"/>
<field name="date_validation" />
<field name="date_payment" groups="base.group_extended"/>
</group>
<group colspan="4">
<separator string="Invoicing" colspan="4"/>
@@ -135,12 +135,12 @@
<field name="arch" type="xml">
<tree string="POS Orders">
<field name="name"/>
<field name="date_order" select="1"/>
<field name="date_order"/>
<field name="date_validation"/>
<field name="date_payment"/>
<field name="user_id"/>
<field name="invoice_id"/>
<field name="state" select="1"/>
<field name="state" />
<field name="amount_total" sum="Amount total"/>
<field name="company_id"/>
</tree>
@@ -155,12 +155,12 @@
<filter icon="terp-sale" string="Quotations" domain="[('state','=','draft')]"/>
<filter icon="terp-sale" string="Running" domain="[('state','in',('payment','advance'))]"/>
<separator orientation="vertical"/>
<field name="name" select="1"/>
<field name="partner_id" select="1"/>
<field name="user_id" select="1" widget="selection">
<field name="name"/>
<field name="partner_id"/>
<field name="user_id" widget="selection">
<filter icon="terp-partner" string="My Sale" domain="[('user_id','=',uid)]" help="My Sale Orders" />
</field>
<field name="date_order" select="1" string="Order date" />
<field name="date_order" string="Order date" />
<newline/>
<group expand="1" string="Group By..." colspan="11" col="11">
<filter string="Customer" icon="terp-sale" domain="[]" context="{'group_by':'partner_id'}"/>
+10 -10
View File
@@ -14,12 +14,12 @@
<filter string="Can be sold" icon="terp-stock" domain="[('sale_ok','=',1)]"/>
<filter string="Can be Purchased" icon="terp-stock" domain="[('purchase_ok', '=', 1)]" />
<separator orientation="vertical"/>
<field name="default_code" select="1"/>
<field name="name" select="1"/>
<field name="categ_id" select="1" widget="selection" operator="child_of"/>
<field name="default_code"/>
<field name="name"/>
<field name="categ_id" widget="selection" operator="child_of"/>
<newline/>
<group col='8' colspan='14' expand="1" string="Extended options...">
<field name="pricelist_id" select="1" widget="selection" context="{'pricelist': self}" />
<field name="pricelist_id" widget="selection" context="{'pricelist': self}" />
</group>
<newline/>
<group col='8' colspan='15' expand='1' string='Group by...'>
@@ -65,12 +65,12 @@
<group colspan="4" col="6">
<group colspan="4" col="2">
<separator string="Product Description" colspan="4"/>
<field name="name" select="1" />
<field name="name"/>
<field groups="product.group_product_variant" name="variants" />
</group>
<group colspan="1" col="2">
<separator string="Codes" colspan="2"/>
<field name="default_code" select="1"/>
<field name="default_code"/>
<field name="ean13" groups="base.group_extended"/>
</group>
<group colspan="1" col="2">
@@ -99,7 +99,7 @@
<group colspan="2" col="2" name="status">
<separator string="Status" colspan="2"/>
<field name="categ_id" select="1"/>
<field name="categ_id"/>
<field name="state"/>
<field groups="base.group_extended" name="product_manager"/>
</group>
@@ -162,10 +162,10 @@
<page groups="base.group_extended" string="Packaging">
<field colspan="4" name="packaging" nolabel="1">
<form string="Packaging">
<field name="ean" select="1"/>
<field name="ean"/>
<field name="sequence" invisible="1"/>
<newline/>
<field name="qty" select="1"/>
<field name="qty"/>
<field name="ul"/>
<field name="weight_ul"/>
<separator colspan="4" string="Palletization"/>
@@ -177,7 +177,7 @@
<field name="width"/>
<field name="length"/>
<separator colspan="4" string="Other Info"/>
<field colspan="4" name="name" select="1"/>
<field colspan="4" name="name"/>
</form>
</field>
</page>
+6 -6
View File
@@ -68,7 +68,7 @@
<field name="arch" type="xml">
<form string="Purchase Order">
<group col="6" colspan="4">
<field name="name" select="1"/>
<field name="name"/>
<field name="date_order"/>
<field name="invoiced"/>
<newline/>
@@ -79,7 +79,7 @@
</group>
<notebook colspan="4">
<page string="Purchase Order">
<field name="partner_id" on_change="onchange_partner_id(partner_id)" select="1" domain="[('supplier','=', 1)]"/>
<field name="partner_id" on_change="onchange_partner_id(partner_id)" domain="[('supplier','=', 1)]"/>
<field name="partner_address_id"/>
<field domain="[('type','=','purchase')]" name="pricelist_id" groups="base.group_extended"/>
<field name="partner_ref"/>
@@ -157,10 +157,10 @@
<separator orientation="vertical"/>
<filter icon="terp-purchase" string="To Invoice" domain="[('invoiced','=',1)]" separator="1"/>
<separator orientation="vertical"/>
<field name="name" select="1" string="Reference"/>
<field name="partner_id" select="1"/>
<field name="product_id" select="1"/>
<field name="create_uid" select="1" widget="selection">
<field name="name" string="Reference"/>
<field name="partner_id"/>
<field name="product_id"/>
<field name="create_uid" widget="selection">
<filter icon="terp-partner" domain="[('create_uid','=',uid)]" help="My Purchase Orders"/>
</field>
</group>
@@ -33,13 +33,13 @@
<field name="arch" type="xml">
<form string="Purchase Requisition">
<group colspan="4" col="6">
<field name="name" select="1"/>
<field name="user_id" select="1"/>
<field name="exclusive" select="1"/>
<field name="name"/>
<field name="user_id"/>
<field name="exclusive"/>
<field name="date_start"/>
<field name="date_end"/>
<field name="origin"/>
<field name="company_id" select="1" groups="base.group_multi_company" widget="selection"/>
<field name="company_id" groups="base.group_multi_company" widget="selection"/>
</group>
<notebook colspan="4">
@@ -78,7 +78,6 @@
<field name="purchase_ids" nolabel="1" colspan="4"/>
</page>
</notebook>
</form>
</field>
</record>
@@ -109,13 +108,13 @@
<filter icon="terp-purchase" string="Current" domain="[('state','=','draft,in_progress')]" separator="1" help="Current Purchaes Requisition"/>
<filter icon="terp-purchase" string="Done" domain="[('state','=','done')]" separator="1" help="Current Purchaes Requisition"/>
<separator orientation="vertical"/>
<field name="name" select="1" string="Requisition Reference"/>
<field name="purchase_ids" select="1"/>
<field name="user_id" select="1" widget="selection">
<field name="name" string="Requisition Reference"/>
<field name="purchase_ids"/>
<field name="user_id" widget="selection">
<filter icon="terp-partner" domain="[('create_uid','=',uid)]" help="My Requisition "/>
</field>
<field name="exclusive" select="1" />
<field name="company_id" select="1" groups="base.group_multi_company" widget="selection"/>
<field name="exclusive"/>
<field name="company_id" groups="base.group_multi_company" widget="selection"/>
</group>
<newline/>
<group expand="1" string="Group By..." colspan="4" col="10">
+25 -24
View File
@@ -97,16 +97,16 @@
<field name="arch" type="xml">
<form string="Sales order">
<group col="6" colspan="4">
<field name="name" select="1"/>
<field name="name"/>
<field name="client_order_ref"/>
<field name="shipped"/>
<field name="date_order" select="1"/>
<field name="date_order"/>
<field name="shop_id" on_change="onchange_shop_id(shop_id)" widget="selection" groups="base.group_extended"/>
<field name="invoiced"/>
</group>
<notebook colspan="4">
<page string="Sale Order">
<field name="partner_id" on_change="onchange_partner_id(partner_id)" required="1" select="1"/>
<field name="partner_id" on_change="onchange_partner_id(partner_id)" required="1"/>
<field domain="[('partner_id','=',partner_id)]" name="partner_order_id"/>
<field domain="[('partner_id','=',partner_id)]" name="partner_invoice_id"/>
<field domain="[('partner_id','=',partner_id)]" name="partner_shipping_id"/>
@@ -123,12 +123,12 @@
context="partner_id=parent.partner_id,quantity=product_uom_qty,pricelist=parent.pricelist_id,shop=parent.shop_id,uom=product_uom"
name="product_id"
on_change="product_id_change(parent.pricelist_id,product_id,product_uom_qty,product_uom,product_uos_qty,product_uos,name,parent.partner_id, 'lang' in context and context['lang'], True, parent.date_order, product_packaging, parent.fiscal_position)"
select="1"/>
/>
<field
context="partner_id=parent.partner_id,quantity=product_uom_qty,pricelist=parent.pricelist_id,shop=parent.shop_id,uom=product_uom"
name="product_uom_qty"
on_change="product_id_change(parent.pricelist_id,product_id,product_uom_qty,product_uom,product_uos_qty,product_uos,name,parent.partner_id, 'lang' in context and context['lang'], False, parent.date_order, product_packaging, parent.fiscal_position, True)"
select="1"/>
/>
<field name="product_uom"
on_change="product_uom_change(parent.pricelist_id,product_id,product_uom_qty,product_uom,product_uos_qty,product_uos,name,parent.partner_id, 'lang' in context and context['lang'], False, parent.date_order)"/>
<field
@@ -256,12 +256,12 @@
<filter icon="terp-sale" string="Running" domain="[('state','in',('manual','progress'))]"/>
<filter icon="terp-sale" string="Sales To Invoice" domain="[('state','=','manual')]"/>
<separator orientation="vertical"/>
<field name="name" select="1"/>
<field name="partner_id" select="1"/>
<field name="user_id" select="1" widget="selection">
<filter icon="terp-partner" domain="[('user_id','=',uid)]" help="My Sale Orders" default="1"/>
<field name="name"/>
<field name="partner_id"/>
<field name="user_id" widget="selection">
<filter icon="terp-partner" domain="[('user_id','=',uid)]" help="My Sale Orders" />
</field>
<field name="date_order" select="1" string="Order date" />
<field name="date_order" string="Order date" />
<newline/>
<group expand="1" string="Group By..." colspan="11" col="11">
<filter string="Customer" icon="terp-sale" domain="[]" context="{'group_by':'partner_id'}"/>
@@ -279,6 +279,7 @@
<field name="res_model">sale.order</field>
<field name="view_type">form</field>
<field name="view_mode">tree,form,calendar,graph</field>
<field name="context">{'search_default_user_id':uid}</field>
<field name="search_view_id" ref="view_sales_order_filter"/>
</record>
<menuitem action="action_order_form" id="menu_sale_order" parent="base.menu_sales" sequence="3"/>
@@ -366,11 +367,11 @@
<notebook>
<page string="Order Lines">
<separator colspan="4" string="General Information"/>
<field name="order_id" select="1"/>
<field name="order_partner_id" readonly="1" select="1" invisible="1"/>
<field name="order_id"/>
<field name="order_partner_id" readonly="1" invisible="1"/>
<field name="product_uom_qty" readonly="1"/>
<field name="product_uom"/>
<field name="product_id" readonly="1" select="1"/>
<field name="product_id" readonly="1"/>
<field name="invoiced"/>
<field name="company_id" groups="base.group_multi_company" widget="selection"/>
<separator colspan="4" string="Manual Designation"/>
@@ -417,16 +418,16 @@
<search string="Search Sales Order">
<filter icon="terp-purchase" string="To Invoice" domain="[('invoiced','&lt;&gt;', 1),('state','=','done')]" separator="1"/>
<separator orientation="vertical"/>
<field name="order_id" select="1"/>
<field name="order_partner_id" select="1"/>
<field name="product_id" select="1"/>
<field name="salesman_id" select="1" widget="selection">
<field name="order_id"/>
<field name="order_partner_id"/>
<field name="product_id"/>
<field name="salesman_id" widget="selection">
<filter icon="terp-sale" domain="[('salesman_id','=',uid)]" help="My Sale Order Lines"/>
<filter icon="terp-sale" domain="[('salesman_id','child_of',[uid])]" help="My Departments Sale Order Lines"/>
</field>
<newline/>
<group expand="context.get('report',False)" string="Group By..." colspan="9" col="8">
<filter string="Product" icon="terp-sale" default="1" domain="[]" context="{'group_by':'product_id'}"/>
<filter string="Product" icon="terp-sale" domain="[]" context="{'group_by':'product_id'}"/>
<filter string="Order" icon="terp-sale" domain="[]" context="{'group_by':'order_id'}"/>
<filter string="Salesman" icon="terp-sale" domain="[]" context="{'group_by':'salesman_id'}"/>
<filter string="State" icon="terp-sale" domain="[]" context="{'group_by':'state'}"/>
@@ -445,14 +446,14 @@
domain="[('state','=','done')]"
name="unshipped"
separator="1" />
<filter icon="terp-purchase" string="Uninvoiced"
domain="[('invoiced','&lt;&gt;', 1),('state','&lt;&gt;','draft'),('state','&lt;&gt;','cancel')]" default="1"
<filter icon="terp-purchase" string="Uninvoiced" name="uninvoiced"
domain="[('invoiced','&lt;&gt;', 1),('state','&lt;&gt;','draft'),('state','&lt;&gt;','cancel')]"
separator="1" />
<separator orientation="vertical"/>
<field name="order_id" select="1"/>
<field name="order_partner_id" select="1"/>
<field name="product_id" select="1"/>
<field name="state" select="1"/>
<field name="order_id"/>
<field name="order_partner_id"/>
<field name="product_id"/>
<field name="state"/>
<newline />
<group expand="1" string="Group By..." colspan="9" col="8">
<filter string="Product" icon="terp-sale" domain="[]" context="{'group_by':'product_id'}"/>
+3 -2
View File
@@ -22,7 +22,7 @@
<field name="inherit_id" ref="sale.view_order_form"/>
<field name="arch" type="xml">
<field name="user_id" position="after">
<field name="section_id" widget="selection" groups="base.group_extended"/>
<field name="section_id" widget="selection" groups="base.group_extended"/>
</field>
</field>
</record>
@@ -34,7 +34,8 @@
<field name="inherit_id" ref="sale.view_sales_order_filter"/>
<field name="arch" type="xml">
<field name="date_order" position="after">
<field name="section_id" default="context.get('section_id', False)" select="1" widget="selection" string="Section" groups="base.group_extended">
<field name="section_id" default="context.get('section_id', False)" widget="selection" string="Section" groups="base.group_extended">
<filter icon="terp-crm"
domain="[('section_id','=',context.get('section_id',False))]"
groups="base.group_extended"
+14 -14
View File
@@ -10,12 +10,12 @@
<notebook>
<page string="Journal">
<separator string="Journal Information" colspan="4"/>
<field name="name" select="1"/>
<field name="code" select="1"/>
<field name="user_id" select="1"/>
<field name="date" select="1"/>
<field name="date_created" select="1"/>
<field name="date_validation" select="1"/>
<field name="name"/>
<field name="code"/>
<field name="user_id"/>
<field name="date"/>
<field name="date_created"/>
<field name="date_validation"/>
<separator string="States" colspan="4"/>
<field name="state"/>
<group col="3" colspan="2">
@@ -41,10 +41,10 @@
<field name="type">tree</field>
<field name="arch" type="xml">
<tree string="Picking Journal">
<field name="name" select="1"/>
<field name="code" select="1"/>
<field name="user_id" select="1"/>
<field name="date" select="1"/>
<field name="name"/>
<field name="code"/>
<field name="user_id"/>
<field name="date"/>
<field name="state"/>
</tree>
</field>
@@ -60,10 +60,10 @@
<filter icon="terp-hr" string="My Picking Journals" domain="[('user_id','=',uid)]" help="My Picking Journals"/>
<filter icon="terp-hr" string="Open" domain="[('state','=','open')]" help="Open Picking Journals"/>
<separator orientation="vertical"/>
<field name="name" select="1"/>
<field name="code" select="1"/>
<field name="user_id" select="1" widget="selection"/>
<field name="date" select="1"/>
<field name="name"/>
<field name="code"/>
<field name="user_id" widget="selection"/>
<field name="date"/>
</group>
</search>
</field>
@@ -11,11 +11,11 @@
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Picking by invoice method">
<field name="name" select="1"/>
<field name="month" select="1"/>
<field name="invoice_state" select="1"/>
<field name="state" select="1"/>
<field name="invoice_type_id" select="1"/>
<field name="name"/>
<field name="month"/>
<field name="invoice_state"/>
<field name="state"/>
<field name="invoice_type_id"/>
<field name="quantity"/>
<field name="count"/>
<field name="price_total"/>
@@ -51,10 +51,10 @@
<filter icon="terp-sale" string="This Year" domain="[('name','=',time.strftime('%%Y'))]" help="Picking by invoice method in this year"/>
<filter icon="terp-sale" string="This Month" domain="[('month','=',time.strftime('%%m'))]" help="Picking by invoice method in this month"/>
<separator orientation="vertical"/>
<field name="name" select="1"/>
<field name="month" select="1"/>
<field name="invoice_state" select="1"/>
<field name="state" select="1"/>
<field name="name"/>
<field name="month"/>
<field name="invoice_state"/>
<field name="state"/>
</group>
</search>
</field>
@@ -91,10 +91,10 @@
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Picking by journals">
<field name="name" select="1"/>
<field name="month" select="1"/>
<field name="state" select="1"/>
<field name="journal_id" select="1"/>
<field name="name"/>
<field name="month"/>
<field name="state"/>
<field name="journal_id"/>
<field name="quantity"/>
<field name="count"/>
<field name="price_total"/>
@@ -128,9 +128,9 @@
<filter icon="terp-sale" string="This Year" domain="[('name','=',time.strftime('%%Y'))]" help="Picking by journals in this year"/>
<filter icon="terp-sale" string="This Month" domain="[('month','=',time.strftime('%%m'))]" help="Picking by journals in this month"/>
<separator orientation="vertical"/>
<field name="name" select="1"/>
<field name="month" select="1"/>
<field name="state" select="1"/>
<field name="name"/>
<field name="month"/>
<field name="state"/>
</group>
</search>
</field>
+20 -20
View File
@@ -42,12 +42,12 @@
<notebook>
<page string="Journal">
<separator string="Journal Information" colspan="4"/>
<field name="name" select="1"/>
<field name="code" select="1"/>
<field name="user_id" select="1"/>
<field name="date" select="1"/>
<field name="date_created" select="1"/>
<field name="date_validation" select="1"/>
<field name="name"/>
<field name="code"/>
<field name="user_id"/>
<field name="date"/>
<field name="date_created"/>
<field name="date_validation"/>
<separator string="States" colspan="4"/>
<field name="state"/>
<group col="3" colspan="2">
@@ -83,10 +83,10 @@
<field name="type">tree</field>
<field name="arch" type="xml">
<tree string="Sale Journal">
<field name="name" select="1"/>
<field name="code" select="1"/>
<field name="user_id" select="1"/>
<field name="date" select="1"/>
<field name="name"/>
<field name="code"/>
<field name="user_id"/>
<field name="date"/>
<field name="state"/>
</tree>
</field>
@@ -102,10 +102,10 @@
<filter icon="terp-sale" string="My Sale Journals" domain="[('user_id','=',uid)]" help="My Sale Journals"/>
<filter icon="terp-sale" string="Open" domain="[('state','=','open')]" help="Open Sale Journals"/>
<separator orientation="vertical"/>
<field name="name" select="1"/>
<field name="code" select="1"/>
<field name="user_id" select="1"/>
<field name="date" select="1"/>
<field name="name"/>
<field name="code"/>
<field name="user_id"/>
<field name="date" />
</group>
</search>
</field>
@@ -285,9 +285,9 @@
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Sales by Journal">
<field name="name" select="1"/>
<field name="state" select="1"/>
<field name="journal_id" select="1"/>
<field name="name"/>
<field name="state"/>
<field name="journal_id"/>
<field name="quantity"/>
<field name="count"/>
<field name="price_total"/>
@@ -306,9 +306,9 @@
<filter icon="terp-sale" string="This Year" domain="[('name','!=','')]" help="Sale journal in this year"/>
<filter icon="terp-sale" string="This Month" domain="[('name','=',time.strftime('%%Y-%%m-01'))]" help="Sale journal in this month"/>
<separator orientation="vertical"/>
<field name="name" select="1"/>
<field name="state" select="1"/>
<field name="journal_id" select="1"/>
<field name="name"/>
<field name="state"/>
<field name="journal_id"/>
</group>
</search>
</field>
+2 -2
View File
@@ -8,8 +8,8 @@
<field name="type">search</field>
<field name="inherit_id" ref="product.product_search_form_view"/>
<field name="arch" type="xml">
<field name="pricelist_id" select="1" widget="selection" position="before">
<field name="location_id" select="1" widget="selection" context="{'location': self}" />
<field name="pricelist_id" widget="selection" position="before">
<field name="location_id" widget="selection" context="{'location': self}" />
<separator orientation="vertical"/>
</field>
</field>
@@ -69,8 +69,8 @@
help = "Completed Stock-Moves"/>
<separator orientation="vertical"/>
<field name="product_id" select="1" widget="selection"/>
<field name="location_id" select="1" widget="selection"/>
<field name="product_id" widget="selection"/>
<field name="location_id" widget="selection"/>
</group>
<newline/>
<group expand="1" string="Group By..." >
+8 -8
View File
@@ -9,12 +9,12 @@
<field name="arch" type="xml">
<search string="Search Location">
<group col="10" colspan="4">
<filter icon="terp-stock" string="Internal Locations" domain="[('location_id.usage', '=', 'internal')]" help="Internal Locations" default="1" />
<filter icon="terp-stock" name="internal_locations" string="Internal Locations" domain="[('location_id.usage', '=', 'internal')]" help="Internal Locations"/>
<filter icon="terp-stock" string="Customer Locations" domain="[('location_id.usage', '=', 'customer')]" help="Customer Locations" />
<filter icon="terp-stock" string="Supplier Locations" domain="[('location_id.usage', '=', 'supplier')]" help="Supplier Locations" />
<separator orientation="vertical"/>
<field name="location_id" select="1"/>
<field name="product_id" select="1" default="1"/>
<field name="location_id"/>
<field name="product_id"/>
</group>
<newline/>
<group expand="1" string="Group By..." colspan="4" col="10">
@@ -73,7 +73,7 @@
<field name="res_model">stock.report.prodlots</field>
<field name="view_type">form</field>
<field name="view_mode">tree,form</field>
<field name="context">{'full':'1'}</field>
<field name="context">{'full':'1','search_default_internal_locations':1}</field>
<field name="search_view_id" ref="view_stock_report_prodlots_filter" />
</record>
<record id="stock_report_tracklots_tree" model="ir.ui.view">
@@ -155,8 +155,7 @@
<field name="type">search</field>
<field name="arch" type="xml">
<search string="Dates of Inventories">
<filter icon="gtk-media-rewind" string="Stockable"
default="1"
<filter icon="gtk-media-rewind" name="stockable" string="Stockable"
domain="[('product_id.type','=', 'product')]"/>
<filter icon="gtk-media-rewind" string="Consumable"
domain="[('product_id.type','=', 'consumable')]"/>
@@ -164,8 +163,8 @@
<filter icon="gtk-media-rewind" string="Non Inv"
domain="[('date','=', False)]"/>
<separator orientation="vertical"/>
<field name="product_id" select="1"/>
<field name="date" select="1" />
<field name="product_id"/>
<field name="date"/>
</search>
</field>
</record>
@@ -187,6 +186,7 @@
<field name="name">Dates of Latest Inventories by Product</field>
<field name="res_model">report.stock.lines.date</field>
<field name="view_type">form</field>
<field name="context">{'search_default_stockable':1}</field>
<field name="view_mode">tree,form</field>
</record>
+105 -99
View File
@@ -50,9 +50,9 @@
<field name="arch" type="xml">
<search string="Search Inventory">
<group col="10" colspan="4">
<field name="name" select="1" />
<field name="date" select="1" />
<field name="company_id" select="1" groups="base.group_multi_company" widget="selection"/>
<field name="name"/>
<field name="date"/>
<field name="company_id" groups="base.group_multi_company" widget="selection"/>
</group>
<newline/>
<group expand="1" string="Group By..." colspan="4" col="4">
@@ -83,28 +83,28 @@
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Lot Inventory">
<field name="name" select="1"/>
<field name="date" select="1"/>
<field name="company_id" select="1" groups="base.group_multi_company" widget="selection"/>
<field name="name"/>
<field name="date"/>
<field name="company_id" groups="base.group_multi_company" widget="selection"/>
<notebook colspan="4">
<page string="General Informations">
<field colspan="4" name="inventory_line_id" nolabel="1" widget="one2many_list">
<tree string="Inventory Lines" editable="bottom">
<field context="location=location_id,uom=product_uom" name="product_id" on_change="on_change_product_id(location_id,product_id,product_uom)" select="1" domain="[('type','&lt;&gt;','service')]"/>
<field context="location=location_id,uom=product_uom" name="product_id" on_change="on_change_product_id(location_id,product_id,product_uom)" domain="[('type','&lt;&gt;','service')]"/>
<field name="product_qty"/>
<field name="product_uom"/>
<field name="prod_lot_id" groups="base.group_extended"/>
<field colspan="4" domain="[('usage','=','internal')]" name="location_id" select="1"/>
<field colspan="4" domain="[('usage','=','internal')]" name="location_id"/>
<field name="state" invisible="1"/>
<button name="%(stock.action_view_stock_inventory_line_split)d"
string="Split inventory lines" groups="base.group_extended"
type="action" icon="gtk-justify-fill" states="draft"/>
</tree>
<form string="Inventory Lines">
<field colspan="4" context="location=location_id,uom=product_uom" name="product_id" on_change="on_change_product_id(location_id,product_id,product_uom)" select="1" domain="[('type','&lt;&gt;','service')]"/>
<field colspan="4" context="location=location_id,uom=product_uom" name="product_id" on_change="on_change_product_id(location_id,product_id,product_uom)" domain="[('type','&lt;&gt;','service')]"/>
<field name="product_qty"/>
<field name="product_uom"/>
<field domain="[('usage','=','internal')]" name="location_id" select="1"/>
<field domain="[('usage','=','internal')]" name="location_id"/>
<field name="prod_lot_id" groups="base.group_extended"/>
<group colspan="2" col="3">
<button name="%(stock.action_view_stock_inventory_line_split)d"
@@ -117,7 +117,7 @@
<field colspan="4" name="move_ids" nolabel="1"/>
</page>
</notebook>
<field name="state" select="1"/>
<field name="state"/>
<group col="4" colspan="2">
<button name="action_done" states="draft" string="Confirm Inventory" type="object" icon="gtk-apply"/>
<button name="action_cancel" states="cancel" string="Set to Draft" type="object" icon="gtk-cancel"/>
@@ -236,10 +236,10 @@
<form string="Production Lot">
<notebook colspan="4">
<page string="Production Lot">
<field name="name" select="1"/>
<field name="name"/>
<field name="ref"/>
<field name="prefix" select="1"/>
<field name="product_id" select="1"/>
<field name="prefix"/>
<field name="product_id"/>
<field name="stock_available"/>
<field name="date"/>
<field colspan="4" name="revisions" nolabel="1"/>
@@ -273,11 +273,11 @@
<group col="10" colspan="4">
<filter icon="terp-stock" name="available" string="Available" domain="[('stock_available', '&gt;', 0)]" help="Available Product Lots" />
<separator orientation="vertical"/>
<field name="prefix" select="1"/>
<field name="name" select="1"/>
<field name="ref" select="1"/>
<field name="product_id" select="1"/>
<field name="date" select="1"/>
<field name="prefix"/>
<field name="name"/>
<field name="ref"/>
<field name="product_id"/>
<field name="date"/>
</group>
<newline/>
<group expand="1" string="Group By..." colspan="4" col="8">
@@ -400,12 +400,12 @@
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Stock location">
<field name="name" select="1"/>
<field name="name"/>
<field name="active" groups="base.group_extended"/>
<newline/>
<field name="usage" select="1"/>
<field name="company_id" select="1" groups="base.group_multi_company" widget="selection"/>
<field name="account_id" select="1" groups="base.group_extended"/>
<field name="usage"/>
<field name="company_id" groups="base.group_multi_company" widget="selection"/>
<field name="account_id" groups="base.group_extended"/>
<field name="location_id"/>
<field name="address_id" context="{'contact_display':'partner'}"/>
<field name="icon" groups="base.group_extended"/>
@@ -599,14 +599,16 @@
<field name="arch" type="xml">
<form string="Picking list">
<group colspan="4" col="6">
<field name="name" select="1" readonly="1"/>
<!-- <field name="address_id" select="1" context="{'contact_display' : 'partner'}" groups="base.group_extended"/>-->
<field name="name" readonly="1"/>
<!-- <field name="address_id" context="{'contact_display' : 'partner'}" groups="base.group_extended"/>-->
<field name="origin"/>
<field name="backorder_id" groups="base.group_extended" readonly="1"/>
<field name="date"/>
<field name="min_date" select="1"/>
<field name="min_date"/>
<field name="type"/>
<field name="company_id" select="1" groups="base.group_multi_company" widget="selection"/>
<field name="company_id" groups="base.group_multi_company" widget="selection"/>
</group>
<notebook colspan="4">
<page string="General Information">
@@ -616,7 +618,7 @@
<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"/>
<field name="picking_id" select="1"/>
<field name="picking_id"/>
<field name="prodlot_id" groups="base.group_extended"/>
<field name="location_id"/>
<field name="location_dest_id"/>
@@ -637,17 +639,17 @@
<notebook colspan="4">
<page string="General Information">
<separator colspan="4" string="Move Information"/>
<field name="location_id" select="1" domain="[('usage','=','internal')]"/>
<field name="location_dest_id" select="1" domain="[('usage','=','internal')]"/>
<field name="location_id" domain="[('usage','=','internal')]"/>
<field name="location_dest_id" domain="[('usage','=','internal')]"/>
<field colspan="4" context="location=location_id" name="product_id" on_change="onchange_product_id(product_id, location_id, location_dest_id)" select="1"/>
<field name="product_qty" select="1" on_change="onchange_quantity(product_id, product_qty, product_uom, product_uos)"/>
<field name="product_uom" select="1"/>
<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" select="1"/>
<field colspan="4" invisible="1" name="name"/>
<field invisible="1" name="date"/>
<field name="date_planned"/>
<field name="address_id" select="1" context="{'contact_display':'partner'}"/>
<field name="address_id" context="{'contact_display':'partner'}"/>
<field groups="base.group_extended" name="product_packaging"/>
<field name="prodlot_id" groups="base.group_extended"
context="{'location_id':location_id, 'product_id':product_id}"
@@ -659,7 +661,7 @@
<button name="%(track_line)d" string="Split in production lots" type="action" icon="gtk-justify-fill"/>
<button name="%(move_scrap)d" string="Scrap Move Line" type="action" icon="gtk-justify-fill"/>
<separator colspan="4" string="Move State"/>
<field name="state" select="1"/>
<field name="state"/>
<group>
<button name="force_assign" states="confirmed" string="Force Availability" type="object" icon="gtk-jump-to"/>
<button name="cancel_assign" states="assigned" string="Cancel Availability" type="object" icon="gtk-no"/>
@@ -710,10 +712,10 @@
<separator orientation="vertical"/>
<filter icon="terp-stock" string="Back Order" domain="[('backorder_id', '!=', False)]" help="Has Back Order" />
<separator orientation="vertical"/>
<field name="location_id" select="1"/>
<field name="location_dest_id" select="1"/>
<field name="name" select="1"/>
<field name="address_id" select="1"/>
<field name="location_id"/>
<field name="location_dest_id"/>
<field name="name"/>
<field name="address_id"/>
</group>
<newline/>
<group expand="1" string="Group By..." colspan="4" col="8">
@@ -732,12 +734,12 @@
<field name="arch" type="xml">
<tree colors="blue:state in ('draft');grey:state in ('cancel', 'done');red:state not in ('cancel', 'done') and date &lt; current_date" string="Picking list">
<field name="name"/>
<field name="address_id" select="1"/>
<field name="address_id"/>
<field name="backorder_id" groups="base.group_extended"/>
<field name="origin"/>
<field name="date" select="1"/>
<field name="min_date" select="1"/>
<field name="state" select="1"/>
<field name="date"/>
<field name="min_date"/>
<field name="state"/>
<button name="%(action_partial_picking)d" states="assigned" string="Validate" type="action" icon="gtk-go-forward" help="Validate Delivery"/>
<button name="button_cancel" states="assigned,confirmed,draft" string="Cancel" icon="gtk-cancel" help="Cancel" confirm="This operation will cancel the delivery. Do you want to continue?"/>
</tree>
@@ -750,13 +752,13 @@
<field name="arch" type="xml">
<form string="Picking list">
<group col="6" colspan="4">
<field name="name" select="1" readonly="1"/>
<field name="address_id" select="1"/>
<field name="name" readonly="1"/>
<field name="address_id"/>
<field name="origin"/>
<field name="backorder_id" groups="base.group_extended" readonly="1"/>
<field name="date" />
<field name="min_date" select="1"/>
<field name="company_id" select="1" groups="base.group_multi_company" widget="selection"/>
<field name="min_date"/>
<field name="company_id" groups="base.group_multi_company" widget="selection"/>
</group>
<notebook colspan="4">
<page string="General Information">
@@ -766,7 +768,7 @@
<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"/>
<field name="picking_id" select="1"/>
<field name="picking_id" />
<field name="prodlot_id" groups="base.group_extended"/>
<field name="location_id"/>
<field name="location_dest_id"/>
@@ -787,14 +789,14 @@
<notebook colspan="4">
<page string="General Information">
<separator colspan="4" string="Move Information"/>
<field name="location_id" select="1" domain="[('usage','=','internal')]"/>
<field name="location_dest_id" select="1" domain="[('usage','&lt;&gt;','view')]"/>
<field colspan="4" context="location=location_id" name="product_id" on_change="onchange_product_id(product_id, location_id, location_dest_id)" select="1"/>
<field name="product_qty" select="1" on_change="onchange_quantity(product_id, product_qty, product_uom, product_uos)"/>
<field name="product_uom" select="1"/>
<field name="location_id" domain="[('usage','=','internal')]"/>
<field name="location_dest_id" domain="[('usage','&lt;&gt;','view')]"/>
<field colspan="4" context="location=location_id" name="product_id" on_change="onchange_product_id(product_id, location_id, location_dest_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" select="1"/>
<field colspan="4" invisible="1" name="name"/>
<field invisible="1" name="date"/>
<field name="date_planned"/>
<field groups="base.group_extended" name="product_packaging"/>
@@ -802,9 +804,9 @@
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" select="1"/>
<field groups="base.group_extended" name="tracking_id"/>
<separator colspan="4" string="Move State"/>
<field name="state" select="1"/>
<field name="state"/>
<group>
<button name="force_assign" states="confirmed" string="Force Availability" type="object" icon="gtk-jump-to"/>
<button name="cancel_assign" states="assigned" string="Cancel Availability" type="object" icon="gtk-find"/>
@@ -834,7 +836,7 @@
<field name="auto_picking"/>
<field name="active"/>
<newline/>
<field name="date" select="1"/>
<field name="date"/>
<field name="date_done"/>
<field name="move_type"/>
</page>
@@ -855,9 +857,9 @@
<separator orientation="vertical"/>
<filter icon="terp-stock" string="Back Order" domain="[('backorder_id','!=',False)]" help="Back Order"/>
<separator orientation="vertical"/>
<field name="name" select="1"/>
<field name="address_id" select="1"/>
<field name="origin" select="1"/>
<field name="name"/>
<field name="address_id"/>
<field name="origin"/>
</group>
<newline/>
<group expand="1" string="Group By..." colspan="4" col="10">
@@ -930,11 +932,11 @@
<group col="6" colspan="4">
<field name="address_id"/>
<field name="min_date"/>
<field name="name" select="1" readonly="1"/>
<field name="name" readonly="1"/>
<field name="invoice_state"/>
<field name="backorder_id" readonly="1"/>
<field name="origin" readonly="1"/>
<field name="company_id" select="1" groups="base.group_multi_company" widget="selection"/>
<field name="company_id" groups="base.group_multi_company" widget="selection"/>
</group>
<notebook colspan="4">
<page string="General Information">
@@ -944,7 +946,7 @@
<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"/>
<field name="picking_id" select="1"/>
<field name="picking_id"/>
<field name="prodlot_id" groups="base.group_extended"/>
<field name="location_id"/>
<field name="location_dest_id"/>
@@ -965,26 +967,26 @@
<notebook colspan="4">
<page string="General Information">
<separator colspan="4" string="Move Information"/>
<field name="location_id" select="1" domain="[('usage','=','internal')]"/>
<field name="location_dest_id" select="1" domain="[('usage','&lt;&gt;','view')]"/>
<field colspan="4" context="location=location_id" name="product_id" on_change="onchange_product_id(product_id, location_id, location_dest_id)" select="1"/>
<field name="product_qty" select="1" on_change="onchange_quantity(product_id, product_qty, product_uom, product_uos)" />
<field name="product_uom" select="1"/>
<field name="location_id" domain="[('usage','=','internal')]"/>
<field name="location_dest_id" domain="[('usage','&lt;&gt;','view')]"/>
<field colspan="4" context="location=location_id" name="product_id" on_change="onchange_product_id(product_id, location_id, location_dest_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" select="1"/>
<field colspan="4" invisible="1" name="name"/>
<field invisible="1" name="date"/>
<field name="date_planned"/>
<field groups="base.group_extended" name="product_packaging"/>
<field name="prodlot_id" select="1" groups="base.group_extended"
<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" select="1"/>
<field groups="base.group_extended" name="tracking_id"/>
<label/>
<button name="%(track_line)d" string="Split in production lots" type="action" icon="gtk-justify-fill"/>
<separator colspan="4" string="Move State"/>
<field name="state" select="1"/>
<field name="state"/>
<group>
<button name="force_assign" states="confirmed" string="Force Availability" type="object" icon="gtk-jump-to"/>
<button name="cancel_assign" states="assigned" string="Cancel Availability" type="object" icon="gtk-no"/>
@@ -1033,9 +1035,11 @@
<filter icon="terp-stock" string="Available" domain="[('state','=','assigned')]" help="Assigned Outgoing Orders"/>
<filter icon="terp-stock" string="Confirmed" domain="[('state','=','confirmed')]" help="Confirmed Outgoing Orders"/>
<separator orientation="vertical"/>
<field name="name" select="1"/>
<field name="address_id" select="1"/>
<!-- <field name="company_id" select="1" widget="selection"/>-->
<field name="name"/>
<field name="address_id" />
<!-- <field name="company_id" widget="selection"/>-->
</group>
<newline/>
<group expand="1" string="Group By..." colspan="4" col="8">
@@ -1103,7 +1107,8 @@
<field name="arch" type="xml">
<form string="Input Picking List">
<group colspan="4" col="6">
<field name="name" readonly="1" select="1"/>
<field name="name" readonly="1"/>
<field name="address_id" on_change="onchange_partner_in(address_id)" context="{'contact_display':'partner'}" />
<field name="origin"/>
<field name="backorder_id" readonly="1" groups="base.group_extended"/>
@@ -1111,7 +1116,7 @@
<field name="type"/>
<field name="min_date" readonly="1"/>
<field name="invoice_state" string="Invoice Control"/>
<field name="company_id" select="1" groups="base.group_multi_company" widget="selection"/>
<field name="company_id" groups="base.group_multi_company" widget="selection"/>
</group>
<notebook colspan="4">
<page string="General Information">
@@ -1137,29 +1142,29 @@
<notebook colspan="4">
<page string="General Information">
<separator colspan="4" string="Move Information"/>
<field name="location_id" select="1" domain="[('usage','&lt;&gt;','view')]"/>
<field domain="[('usage','=','internal')]" name="location_dest_id" select="1"/>
<field colspan="4" context="location=location_id" name="product_id" on_change="onchange_product_id(product_id, location_id, location_dest_id)" select="1"/>
<field name="product_qty" select="1" on_change="onchange_quantity(product_id, product_qty, product_uom, product_uos)"/>
<field name="product_uom" select="1"/>
<field name="location_id" domain="[('usage','&lt;&gt;','view')]"/>
<field domain="[('usage','=','internal')]" name="location_dest_id" />
<field colspan="4" context="location=location_id" name="product_id" on_change="onchange_product_id(product_id, location_id, location_dest_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" select="1"/>
<field colspan="4" invisible="1" name="name" />
<field groups="base.group_extended" name="date_planned"/>
<newline/>
<newline/>
<field groups="base.group_extended" name="product_packaging"/>
<newline/>
<field name="prodlot_id" select="1" groups="base.group_extended"
<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" select="1"/>
<field groups="base.group_extended" name="tracking_id"/>
<newline/>
<label/>
<button groups="base.group_extended" name="%(track_line)d" string="Split in production lots" type="action" icon="gtk-justify-fill"/>
<separator colspan="4" string="Move State"/>
<field name="state" select="1"/>
<field name="state"/>
<group>
<button name="force_assign" states="confirmed" string="Force Availability" type="object" icon=""/>
<button name="cancel_assign" states="assigned" string="Cancel Availability" type="object" icon=""/>
@@ -1205,9 +1210,9 @@
<separator orientation="vertical" />
<filter icon="terp-stock" string="Back Order" domain="[('backorder_id', '!=', False)]" help="Has Back Order" groups="base.group_extended"/>
<separator orientation="vertical"/>
<field name="name" select="1"/>
<field name="address_id" select="1"/>
<field name="company_id" select="1" widget="selection" groups="base.group_multi_company" />
<field name="name"/>
<field name="address_id"/>
<field name="company_id" widget="selection" groups="base.group_multi_company" />
</group>
<newline/>
<group expand="1" string="Group By..." colspan="4" col="8">
@@ -1264,9 +1269,9 @@
<filter icon="terp-stock" string="Available" domain="[('state','=','assigned')]" help="Assigned Internal Moves"/>
<filter icon="terp-stock" name="confirmed" string="Confirmed" domain="[('state','=','confirmed')]" help="Confirmed Internal Moves" />
<separator orientation="vertical"/>
<field name="name" select="1"/>
<field name="origin" select="1"/>
<field name="company_id" select="1" widget="selection"/>
<field name="name"/>
<field name="origin"/>
<field name="company_id" widget="selection"/>
</group>
<newline/>
<group expand="1" string="Group By..." colspan="4" col="8">
@@ -1302,8 +1307,9 @@
<field name="name" string="Move Name"/>
<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="Unit Of Measure"/>
<field name="product_uom" string="Unit Of Measure"/>
<field name="picking_id" select="1"/>
<field name="prodlot_id" groups="base.group_extended"/>
<field name="location_id"/>
<field name="location_dest_id"/>
@@ -1327,7 +1333,7 @@
<group colspan="2" col="2">
<separator colspan="2" string="Move Information"/>
<field name="name"/>
<field name="product_id" select="1" on_change="onchange_product_id(product_id,location_id,location_dest_id)"/>
<field name="product_id" on_change="onchange_product_id(product_id,location_id,location_dest_id)"/>
<field name="product_qty" on_change="onchange_quantity(product_id, product_qty, product_uom, product_uos)"/>
<field name="product_uom" string="Unit Of Measure" widget="selection"/>
<field name="product_uos" groups="base.group_extended" />
@@ -1335,11 +1341,11 @@
<group colspan="2" col="2">
<separator string="Locations &amp; Picking" colspan="2" />
<field name="location_id" select="1" widget="selection"/>
<field name="location_dest_id" select="1" widget="selection"/>
<field name="location_id" widget="selection"/>
<field name="location_dest_id" widget="selection"/>
<field name="picking_id"/>
<field name="address_id" context="{'contact_display':'partner'}"/>
<field name="company_id" select="1" groups="base.group_multi_company" widget="selection"/>
<field name="company_id" groups="base.group_multi_company" widget="selection"/>
</group>
<group colspan="2" col="2">
@@ -1351,7 +1357,7 @@
<group colspan="2" col="4">
<separator string="Traceability" colspan="4" />
<field name="tracking_id" select="1" colspan="4" />
<field name="tracking_id" colspan="4" />
<field name="prodlot_id" groups="base.group_extended"
context="{'location_id':location_id, 'product_id':product_id}"
domain="[('product_id','=?',product_id)]"
@@ -1364,7 +1370,7 @@
</page>
</notebook>
<group col="6" colspan="4">
<field name="state" select="1"/>
<field name="state"/>
<button name="action_confirm" states="draft" string="Confirm" type="object" icon="gtk-apply"/>
<button name="action_assign" states="confirmed" string="Set Available" type="object" icon="gtk-yes"/>
<button name="action_cancel" states="assigned,confirmed" string="Cancel" type="object" icon="gtk-cancel"/>
+2 -2
View File
@@ -23,8 +23,8 @@ import stock_traceability
import stock_move
import stock_partial_picking
import stock_partial_move
import wizard_replacement
import wizard_ups
import stock_replacement
import stock_ups
import stock_inventory_merge
import stock_inventory_set_stock_zero
import stock_fill_inventory
+68
View File
@@ -0,0 +1,68 @@
# -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
##############################################################################
from osv import fields, osv
from service import web_services
from tools.translate import _
import netsvc
import pooler
import time
import wizard
class stock_replacement(osv.osv_memory):
"""
This class has been defined for replacement wizard
"""
_name = "stock.replacement"
_description = "Stock Replacement"
def get_composant(self, cr, uid, ids, context = {}):
return {}
def replace_composant(self, cr, uid, ids, context = {}):
"""
to open a new wizard that acknowledge, a replacement task
@return: it returns the replacement acknowledgement form
"""
return {
'name': False,
'view_type': 'form',
'view_mode': 'form',
'res_model': 'stock.replacement.result',
'type': 'ir.actions.act_window',
'target':'new',
}
stock_replacement()
class stock_replacement_result(osv.osv_memory):
"""
This class has been defined for replacement result
"""
_name = "stock.replacement.result"
_description = "Stock Replacement result"
stock_replacement_result()
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
@@ -0,0 +1,41 @@
<?xml version="1.0" encoding="utf-8"?>
<openerp>
<data>
<record id="view_stock_replacement" model="ir.ui.view">
<field name="name">Stock Replacement</field>
<field name="model">stock.replacement</field>
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Replace a component">
<label string="Component" colspan="4"/>
<separator string="" colspan="4" />
<button icon='gtk-cancel' special="cancel" string="Cancel" />
<button name="replace_composant" string="Replace" type="object" />
</form>
</field>
</record>
<act_window name="Stock Replacement"
res_model="stock.replacement"
src_model=""
view_mode="form"
target="new"
key2="client_action_multi"
id="action_view_stock_replacement"/>
<record id="view_stock_replacement_result" model="ir.ui.view">
<field name="name">Stock Replacement result</field>
<field name="model">stock.replacement.result</field>
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Replace result">
<label string="Replacing successful !" colspan="4"/>
<separator string="" colspan="4" />
<button special="cancel" string="Ok" />
</form>
</field>
</record>
</data>
</openerp>
+91
View File
@@ -0,0 +1,91 @@
# -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
##############################################################################
from osv import fields, osv
from service import web_services
from tools.translate import _
import netsvc
import pooler
import time
import wizard
class stock_ups(osv.osv_memory):
_name = "stock.ups"
_description = "Stock ups"
def ups_save(self, cr, uid, ids, context = {}):
return {
'name': False,
'view_type': 'form',
'view_mode': 'form',
'res_model': 'stock.ups.final',
'type': 'ir.actions.act_window',
'target':'new',
}
def ups_upload(self, cr, uid, ids, context = {}):
return {
'name': False,
'view_type': 'form',
'view_mode': 'form',
'res_model': 'stock.ups.upload',
'type': 'ir.actions.act_window',
'target':'new',
}
_columns = {
'weight': fields.float('Lot weight', required=True),
}
_defaults = {
'weight': lambda *a: 3.0,
}
stock_ups()
class stock_ups_final(osv.osv_memory):
_name = "stock.ups.final"
_description = "Stock ups final"
def create_xmlfile(self, cr, uid, ids, context = {}):
report = netsvc._group['report']['report.stock.move.lot.ups_xml']
data['report_type'] = 'raw'
return {'xmlfile' : report.create(uid, context['active_id'], ids, {})}
_columns = {
'xmlfile': fields.binary('XML File'),
}
stock_ups_final()
class stock_ups_upload(osv.osv_memory):
_name = "stock.ups.upload"
_description = "Stock ups upload"
def upload_xmlfile(self, cr, uid, ids, context = {}):
report = netsvc._group['report']['report.stock.move.lot.ups_xml']
data['report_type'] = 'raw'
#FIXME: this seems unfinished
fp = file('/tmp/test.xml', 'w').write(report.create(uid, context['active_id'], ids, {}))
return {}
stock_ups_upload()
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
+56
View File
@@ -0,0 +1,56 @@
<?xml version="1.0" encoding="utf-8"?>
<openerp>
<data>
<record id="view_stock_ups" model="ir.ui.view">
<field name="name">Stock ups</field>
<field name="model">stock.ups</field>
<field name="type">form</field>
<field name="arch" type="xml">
<form string="UPS XML generator">
<separator string="UPS generator" colspan="4"/>
<field name="weight" />
<separator string="" colspan="4" />
<button icon='gtk-cancel' special="cancel" string="Cancel" />
<button name="ups_save" string="Get xml file" type="object" />
<button name="ups_upload" string="Upload xml file" type="object" />
</form>
</field>
</record>
<record id="view_stock_ups_final" model="ir.ui.view">
<field name="name">Stock ups</field>
<field name="model">stock.ups.final</field>
<field name="type">form</field>
<field name="arch" type="xml">
<form string="UPS XML generator">
<separator string="Save the attached file" colspan="4" />
<field name="xmlfile" />
<button special="cancel" string="End" />
<button name="create_xmlfile" string="create xml file" type="object" />
</form>
</field>
</record>
<record id="view_stock_ups_upload" model="ir.ui.view">
<field name="name">Stock ups</field>
<field name="model">stock.ups.upload</field>
<field name="type">form</field>
<field name="arch" type="xml">
<form string="UPS XML generator">
<separator string="File uploaded" colspan="4" />
<button special="cancel" string="End" />
<button name="upload_xmlfile" string="Upload xml file" type="object" />
</form>
</field>
</record>
<act_window name="Stock ups"
res_model="stock.ups"
src_model=""
view_mode="form"
target="new"
key2="client_action_multi"
id="action_view_stock_ups"/>
</data>
</openerp>
-60
View File
@@ -1,60 +0,0 @@
# -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
##############################################################################
import wizard
class wizard_replacement(wizard.interface):
def getComposant(self, cr, uid, data, context):
return {}
def replaceComposant(self, cr, uid, data, context):
return {}
comp_form = '''<?xml version="1.0"?><form string="Replace a component"><label string="Component" colspan="4"/></form>'''
comp_fields = {}
replace_form = '''<?xml version="1.0"?><form string="Replace result"><label string="Replacing successful !" colspan="4" /></form>'''
replace_fields = {}
states = {
'init' : {
'actions' : [getComposant],
'result' : {
'type' : 'form',
'arch' : comp_form,
'fields' : comp_fields,
'state' : [('end', 'Cancel'), ('replace', 'Replace')]}
},
'replace' : {
'action' : [replaceComposant],
'result' : {
'type' : 'form',
'arch' : replace_form,
'fields' : replace_fields,
'state' : [('end', 'Ok')]}
},
}
wizard_replacement('stock.move.replace')
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
-85
View File
@@ -1,85 +0,0 @@
# -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
##############################################################################
import os
import wizard
import netsvc
import time
_ups_form = '''<?xml version="1.0"?>
<form string="UPS XML generator">
<separator string="UPS generator" colspan="4"/>
<field name="weight" />
</form>'''
_ups_fields = {
'weight' : { 'string' : 'Lot weight', 'type' : 'float', 'default' : lambda *a: 3.0, 'required' : True },
}
_ups_finalform = '''<?xml version="1.0"?>
<form string="UPS XML generator">
<separator string="Save the attached file" colspan="4" />
<field name="xmlfile" />
</form>'''
_ups_finalfields = {
'xmlfile' : { 'string' : 'XML File', 'type' : 'binary' },
}
_ups_uploadform = '''<?xml version="1.0"?>
<form string="UPS XML generator">
<separator string="File uploaded" colspan="4" />
</form>'''
_ups_uploadfields = {}
def create_xmlfile(self, cr, uid, data, context):
report = netsvc._group['report']['report.stock.move.lot.ups_xml']
data['report_type'] = 'raw'
return {'xmlfile' : report.create(uid, data['ids'], data, {})}
def upload_xmlfile(self, cr, uid, data, context):
report = netsvc._group['report']['report.stock.move.lot.ups_xml']
data['report_type'] = 'raw'
#FIXME: this seems unfinished
fp = file('/tmp/test.xml', 'w').write(report.create(uid, data['ids'], data, {}))
return {}
class wiz_ups(wizard.interface):
states = {
'init': {
'actions': [],
'result': {'type': 'form', 'arch' : _ups_form, 'fields' : _ups_fields, 'state':[('end','Cancel'),('ups_save','Get xml file'), ('ups_upload', 'Upload xml file')]}
},
'ups_save': {
'actions': [create_xmlfile],
'result': {'type': 'form', 'arch' : _ups_finalform, 'fields' : _ups_finalfields, 'state':[('end', 'End')]}
},
'ups_upload' : {
'actions' : [upload_xmlfile],
'result' : {'type' : 'form', 'arch' : _ups_uploadform, 'fields' : _ups_uploadfields, 'state' : [('end', 'End')]}
},
}
wiz_ups('stock.ups_xml');
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
+18 -18
View File
@@ -133,13 +133,13 @@
<form string="Stock and Sales Forecast">
<group colspan = "4" col = "4">
<group colspan = "2" col="2" >
<field name="company_id" select="1"
<field name="company_id"
groups="base.group_multi_company"
widget="selection"
on_change="onchange_company(company_id)"/>
<field name="warehouse_id" select="1" domain = "[('company_id','=',company_id)] "/>
<field name="period_id" select="1" />
<field name="product_id" select="1" on_change="product_id_change(product_id)" />
<field name="warehouse_id" domain = "[('company_id','=',company_id)] "/>
<field name="period_id" />
<field name="product_id" on_change="product_id_change(product_id)" />
<field name="product_uom_categ" invisible = "True"/>
<field name="product_uos_categ" invisible = "True"/>
<field name="product_uom"
@@ -208,9 +208,9 @@
<field name="type">tree</field>
<field name="arch" type="xml">
<tree string="Stock and Sales Forecasts" editable="bottom">
<field name="warehouse_id" select="1"/>
<field name="warehouse_id"/>
<field name="user_id"/>
<field name="period_id" select="1"/>
<field name="period_id"/>
<field name="product_id" on_change="product_id_change(product_id)" />
<field name="product_qty"/>
<field name="product_uom" />
@@ -240,11 +240,11 @@
<search string="Search Stock and Sales Forecast">
<group col='10' colspan='4'>
<filter icon="terp-purchase" string="Validated" domain="[('state','=','validated')]" separator="1"/>
<field name="company_id" select="1" widget="selection"/>
<field name="warehouse_id" select="1" widget="selection"/>
<field name="period_id" select="1" widget="selection"/>
<field name="product_id" select="1" widget="selection"/>
<field name="create_uid" select="1" widget="selection">
<field name="company_id" widget="selection"/>
<field name="warehouse_id" widget="selection"/>
<field name="period_id" widget="selection"/>
<field name="product_id" widget="selection"/>
<field name="create_uid" widget="selection">
<filter icon="terp-purchase" domain="[('create_uid','=',uid)]" help="My Forecasts"/>
</field>
</group>
@@ -322,10 +322,10 @@
<group colspan ="3" col="2">
<separator colspan ="2" string = "General Info"/>
<field name="company_id" select = "1" widget= "selection"
<field name="company_id" widget= "selection"
on_change="onchange_company(company_id)" groups="base.group_multi_company"/>
<field name="warehouse_id" select="1" domain = "[('company_id','=',company_id)] " />
<field name="period_id" select="1" />
<field name="warehouse_id" domain = "[('company_id','=',company_id)] " />
<field name="period_id" />
<field name="product_id" on_change="product_id_change(product_id)" />
<field name="product_uom_categ" invisible = "True"/>
<field name="product_uos_categ" invisible = "True"/>
@@ -386,10 +386,10 @@
<group col='10' colspan='4'>
<!-- Doesn't work ! <filter icon="terp-purchase" string="Current" domain="[('line_time','=','Future')]" separator="1"/> -->
<filter icon="terp-purchase" string="No Requisition" domain="[('history','=',False)]" separator="1"/>
<field name="company_id" select="1" widget="selection"/>
<field name="warehouse_id" select="1" widget="selection"/>
<field name="period_id" select="1" widget="selection"/>
<field name="product_id" select="1" widget="selection"/>
<field name="company_id" widget="selection"/>
<field name="warehouse_id" widget="selection"/>
<field name="period_id" widget="selection"/>
<field name="product_id" widget="selection"/>
</group>
</search>
</field>