Odoo Help

Welcome!

This community is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.

0

Product Variant Sort in Sales Order Report and View

By
Navin Shettigar
on 5/10/16, 11:04 PM 616 views

I was unable to change / modify the code so that the Product Varaiants be sorted in particular order so that all the produts are dispalyed with same order of Attributes. Presently the attribute values are randomly ordered.

The Sequence number associated with Attributes helps only to sort the List view of Attirbute Values but when used within the codes, it is unable to sort. Please help to modify the code.


0

zbik

--zbik--
5941
| 6 4 7
Lodz, Poland
--zbik--


zbik
On 5/11/16, 11:33 AM

Product Variants - model product.product

The standard sort order in this model:

_order = 'default_code,name_template'

where:

default_code = Internal Reference

name_template = Template Name

Solutions:

1) You set simmilar default_code for simmilar attibutes

2) Or, you create own module and change value _order = 'default code,name template' as you need.


Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

About This Community

This community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

1 follower(s)

Stats

Asked: 5/10/16, 11:04 PM
Seen: 616 times
Last updated: 5/11/16, 11:33 AM