[FIX, IMP] stock: Fixed bug in Make Picking wizard. Check wizards available on pickings, remove some of them, from the wizard's list. (like: we can not confirm a list of picking, because we have to provide the quantities. We can only use this wizard from the form view through a button).
bzr revid: uco@tinyerp.co.in-20100315125044-ef8f6oldp5g4mq1t
This commit is contained in:
parent
6b35370983
commit
a558d4fd30
|
@ -588,7 +588,19 @@
|
|||
<field name="min_date" select="1"/>
|
||||
<field name="type"/>
|
||||
<field name="company_id" select="1" groups="base.group_multi_company" widget="selection"/>
|
||||
</group>
|
||||
<button name="%(make_picking)d"
|
||||
states="confirmed,assigned"
|
||||
string="Make Picking"
|
||||
type="action"
|
||||
icon="gtk-go-forward"
|
||||
help="Make Picking" colspan="2"/>
|
||||
<button name="%(return_picking)d"
|
||||
states="done"
|
||||
string="Return Picking"
|
||||
type="action"
|
||||
icon="gtk-go-back"
|
||||
help="Return Picking" colspan="2"/>
|
||||
</group>
|
||||
<notebook colspan="4">
|
||||
<page string="General Information">
|
||||
<field colspan="4" name="move_lines" nolabel="1" widget="one2many_list" default_get="{'move_line':move_lines, 'address_out_id': address_id}">
|
||||
|
@ -744,8 +756,19 @@
|
|||
<field name="min_date" select="1"/>
|
||||
<field name="type"/>
|
||||
<field name="company_id" select="1" groups="base.group_multi_company" widget="selection"/>
|
||||
|
||||
</group>
|
||||
<button name="%(make_picking)d"
|
||||
states="assigned"
|
||||
string="Make Picking"
|
||||
type="action"
|
||||
icon="gtk-go-forward"
|
||||
help="Make Picking" colspan="2"/>
|
||||
<button name="%(return_picking)d"
|
||||
states="done"
|
||||
string="Return Picking"
|
||||
type="action"
|
||||
icon="gtk-go-back"
|
||||
help="Return Picking" colspan="2"/>
|
||||
</group>
|
||||
<notebook colspan="4">
|
||||
<page string="General Information">
|
||||
<field colspan="4" name="move_lines" nolabel="1" widget="one2many_list" default_get="{'move_line':move_lines, 'address_out_id': address_id}">
|
||||
|
@ -928,7 +951,19 @@
|
|||
<field name="backorder_id" select="2" readonly="1"/>
|
||||
<field name="origin" select="2" readonly="1"/>
|
||||
<field name="company_id" select="1" groups="base.group_multi_company" widget="selection"/>
|
||||
</group>
|
||||
<button name="%(make_picking)d"
|
||||
states="assigned"
|
||||
string="Make Picking"
|
||||
type="action"
|
||||
icon="gtk-go-forward"
|
||||
help="Make Picking" colspan="2"/>
|
||||
<button name="%(return_picking)d"
|
||||
states="done"
|
||||
string="Return Picking"
|
||||
type="action"
|
||||
icon="gtk-go-back"
|
||||
help="Return Picking" colspan="2"/>
|
||||
</group>
|
||||
<notebook colspan="4">
|
||||
<page string="General Information">
|
||||
<field colspan="4" name="move_lines" nolabel="1" widget="one2many_list" default_get="{'move_line':move_lines, 'address_out_id': address_id}">
|
||||
|
@ -1108,7 +1143,19 @@
|
|||
<field name="invoice_state" select="2" string="Invoice Control"/>
|
||||
<field name="type"/>
|
||||
<field name="company_id" select="1" groups="base.group_multi_company" widget="selection"/>
|
||||
</group>
|
||||
<button name="%(make_picking)d"
|
||||
states="confirmed,assigned"
|
||||
string="Make Picking"
|
||||
type="action"
|
||||
icon="gtk-go-forward"
|
||||
help="Make Picking" colspan="2"/>
|
||||
<button name="%(return_picking)d"
|
||||
states="done"
|
||||
string="Return Picking"
|
||||
type="action"
|
||||
icon="gtk-go-back"
|
||||
help="Return Picking" colspan="2"/>
|
||||
</group>
|
||||
<notebook colspan="4">
|
||||
<page string="General Information">
|
||||
<field colspan="4" name="move_lines" nolabel="1" widget="one2many_list" default_get="{'move_line':move_lines, 'address_in_id': address_id}">
|
||||
|
|
|
@ -17,10 +17,27 @@
|
|||
<wizard
|
||||
id="partial_picking"
|
||||
model="stock.picking"
|
||||
multi="True"
|
||||
menu="False"
|
||||
keyword="client_action_multi"
|
||||
name="stock.partial_picking"
|
||||
string="Partial picking"/>
|
||||
|
||||
<wizard
|
||||
id="make_picking"
|
||||
model="stock.picking"
|
||||
menu="False"
|
||||
keyword="client_action_multi"
|
||||
name="stock.picking.make"
|
||||
string="Make Picking"/>
|
||||
|
||||
<wizard
|
||||
id="return_picking"
|
||||
model="stock.picking"
|
||||
menu="False"
|
||||
keyword="client_action_multi"
|
||||
name="stock.return.picking"
|
||||
string="Return picking"/>
|
||||
|
||||
<wizard
|
||||
id="partial_move"
|
||||
model="stock.move"
|
||||
|
@ -35,14 +52,6 @@
|
|||
name="stock.inventory.line.split"
|
||||
string="Split inventory lines"/>
|
||||
|
||||
<wizard id="make_picking" model="stock.picking" multi="True" name="stock.picking.make" string="Make picking"/>
|
||||
|
||||
<wizard
|
||||
id="return_picking"
|
||||
model="stock.picking"
|
||||
name="stock.return.picking"
|
||||
string="Return picking"/>
|
||||
|
||||
<wizard
|
||||
string="Merge inventories"
|
||||
model="stock.inventory"
|
||||
|
|
|
@ -32,7 +32,7 @@ ARCH = '''<?xml version="1.0"?>
|
|||
FIELDS = {
|
||||
'pickings': {
|
||||
'string': 'Picking',
|
||||
'type': 'one2many',
|
||||
'type': 'many2many',
|
||||
'relation': 'stock.picking',
|
||||
'readonly': True,
|
||||
},
|
||||
|
@ -52,8 +52,7 @@ def _make_packing(obj, cursor, user, data, context):
|
|||
wkf_service = netsvc.LocalService('workflow')
|
||||
pool = pooler.get_pool(cursor.dbname)
|
||||
picking_obj = pool.get('stock.picking')
|
||||
ids = [x[1] for x in data['form']['pickings']]
|
||||
|
||||
ids = data['form']['pickings'][0][2]
|
||||
picking_obj.force_assign(cursor, user, ids)
|
||||
picking_obj.action_move(cursor, user, ids)
|
||||
for picking_id in ids:
|
||||
|
|
Loading…
Reference in New Issue