[IMP] useability main flows and some bugfixes

bzr revid: fp@tinyerp.com-20101017115901-4y7a9sq42dckklx1
This commit is contained in:
Fabien Pinckaers 2010-10-17 13:59:01 +02:00
parent ad15fa3385
commit f18c6eb0c2
10 changed files with 120 additions and 115 deletions

View File

@ -510,22 +510,5 @@
res_model="account.invoice"
src_model="account.journal"/>
<act_window
domain="[('account_id.reconcile', '=', True)]"
context="{'search_default_unreconciled':True,'search_default_partner_id':[partner_id]}"
id="act_account_invoice_account_move_unreconciled"
groups="base.group_extended"
name="Items to Reconcile"
res_model="account.move.line"
src_model="account.invoice"/>
<act_window
context="{'search_default_move_id':move_id, 'search_default_unreconciled':False,}"
id="act_account_invoice_account_move_invoice_link"
name="Invoice Items"
groups="base.group_extended"
res_model="account.move.line"
src_model="account.invoice"/>
</data>
</openerp>

View File

@ -76,6 +76,9 @@
<button name="case_cancel" string="Cancel"
states="draft" type="object"
icon="gtk-close" />
<button name="case_mark_lost" string="Mark Lost"
states="open,pending" type="object"
icon="gtk-cancel" />
<button name="case_reset" string="Reset to Draft"
states="done,cancel" type="object"
icon="gtk-convert" />
@ -89,9 +92,6 @@
states="open,pending" type="object"
groups="base.group_extended"
icon="gtk-go-up" />
<button name="case_mark_lost" string="Mark Lost"
states="open,pending" type="object"
icon="gtk-cancel" />
<button name="case_close" string="Mark Won"
states="open,pending" type="object"
icon="gtk-apply" />

View File

@ -234,10 +234,13 @@
<field name="model">stock.move</field>
<field name="inherit_id" ref="stock.view_move_form"/>
<field name="arch" type="xml">
<field name="product_uom" position="after">
<field name="weight"/>
<field name="weight_net"/>
</field>
<group colspan="2" col="2" position="after">
<group colspan="2" col="2" groups="base.group_extended">
<separator string="Weights" colspan="2"/>
<field name="weight"/>
<field name="weight_net"/>
</group>
</group>
</field>
</record>
@ -247,10 +250,13 @@
<field name="model">stock.move</field>
<field name="inherit_id" ref="stock.view_move_form_reception_picking"/>
<field name="arch" type="xml">
<field name="product_uom" position="after">
<field name="weight"/>
<field name="weight_net"/>
</field>
<group colspan="2" col="2" position="after">
<group colspan="2" col="2" groups="base.group_extended">
<separator string="Weights" colspan="2"/>
<field name="weight"/>
<field name="weight_net"/>
</group>
</group>
</field>
</record>

View File

@ -697,7 +697,7 @@
<group colspan="2" col="2" name="Prices">
<separator string="Prices" colspan="2"/>
<field name="lst_price"/>
<field name="standard_price"/>
<field name="standard_price"/>
</group>
</page>
</notebook>

View File

