Перейти к содержимому
Меню
Чтобы взаимодействовать с сообществом, необходимо зарегистрироваться.
Этот вопрос был отмечен
3 Ответы
3490 Представления

Hi,

I'm new to odoo. I want to insert the customer number in the information block in document Layout DIN5008 for invoice, sale order etc. reports . 

Can i insert this by odoo studio or only in Qweb?

In which file do i have to make the changes?

If there is already a post about this please make a link.

I would be very grateful for help

Аватар
Отменить
Лучший ответ

Hi,

but where could I change the block "din5008_document_information" itself?

Аватар
Отменить
Лучший ответ

Hi Cybrosys, 

Many thanks for your answere but i have another problem.

When i insert

 
Customer Number:

in information block under invoice number, etc. nothing happends. 

Also when i delete some information for example invoice date, delivery date, etc. nothing changes.

But when i insert this in the invoice body for example under artikel discription the customer number will be shown.

Do I have to additionally adjust something to change the infomation block?




Аватар
Отменить
Лучший ответ

Hi,


To insert the customer number into the document layout for invoices, sale orders, and other reports in Odoo, you need to modify the QWeb templates as Odoo Studio is primarily for customizing forms and views, not document layouts. Follow these steps to edit the report:


1. Activate Developer Mode and navigate to Settings -> Technical -> Views.

2. Search for the template you want to modify. For example, for invoices, search for the key 'account.report_invoice_document', and for sale orders, search for the key 'sale.report_saleorder_document'.

3. Open the desired template and locate the section where you want to add the customer number. Insert the following code:


For sale orders:


<div><strong>Customer Number:</strong> <t t-esc="doc.partner_invoice_id.x_customer_number"/></div>


For invoices:


<div><strong>Customer Number:</strong> <t t-esc="o.partner_id.x_customer_number"/></div>


Make sure to replace 'x_customer_number' with the actual field name containing the customer number.



Hope it helps

Аватар
Отменить
Related Posts Ответы Просмотры Активность
0
мар. 15
3643
1
июн. 24
1847
0
мар. 21
3923
4
янв. 18
5448
2
мар. 15
5785