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.

1

order lines and invoice lines ordering

By
Kris Coenen
on 6/12/13, 4:35 AM 2,653 views

Hi

I have a problem that when i input order line in a certian order. After i save that order the order of the lines isn't the same anymore. is there a way to solve this or is this just the way openerp orders the order lines.

Kind regards

2

Borni DHIFI

--Borni DHIFI--
5102
| 6 8 9
Tunis, Tunisia
--Borni DHIFI--

Techno Functional Consultant Odoo(OpenERP) 

http://www.linkedin.com/in/borni

Skype : dhifi.borni

Borni DHIFI
On 6/13/13, 5:47 AM

Hi,

in 'sale.order.line' :

_order = 'order_id desc, sequence'
_defaults = {      
            'sequence': 10,
            }

Sequence : Gives the sequence order when displaying a list of sales order lines.

so all order lines have a sequence=10.

to keep order of the input lines change _order by;

--  _order = 'order_id desc, sequence'
++  _order = 'id'

you can change it in sale.py but this is not the best way must create a new module to overwrite _order.

Thanks that worked for me

ANALYS4IT, Kris Coenen
on 6/13/13, 6:21 AM
0
Larson
On 2/2/14, 9:54 AM

the easier way would be to make a change in the form view of sale order or invoice. on the line field name = sequence: replace <field name="sequence" widget="handle"/> with just <field name="sequence"/> Done.

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

0 follower(s)

Stats

Asked: 6/12/13, 4:35 AM
Seen: 2653 times
Last updated: 3/16/15, 8:10 AM