@ -17,7 +17,7 @@
<separator orientation="vertical"/>
<field name="default_code"/>
<field name="name"/>
<field name="categ_id" widget="selection" operator="child_of"/>
<field name="categ_id" widget="selection" operator="child_of" groups="base.group_extended"/>
<newline/>
<group expand="0" string="Extended Filters..." groups="base.group_extended">
<field name="pricelist_id" widget="selection" context="{'pricelist': self}" />
@ -53,7 +53,7 @@
<field name="lst_price"/>
<field name="standard_price"/>
<field name="price" invisible="not context.get('pricelist',False)"/>
<field name="state"/>
<field name="state" groups="base.group_extended"/>
</tree>
</field>
</record>
@ -90,6 +90,16 @@
<field name="procure_method" groups="base.group_extended"/>
<field name="supply_method"/>
</group>
<group colspan="2" col="2">
<separator string="Base Prices" colspan="2"/>
<field name="standard_price" attrs="{'readonly':[('cost_method','=','average')]}"/>
<field name="list_price"/>
<newline/>
<field name="price_margin" groups="product.group_product_variant"/>
<field name="price_extra" groups="product.group_product_variant"/>
<newline/>
<field groups="base.group_extended" name="cost_method"/>
</group>
<group colspan="2" col="2" groups="base.group_extended">
<separator string="Weigths" colspan="2"/>
@ -98,11 +108,11 @@
<field digits="(14, 3)" name="weight_net" attrs="{'readonly':[('type','=','service')]}"/>
</group>
<group colspan="2" col="2" name="status">
<group colspan="2" col="2" name="status" groups="base.group_extended">
<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"/>
<field name="product_manager"/>
</group>
<group colspan="2" col="2" name="uom">
@ -140,16 +150,7 @@
</group>
</page>
<page string="Prices &amp; Suppliers">
<separator string="Base Prices" colspan="4"/>
<field name="standard_price" attrs="{'readonly':[('cost_method','=','average')]}"/>
<field name="list_price"/>
<newline/>
<field name="price_margin" groups="product.group_product_variant"/>
<field name="price_extra" groups="product.group_product_variant"/>
<newline/>
<field groups="base.group_extended" name="cost_method"/>
<newline/>
<page string="Suppliers">
<field colspan="4" name="seller_ids" nolabel="1"/>
</page>
<page string="Descriptions">
@ -530,7 +531,7 @@
<field name="name"/>
<field name="categ_id"/>
<field name="type"/>
<field name="state"/>
<field name="state" groups="base.group_extended"/>
</tree>
</field>
</record>
@ -559,6 +560,13 @@
<field name="supply_method"/>
</group>
<group colspan="2" col="2">
<separator string="Base Prices" colspan="2"/>
<field name="standard_price" attrs="{'readonly':[('cost_method','=','average')]}"/>
<field name="list_price"/>
<field groups="base.group_extended" name="cost_method"/>
</group>
<group colspan="2" col="2" groups="base.group_extended">
<separator string="Weigths" colspan="2"/>
<field digits="(14, 3)" name="volume" attrs="{'readonly':[('type','=','service')]}"/>
@ -566,11 +574,11 @@
<field digits="(14, 3)" name="weight_net" attrs="{'readonly':[('type','=','service')]}"/>
</group>
<group colspan="2" col="2" name="status">
<group colspan="2" col="2" name="status" groups="base.group_extended">
<separator string="Status" colspan="2"/>
<field name="categ_id" select="1"/>
<field name="state"/>
<field groups="base.group_extended" name="product_manager"/>
<field name="product_manager"/>
</group>
<group colspan="2" col="2" name="uom">
@ -605,12 +613,7 @@
</group>
</page>
<page string="Prices &amp; Suppliers">
<separator string="Base Prices" colspan="4"/>
<field name="standard_price" attrs="{'readonly':[('cost_method','=','average')]}"/>
<field name="list_price"/>
<field groups="base.group_extended" name="cost_method"/>
<newline/>
<page string="Suppliers">
<field colspan="4" name="seller_ids" nolabel="1"/>
</page>
<page string="Descriptions">

View File

@ -486,9 +486,9 @@ class sale_order(osv.osv):
'context': "{'type':'out_invoice'}",
'type': 'ir.actions.act_window',
'nodestroy' :True,
'target': 'new',
'target': 'current',
'res_id': inv_ids and inv_ids[0] or False,
}
}
return result

View File

@ -207,7 +207,7 @@
<button name="ship_recreate" states="shipping_except" string="Recreate Procurement" icon="gtk-ok"/>
<button name="ship_corrected" states="shipping_except" string="Procurement Corrected" icon="gtk-apply"/>
<button name="action_cancel" states="manual,progress" string="Cancel Order" type="object" icon="gtk-cancel"/>
<button name="manual_invoice" states="manual" string="Create Invoice" icon="terp-gtk-go-back-rtl" type="object"/>
<button name="manual_invoice" states="manual" string="Create Invoice" icon="gtk-go-forward" type="object"/>
<button name="ship_cancel" states="shipping_except" string="Cancel Order" icon="gtk-cancel"/>
<button name="action_cancel_draft" states="cancel" string="Set to Draft" type="object" icon="gtk-convert"/>
<button name="cancel" states="draft" string="Cancel Order" icon="gtk-cancel"/>

View File

