summaryrefslogtreecommitdiff
path: root/fixco_custom/views
diff options
context:
space:
mode:
Diffstat (limited to 'fixco_custom/views')
-rw-r--r--fixco_custom/views/purchase_order.xml7
-rw-r--r--fixco_custom/views/purchase_order_multi_bills.xml36
2 files changed, 43 insertions, 0 deletions
diff --git a/fixco_custom/views/purchase_order.xml b/fixco_custom/views/purchase_order.xml
index d5e612c..128224d 100644
--- a/fixco_custom/views/purchase_order.xml
+++ b/fixco_custom/views/purchase_order.xml
@@ -61,5 +61,12 @@
</field>
</field>
</record>
+ <record id="purchase_order_multi_create_bills_ir_actions_server" model="ir.actions.server">
+ <field name="name">Multi Bills</field>
+ <field name="model_id" ref="purchase.model_purchase_order"/>
+ <field name="binding_model_id" ref="purchase.model_purchase_order"/>
+ <field name="state">code</field>
+ <field name="code">action = records.open_form_multi_create_bills()</field>
+ </record>
</data>
</odoo>
diff --git a/fixco_custom/views/purchase_order_multi_bills.xml b/fixco_custom/views/purchase_order_multi_bills.xml
new file mode 100644
index 0000000..dbcbc4a
--- /dev/null
+++ b/fixco_custom/views/purchase_order_multi_bills.xml
@@ -0,0 +1,36 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<odoo>
+ <data>
+ <record id="view_purchase_order_multi_create_bills_form" model="ir.ui.view">
+ <field name="name">Purchase Order Multi Create Bills</field>
+ <field name="model">purchase.order.multi_bills</field>
+ <field name="arch" type="xml">
+ <form string="Create Bills">
+ <sheet>
+ <div class="oe_title">
+ <h2>Create Bills for Selected Sales Orders</h2>
+ </div>
+ <div class="alert alert-info">
+ <p>This will create Bills for all selected sales orders.</p>
+ <p>Total orders selected: <strong><span t-esc="len(context.get('so_ids', []))"/></strong></p>
+ </div>
+ </sheet>
+ <footer>
+ <button name="queue_job" string="Create Bills" type="object"
+ class="btn-primary" default_focus="1"/>
+ <button string="Cancel" class="btn-secondary" special="cancel"/>
+ </footer>
+ </form>
+ </field>
+ </record>
+
+ <record id="action_purchase_order_multi_bills" model="ir.actions.act_window">
+ <field name="name">Create Bills</field>
+ <field name="res_model">purchase.order.multi_bills</field>
+ <field name="type">ir.actions.act_window</field>
+ <field name="view_mode">form</field>
+ <field name="view_id" ref="view_purchase_order_multi_create_bills_form"/>
+ <field name="target">new</field>
+ </record>
+ </data>
+</odoo> \ No newline at end of file