I wonder how to add checkbox or at least something that is square (I mean, I don't need to check or uncheck it).
I tried this but it doesn't work. I find this but it uses XmlDocx and it needs according to me those xml (that I don't want to integrate with my Odoo module).
I find here how checkbox looks like in xml format
<w:checkBox>
<w:sizeAuto />
<w:default w:val="0">
<w:checked/>
</w:checkBox>
But don't know how to integrate it in Document() object.
Can you help me? Thank you very much.
This is my code in main :
filename = '%s.docx' % self.acronym
logo = base64.b64decode(self.company_id.logo)
logo_filename = "logo.jpg"
full_path_logo = os.path.join('/tmp', logo_filename)
with open(full_path_logo, 'wb') as f:
f.write(logo)
full_path_filename = os.path.join('/tmp', filename)
document = Document()
style = document.styles['Normal']
font = style.font
font.name = 'Arial'