@ -60,9 +60,11 @@
<field name="inherit_id" ref="product.product_normal_form_view"/>
<field name="arch" type="xml">
<field name="standard_price" position="replace">
<group col="4" colspan="2">
<field name="standard_price" readonly="1"/>
<button name="%(action_view_change_standard_price)d" string="Change Price" type="action" icon="gtk-execute" attrs="{'readonly':[('cost_method','=','average')]}"/>
<label string="Cost Price:" align="1.0"/>
<group col="2" colspan="1">
<field name="standard_price" attrs="{'readonly':[('cost_method','=','average')]}" nolabel="1"/>
<button name="%(action_view_change_standard_price)d" string="Update"
type="action" icon="gtk-execute" attrs="{'invisible':[('cost_method','&lt;&gt;','average')]}"/>
</group>
</field>
</field>

View File

@ -1341,35 +1341,38 @@
<field eval="4" name="priority"/>
<field name="arch" type="xml">
<form string="Stock Moves">
<group colspan="2" col="4">
<separator colspan="4" string="Move Information"/>
<field name="name" colspan="4"/>
<field name="product_id" on_change="onchange_product_id(product_id,location_id,location_dest_id, parent.address_id)" colspan="4"/>
<field name="product_qty" on_change="onchange_quantity(product_id, product_qty, product_uom, product_uos)" colspan="3"/>
<group colspan="4" col="7">
<field name="product_id" on_change="onchange_product_id(product_id,location_id,location_dest_id, False)"/>
<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"/>
<button name="%(stock.move_scrap)d" groups="base.group_extended"
string="Scrap" type="action"
icon="gtk-convert" context="{'scrap': True}"
states="draft,waiting,confirmed,assigned" colspan="1"/>
<field name="product_uom" string="Unit Of Measure" widget="selection" colspan="4"/>
<newline/>
<field name="location_id" context="{'full':True}"/>
<field name="location_dest_id" context="{'full':True}"/>
<field name="address_id" context="{'contact_display':'partner'}"/>
</group>
<group colspan="2" col="2">
<separator colspan="2" string="Move Information"/>
<field name="name" string="Reason"/>
<field name="product_uos_qty" groups="product.product_uos" colspan="4"/>
<field name="product_uos" groups="product.product_uos" colspan="4"/>
</group>
<group colspan="2" col="2">
<separator string="Locations &amp; Picking" colspan="2" />
<field name="location_id" widget="selection"/>
<field name="location_dest_id" widget="selection"/>
<separator string="Picking" colspan="2" />
<field name="picking_id"/>
<field name="address_id" context="{'contact_display':'partner'}"/>
<field name="company_id" groups="base.group_multi_company" widget="selection"/>
</group>
<group colspan="2" col="2">
<separator string="Dates &amp; Priority" colspan="2" />
<field name="create_date"/>
<field name="date"/>
<separator string="Dates" colspan="2" />
<field name="create_date" groups="base.group_extended"/>
<field name="date" groups="base.group_extended"/>
<field name="date_expected"/>
<field name="priority"/>
</group>
<group colspan="2" col="4" groups="base.group_extended">
@ -1392,10 +1395,10 @@
<separator colspan="4"/>
<field name="state"/>
<group col="4" colspan="2">
<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_confirm" states="draft" string="Process Later" type="object" icon="gtk-apply"/>
<button name="force_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"/>
<button name="action_done" states="assigned" string="Process" type="object" icon="gtk-jump-to"/>
<button name="action_done" states="draft,assigned,confirmed" string="Process Now" type="object" icon="gtk-jump-to"/>
</group>
</form>
</field>
@ -1529,36 +1532,39 @@
<field name="type">form</field>
<field eval="6" name="priority"/>
<field name="arch" type="xml">
<form string="Moves">
<group colspan="2" col="4">
<separator colspan="4" string="Move Information"/>
<field name="name" colspan="4"/>
<field name="product_id" on_change="onchange_product_id(product_id, location_id, location_dest_id, address_id)" colspan="4"/>
<field name="product_qty" on_change="onchange_quantity(product_id, product_qty, product_uom, product_uos)" colspan="3"/>
<form string="Receive Products">
<group colspan="4" col="7">
<field name="product_id" on_change="onchange_product_id(product_id,location_id,location_dest_id, False)"/>
<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"/>
<button name="%(stock.move_scrap)d" groups="base.group_extended"
string="Scrap" type="action"
icon="gtk-convert" context="{'scrap': True}"
states="draft,waiting,confirmed,assigned" colspan="1"/>
<field name="product_uom" widget="selection" colspan="4"/>
<newline/>
<field name="location_id" context="{'full':True}"/>
<field name="location_dest_id" context="{'full':True}"/>
<field name="address_id" context="{'contact_display':'partner'}"/>
</group>
<group colspan="2" col="2">
<separator colspan="2" string="Move Information"/>
<field name="name" string="Reason"/>
<field name="product_uos_qty" groups="product.product_uos" colspan="4"/>
<field name="product_uos" widget="selection" groups="product.product_uos" colspan="4"/>
<field name="product_uos" groups="product.product_uos" colspan="4"/>
</group>
<group colspan="2" col="2">
<separator string="Locations &amp; Picking" colspan="2" />
<field name="location_id" widget="selection"/>
<field name="location_dest_id" widget="selection"/>
<separator string="Picking" colspan="2" />
<field name="picking_id"/>
<field name="address_id" context="{'contact_display':'partner'}"/>
<field name="company_id" groups="base.group_multi_company" widget="selection"/>
</group>
<group colspan="2" col="2">
<separator string="Dates &amp; Priority" colspan="2" />
<field name="create_date"/>
<field name="date"/>
<separator string="Dates" colspan="2" />
<field name="create_date" groups="base.group_extended"/>
<field name="date" groups="base.group_extended"/>
<field name="date_expected"/>
<field name="priority"/>
</group>
<group colspan="2" col="4" groups="base.group_extended">
@ -1567,7 +1573,7 @@
<button name="%(split_into)d" string="New pack" type="action"
groups="base.group_extended"
icon="terp-stock_effects-object-colorize"
states="draft,assigned,confirmed,done"/>
states="draft,assigned,confirmed,done" colspan="1"/>
<field name="prodlot_id" groups="base.group_extended"
context="{'location_id':location_id, 'product_id':product_id}"
domain="[('product_id','=?',product_id)]"
@ -1575,16 +1581,17 @@
<button name="%(track_line)d"
groups="base.group_extended"
states="draft,waiting,confirmed,assigned,done"
string="Split" type="action" icon="terp-stock_effects-object-colorize" colspan="1" />
string="Split" type="action" icon="terp-stock_effects-object-colorize" colspan="1"/>
</group>
<separator colspan="4"/>
<field name="state"/>
<group col="5" colspan="2">
<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"/>
<button name="%(action_partial_move)d" states="assigned,confirmed" string="Partial" type="action" icon="gtk-justify-fill"/>
<button name="action_done" states="assigned" string="Process" type="object" icon="gtk-go-forward"/>
<button name="action_confirm" states="draft" string="Process Later" type="object" icon="gtk-apply"/>
<button name="force_assign" states="confirmed" string="Set Available" type="object" icon="gtk-yes"/>
<button name="%(action_partial_move)d" states="assigned" string="Partial" type="action" icon="gtk-justify-fill"/>
<button name="action_done" states="draft,assigned,confirmed" string="Process Now" type="object" icon="gtk-jump-to"/>
</group>
</form>
</field>
@ -1662,16 +1669,16 @@
</record>
<record id="action_reception_picking_move" model="ir.actions.act_window">
<field name="name">Incoming Products</field>
<field name="name">Receive Products</field>
<field name="res_model">stock.move</field>
<field name="type">ir.actions.act_window</field>
<field name="view_type">form</field>
<field name="view_mode">tree,form</field>
<field name="domain">['|','&amp;',('picking_id','=',False),('location_id.usage', 'in', ['customer','supplier']),'&amp;',('picking_id','!=',False),('picking_id.type','=','in')]</field>
<field name="view_id" ref="view_move_tree_reception_picking"/>
<field name="context">{"search_default_receive":1}</field>
<field name="context" eval="'{\'search_default_receive\':1, \'default_location_id\':%d, \'default_location_dest_id\':%d}' % (ref('stock_location_suppliers'),ref('stock_location_stock'))"/>
<field name="search_view_id" ref="view_move_search_reception_incoming_picking"/>
<field name="help">The Incoming Products lists all products you are waiting for, according to your preceding purchase orders. Once you receive an order, you can filter based on the name of the supplier or the purchase order reference. Then you can confirm all products received using the buttons on the right of each line.</field>
<field name="help">You will find here the list of all products you are waiting for, according to your preceding purchase orders. Once you receive an order, you can filter based on the name of the supplier or the purchase order reference. Then you can confirm all products received using the buttons on the right of each line.</field>
</record>
<record model="ir.actions.act_window.view" id="action_move_reception_picking_tree">
@ -1797,16 +1804,16 @@
</record>
<record id="action_out_picking_move" model="ir.actions.act_window">
<field name="name">Outgoing Products</field>
<field name="name">Deliver Products</field>
<field name="res_model">stock.move</field>
<field name="type">ir.actions.act_window</field>
<field name="view_type">form</field>
<field name="view_mode">tree,form</field>
<field name="domain">['|','&amp;',('picking_id','=',False),('location_dest_id.usage', 'in', ['customer','supplier']),'&amp;',('picking_id','!=',False),('picking_id.type','=','out')]</field>
<field name="view_id" ref="view_move_tree_reception_picking"/>
<field name="context">{"search_default_receive":1}</field>
<field name="context" eval="'{\'search_default_receive\':1, \'default_location_id\':%d, \'default_location_dest_id\':%d}' % (ref('stock_location_stock'),ref('stock_location_customers'))"/>
<field name="search_view_id" ref="view_move_search_reception_outcoming_picking"/>
<field name="help">The Outgoing Products lists all products you have to deliver to your customers. You can process the deliveries directly from this list, line by or line or through the Delivery Orders menu.</field>
<field name="help">The 'Deliver Products' menu lists all products you have to deliver to your customers. You can process the deliveries directly from this list, line by or line or through the Delivery Orders menu.</field>
</record>
<record model="ir.actions.act_window.view" id="action_move_out_picking_tree">
@ -1818,7 +1825,7 @@
<record model="ir.actions.act_window.view" id="action_move_out_picking_form">
<field name="sequence" eval="2"/>
<field name="view_mode">form</field>
<field name="view_id" ref="view_move_form_reception_picking"/>
<field name="view_id" ref="view_move_form"/>
<field name="act_window_id" ref="action_out_picking_move"/>
</record>

