Odoo is the world's easiest all-in-one management software. It includes hundreds of business apps:
CRM | e-Commerce | Accounting | Inventory | PoS | Project management | MRP | etc.
I'm working on customizing the sales order print view via XML view overrides. I added the "sequence" field to the order lines, thinking that I would get "1, 2, 3 . . . " or "10, 20, 30 . . ." Instead, I get "10" for every line, unless I rearrange the line order on the edit screen, in which case it starts adding new sequence numbers, like, "13, 14, 15 . . ." How do you get correct line numbering by default?
sequence is reserved word in orm... that field is intended for reordering of sale order lines (default value is 10)
but if you define sale order form view , with field:
<field name="order_lines" widget="handle" /> you will notice a small circle icon instead of field.. that enables drag and drop reordering of lines...
Also.. i think sale order object already has sequence field, with that widget in wiev : )
If you realy need a field that wil enumerate call it something else that "sequence" and it will work...
Also if you are using rml reports, you can use <seqReset/> tag berofe <repeat in...
and put <seq> in field where you want sequence to appear...
(this will enumerate lines only on printing)
hope it helps
About This Community
This platform 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.Register
Odoo Training Center
Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.Test it now
|Asked: 11/3/14, 11:40 AM|
|Seen: 2342 times|
|Last updated: 3/16/15, 8:10 AM|