On 2015-12-10 10:35, Karla Stenger wrote:
> 2015-12-09 17:01 GMT-03:00 Lucas Riccombene <[email protected]>:
> 
> > Consultation is very fucked up the issue of ordering the products of a
> > sale.
> > The sale has a grid of products, these are the ones added as they're
> > loaded in the order, however once I would load the products they can be
> > ordered
> > hitting the head of the grid as is done in other parts you order the grids
> > Well here I am investigating but nothing that a little lost even with the
> > topic. Gradually overcoming situations.
> >
> > Cheers
> >
> 
> ​
> Hi Lucas,
> if the problem is that lines can be sorted you can prevent it by using the
> view "sale.sale_line_view_tree" instead of the default one
> "sale.sale_line_view_tree_sequence".
> 
> You can do this from your own module by adding this in your
> view/sale_form.xml file:
> 
>     <xpath expr="/form/notebook/page[@id='sale']/field[@name='lines']"
>         position="replace_attributes">
>         <field name="lines" view_ids="sale.sale_line_view_tree"/>
>     </xpath>
> 
> that replaces the definition of view_ids which comes from
> sale/view/sale_form.xml:
>             <field name="lines" colspan="4"
>                 view_ids="sale.sale_line_view_tree_sequence"/>
> 
> I am not sure that you also want to make the sequence readonly or something
> like that.

It is not the view that defines the order but the order of the One2Many
or the default order of the Model. Here it is the default order of
SaleLine.
The view "sequence" is only there to enforce this behaviour.

-- 
Cédric Krier - B2CK SPRL
Email/Jabber: [email protected]
Tel: +32 472 54 46 59
Website: http://www.b2ck.com/

-- 
You received this message because you are subscribed to the Google Groups 
"tryton" group.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tryton/20151210142833.GW13365%40tetsuo.Home.

Reply via email to