diff options
| author | it-fixcomart <it@fixcomart.co.id> | 2025-07-23 14:50:10 +0700 |
|---|---|---|
| committer | it-fixcomart <it@fixcomart.co.id> | 2025-07-23 14:50:10 +0700 |
| commit | deb60713ed39979b34083ee094de79fa3afac3b8 (patch) | |
| tree | b1648b3b7822034fb893b82e78f16769c5db54aa /indoteknik_custom/views/sale_order.xml | |
| parent | c667a8699762057c9e6191466a182ebb69cb66c7 (diff) | |
<hafid> Refund System
Diffstat (limited to 'indoteknik_custom/views/sale_order.xml')
| -rwxr-xr-x | indoteknik_custom/views/sale_order.xml | 38 |
1 files changed, 37 insertions, 1 deletions
diff --git a/indoteknik_custom/views/sale_order.xml b/indoteknik_custom/views/sale_order.xml index 2a159307..bb8bdc08 100755 --- a/indoteknik_custom/views/sale_order.xml +++ b/indoteknik_custom/views/sale_order.xml @@ -35,7 +35,32 @@ string="UangMuka" type="action" attrs="{'invisible': [('approval_status', '!=', 'approved')]}"/> </button> - <field name="payment_term_id" position="after"> + <xpath expr="//header" position="inside"> + <button name="button_refund" + type="object" + string="Refund" + class="btn-primary" + attrs="{'invisible': ['|', ('state', 'not in', ['sale', 'done']), ('has_refund', '=', True)]}" /> + </xpath> + <div class="oe_button_box" name="button_box"> + <button name="action_open_advance_payment_move" + type="object" + class="oe_stat_button" + icon="fa-book" + width="250px" + attrs="{'invisible': [('advance_payment_move_id','=',False)]}"> + <field name="advance_payment_move_id" string="Journal Uang Muka" widget="statinfo"/> + </button> + + <button type="object" + name="action_view_related_refunds" + class="oe_stat_button" + icon="fa-refresh" + attrs="{'invisible': [('refund_count', '=', 0)]}"> + <field name="refund_count" widget="statinfo" string="Refund"/> + </button> + </div> + <field name="payment_term_id" position="after"> <field name="create_uid" invisible="1"/> <field name="create_date" invisible="1"/> <field name="shipping_cost_covered" @@ -151,6 +176,7 @@ <field name="expected_ready_to_ship"/> <field name="eta_date_start"/> <field name="eta_date" readonly="1"/> + <field name="has_refund" readonly="1"/> </group> </xpath> <xpath expr="//form/sheet/notebook/page/field[@name='order_line']" @@ -633,6 +659,16 @@ </data> <data> + <record id="sale_order_multi_create_refund_ir_actions_server" model="ir.actions.server"> + <field name="name">Refund</field> + <field name="model_id" ref="sale.model_sale_order"/> + <field name="binding_model_id" ref="sale.model_sale_order"/> + <field name="state">code</field> + <field name="code">action = records.open_form_multi_create_refund()</field> + </record> + </data> + + <data> <record id="mail_template_sale_order_notification_to_salesperson" model="mail.template"> <field name="name">Sale Order: Notification to Salesperson</field> <field name="model_id" ref="sale.model_sale_order"/> |
