|
| 1 | +<?xml version='1.0' encoding='UTF-8'?> |
| 2 | +<odoo> |
| 3 | + <record id="sale_res_config_settings_inherit_view" model="ir.ui.view"> |
| 4 | + <field name="name">res.config.settings.inherit.sale.view</field> |
| 5 | + <field name="model">res.config.settings</field> |
| 6 | + <field name="mode">extension</field> |
| 7 | + <field name="active" eval="True"/> |
| 8 | + <field name="inherit_id" ref="sale.res_config_settings_view_form"/> |
| 9 | + <field name="arch" type="xml"> |
| 10 | + <xpath expr="//block[@name='quotation_order_setting_container']" position="inside"> |
| 11 | + <div class="col-12 col-lg-6 o_setting_box" id="x_simplify_so "> |
| 12 | + <div class="o_setting_left_pane"> |
| 13 | + <field name="x_simplify_so"/> |
| 14 | + </div> |
| 15 | + <div class="o_setting_right_pane"> |
| 16 | + <label for="x_simplify_so" string="Simplified Sales Order"/> |
| 17 | + <div class="text-muted mb16"> |
| 18 | + Simplified Sales Order |
| 19 | + </div> |
| 20 | + </div> |
| 21 | + </div> |
| 22 | + </xpath> |
| 23 | + </field> |
| 24 | + </record> |
| 25 | + <record id="contact_report_default" model="ir.ui.view"> |
| 26 | + <field name="arch" type="xml"> |
| 27 | + <data> |
| 28 | + <xpath expr="//field[@name='category_id']" position="after"> |
| 29 | + <field name="x_report" domain="[("binding_model_id", "in", [471])]"/> |
| 30 | + </xpath> |
| 31 | + </data> |
| 32 | + </field> |
| 33 | + <field name="inherit_id" ref="base.view_partner_form"/> |
| 34 | + <field name="mode">extension</field> |
| 35 | + <field name="model">res.partner</field> |
| 36 | + <field name="active" eval="True"/> |
| 37 | + <field name="name">Odoo Studio: res.partner.form customization</field> |
| 38 | + <field name="priority">360</field> |
| 39 | + <field name="type">form</field> |
| 40 | + </record> |
| 41 | + <record id="sale_order_custom_view" model="ir.ui.view" > |
| 42 | + <field name="arch" type="xml"> |
| 43 | + <data> |
| 44 | + <xpath expr="//form[1]/header[1]/field[@name='state']" position="after"> |
| 45 | + <button string="Send Simplified Email" name="%(replace_so_email)d" type="action"/> |
| 46 | + </xpath> |
| 47 | + <xpath expr="//form[1]/sheet[1]/notebook[1]/page[@name='order_lines']/field[@name='order_line']/list[1]/field[@name='product_uom']" position="after"> |
| 48 | + <field optional="show" name="x_studio_unit_cost"/> |
| 49 | + <attribute name="column_invisible">True</attribute> |
| 50 | + </xpath> |
| 51 | + <xpath expr="//form[1]/sheet[1]/notebook[1]/page[@name='order_lines']/field[@name='order_line']/list[1]/field[@name='discount']" position="attributes"> |
| 52 | + <attribute name="column_invisible">True</attribute> |
| 53 | + </xpath> |
| 54 | + </data> |
| 55 | + </field> |
| 56 | + <field name="inherit_id" ref="sale.view_order_form"/> |
| 57 | + <field name="mode">extension</field> |
| 58 | + <field name="model">sale.order</field> |
| 59 | + <field name="name">Odoo Studio: sale.order.form customization</field> |
| 60 | + <field name="priority">160</field> |
| 61 | + <field name="type">form</field> |
| 62 | + <field name="active" eval="True"/> |
| 63 | + </record> |
| 64 | + <record id="portal_sale_view_2" model="ir.ui.view"> |
| 65 | + <field name="name">portal_sale_view.customization2</field> |
| 66 | + <field name="inherit_id" ref="sale.sale_order_portal_template"/> |
| 67 | + <field name="mode">extension</field> |
| 68 | + <field name="model"></field> |
| 69 | + <field name="active" eval="False"/> |
| 70 | + <field name="priority">160</field> |
| 71 | + <field name="type">qweb</field> |
| 72 | + <field name="arch" type="xml"> |
| 73 | + <xpath expr="//div[hasclass('o_download_pdf', 'd-flex', 'gap-2', 'flex-lg-column', 'flex-xl-row', 'flex-wrap')]" position="replace"/> |
| 74 | + </field> |
| 75 | + </record> |
| 76 | + <record id="portal_sale_view" model="ir.ui.view"> |
| 77 | + <field name="name">portal_sale_view.customization</field> |
| 78 | + <field name="inherit_id" ref="sale.sale_order_portal_content"/> |
| 79 | + <field name="mode">extension</field> |
| 80 | + <field name="model"></field> |
| 81 | + <field name="active" eval="False"/> |
| 82 | + <field name="priority">160</field> |
| 83 | + <field name="type">qweb</field> |
| 84 | + <field name="arch" type="xml"> |
| 85 | + <data inherit_id="sale.sale_order_portal_content" name="Default"> |
| 86 | + <xpath expr="//table[@id='sales_order_table']" position="replace"> |
| 87 | + <table t-att-data-order-id="sale_order.id" t-att-data-token="sale_order.access_token" class="table table-sm" id="sales_order_table"> |
| 88 | + <thead> |
| 89 | + <tr> |
| 90 | + <th class="text-start">Product</th> |
| 91 | + <th class="text-end text-nowrap">Total Amount</th> |
| 92 | + </tr> |
| 93 | + </thead> |
| 94 | + <tbody class="sale_tbody"> |
| 95 | + <t t-set="current_subtotal" t-value="0"/> |
| 96 | + <t t-set="lines_to_report" t-value="sale_order._get_order_lines_to_report()"/> |
| 97 | + <t t-set="has_section" t-value="any(line.display_type == 'line_section' or line.product_type == 'combo' for line in lines_to_report)"/> |
| 98 | + |
| 99 | + <t t-if="has_section"> |
| 100 | + <t t-foreach="lines_to_report" t-as="line"> |
| 101 | + <t t-set="current_subtotal" t-value="current_subtotal + line.price_subtotal"/> |
| 102 | + <t t-if="line.display_type == 'line_section' or line.product_type == 'combo'"> |
| 103 | + <tr> |
| 104 | + <td colspan="99"> |
| 105 | + <span t-field="line.name"/> |
| 106 | + </td> |
| 107 | + <t t-set="current_section" t-value="line"/> |
| 108 | + <t t-set="current_subtotal" t-value="0"/> |
| 109 | + </tr> |
| 110 | + </t> |
| 111 | + <t t-if="current_section and (line_last or lines_to_report[line_index+1].display_type == 'line_section')"> |
| 112 | + <tr class="is-subtotal text-end"> |
| 113 | + <td colspan="99"> |
| 114 | + <strong class="mr16">Subtotal</strong> |
| 115 | + <span t-out="current_subtotal" t-options="{'widget': 'monetary', 'display_currency': sale_order.currency_id}"/> |
| 116 | + </td> |
| 117 | + </tr> |
| 118 | + <t t-set="current_section" t-value="None"/> |
| 119 | + </t> |
| 120 | + </t> |
| 121 | + </t> |
| 122 | + |
| 123 | + <t t-else=""> |
| 124 | + <tr> |
| 125 | + <td colspan="99"> |
| 126 | + <strong>Project: </strong> |
| 127 | + <span t-field="sale_order.name"/> |
| 128 | + </td> |
| 129 | + </tr> |
| 130 | + <tr class="is-subtotal text-end"> |
| 131 | + <td colspan="99"> |
| 132 | + <strong class="mr16">Total</strong> |
| 133 | + <span t-out="sale_order.amount_total" t-options="{'widget': 'monetary', 'display_currency': sale_order.currency_id}"/> |
| 134 | + </td> |
| 135 | + </tr> |
| 136 | + </t> |
| 137 | + </tbody> |
| 138 | + </table> |
| 139 | + </xpath> |
| 140 | + |
| 141 | +</data> |
| 142 | +</field> |
| 143 | +</record> |
| 144 | +</odoo> |
0 commit comments