odoo.define('product_library.product_library', function (require) {
    "use strict";

    var models = require('point_of_sale.models');
    //var screens = require('point_of_sale.screens');
    //var core = require('web.core');
    //var gui = require('point_of_sale.gui');
    //var _t = core._t;

    models.load_fields("product.product", ['has_image']);

/* ********************************************************
Overload models.PosModel
******************************************************** */

    var _super_posmodel = models.PosModel.prototype;
    models.PosModel = models.PosModel.extend({
        initialize: function (session, attributes) {
            
            //this.member_categories = [];
        
            var product_model = _.find(this.models, function(model){ return model.model === 'product.product'; });
            //product_model.fields.push('default_code');
            product_model.fields.push('autor');
            product_model.fields.push('editorial');
            product_model.fields.push('genero');
            product_model.fields.push('formato');
            return _super_posmodel.initialize.apply(this, arguments);
        }
    });
});
