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

Sales order line numbering

By
Jeff Beidler
on 11/3/14, 11:40 AM 1,415 views

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?

1

Bole

--Bole--
2385
| 5 4 6
Zagreb | Karlovac, Croatia
--Bole--

there is only 10 kind of people the ones that understand binary ... and others

Bole
On 11/4/14, 6:40 AM

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

Yes, the sales order form already has the widget with the draggable handle. That's what changed the numbers from "10, 10, 10" to "13, 14, 15". I am using an XML file in a module to modify the sales report (shown when you click "Print"), and displaying the already present field named "sequence". Is there a equivalent in Qweb/XML layout format?

Jeff Beidler
on 11/4/14, 12:42 PM

Bump

Jeff Beidler
on 11/10/14, 2:47 PM

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

2 follower(s)

Stats

Asked: 11/3/14, 11:40 AM
Seen: 1415 times
Last updated: 3/16/15, 8:10 AM