[IMP]interchange sequence of buttons in Purchase order form like: [Receive Products] [Receive Invoice]
bzr revid: pja@tinyerp.com-20121012062846-27zef8nxmwiaz5wz
This commit is contained in:
parent
ac999ede8a
commit
4e088306d1
|
@ -114,7 +114,7 @@ class purchase_order(osv.osv):
|
|||
if state=='done':
|
||||
res[oid][0] += nbr or 0.0
|
||||
res[oid][1] += nbr or 0.0
|
||||
else:
|
||||
else:L878
|
||||
res[oid][1] += nbr or 0.0
|
||||
for r in res:
|
||||
if not res[r][1]:
|
||||
|
@ -877,10 +877,10 @@ class purchase_order_line(osv.osv):
|
|||
context = {}
|
||||
|
||||
# - check for the presence of partner_id and pricelist_id
|
||||
if not pricelist_id:
|
||||
raise osv.except_osv(_('No Pricelist !'), _('Select a price list for a supplier in the purchase form to choose a product.'))
|
||||
if not partner_id:
|
||||
raise osv.except_osv(_('No Partner!'), _('Select a partner in purchase order to choose a product.'))
|
||||
if not pricelist_id:
|
||||
raise osv.except_osv(_('No Pricelist !'), _('Select a price list for a supplier in the purchase form to choose a product.'))
|
||||
res = {'value': {'price_unit': price_unit or 0.0, 'name': name or '', 'product_uom' : uom_id or False}}
|
||||
if not product_id:
|
||||
return res
|
||||
|
|
|
@ -205,8 +205,8 @@
|
|||
<button name="picking_ok" states="except_picking" string="Manually Corrected"/>
|
||||
<button name="invoice_ok" states="except_invoice" string="Manually Corrected"/>
|
||||
<button name="purchase_approve" states="confirmed" string="Approve Order" class="oe_highlight" groups="purchase.group_purchase_manager"/>
|
||||
<button name="view_invoice" string="Receive Invoice" type="object" attrs="{'invisible': ['|', ('invoice_method','=','picking'), '|', ('state','!=', 'approved'), ('invoiced','=',True) ]}" class="oe_highlight"/>
|
||||
<button name="view_picking" string="Receive Products" type="object" attrs="{'invisible': ['|', ('shipped','=',True), ('state','!=', 'approved')]}" class="oe_highlight"/>
|
||||
<button name="view_invoice" string="Receive Invoice" type="object" attrs="{'invisible': ['|', ('invoice_method','=','picking'), '|', ('state','!=', 'approved'), ('invoiced','=',True) ]}" class="oe_highlight"/>
|
||||
<button name="action_cancel_draft" states="cancel,sent,confirmed" string="Set to Draft" type="object" />
|
||||
<button name="purchase_cancel" states="draft,confirmed,sent" string="Cancel"/>
|
||||
<field name="state" widget="statusbar" statusbar_visible="draft,sent,approved,done" statusbar_colors='{"except_picking":"red","except_invoice":"red","confirmed":"blue"}' readonly="1"/>
|
||||
|
|
Loading…
Reference in New Issue