[IMP]purchase: Improve warning message and set a button attrs
bzr revid: mma@tinyerp.com-20120229060931-gsgg20m9mut5p10y
This commit is contained in:
parent
3e9fbd83ca
commit
06b32aedf4
|
@ -280,8 +280,8 @@ class purchase_order(osv.osv):
|
|||
for po in self.browse(cr, uid, ids, context=context):
|
||||
if po.invoice_method == 'manual':
|
||||
if not po.invoice_ids:
|
||||
raise osv.except_osv(_('Warring !'),
|
||||
_('You have configure Invoice Control is: "%s", You must first Create all invoices related to this purchase order: "%s"') % (self._columns['invoice_method'].selection[0][1], po.name))
|
||||
raise osv.except_osv(_('warning !'),
|
||||
_('Your Invoicing Control is based on order lines, so please create invoice from Purchase order lines.'))
|
||||
inv_ids+= [invoice.id for invoice in po.invoice_ids]
|
||||
|
||||
res = mod_obj.get_object_reference(cr, uid, 'account', 'invoice_supplier_form')
|
||||
|
|
|
@ -203,8 +203,8 @@
|
|||
<button name="purchase_confirm" states="draft,send" string="Confirm Order" icon="gtk-go-forward"/>
|
||||
<button name="purchase_appbuyer" states="wait_auth" string="Approve Purchase" icon="gtk-ok"/>
|
||||
<button name="purchase_approve" states="confirmed" string="Approve Order" icon="gtk-go-forward"/>
|
||||
<button name="view_invoice" string="Receive Invoice" icon="gtk-go-forward" type="object" attrs="{'invisible': ['|', ('invoice_method','=','picking'),('state','!=', 'approved') ]}" />
|
||||
<button name="view_picking" states="approved" string="Receive Product" icon="gtk-go-forward" type="object"/>
|
||||
<button name="view_invoice" string="Receive Invoice" icon="gtk-go-forward" type="object" attrs="{'invisible': ['|', ('invoice_method','=','picking'), '|', ('state','!=', 'approved'), ('invoiced','=',True) ]}"/>
|
||||
<button name="view_picking" string="Receive Product" icon="gtk-go-forward" type="object" attrs="{'invisible': ['|', ('shipped','=',True), ('state','!=', 'approved')]}"/>
|
||||
<button name="action_cancel_draft" states="cancel,send,confirmed" string="Set to Draft" type="object" icon="gtk-convert"/>
|
||||
<button name="purchase_cancel" states="draft,confirmed,wait_auth,send" string="Cancel" icon="gtk-cancel"/>
|
||||
</group>
|
||||
|
|
Loading…
Reference in New Issue