Odoo Mindscape. Understand Odoo faster. Explore modules, fields, dependencies and version differences in one place instead of digging through the source code.
Module: Import/Export Invoices From XML/PDF
Entity: account.edi.document
Compute Method: _compute_edi_content
| Inputs | Method | Outputs |
|---|---|---|
|
for doc in self:
res = b''
if doc.state in ('to_send', 'to_cancel'):
move = doc.move_id
config_errors = doc.edi_format_id._check_move_configuration(move)
if config_errors:
- res = base64.b64encode('\n'.join(config_errors).encode('UTF-8'))
+ res = '\n'.join(config_errors).encode()
else:
move_applicability = doc.edi_format_id._get_move_applicability(move)
if move_applicability and move_applicability.get('edi_content'):
- res = base64.b64encode(move_applicability['edi_content'](move))
- doc.edi_content = res
+ res = move_applicability['edi_content'](move)
+ doc.edi_content = BinaryBytes(res)
|
|
