[IMP] l10n_fr_pos_cert: allow price modification
Currently, the module l10n_fr_pos_cert (France - VAT Anti-Fraud Certification): Prevent price modification Prevent from inserting negative lines while decreasing quantity Hash links between orders Print the hash onto the ticket This commit allows the price modification of the products. To be compliant with the law, we track any price modification on the ticket and on the product screen. Task-id: 2610576 Part-of: odoo/odoo#92854
This commit is contained in:
@@ -39,6 +39,7 @@ The module adds following features:
|
||||
'assets': {
|
||||
'point_of_sale.assets': [
|
||||
'l10n_fr_pos_cert/static/src/js/**/*',
|
||||
'l10n_fr_pos_cert/static/src/css/pos.css',
|
||||
],
|
||||
'web.assets_qweb': [
|
||||
'l10n_fr_pos_cert/static/src/xml/**/*',
|
||||
|
||||
@@ -0,0 +1,3 @@
|
||||
.oldPrice {
|
||||
font-weight: bold;
|
||||
}
|
||||
@@ -24,13 +24,6 @@ const L10nFrPosGlobalState = (PosGlobalState) => class L10nFrPosGlobalState exte
|
||||
let result = super.disallowLineQuantityChange(...arguments);
|
||||
return this.is_french_country() || result;
|
||||
}
|
||||
cashierHasPriceControlRights() {
|
||||
if (this.is_french_country()) {
|
||||
return false;
|
||||
} else {
|
||||
return super.cashierHasPriceControlRights();
|
||||
}
|
||||
}
|
||||
}
|
||||
Registries.Model.extend(PosGlobalState, L10nFrPosGlobalState);
|
||||
|
||||
|
||||
@@ -8,4 +8,19 @@
|
||||
</t>
|
||||
</xpath>
|
||||
</t>
|
||||
|
||||
<t t-name="OrderLinesReceipt" t-inherit="point_of_sale.OrderLinesReceipt" t-inherit-mode="extension" owl="1">
|
||||
<xpath expr="//t[@t-foreach='receipt.orderlines']" position="inside">
|
||||
<t t-if="receipt.l10n_fr_hash !== false and line.price_manually_set === true">
|
||||
<div class="pos-receipt-right-padding">
|
||||
Old unit price:
|
||||
<span class="oldPrice">
|
||||
<s>
|
||||
<t t-esc="env.pos.format_currency(line.fixed_lst_price, 'Product Price')" /> / Units
|
||||
</s>
|
||||
</span>
|
||||
</div>
|
||||
</t>
|
||||
</xpath>
|
||||
</t>
|
||||
</templates>
|
||||
|
||||
@@ -0,0 +1,19 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<templates id="template" xml:space="preserve">
|
||||
|
||||
<t t-name="Orderline" t-inherit="point_of_sale.Orderline" t-inherit-mode="extension" owl="1">
|
||||
<xpath expr="//ul[hasclass('info-list')]" position="inside">
|
||||
<t t-if="env.pos.is_french_country() !== false and props.line.price_manually_set === true">
|
||||
<li class="info">
|
||||
Old unit price:
|
||||
<span class="oldPrice">
|
||||
<s>
|
||||
<t t-esc="env.pos.format_currency(props.line.get_fixed_lst_price(),'Product Price')" /> / Units
|
||||
</s>
|
||||
</span>
|
||||
</li>
|
||||
</t>
|
||||
</xpath>
|
||||
</t>
|
||||
|
||||
</templates>
|
||||
@@ -1505,6 +1505,8 @@ class Orderline extends PosModel {
|
||||
product_name: this.get_product().display_name,
|
||||
product_name_wrapped: this.generate_wrapped_product_name(),
|
||||
price_lst: this.get_lst_price(),
|
||||
fixed_lst_price: this.get_fixed_lst_price(),
|
||||
price_manually_set: this.price_manually_set,
|
||||
display_discount_policy: this.display_discount_policy(),
|
||||
price_display_one: this.get_display_price_one(),
|
||||
price_display : this.get_display_price(),
|
||||
|
||||
Reference in New Issue
Block a user