pos_usability: add sequenc eon pos.payment.method

This commit is contained in:
Alexis de Lattre
2023-10-23 12:40:09 +00:00
parent 18e9ed99ff
commit e36f88e23a
3 changed files with 35 additions and 0 deletions

View File

@@ -31,6 +31,7 @@ Akretion:
"views/report_pos_order.xml",
"views/pos_category.xml",
"views/pos_session.xml",
"views/pos_payment_method.xml",
"views/pos_order.xml",
"views/product.xml",
],

View File

@@ -8,7 +8,9 @@ from odoo import fields, models
class PosPaymentMethod(models.Model):
_inherit = 'pos.payment.method'
_check_company_auto = True
_order = 'sequence, id'
outstanding_account_id = fields.Many2one(check_company=True)
receivable_account_id = fields.Many2one(check_company=True)
journal_id = fields.Many2one(check_company=True)
sequence = fields.Integer(default=10)

View File

@@ -0,0 +1,32 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright 2023 Akretion France (http://www.akretion.com/)
@author: Alexis de Lattre <alexis.delattre@akretion.com>
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
-->
<odoo>
<record id="pos_payment_method_view_tree" model="ir.ui.view">
<field name="model">pos.payment.method</field>
<field name="inherit_id" ref="point_of_sale.pos_payment_method_view_tree"/>
<field name="arch" type="xml">
<field name="name" position="before">
<field name="sequence" widget="handle"/>
</field>
</field>
</record>
<record id="pos_payment_method_view_form" model="ir.ui.view">
<field name="model">pos.payment.method</field>
<field name="inherit_id" ref="point_of_sale.pos_payment_method_view_form"/>
<field name="arch" type="xml">
<field name="company_id" position="after">
<!-- company_id without groups="base.group_multi_company" is missing -->
<field name="company_id" invisible="1"/>
</field>
</field>
</record>
</odoo>