Skip to content

Commit cc382ba

Browse files
victoralmauCarlosRoca13
authored andcommitted
[FIX] pos_margin: Remove margin data on the ticket
TT62342
1 parent d41f32d commit cc382ba

2 files changed

Lines changed: 12 additions & 1 deletion

File tree

pos_margin/static/src/js/models.esm.js

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,15 @@ patch(PosOrder.prototype, {
2626
get_margin_rate_str() {
2727
return roundCurrency(this.get_margin_rate(), this.currency) + "%";
2828
},
29+
30+
export_for_printing(baseUrl, headerData) {
31+
const result = super.export_for_printing(baseUrl, headerData);
32+
result.orderlines = result.orderlines.map((line) => ({
33+
...line,
34+
ifaceDisplayMargin: false,
35+
}));
36+
return result;
37+
},
2938
});
3039

3140
// /////////////////////////////

pos_margin/static/src/xml/pos_margin.xml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,9 @@ License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
2828

2929
<t t-inherit="point_of_sale.OrderWidget" t-inherit-mode="extension">
3030
<xpath expr="//t[@t-slot='details']" position="before">
31-
<OrderSummaryMargin />
31+
<t t-if="!props.screenName">
32+
<OrderSummaryMargin />
33+
</t>
3234
</xpath>
3335
</t>
3436

0 commit comments

Comments
 (0)