Add 'Print Order' on PO (there was already a 'Print RFQ button'...)
This commit is contained in:
@@ -49,6 +49,11 @@ class PurchaseOrder(models.Model):
|
||||
})
|
||||
return res
|
||||
|
||||
def print_order(self):
|
||||
action = self.env['report'].get_action(
|
||||
self, 'purchase.report_purchaseorder')
|
||||
return action
|
||||
|
||||
|
||||
class StockPicking(models.Model):
|
||||
_inherit = 'stock.picking'
|
||||
|
||||
@@ -11,25 +11,11 @@
|
||||
<record id="purchase_order_form" model="ir.ui.view">
|
||||
<field name="name">usability.purchase.order.form</field>
|
||||
<field name="model">purchase.order</field>
|
||||
<!-- high priority because we change the string of a page
|
||||
and other modules inherit the page using the original string -->
|
||||
<field name="priority">1000</field>
|
||||
<field name="inherit_id" ref="purchase.purchase_order_form"/>
|
||||
<field name="arch" type="xml">
|
||||
<!-- So far, I consider the shortcut icon are enough
|
||||
<notebook position="inside">
|
||||
<page string="Deliveries" states="approved,except_picking,except_invoice,done">
|
||||
<field name="picking_ids" nolabel="1"/>
|
||||
</page>
|
||||
<page string="Invoices" states="approved,except_picking,except_invoice,done">
|
||||
<field name="invoice_ids" nolabel="1" context="{'form_view_ref': 'account.invoice_supplier_form'}"/>
|
||||
</page>
|
||||
</notebook>
|
||||
-->
|
||||
<!--
|
||||
<page string="Deliveries & Invoices" position="attributes">
|
||||
<attribute name="string">Other Information</attribute>
|
||||
</page> -->
|
||||
<button name="action_rfq_send" states="purchase" position="after">
|
||||
<button name="print_order" states="purchase" string="Print Order" type="object" groups="base.group_user"/>
|
||||
</button>
|
||||
<field name="fiscal_position_id" position="attributes">
|
||||
<attribute name="widget">selection</attribute>
|
||||
</field>
|
||||
|
||||
Reference in New Issue
Block a user