Skip to Content
Menu
This question has been flagged
1 Reply
1059 Views

Am working on customizing my Database's POS Sale details report where there are only 3 columns for now Product name, Quantity Sold and Unit Price, I need to add 4 more columns in the same report, which will be computed fields and any field will not be new..

Example:

Extra column 1 :Amount = Quantity Sold * Unit Price
Extra column 2 : VAT = 5%

Extra column 3 : VAT Amount = (Amount * VAT) / 100

Extra column 4 : Total Amount = VAT Amount + Amount

you can see these fields do not get data from any forms , instead perform calculations between them, 

My question is Can I put these fields/columns only in the xml views without using python code and perform calculation in xml only? 

Avatar
Discard
Best Answer

Hi Suhaib:

You can add these fields to the model by activating developer mode and going to Settings > Technical > Database Structure > Models and then use them in the report view. No need to write python code.

Avatar
Discard
Author

I searched for the model but there is only one field present in that particular model,"Display Name" and other fields are given in the backend sir..