[IMP] account, purchase : Added 'Supplier Invoices' button on 'Supplier' form view and its related changes.
bzr revid: mdi@tinyerp.com-20120725104634-2cj4g3zp5mrow6do
This commit is contained in:
parent
1910f0dece
commit
20d79d06e0
|
@ -306,7 +306,7 @@ class account_invoice(osv.osv):
|
|||
if view_type == 'form':
|
||||
if partner['supplier'] and not partner['customer']:
|
||||
view_id = self.pool.get('ir.ui.view').search(cr,uid,[('name', '=', 'account.invoice.supplier.form')])
|
||||
else:
|
||||
elif partner['customer'] and not partner['supplier']:
|
||||
view_id = self.pool.get('ir.ui.view').search(cr,uid,[('name', '=', 'account.invoice.form')])
|
||||
if view_id and isinstance(view_id, (list, tuple)):
|
||||
view_id = view_id[0]
|
||||
|
|
|
@ -47,6 +47,22 @@
|
|||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="act_res_partner_2_supplier_invoices" model="ir.actions.act_window">
|
||||
<field name="name">Supplier Invoices</field>
|
||||
<field name="res_model">account.invoice</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_mode">tree,form,graph</field>
|
||||
<field name="domain">[('type','=','in_invoice')]</field>
|
||||
<field name="context">{'search_default_partner_id': active_id, 'default_type': 'in_invoice', 'type': 'in_invoice', 'journal_type': 'purchase'}</field>
|
||||
<field name="help">
|
||||
Click here to create Supplier invoice.
|
||||
<p>
|
||||
You can control the invoice from your supplier according to what you purchased or received.
|
||||
<p>
|
||||
OpenERP can also generate draft invoices automatically from purchase orders or receipts.
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="res_partner_view_purchase_buttons" model="ir.ui.view">
|
||||
<field name="name">res.partner.view.purchase.buttons</field>
|
||||
|
@ -59,6 +75,8 @@
|
|||
<button name="%(purchase.act_res_partner_2_purchase_order)d" type="action"
|
||||
string="RFQs and Purchases"
|
||||
groups="purchase.group_purchase_user"/>
|
||||
<button name="%(purchase.act_res_partner_2_supplier_invoices)d" type="action"
|
||||
string="Supplier Invoices"/>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
|
|
Loading…
Reference in New Issue