Skip ke Konten
Menu
Pertanyaan ini telah diberikan tanda
2 Replies
5084 Tampilan

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
Buang
Penulis

Still looking at this, appreciate if anyone can help?

Jawaban Terbai

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
Buang
Penulis

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

Post Terkait Replies Tampilan Aktivitas
0
Okt 24
1768
0
Agu 24
1591
0
Jan 24
2088
1
Nov 23
1790
0
Jun 23
2149