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

Change display order of product variants

By
Mark Lewis
on 9/30/15, 11:39 AM 633 views

Hello

How can I change the order of variants displayed on a website page.

Say I sell hammers: 7cm, 12 cm and 18 cm

Currently the website item hammer offers them (as variants) 18cm first, then 7cm, then 12 cm

How can I change this order to be alphanumeric? I couldn't find a variant sequence number.

Thanks

0

zbik

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


zbik
On 9/30/15, 12:23 PM

You inherit model product.product and define new field "Sequence". Additionally change sort order in this model to:

_order = 'sequence,default_code,name_template'

and modify tree/form views to show new field.

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: 9/30/15, 11:39 AM
Seen: 633 times
Last updated: 9/30/15, 12:23 PM