Skip to content

Commit

Permalink
[MIG] pos_auto_invoice: migration to 16.0
Browse files Browse the repository at this point in the history
  • Loading branch information
huguesdk committed Oct 30, 2024
1 parent 535bb8e commit f38e5cc
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 10 deletions.
2 changes: 1 addition & 1 deletion pos_auto_invoice/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"name": "Point of Sale Automatically Invoice",
"summary": """
In the POS, set orders as to-invoice by default.""",
"version": "15.0.1.0.0",
"version": "16.0.1.0.0",
"category": "Point of Sale",
"website": "https://coopiteasy.be",
"author": "Coop IT Easy SC",
Expand Down
23 changes: 14 additions & 9 deletions pos_auto_invoice/static/src/js/models.js
Original file line number Diff line number Diff line change
@@ -1,13 +1,18 @@
odoo.define("pos_auto_invoice.models", function(require) {
odoo.define("pos_auto_invoice.models", function (require) {
"use strict";

var models = require("point_of_sale.models");
const {Order} = require("point_of_sale.models");
const Registries = require("point_of_sale.Registries");

var OrderSuper = models.Order;
models.Order = models.Order.extend({
initialize: function(attributes, options) {
OrderSuper.prototype.initialize.apply(this, arguments);
this.to_invoice = true;
},
});
// eslint-disable-next-line no-shadow
const AutoInvoiceOrder = (Order) =>
// eslint-disable-next-line no-shadow
class AutoInvoiceOrder extends Order {
constructor() {
super(...arguments);
this.to_invoice = true;
}
};

Registries.Model.extend(Order, AutoInvoiceOrder);
});

0 comments on commit f38e5cc

Please sign in to comment.