Questions tagged [qweb]

QWeb is the template engine used by the OpenERP/Odoo Web Client. It is an XML-based templating language, similar to Genshi, Thymeleaf or Facelets

572 questions
4
votes
2 answers

Odoo 10 - Qweb PDF report header_spacing and margin_top properties

I am defining my own report.paperformat. I am trying differnet configurations for margin_top and header_space but I can not manage to undersand what does each parameter. When a given value is used inmargin_top and header_space, which are the units…
M.E.
  • 4,955
  • 4
  • 49
  • 128
4
votes
1 answer

How to display image in Qweb Report in Odoo10?

I am beginner for Qweb Report. And i want to display image in Qweb report. So, What should i do for that? And i also want to know about that what is the difference between 'o.field_name' and 'docs.field_name'?
Pawan Kumar Sharma
  • 1,168
  • 8
  • 30
4
votes
3 answers

Reduce string length in qweb odoo

How reduce string length in qweb? Example:

return stackoverflow I want remowe last 8 character and get stack

user_odoo
  • 2,284
  • 34
  • 55
4
votes
1 answer

QWebException: "'NoneType' object has no attribute 'with_context'" while evaluating "doc.with_context({'lang':doc.partner_id.lang})"

I am new to odoo, I created a module by inheriting sales_order to create a custom report. I am getting the above error when I am printing the report. Need help please? Here is the code snippets: test/my_module.py: class sale_order(models.Model): …
Arshad
  • 61
  • 1
  • 5
4
votes
1 answer

QWEB - IndexError: list index out of range

I'm trying to create a QWeb report. I have a list of product and I would like to print each etiquette on the same page. This is my code :
Gary Heldmann
  • 79
  • 1
  • 10
4
votes
4 answers

[Odoo][Qweb]Dictionary foreach, print key and value

Is there a way to print key and value from a python dictionary in loop Qweb? For example, if I have a fuction that return a dictionary: def get_informations(self): mydico={'myfirstkey':1,'mysecondkey':2} return mydico And then, in Qweb…
FTK
  • 185
  • 1
  • 2
  • 13
4
votes
1 answer

QWebException: "'NoneType' object is not callable" while evaluating 'has_shortage_so_lines(data)==True'

I found the another question at here. But there is no answer. I got the error QWebException: "'NoneType' object is not callable" while evaluating 'has_shortage_so_lines(data)==True' This is my report_view.xml
Thu Ra
  • 2,013
  • 12
  • 48
  • 76
4
votes
6 answers

How to remove the Powered by Odoo #1 Open Source eCommerce footer from front end of Odoo 8?

How do you remove the backlinks from the public front end of Odoo 8? Location: lower right corner of the page, in the footer. HTML Code:
Powered by
Chris Coleman
  • 496
  • 1
  • 5
  • 9
3
votes
1 answer

Odoo 12 NonType errors on custom report

I am trying to create a custom report under Odoo 12 to be added to the print option under Orders View. So far, so good, I include the XML in the manifest and create the XML under the sale_management/report folder. I update the module upon editing…
kankamuso
  • 441
  • 1
  • 3
  • 18
3
votes
2 answers

Odoo 12 report sample

I am trying to make a report but without using external_layout or internal_layout because they have headers in them. I wanted to have my own header and footer. I have tried using minimal_layout because it seems it is the less busy layout compared…
strike_noir
  • 4,080
  • 11
  • 57
  • 100
3
votes
2 answers

Is there any way to show a variable using decimal precision in Qweb?

I am showing a float variable in a Qweb report: I want to round it with the decimal precision of Product Price. I am rounding it to 4 digits because I…
forvas
  • 9,801
  • 7
  • 62
  • 158
3
votes
1 answer

Unable to translate a term inside a Qweb condition in Odoo 10. How to do this?

I'm trying to translate a specific term which appears in a Qweb report, but its behaviour is very different from expected. If you install the standard sale module in Odoo 10, take a look at its sale order report (XML ID = report_saleorder_document).…
forvas
  • 9,801
  • 7
  • 62
  • 158
3
votes
1 answer

QWeb pdf report odoo 10

I am new in odoo I want to make a report pdf to my model, I have try all tuto I have find in net youtube, google but no one work for me please give me an advice. there is my model : # modelx.py file from openerp import models, fields, api class…
Walid Bousseta
  • 1,329
  • 2
  • 18
  • 33
3
votes
2 answers

How to format Qweb variables in Odoo

I have been trying to display a calculated variable in qweb separated by comma's.
Shravy
  • 656
  • 1
  • 23
  • 61
3
votes
1 answer

Saving variable get_pdf() into fields.binary

I want to save a variable automatically into a fields.binary (email_attachment_file) from get_pdf function. My codes below here: class example_example(models.Model): email_attachment_file = fields.Binary('Data (.txt,.pdf)') …
1
2
3
38 39