Fix Odoo 19 compatibility and installation issues

This commit is contained in:
Suherdy Yacob 2026-05-11 14:07:44 +07:00
parent 989865e434
commit 3d9be58a77
2 changed files with 10 additions and 7 deletions

View File

@ -1,7 +1,7 @@
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
{ {
'name': 'POS Custom Closing', 'name': 'POS Custom Closing',
'version': '1.0', 'version': '19.0.1.0',
'category': 'Sales/Point of Sale', 'category': 'Sales/Point of Sale',
'summary': 'Customize Point of sale Closing Register modal', 'summary': 'Customize Point of sale Closing Register modal',
'author': 'Aziz', 'author': 'Aziz',

View File

@ -1,22 +1,25 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<templates id="template" xml:space="preserve"> <templates id="template" xml:space="preserve">
<t t-name="pos_custom_closing.ClosePosPopup" t-inherit="point_of_sale.ClosePosPopup" t-inherit-mode="extension" owl="1"> <t t-name="pos_custom_closing.ClosePosPopup" t-inherit="point_of_sale.ClosePosPopup" t-inherit-mode="extension">
<!-- 1. Hide Payment Details --> <!-- 1. Hide Payment Details -->
<!-- Base POS (when pos_hr is disabled) -->
<xpath expr="//div[hasclass('payment-methods-overview')]" position="attributes"> <xpath expr="//div[hasclass('payment-methods-overview')]" position="attributes">
<attribute name="t-att-class">pos.config.custom_hide_payment_details ? 'd-none' : ''</attribute> <attribute name="t-if">!pos.config.module_pos_hr and !pos.config.custom_hide_payment_details</attribute>
</xpath> </xpath>
<!-- POS HR block (when pos_hr is enabled) -->
<xpath expr="//t[@t-if='pos.config.module_pos_hr']" position="attributes"> <xpath expr="//t[@t-if='pos.config.module_pos_hr']" position="attributes">
<attribute name="t-if">pos.config.module_pos_hr and !pos.config.custom_hide_payment_details</attribute> <attribute name="t-if">pos.config.module_pos_hr and !pos.config.custom_hide_payment_details</attribute>
</xpath> </xpath>
<!-- 2. Hide Non Cash Input Fields --> <!-- 2. Hide Non Cash Input Fields -->
<xpath expr="//div[@t-foreach='props.non_cash_payment_methods']//t[@t-if='_showDiff']" position="attributes"> <!-- We use t-att-class to hide them if the setting is on -->
<attribute name="t-if">_showDiff and !pos.config.custom_hide_non_cash_inputs</attribute> <xpath expr="//div[@t-foreach='props.non_cash_payment_methods']" position="attributes">
<attribute name="t-att-class">pos.config.custom_hide_non_cash_inputs ? 'd-none' : 'w-100 mb-3'</attribute>
</xpath> </xpath>
<!-- 3. Hide Cash In/Out --> <!-- 3. Hide Cash In/Out -->
<xpath expr="//button[@t-on-click='() =&gt; this.cashMove()']" position="attributes"> <xpath expr="//button[contains(@t-on-click, 'this.cashMove()')]" position="attributes">
<attribute name="t-if">pos.showCashMoveButton and !pos.config.custom_hide_cash_in_out</attribute> <attribute name="t-if">pos.showCashMoveButton and !pos.config.custom_hide_cash_in_out</attribute>
</xpath> </xpath>
@ -31,7 +34,7 @@
<attribute name="t-if">!pos.config.custom_hide_copy_btn</attribute> <attribute name="t-if">!pos.config.custom_hide_copy_btn</attribute>
</xpath> </xpath>
<!-- PM count autofill --> <!-- PM count autofill -->
<xpath expr="//button[@t-on-click='() =&gt; this.autoFillPMCount(pm.id)']" position="attributes"> <xpath expr="//button[contains(@t-on-click, 'this.autoFillPMCount')]" position="attributes">
<attribute name="t-if">!pos.config.custom_hide_copy_btn</attribute> <attribute name="t-if">!pos.config.custom_hide_copy_btn</attribute>
</xpath> </xpath>