Browse Source

Feb 13 [UPDT] : Updated 'product_multi_uom_pos'

pull/313/head
AjmalCybro 1 year ago
parent
commit
232a04b0a8
  1. 2
      product_multi_uom_pos/__manifest__.py
  2. 5
      product_multi_uom_pos/doc/RELEASE_NOTES.md
  3. 2
      product_multi_uom_pos/static/src/overrides/generic_components/orderline/orderline.xml
  4. 14
      product_multi_uom_pos/static/src/overrides/models/orderline.js

2
product_multi_uom_pos/__manifest__.py

@ -21,7 +21,7 @@
#############################################################################
{
'name': "POS Product Multiple UOM",
'version': '17.0.1.0.0',
'version': '17.0.1.0.1',
'category': 'Point of Sale',
'summary': """A module to manage multiple UoM in POS""",
'description': """Using this app, you can change unit of measure of

5
product_multi_uom_pos/doc/RELEASE_NOTES.md

@ -4,3 +4,8 @@
#### Version 17.0.1.0.0
#### ADD
- Initial commit for POS Product Multiple UOM
#### 12.02.2024
#### Version 17.0.1.0.1
#### UPDATE
- Removed buttons from receipt.

2
product_multi_uom_pos/static/src/overrides/generic_components/orderline/orderline.xml

@ -5,7 +5,7 @@
t-inherit="point_of_sale.Orderline"
t-inherit-mode="extension" owl="1">
<xpath expr="//ul[hasclass('info-list')]" position="after">
<t t-if="line.getUom(this).length != 0">
<t t-if="line.getUom(this).length != 0 and props.line.resetUom">
<t t-log="this"/>
<button id="reset_uom" style="margin-top: 15px; background:transparent;border:transparent;
margin-bottom: 5px;margin-left: 180px;"

14
product_multi_uom_pos/static/src/overrides/models/orderline.js

@ -2,6 +2,7 @@
import { patch } from "@web/core/utils/patch";
import { Orderline } from "@point_of_sale/app/store/models";
import { Order } from "@point_of_sale/app/store/models";
patch(Orderline.prototype, {
export_as_JSON(){
@ -75,3 +76,16 @@ patch(Orderline.prototype, {
};
},
});
patch(Order.prototype, {
/**
* Extends the export_for_printing method to customize the printing data.
* Removes the 'showPricelist' property from each order line.
* @returns {Object} The modified printing data.
*/
export_for_printing() {
const result = super.export_for_printing(...arguments);
result['orderlines'] = result['orderlines'].map(({ ["resetUom"]: _, ...rest }) => rest);
return result;
},
});
Loading…
Cancel
Save