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.

17 lines
619 B

  1. odoo.define('pos_default_empty_image.db', function (require) {
  2. "use strict";
  3. var models = require('point_of_sale.models');
  4. var _super_posmodel = models.PosModel.prototype;
  5. // load new field 'has_image' for 'product.product' model
  6. models.PosModel = models.PosModel.extend({
  7. initialize: function (session, attributes) {
  8. var product_model = _.find(this.models, function(model){ return model.model === 'product.product'; });
  9. product_model.fields.push('has_image');
  10. return _super_posmodel.initialize.call(this, session, attributes);
  11. },
  12. });
  13. });