İçereği Atla
Menü
Bu soru işaretlendi
2 Cevaplar
5108 Görünümler

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
Vazgeç
Üretici

Still looking at this, appreciate if anyone can help?

En İyi Yanıt

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
Vazgeç
Üretici

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

İlgili Gönderiler Cevaplar Görünümler Aktivite
0
Eki 24
1822
0
Ağu 24
1624
0
Oca 24
2106
1
Kas 23
1831
0
Haz 23
2195