</field>
</field>
</record>
+
+ <record id="product_template_tree_view" model="ir.ui.view">
+ <field name="name">product.template.tree.inherit</field>
+ <field name="model">product.template</field>
+ <field name="inherit_id" ref="product.product_template_tree_view"/>
+ <field name="arch" type="xml">
+ <field name="name" position="before">
+ <field name="sequence" widget="handle" />
+ </field>
+ </field>
+ </record>
+
<!-- END -->
<menuitem name="Configuration" parent="menu_point_root"
fields: ['display_name', 'list_price','price','pos_categ_id', 'taxes_id', 'barcode', 'default_code',
'to_weight', 'uom_id', 'uos_id', 'uos_coeff', 'mes_type', 'description_sale', 'description',
'product_tmpl_id'],
+ order: ['sequence','name'],
domain: function(self){ return [['sale_ok','=',true],['available_in_pos','=',true]]; },
context: function(self){ return { pricelist: self.pricelist.id, display_default_code: false }; },
loaded: function(self, products){
var domain = typeof model.domain === 'function' ? model.domain(self,tmp) : model.domain;
var context = typeof model.context === 'function' ? model.context(self,tmp) : model.context;
var ids = typeof model.ids === 'function' ? model.ids(self,tmp) : model.ids;
+ var order = typeof model.order === 'function' ? model.order(self,tmp): model.order;
progress += progress_step;
if (model.ids) {
var records = new instance.web.Model(model.model).call('read',[ids,fields],context);
} else {
- var records = new instance.web.Model(model.model).query(fields).filter(domain).context(context).all()
+ var records = new instance.web.Model(model.model).query(fields).filter(domain).order_by(order).context(context).all()
}
records.then(function(result){
try{ // catching exceptions in model.loaded(...)
_columns = {
'name': fields.char('Name', required=True, translate=True, select=True),
+ 'sequence': fields.integer('Sequence', help='Gives the sequence order when displaying a product list'),
'product_manager': fields.many2one('res.users','Product Manager'),
'description': fields.text('Description',translate=True,
help="A precise description of the Product, used only for internal information purposes."),
'categ_id' : _default_category,
'type' : 'consu',
'active': True,
+ 'sequence': 1,
}
def _check_uom(self, cursor, user, ids, context=None):