when i duplicate a sale order or account invoice qweb report from the report created by other user, the information about saleperson is the same with the orginal report. Could we get the current user in the copy one. Please help me to point out step by step the right way to get the purpose. Thank for your time. Sory because my low level of English.
Odoo 9.0c: How to get the current user in qweb report?
1.3k views Asked by tuấn anh phạm At
1
There are 3 different way we can add and print the user detail into the Qweb Report
1. Directly access the 'user' global object in qweb Part
2. Get the current user detail from the report parser class
parser report class method:-
Call parser class method into qweb View Part :-
3. Set the custom user_id (many2one) field on that particular report and set as default attribute as env user record set
Add into your report model :-
Access that field into the Qweb View part:-