refactor: move is_quotation_line registration to export_as_JSON patch instead of static array push
This commit is contained in:
parent
397da50866
commit
811e1be4f5
@ -8,7 +8,16 @@ import { _t } from "@web/core/l10n/translation";
|
|||||||
import { OrderReceipt } from "@point_of_sale/app/screens/receipt_screen/receipt/order_receipt";
|
import { OrderReceipt } from "@point_of_sale/app/screens/receipt_screen/receipt/order_receipt";
|
||||||
import { onError } from "@odoo/owl";
|
import { onError } from "@odoo/owl";
|
||||||
|
|
||||||
PosOrderline.extraFields.push("is_quotation_line");
|
// Field is now loaded via _load_pos_data_fields in Python
|
||||||
|
|
||||||
|
patch(PosOrderline.prototype, {
|
||||||
|
export_as_JSON() {
|
||||||
|
const json = super.export_as_JSON(...arguments);
|
||||||
|
json.is_quotation_line = this.is_quotation_line;
|
||||||
|
return json;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
patch(PosStore.prototype, {
|
patch(PosStore.prototype, {
|
||||||
async pay() {
|
async pay() {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user