| 1 |
<?xml version="1.0" encoding="utf-8"?> |
| 2 |
<odoo> |
| 3 |
<record id="pos_payment_method_view_form" model="ir.ui.view"> |
| 4 |
<field name="name">pos.payment.method.form</field> |
| 5 |
<field name="model">pos.payment.method</field> |
| 6 |
<field name="arch" type="xml"> |
| 7 |
<form string="Payment Methods"> |
| 8 |
<sheet> |
| 9 |
<widget name="web_ribbon" title="Archived" bg_color="text-bg-danger" invisible="active"/> |
| 10 |
<field name="active" invisible="1"/> |
| 11 |
<field name="type" invisible="1"/> |
| 12 |
<field name="default_pos_receivable_account_name" invisible="1" /> |
| 13 |
<div class="d-flex justify-content-between"> |
| 14 |
<div class="oe_title"> |
| 15 |
<label for="name"/> |
| 16 |
<h1><field name="name" placeholder="e.g. Cash" class="oe_inline"/></h1> |
| 17 |
</div> |
| 18 |
<field name="image" class="oe_avatar" widget='image'/> |
| 19 |
</div> |
| 20 |
<group name="Payment methods"> |
| 21 |
<group> |
| 22 |
<field name="split_transactions"/> |
| 23 |
<field name="journal_id" required="not split_transactions" placeholder="Leave empty to use the receivable account of customer" /> |
| 24 |
<field name="outstanding_account_id" groups="account.group_account_readonly" invisible="type != 'bank'" required="type == 'bank'" placeholder="Selection of outstanding account is required" /> |
| 25 |
<field name="receivable_account_id" groups="account.group_account_readonly" invisible="split_transactions" widget="many2one" options="{'placeholder_field': 'default_pos_receivable_account_name'}"/> |
| 26 |
<field name="company_id" readonly="1" groups="base.group_multi_company" /> |
| 27 |
<field name="config_ids" widget="many2many_tags" placeholder="No Point of Sale" /> |
| 28 |
</group> |
| 29 |
<div> |
| 30 |
<group> |
| 31 |
<field name="hide_use_payment_terminal" invisible="1"/> |
| 32 |
<field name="hide_qr_code_method" invisible="1"/> |
| 33 |
<field name="payment_method_type" /> |
| 34 |
<field name="use_payment_terminal" string="Integrate with" invisible="hide_use_payment_terminal"/> |
| 35 |
<field name="qr_code_method" invisible="hide_qr_code_method" required="payment_method_type == 'qr_code'"/> |
| 36 |
</group> |
| 37 |
<widget name="pos_payment_provider_cards" invisible="use_payment_terminal or payment_method_type != 'terminal'" /> |
| 38 |
</div> |
| 39 |
</group> |
| 40 |
</sheet> |
| 41 |
</form> |
| 42 |
</field> |
| 43 |
</record> |
| 44 |
|
| 45 |
<record id="pos_payment_method_view_tree" model="ir.ui.view"> |
| 46 |
<field name="name">pos.payment.method.list</field> |
| 47 |
<field name="model">pos.payment.method</field> |
| 48 |
<field name="arch" type="xml"> |
| 49 |
<list string="Payment Methods" create="1" delete="1"> |
| 50 |
<field name="type" column_invisible="True"/> |
| 51 |
<field name="sequence" widget="handle"/> |
| 52 |
<field name="name" /> |
| 53 |
<field name="split_transactions" optional="hide" /> |
| 54 |
<field name="journal_id" required="not split_transactions" /> |
| 55 |
<field name="outstanding_account_id" groups="account.group_account_readonly" optional="hide" invisible="type != 'bank'" /> |
| 56 |
<field name="receivable_account_id" groups="account.group_account_readonly" optional="hide" invisible="split_transactions" /> |
| 57 |
<field name="company_id" groups="base.group_multi_company" /> |
| 58 |
<field name="config_ids" widget="many2many_tags"/> |
| 59 |
</list> |
| 60 |
</field> |
| 61 |
</record> |
| 62 |
|
| 63 |
<record id="pos_payment_method_view_search" model="ir.ui.view"> |
| 64 |
<field name="name">pos.payment.search.view</field> |
| 65 |
<field name="model">pos.payment.method</field> |
| 66 |
<field name="arch" type="xml"> |
| 67 |
<search string="Payment Methods"> |
| 68 |
<field name="name"/> |
| 69 |
<field name="receivable_account_id" groups="account.group_account_readonly" /> |
| 70 |
<group> |
| 71 |
<filter name="group_by_receivable_account" string="Account" domain="[]" context="{'group_by':'receivable_account_id'}"/> |
| 72 |
<filter name="group_by_pos_config" string="Point of Sale" domain="[]" context="{'group_by':'config_ids'}"/> |
| 73 |
<filter name="group_by_method_name" string="Method Name" domain="[]" context="{'group_by':'name'}"/> |
| 74 |
<filter name="group_by_journal_id" string="Journal" domain="[]" context="{'group_by':'journal_id'}"/> |
| 75 |
</group> |
| 76 |
<filter string="Archived" name="active" domain="[('active', '=', False)]"/> |
| 77 |
</search> |
| 78 |
</field> |
| 79 |
</record> |
| 80 |
|
| 81 |
<record id="action_pos_payment_method_form" model="ir.actions.act_window"> |
| 82 |
<field name="name">Payment Methods</field> |
| 83 |
<field name="res_model">pos.payment.method</field> |
| 84 |
<field name="view_mode">list,kanban,form</field> |
| 85 |
<field name="view_id" eval="False"/> |
| 86 |
<field name="domain">[]</field> |
| 87 |
<field name="context">{'search_default_group_by_account': 1}</field> |
| 88 |
<field name="help" type="html"> |
| 89 |
<p class="o_view_nocontent_smiling_face"> |
| 90 |
Add a new payment method |
| 91 |
</p> |
| 92 |
<p> |
| 93 |
Installing chart of accounts from the General Settings of |
| 94 |
Invocing/Accounting app will create Bank and Cash payment |
| 95 |
methods automatically. |
| 96 |
</p> |
| 97 |
</field> |
| 98 |
</record> |
| 99 |
|
| 100 |
<menuitem id="menu_pos_payment_method" parent="menu_point_config_product" action="action_pos_payment_method_form" sequence="3" groups="group_pos_manager,group_pos_user"/> |
| 101 |
|
| 102 |
<record id="action_payment_methods_tree" model="ir.actions.act_window"> |
| 103 |
<field name="context">{}</field> |
| 104 |
<field name="name">Payments Methods</field> |
| 105 |
<field name="res_model">pos.payment.method</field> |
| 106 |
<field name="view_id" ref="pos_payment_method_view_tree"/> |
| 107 |
<field name="view_mode">list,form,kanban</field> |
| 108 |
</record> |
| 109 |
</odoo> |