You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

30 lines
1.1 KiB

  1. /* Copyright 2018 Tecnativa - David Vidal
  2. License LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl). */
  3. odoo.define('pos_order_mgmt.models', function (require) {
  4. 'use strict';
  5. var models = require('point_of_sale.models');
  6. var order_super = models.Order.prototype;
  7. models.Order = models.Order.extend({
  8. init_from_JSON: function (json) {
  9. order_super.init_from_JSON.apply(this, arguments);
  10. this.returned_order_id = json.returned_order_id;
  11. this.returned_order_reference = json.returned_order_reference;
  12. },
  13. export_as_JSON: function () {
  14. var res = order_super.export_as_JSON.apply(this, arguments);
  15. res.returned_order_id = this.returned_order_id;
  16. res.returned_order_reference = this.returned_order_reference;
  17. return res;
  18. },
  19. export_for_printing: function () {
  20. var res = order_super.export_for_printing.apply(this, arguments);
  21. res.returned_order_id = this.returned_order_id;
  22. res.returned_order_reference = this.returned_order_reference;
  23. return res;
  24. },
  25. });
  26. });