Skip to Content
Menu
Musisz się zarejestrować, aby móc wchodzić w interakcje z tą społecznością.
To pytanie dostało ostrzeżenie
2 Odpowiedzi
5068 Widoki

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.

Awatar
Odrzuć
Autor

Still looking at this, appreciate if anyone can help?

Najlepsza odpowiedź

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. 

 

Awatar
Odrzuć
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

Powiązane posty Odpowiedzi Widoki Czynność
0
paź 24
1752
0
sie 24
1574
0
sty 24
2063
1
lis 23
1778
0
cze 23
2099