[IMP] invoice control manual invisible button.

bzr revid: nco@tinyerp.com-20121029134845-wl1sr4mn9a4g4iud
This commit is contained in:
Nimesh (Open ERP) 2012-10-29 19:18:45 +05:30
parent 8f6c77c582
commit a4b0b789dd
2 changed files with 2 additions and 2 deletions

View File

@ -534,7 +534,7 @@ class purchase_order(osv.osv):
'invoice_state': '2binvoiced' if order.invoice_method == 'picking' else 'none',
'type': 'in',
'partner_id': order.dest_address_id.id or order.partner_id.id,
'invoice_state': '2binvoiced' if order.invoice_method == 'picking' else 'none',
'invoice_state': '2binvoiced' if order.invoice_method in ('picking', 'order') else 'none',
'purchase_id': order.id,
'company_id': order.company_id.id,
'move_lines' : [],

View File

@ -43,7 +43,7 @@
<field name="inherit_id" ref="stock.view_picking_in_form"/>
<field name="arch" type="xml">
<xpath expr="//button[@name='action_process']" position="after">
<button name="create_draft_invoice" states="assigned" string="Receive &amp; Control Invoice" type="object" class="oe_highlight"/>
<button name="create_draft_invoice" attrs="{'invisible':[('invoice_state', '=', 'none')]}" string="Receive &amp; Control Invoice" type="object" class="oe_highlight"/>
</xpath>
</field>
</record>