Ir al contenido
Menú
Se marcó esta pregunta
2 Respuestas
5021 Vistas

Hi,

We need to have incoterms on our invoice, this is entered on the sales order but I'm unsure if this can be referenced in the invoice report (I don't believe there is a link from the account.invoice > sale.order)

I therefore tried a different approach where I created a custom field on the account.invoice model, x_incoterm which is type many2one using the object relation to stock.incoterms.  I added the field to the invoice form as

<field name="x_incoterm" widget="selection"/> 

which works well, with the dropdown options.

When I then amend the invoice report and add the field as [[ (o.x_incoterm and o.incoterm.name) or '' ]] the incoterms dont appear on the output, any ideas, perhaps the stock.incoterms need to be made available to the account.invoice but unsure about this?

Any help appreciated.

Avatar
Descartar
Autor

Still looking at this, appreciate if anyone can help?

Mejor respuesta

I thought, its very easy and you did perfectly. I tried with your scenario and its perfectly working. please check it again.

I added <td> </td> both the tables and value showing as your point.

Please paste the (report.rml) code so we can analyze and give you proper solution.


Thanks.

Bipin Rathod.

Serpent consulting Services PVT.LTD. 

 

Avatar
Descartar
Autor

Hi and thanks for your update Bipin, Not sure what I can post, The entry of the incoterms on the invoice works perfectly, for example I see EX WORKS on the form and I can see in the database a '1' in the x_incoterm field. The problem is the output [[ (o.x_incoterm and o.incoterm.name) or '' ]] which appears to not be working. If I change the statement to [[ (o.x_incoterm) ]] I see 'browse_record(stock.incoterms,1)' Appreciate your help Regards, kevin

Please add report code (.rml). you can mail on bipin.rathod.serpentcs@gmail.com

Publicaciones relacionadas Respuestas Vistas Actividad
0
oct 24
1675
0
ago 24
1501
0
ene 24
2021
1
nov 23
1724
0
jun 23
2045