View File

@ -60,13 +60,10 @@ class stock_partial_picking(osv.osv_memory):
result = super(stock_partial_picking, self).fields_view_get(cr, uid, view_id, view_type, context, toolbar,submenu)
pick_obj = self.pool.get('stock.picking')
picking_ids = context.get('active_ids', False)
_moves_arch_lst = """<form string="Deliver Products">
<separator colspan="4" string="Delivery Information"/>
<group colspan="4" col="4">
<field name="date"/>
</group>
<separator colspan="4" string="Move Detail"/>
"""
_moves_arch_lst = """<form string="%s">
<field name="date" invisible="1"/>
<separator colspan="4" string="%s"/>
""" % (_('Process Document'), _('Products'))
_moves_fields = result['fields']
if picking_ids and view_type in ['form']:
for pick in pick_obj.browse(cr, uid, picking_ids, context):
@ -101,13 +98,20 @@ class stock_partial_picking(osv.osv_memory):
}
})
invisible = "1"
if pick.type=='in' and m.product_id.track_incoming:
invisible=""
if pick.type=='out' and m.product_id.track_outgoing:
invisible=""
_moves_arch_lst += """
<group colspan="4" col="10">
<field name="move%s_product_id" nolabel="1"/>
<field name="move%s_product_qty" string="Qty" />
<field name="move%s_product_qty"/>
<field name="move%s_product_uom" nolabel="1" />
<field name="move%s_prodlot_id" domain="[('product_id','=',move%s_product_id)]" groups="base.group_extended" />
"""%(m.id, m.id, m.id, m.id,m.id)
<field name="move%s_prodlot_id" domain="[('product_id','=',move%s_product_id)]" invisible="%s" />
"""%(m.id, m.id, m.id, m.id,m.id, invisible)
if (need_product_cost and m.product_id.cost_method == 'average'):
_moves_fields.update({