Compare commits

...

1 Commits
main ... 19.0

3 changed files with 5 additions and 5 deletions

View File

@ -15,7 +15,7 @@
# Categories can be used to filter modules in modules listing # Categories can be used to filter modules in modules listing
'category': 'Point of Sale', 'category': 'Point of Sale',
'version': '17.0.1.0.0', 'version': '19.0.1.0.0',
# any module necessary for this one to work correctly # any module necessary for this one to work correctly
'depends': ['point_of_sale', 'pos_discount'], 'depends': ['point_of_sale', 'pos_discount'],

View File

@ -8,13 +8,13 @@ class PosPaymentMethod(models.Model):
income_account_id = fields.Many2one( income_account_id = fields.Many2one(
'account.account', 'account.account',
string='Income Account', string='Income Account',
domain=[('deprecated', '=', False)], domain=[('active', '=', True)],
help='Account used for income lines when splitting by payment method. ' help='Account used for income lines when splitting by payment method. '
'If empty, the default income account from the product will be used.') 'If empty, the default income account from the product will be used.')
discount_account_id = fields.Many2one( discount_account_id = fields.Many2one(
'account.account', 'account.account',
string='Discount Account', string='Discount Account',
domain=[('deprecated', '=', False)], domain=[('active', '=', True)],
help='Account used for discount product lines when splitting by payment method. ' help='Account used for discount product lines when splitting by payment method. '
'If empty, the default discount account from the product will be used.') 'If empty, the default discount account from the product will be used.')

View File

@ -6,8 +6,8 @@
<field name="inherit_id" ref="point_of_sale.pos_payment_method_view_form"/> <field name="inherit_id" ref="point_of_sale.pos_payment_method_view_form"/>
<field name="arch" type="xml"> <field name="arch" type="xml">
<xpath expr="//group[@name='Payment methods']/group" position="inside"> <xpath expr="//group[@name='Payment methods']/group" position="inside">
<field name="income_account_id" domain="[('deprecated', '=', False)]"/> <field name="income_account_id" domain="[('active', '=', True)]"/>
<field name="discount_account_id" domain="[('deprecated', '=', False)]"/> <field name="discount_account_id" domain="[('active', '=', True)]"/>
</xpath> </xpath>
</field> </field>
</record> </record>