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

Hi there,

Is there an easy way to change the printed reports in the portal of the current logged customer?

Let's take the (sale order) for example. When I want the print button in the portal (my account) to use another template for the print function, how can I do that?

The print button in the portal is special, because the template is going through this method:

if report_type in ('html', 'pdf', 'text'):
return self._show_report(model=order_sudo, report_type=report_type, report_ref='sale.action_report_saleorder', download=download)

Any ideas on this?




Awatar
Odrzuć
Najlepsza odpowiedź

Hi,

You can create new custom report as per you need and you can inherit the corresponding method you have specified in question, and give the id of the new report you have given.

Currently,

<report 
id="action_report_saleorder"
string="Quotation / Order"
model="sale.order"
report_type="qweb-pdf"
file="sale.report_saleorder"
name="sale.report_saleorder"
print_report_name="(object.state in ('draft', 'sent') and 'Quotation - %s' % (object.name)) or 'Order - %s' % (object.name)"
/>

this report is called from portal.


Thanks

Awatar
Odrzuć
Powiązane posty Odpowiedzi Widoki Czynność
1
cze 24
1358
1
sty 23
2074
2
wrz 21
5082
0
lis 16
3441
0
lip 25
280