[ADD] account_edi: generic module to manage EDI (factur-x)

- account_edi is the base module to manage EDIs. It manages the generic worflow of import/export and defines the methods for import/export that should be overridden by each types of EDI (in different modules).
- On export, the files are added as attachment and can be embeded into pdf (format specific).
- On export, the exported format are set on the journal to allow different settings based on journal (different companies, countries, etc).
- On import, depending on the import method (from message_post or upload button in invoice tree view) a new invoice is created or an existing one is updated (only allowed draft invoices with no invoice lines).
- Adapted factur-x
This commit is contained in:
Benjamin Frantzen (bfr)
2020-05-29 07:16:30 +00:00
parent 0226901ec7
commit 913f22f73f
50 changed files with 616 additions and 1597 deletions
+11 -3
View File
@@ -546,10 +546,8 @@ class AccountJournal(models.Model):
invoices = self.env['account.move']
for attachment in attachments:
invoice = self.env['account.move'].create({})
attachment.write({'res_model': 'mail.compose.message'})
invoice.message_post(attachment_ids=[attachment.id])
invoices += invoice
invoices += self._create_invoice_from_single_attachment(attachment)
action_vals = {
'name': _('Generated Documents'),
@@ -565,6 +563,16 @@ class AccountJournal(models.Model):
action_vals['view_mode'] = 'tree,form'
return action_vals
def _create_invoice_from_single_attachment(self, attachment):
""" Creates an invoice and post the attachment. If the related modules
are installed, it will trigger OCR or the import from the EDI.
:returns: the created invoice.
"""
invoice = self.env['account.move'].create({})
invoice.message_post(attachment_ids=[attachment.id])
return invoice
def _create_secure_sequence(self, sequence_fields):
"""This function creates a no_gap sequence on each journal in self that will ensure
a unique number is given to all posted account.move in such a way that we can always
@@ -84,7 +84,8 @@ class AccountInvoiceSend(models.TransientModel):
def _send_email(self):
if self.is_email:
self.composer_id.send_mail()
# with_context : we don't want to reimport the file we just exported.
self.composer_id.with_context(no_new_invoice=True).send_mail()
if self.env.context.get('mark_invoice_as_sent'):
#Salesman send posted invoice, without the right to write
#but they should have the right to change this flag
@@ -1,3 +1,4 @@
# -*- encoding: utf-8 -*-
from . import models
from . import wizard
+24
View File
@@ -0,0 +1,24 @@
# -*- coding: utf-8 -*-
{
'name' : 'Import/Export Invoices From XML/PDF',
'description':"""
Electronic Data Interchange
=======================================
EDI is the electronic interchange of business information using a standardized format.
This is the base module for import and export of invoices in various EDI formats, and the
the transmission of said documents to various parties involved in the exchange (other company,
governements, etc.)
""",
'version' : '1.0',
'category': 'Accounting/Accounting',
'depends' : ['account'],
'data': [
'security/ir.model.access.csv',
'wizard/account_invoice_send_views.xml',
'views/account_journal_views.xml'
],
'installable': True,
'application': False,
'auto_install': True,
}
+8
View File
@@ -0,0 +1,8 @@
# -*- encoding: utf-8 -*-
from . import account_move
from . import account_journal
from . import account_edi_format
from . import ir_actions_report
from . import ir_attachment
from . import mail_template
@@ -0,0 +1,300 @@
# -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
from odoo import models, fields, api
from odoo.exceptions import UserError
from odoo.tools.pdf import OdooPdfFileReader, OdooPdfFileWriter
from lxml import etree
import base64
import io
import logging
_logger = logging.getLogger(__name__)
class AccountEdiFormat(models.Model):
_name = 'account.edi.format'
_description = 'EDI format'
name = fields.Char()
code = fields.Char()
hide_on_journal = fields.Selection([('import_export', 'Import/Export'), ('import', 'Import Only')], default='import_export', help='used to hide this EDI format on journals')
_sql_constraints = [
('unique_code', 'unique (code)', 'This code already exists')
]
####################################################
# Export method to override based on EDI Format
####################################################
def _export_invoice_to_attachment(self, invoice):
""" Create the file content representing the invoice.
:param invoice: the invoice to encode.
:returns: a dictionary (values are compatible to create an ir.attachment)
* name : the name of the file
* datas : the content of the file,
* res_model : 'account.move',
* res_id: the id of invoice
* mimetype : the mimetype of the attachment
"""
# TO OVERRIDE
self.ensure_one()
return False
def _export_invoice_to_embed_to_pdf(self, pdf_content, invoice):
""" Create the file content representing the invoice when it's destined
to be embed into a pdf.
- default: creates the default EDI document (_export_invoice_to_attachment).
- Should return False if this EDI format should not be embedded.
- Should be overriden only if a specific behavior (for example,
include the pdf content inside the file).
:param pdf_content: the pdf before any EDI format was added.
:param invoice: the invoice to add.
:returns: a dictionary or False if this EDI format must not be embedded to pdf.
* name : the name of the file
* datas : the content of the file,
* res_model : 'account.move',
* res_id: the id of invoice
* mimetype : the mimetype of the attachment
"""
# TO OVERRIDE
self.ensure_one()
return self._export_invoice_to_attachment(invoice)
####################################################
# Import methods to override based on EDI Format
####################################################
def _create_invoice_from_xml_tree(self, filename, tree):
""" Create a new invoice with the data inside the xml.
:param filename: The name of the xml.
:param tree: The tree of the xml to import.
:returns: The created invoice.
"""
# TO OVERRIDE
self.ensure_one()
return self.env['account.move']
def _update_invoice_from_xml_tree(self, filename, tree, invoice):
""" Update an existing invoice with the data inside the xml.
:param filename: The name of the xml.
:param tree: The tree of the xml to import.
:param invoice: The invoice to update.
:returns: The updated invoice.
"""
# TO OVERRIDE
self.ensure_one()
return self.env['account.move']
def _create_invoice_from_pdf_reader(self, filename, reader):
""" Create a new invoice with the data inside a pdf.
:param filename: The name of the pdf.
:param reader: The OdooPdfFileReader of the pdf to import.
:returns: The created invoice.
"""
# TO OVERRIDE
self.ensure_one()
return self.env['account.move']
def _update_invoice_from_pdf_reader(self, filename, reader, invoice):
""" Update an existing invoice with the data inside the pdf.
:param filename: The name of the pdf.
:param reader: The OdooPdfFileReader of the pdf to import.
:param invoice: The invoice to update.
:returns: The updated invoice.
"""
# TO OVERRIDE
self.ensure_one()
return self.env['account.move']
####################################################
# Export Internal methods (not meant to be overridden)
####################################################
def _embed_edis_to_pdf(self, pdf_content, invoice):
""" Create the EDI document of the invoice and embed it in the pdf_content.
:param pdf_content: the bytes representing the pdf to add the EDIs to.
:param invoice: the invoice to generate the EDI from.
:returns: the same pdf_content with the EDI of the invoice embed in it.
"""
attachments = []
for edi_format in self:
try:
vals = edi_format._export_invoice_to_embed_to_pdf(pdf_content, invoice)
except:
continue
if vals:
attachments.append(vals)
if attachments:
# Add the attachments to the pdf file
reader_buffer = io.BytesIO(pdf_content)
reader = OdooPdfFileReader(reader_buffer)
writer = OdooPdfFileWriter()
writer.cloneReaderDocumentRoot(reader)
for vals in attachments:
writer.addAttachment(vals['name'], vals['datas'])
buffer = io.BytesIO()
writer.write(buffer)
pdf_content = buffer.getvalue()
reader_buffer.close()
buffer.close()
return pdf_content
def _create_ir_attachments(self, invoice):
""" Create ir.attachment for the EDIs from invoice.
:param invoice: the invoice to generate the EDI from.
:returns: the newly created attachments.
"""
attachment_vals_list = []
for edi_format in self:
vals = edi_format._export_invoice_to_attachment(invoice)
if vals:
vals['datas'] = base64.encodebytes(vals['datas'])
vals['edi_format_id'] = edi_format._origin.id
attachment_vals_list.append(vals)
res = self.env['ir.attachment'].create(attachment_vals_list)
invoice.edi_document_ids |= res
return res
####################################################
# Import Internal methods (not meant to be overridden)
####################################################
def _decode_xml(self, filename, content):
"""Decodes an xml into a list of one dictionary representing an attachment.
:param filename: The name of the xml.
:param attachment: The xml as a string.
:returns: A list with a dictionary.
* filename: The name of the attachment.
* content: The content of the attachment.
* type: The type of the attachment.
* xml_tree: The tree of the xml if type is xml.
* pdf_reader: The pdf_reader if type is pdf.
"""
to_process = []
try:
xml_tree = etree.fromstring(content)
except Exception as e:
_logger.exception("Error when converting the xml content to etree: %s" % e)
return to_process
if len(xml_tree):
to_process.append({
'filename': filename,
'content': content,
'type': 'xml',
'xml_tree': xml_tree,
})
return to_process
def _decode_pdf(self, filename, content):
"""Decodes a pdf and unwrap sub-attachment into a list of dictionary each representing an attachment.
:param filename: The name of the pdf.
:param content: The bytes representing the pdf.
:returns: A list of dictionary for each attachment.
* filename: The name of the attachment.
* content: The content of the attachment.
* type: The type of the attachment.
* xml_tree: The tree of the xml if type is xml.
* pdf_reader: The pdf_reader if type is pdf.
"""
to_process = []
try:
buffer = io.BytesIO(content)
pdf_reader = OdooPdfFileReader(buffer)
except Exception as e:
# Malformed pdf
_logger.exception("Error when reading the pdf: %s" % e)
return to_process
# Process embedded files.
for xml_name, content in pdf_reader.getAttachments():
to_process.extend(self._decode_xml(xml_name, content))
# Process the pdf itself.
to_process.append({
'filename': filename,
'content': content,
'type': 'pdf',
'pdf_reader': pdf_reader,
})
return to_process
def _decode_attachment(self, attachment):
"""Decodes an ir.attachment and unwrap sub-attachment into a list of dictionary each representing an attachment.
:param attachment: An ir.attachment record.
:returns: A list of dictionary for each attachment.
* filename: The name of the attachment.
* content: The content of the attachment.
* type: The type of the attachment.
* xml_tree: The tree of the xml if type is xml.
* pdf_reader: The pdf_reader if type is pdf.
"""
content = base64.b64decode(attachment.with_context(bin_size=False).datas)
to_process = []
if 'pdf' in attachment.mimetype:
to_process.extend(self._decode_pdf(attachment.name, content))
elif 'xml' in attachment.mimetype:
to_process.extend(self._decode_xml(attachment.name, content))
return to_process
def _create_invoice_from_attachment(self, attachment):
"""Decodes an ir.attachment to create an invoice.
:param attachment: An ir.attachment record.
:returns: The invoice where to import data.
"""
for file_data in self._decode_attachment(attachment):
for edi_format in self:
res = False
if file_data['type'] == 'xml':
res = edi_format._create_invoice_from_xml_tree(file_data['filename'], file_data['xml_tree'])
elif file_data['type'] == 'pdf':
res = edi_format._create_invoice_from_pdf_reader(file_data['filename'], file_data['pdf_reader'])
file_data['pdf_reader'].stream.close()
if res:
if 'extract_state' in res:
# Bypass the OCR to prevent overwriting data when an EDI was succesfully imported.
# TODO : remove when we integrate the OCR to the EDI flow.
res.write({'extract_state': 'done'})
return res
return self.env['account.move']
def _update_invoice_from_attachment(self, attachment, invoice):
"""Decodes an ir.attachment to update an invoice.
:param attachment: An ir.attachment record.
:returns: The invoice where to import data.
"""
for file_data in self._decode_attachment(attachment):
for edi_format in self:
res = False
if file_data['type'] == 'xml':
res = edi_format._update_invoice_from_xml_tree(file_data['filename'], file_data['xml_tree'], invoice)
elif file_data['type'] == 'pdf':
res = edi_format._update_invoice_from_pdf_reader(file_data['filename'], file_data['pdf_reader'], invoice)
file_data['pdf_reader'].stream.close()
if res:
if 'extract_state' in res:
# Bypass the OCR to prevent overwriting data when an EDI was succesfully imported.
# TODO : remove when we integrate the OCR to the EDI flow.
res.write({'extract_state': 'done'})
return res
return self.env['account.move']
@@ -0,0 +1,21 @@
# -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
from odoo import models, fields
class AccountJournal(models.Model):
_inherit = 'account.journal'
edi_format_ids = fields.Many2many(comodel_name='account.edi.format',
string='Electronic invoicing',
help='Send XML/EDI invoices',
domain="[('hide_on_journal', '=', 'import_export')]")
def _create_invoice_from_single_attachment(self, attachment):
invoice = self.env['account.edi.format'].search([])._create_invoice_from_attachment(attachment)
if invoice:
# with_context: we don't want to import the attachment since the invoice was just created from it.
invoice.with_context(no_new_invoice=True).message_post(attachment_ids=[attachment.id])
return invoice
return super()._create_invoice_from_single_attachment(attachment)
+53
View File
@@ -0,0 +1,53 @@
# -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
from odoo import api, models, fields
class AccountMove(models.Model):
_inherit = 'account.move'
edi_document_ids = fields.One2many('ir.attachment', 'res_id', domain=[('res_model', '=', 'account.move'), ('edi_format_id', '!=', False)])
def post(self):
# OVERRIDE
# Generate the electronic documents for the move.
existing_attachments = self.env['ir.attachment'].search([
('res_model', '=', 'account.move'),
('res_id', 'in', self.ids),
('edi_format_id', 'in', self.journal_id.edi_format_ids.ids)])
existing_attachments.unlink()
res = super(AccountMove, self).post()
for move in self:
move.journal_id.edi_format_ids._create_ir_attachments(move)
@api.returns('mail.message', lambda value: value.id)
def message_post(self, **kwargs):
# OVERRIDE
# When posting a message, analyse the attachment to check if it is an EDI document and update the invoice
# with the data.
res = super(AccountMove, self).message_post(**kwargs)
if len(self) != 1 or self.env.context.get('no_new_invoice') or not self.is_invoice(include_receipts=True):
return res
attachments = self.env['ir.attachment'].browse(kwargs.get('attachment_ids', []))
odoobot = self.env.ref('base.partner_root')
if attachments and self.state != 'draft':
self.message_post(body='The invoice is not a draft, it was not updated from the attachment.',
message_type='comment',
subtype_xmlid='mail.mt_note',
author_id=odoobot.id)
return res
if attachments and self.line_ids:
self.message_post(body='The invoice already contains lines, it was not updated from the attachment.',
message_type='comment',
subtype_xmlid='mail.mt_note',
author_id=odoobot.id)
return res
for attachment in attachments:
invoice = self.env['account.edi.format'].search([])._update_invoice_from_attachment(attachment, self)
break
return res
@@ -0,0 +1,16 @@
# -*- coding: utf-8 -*-
from odoo import models, fields, api, _
class IrActionsReport(models.Model):
_inherit = 'ir.actions.report'
def _post_pdf(self, save_in_attachment, pdf_content=None, res_ids=None):
# OVERRIDE to embed some EDI documents inside the PDF.
if self.model == 'account.move' and res_ids and len(res_ids) == 1 and pdf_content:
invoice = self.env['account.move'].browse(res_ids)
if invoice.is_sale_document() and invoice.state != 'draft':
pdf_content = invoice.journal_id.edi_format_ids._embed_edis_to_pdf(pdf_content, invoice)
return super(IrActionsReport, self)._post_pdf(save_in_attachment, pdf_content=pdf_content, res_ids=res_ids)
@@ -0,0 +1,10 @@
# -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
from odoo import models, fields
class IrAttachment(models.Model):
_inherit = 'ir.attachment'
edi_format_id = fields.Many2one('account.edi.format')
@@ -0,0 +1,32 @@
# -*- coding: utf-8 -*-
from odoo import api, models
class MailTemplate(models.Model):
_inherit = "mail.template"
def generate_email(self, res_ids, fields):
res = super().generate_email(res_ids, fields)
multi_mode = True
if isinstance(res_ids, int):
res_ids = [res_ids]
multi_mode = False
if self.model != 'account.move':
return res
existing_attachments = self.env['ir.attachment'].search([
('res_model', '=', 'account.move'),
('res_id', 'in', res_ids),
('edi_format_id', '!=', False)])
for record in self.env[self.model].browse(res_ids):
available_formats = existing_attachments.filtered(lambda a: a.res_id == record.id)
missing_formats = record.journal_id.edi_format_ids.filtered(lambda f: f._origin.id not in available_formats.edi_format_id.ids)
new_attachments = missing_formats._create_ir_attachments(record)
available_formats |= new_attachments
(res[record.id] if multi_mode else res).setdefault('attachments', []).extend([(a.name, a.datas) for a in available_formats])
return res
@@ -0,0 +1,2 @@
id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink
access_account_edi_format_readonly,account.edi.format,model_account_edi_format,,1,0,0,0
1 id name model_id:id group_id:id perm_read perm_write perm_create perm_unlink
2 access_account_edi_format_readonly account.edi.format model_account_edi_format 1 0 0 0
@@ -0,0 +1,17 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<data>
<record id="view_account_journal_form_inherited" model="ir.ui.view">
<field name="name">account.journal.form.inherited</field>
<field name="model">account.journal</field>
<field name="inherit_id" ref="account.view_account_journal_form" />
<field name="arch" type="xml">
<xpath expr="//page[@name='advanced_settings']/group" position="inside">
<group string="Electronic Data Interchange" >
<field name="edi_format_ids" widget="many2many_tags"/>
</group>
</xpath>
</field>
</record>
</data>
</odoo>
+1
View File
@@ -0,0 +1 @@
from . import account_invoice_send
@@ -0,0 +1,13 @@
# -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
from odoo import api, fields, models, _
from odoo.exceptions import UserError
import base64
class AccountInvoiceSend(models.TransientModel):
_inherit = 'account.invoice.send'
_description = 'Account Invoice Send'
edi_format_ids = fields.Many2many(related='invoice_ids.journal_id.edi_format_ids', string="Electronic invoicing")
@@ -0,0 +1,29 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<data>
<record model="ir.ui.view" id="account_invoice_send_inherit_account_wizard_form">
<field name="name">account.invoice.send.form.inherited.edi</field>
<field name="model">account.invoice.send</field>
<field name="inherit_id" ref="account.account_invoice_send_wizard_form"/>
<field name="arch" type="xml">
<xpath expr="//div[@name='mail_form']" position='before'>
<div name="edi_format_option">
<group>
<label for="edi_format_ids"/>
<div class="oe_inline">
<field name="edi_format_ids"
nolabel="1"
widget="many2many_tags"
placeholder="You can set default electronic invoicing formats on the journal"
attrs="{'invisible':[('edi_format_ids', '=', [])]}"/>
<div attrs="{'invisible':[('edi_format_ids', '!=', [])]}">
<i>Please, set electronic invoicing formats on the journal</i>
</div>
</div>
</group>
</div>
</xpath>
</field>
</record>
</data>
</odoo>
+1
View File
@@ -0,0 +1 @@
from . import models
@@ -1,10 +1,11 @@
# -*- coding: utf-8 -*-
{
'name' : 'Import Bills/Invoices From XML',
'name' : 'Import/Export invoices with Factur-X',
'version' : '1.0',
'category': 'Accounting/Accounting',
'depends' : ['account'],
'depends' : ['account_edi'],
'data': [
'data/account_edi_data.xml',
'data/facturx_templates.xml',
],
'installable': True,
@@ -0,0 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<data>
<record id="edi_facturx_1_0_05" model="account.edi.format">
<field name="name">Factur-X (FR)</field>
<field name="code">facturx_1_0_05</field>
</record>
</data>
</odoo>
@@ -133,7 +133,7 @@
<t t-set="line_counter" t-value="0"/>
<t t-foreach="record.invoice_line_ids.filtered(lambda l: not l.display_type)" t-as="line">
<t t-set="line_counter" t-value="line_counter + 1"/>
<t t-call="account_facturx.account_invoice_line_facturx_export"/>
<t t-call="account_edi_facturx.account_invoice_line_facturx_export"/>
</t>
<!-- Partners. -->
@@ -141,7 +141,7 @@
<!-- Seller. -->
<ram:SellerTradeParty>
<!-- Address. -->
<t t-call="account_facturx.account_invoice_partner_facturx_export">
<t t-call="account_edi_facturx.account_invoice_partner_facturx_export">
<t t-set="partner" t-value="record.company_id.partner_id"/>
</t>
@@ -154,7 +154,7 @@
<!-- Customer. -->
<ram:BuyerTradeParty>
<!-- Address. -->
<t t-call="account_facturx.account_invoice_partner_facturx_export">
<t t-call="account_edi_facturx.account_invoice_partner_facturx_export">
<t t-set="partner" t-value="record.commercial_partner_id"/>
</t>
@@ -174,7 +174,7 @@
<ram:ApplicableHeaderTradeDelivery>
<ram:ShipToTradeParty
t-if="'partner_shipping_id' in record._fields and record.partner_shipping_id">
<t t-call="account_facturx.account_invoice_partner_facturx_export">
<t t-call="account_edi_facturx.account_invoice_partner_facturx_export">
<t t-set="partner" t-value="record.partner_shipping_id"/>
</t>
</ram:ShipToTradeParty>
@@ -0,0 +1 @@
from . import account_edi_format
@@ -10,23 +10,22 @@ from lxml import etree
from PyPDF2 import PdfFileReader
import io
import base64
import logging
_logger = logging.getLogger(__name__)
DEFAULT_FACTURX_DATE_FORMAT = '%Y%m%d'
class AccountMove(models.Model):
_inherit = 'account.move'
class AccountEdiFormat(models.Model):
_inherit = 'account.edi.format'
def _export_as_facturx_xml(self):
''' Create the Factur-x xml file content.
:return: The XML content as str.
'''
def _export_invoice_to_attachment(self, invoice):
self.ensure_one()
if self.code != 'facturx_1_0_05':
return super()._export_invoice_to_attachment(invoice)
def format_date(dt):
# Format the date in the Factur-x standard.
@@ -39,35 +38,59 @@ class AccountMove(models.Model):
# Create file content.
template_values = {
'record': self,
'record': invoice,
'format_date': format_date,
'format_monetary': format_monetary,
}
content = self.env.ref('account_facturx.account_invoice_facturx_export')._render(template_values)
return b"<?xml version='1.0' encoding='UTF-8'?>" + content
xml_content = b"<?xml version='1.0' encoding='UTF-8'?>"
xml_content += self.env.ref('account_edi_facturx.account_invoice_facturx_export')._render(template_values)
xml_name = '%s_facturx.xml' % (invoice.name.replace('/', '_'))
return {'name': xml_name,
'datas': xml_content,
'res_model': 'account.move',
'res_id': invoice._origin.id,
'mimetype': 'application/xml'
}
def _import_facturx_invoice(self, tree):
''' Extract invoice values from the Factur-x xml tree passed as parameter.
def _is_facturx(self, filename, tree):
return self.code == 'facturx_1_0_05' and tree.tag == '{urn:un:unece:uncefact:data:standard:CrossIndustryInvoice:100}CrossIndustryInvoice'
def _create_invoice_from_xml_tree(self, filename, tree):
self.ensure_one()
if self._is_facturx(filename, tree):
return self._import_facturx(tree, self.env['account_move'])
return super()._create_invoice_from_xml_tree(filename, tree)
def _update_invoice_from_xml_tree(self, filename, tree, invoice):
self.ensure_one()
if self._is_facturx(filename, tree):
return self._import_facturx(tree, invoice)
return super()._update_invoice_from_xml_tree(filename, tree, invoice)
def _import_facturx(self, tree, invoice):
""" Decodes a factur-x invoice into an invoice.
:param tree: the factur-x tree to decode.
:param invoice: the invoice to update or an empty recordset.
:returns: the invoice where the factur-x data was imported.
"""
:param tree: The tree of the Factur-x xml file.
:return: A dictionary containing account.invoice values to create/update it.
'''
amount_total_import = None
default_type = False
if self._context.get('default_journal_id'):
default_move_type = False
if invoice._context.get('default_journal_id'):
journal = self.env['account.journal'].browse(self.env.context['default_journal_id'])
default_type = 'out_invoice' if journal.type == 'sale' else 'in_invoice'
elif self._context.get('default_move_type'):
default_type = self._context['default_move_type']
elif self.move_type in self.env['account.move'].get_invoice_types(include_receipts=True):
default_move_type = 'out_invoice' if journal.type == 'sale' else 'in_invoice'
elif invoice._context.get('default_move_type'):
default_move_type = self._context['default_move_type']
elif invoice.move_type in self.env['account.move'].get_invoice_types(include_receipts=True):
# in case an attachment is saved on a draft invoice previously created, we might
# have lost the default value in context but the type was already set
default_type = self.move_type
default_move_type = invoice.move_type
if not default_type:
if not default_move_type:
raise UserError(_("No information about the journal or the type of invoice is passed"))
if default_type == 'entry':
if default_move_type == 'entry':
return
# Total amount.
@@ -82,31 +105,31 @@ class AccountMove(models.Model):
elements = tree.xpath('//rsm:ExchangedDocument/ram:TypeCode', namespaces=tree.nsmap)
type_code = elements[0].text
default_type.replace('_refund', '_invoice')
default_move_type.replace('_refund', '_invoice')
if type_code == '381':
default_type = 'out_refund' if default_type == 'out_invoice' else 'in_refund'
default_move_type = 'out_refund' if default_move_type == 'out_invoice' else 'in_refund'
refund_sign = -1
else:
# Handle 'b' refund mode.
if total_amount < 0:
default_type = 'out_refund' if default_type == 'out_invoice' else 'in_refund'
refund_sign = -1 if 'refund' in default_type else 1
default_move_type = 'out_refund' if default_move_type == 'out_invoice' else 'in_refund'
refund_sign = -1 if 'refund' in default_move_type else 1
# Write the type as the journal entry is already created.
self.move_type = default_type
invoice.move_type = default_move_type
# self could be a single record (editing) or be empty (new).
with Form(self.with_context(default_move_type=default_type)) as invoice_form:
with Form(invoice.with_context(default_move_type=default_move_type)) as invoice_form:
# Partner (first step to avoid warning 'Warning! You must first select a partner.').
partner_type = invoice_form.journal_id.type == 'purchase' and 'SellerTradeParty' or 'BuyerTradeParty'
elements = tree.xpath('//ram:'+partner_type+'/ram:SpecifiedTaxRegistration/ram:ID', namespaces=tree.nsmap)
elements = tree.xpath('//ram:' + partner_type + '/ram:SpecifiedTaxRegistration/ram:ID', namespaces=tree.nsmap)
partner = elements and self.env['res.partner'].search([('vat', '=', elements[0].text)], limit=1)
if not partner:
elements = tree.xpath('//ram:'+partner_type+'/ram:Name', namespaces=tree.nsmap)
elements = tree.xpath('//ram:' + partner_type + '/ram:Name', namespaces=tree.nsmap)
partner_name = elements and elements[0].text
partner = elements and self.env['res.partner'].search([('name', 'ilike', partner_name)], limit=1)
if not partner:
elements = tree.xpath('//ram:'+partner_type+'//ram:URIID[@schemeID=\'SMTP\']', namespaces=tree.nsmap)
elements = tree.xpath('//ram:' + partner_type + '//ram:URIID[@schemeID=\'SMTP\']', namespaces=tree.nsmap)
partner = elements and self.env['res.partner'].search([('email', '=', elements[0].text)], limit=1)
if partner:
invoice_form.partner_id = partner
@@ -223,98 +246,3 @@ class AccountMove(models.Model):
invoice_line_form.price_unit = amount_total_import
return invoice_form.save()
@api.returns('mail.message', lambda value: value.id)
def message_post(self, **kwargs):
# OVERRIDE
# /!\ 'default_res_id' in self._context is used to don't process attachment when using a form view.
res = super(AccountMove, self).message_post(**kwargs)
if not self.env.context.get('no_new_invoice') and len(self) == 1 and self.state == 'draft' and (
self.env.context.get('default_move_type', self.move_type) in self.env['account.move'].get_invoice_types(include_receipts=True)
or self.env['account.journal'].browse(self.env.context.get('default_journal_id')).type in ('sale', 'purchase')
):
for attachment in self.env['ir.attachment'].browse(kwargs.get('attachment_ids', [])):
self._create_invoice_from_attachment(attachment)
return res
def _create_invoice_from_attachment(self, attachment):
if 'pdf' in attachment.mimetype:
for move in self:
move._create_invoice_from_pdf(attachment)
if 'xml' in attachment.mimetype:
for move in self:
move._create_invoice_from_xml(attachment)
def _create_invoice_from_pdf(self, attachment):
content = base64.b64decode(attachment.datas)
with io.BytesIO(content) as buffer:
try:
reader = PdfFileReader(buffer)
# Search for Factur-x embedded file.
if reader.trailer['/Root'].get('/Names') and reader.trailer['/Root']['/Names'].get('/EmbeddedFiles'):
# N.B: embedded_files looks like:
# ['file.xml', {'/Type': '/Filespec', '/F': 'file.xml', '/EF': {'/F': IndirectObject(22, 0)}}]
embedded_files = reader.trailer['/Root']['/Names']['/EmbeddedFiles']['/Names']
# '[::2]' because it's a list [fn_1, content_1, fn_2, content_2, ..., fn_n, content_2]
for filename_obj, content_obj in list(zip(embedded_files, embedded_files[1:]))[::2]:
content = content_obj.getObject()['/EF']['/F'].getData()
if filename_obj == 'factur-x.xml':
try:
tree = etree.fromstring(content)
except Exception:
continue
self._import_facturx_invoice(tree)
self._remove_ocr_option()
buffer.close()
except UserError as e:
raise e
except Exception as e:
# Malformed pdf
_logger.exception(e)
@api.model
def _get_xml_decoders(self):
''' List of usable decoders to extract invoice from attachments.
:return: a list of triplet (xml_type, check_func, decode_func)
* xml_type: The format name, e.g 'UBL 2.1'
* check_func: A function taking an etree and a file name as parameter and returning a dict:
* flag: The etree is part of this format.
* error: Error message.
* decode_func: A function taking an etree as parameter and returning an invoice record.
'''
# TO BE OVERWRITTEN
return []
def _create_invoice_from_xml(self, attachment):
decoders = self._get_xml_decoders()
# Convert attachment -> etree
content = base64.b64decode(attachment.datas)
try:
tree = etree.fromstring(content)
except Exception:
_logger.exception('The xml file is badly formatted : {}'.format(attachment.name))
for xml_type, check_func, decode_func in decoders:
check_res = check_func(tree, attachment.name)
if check_res.get('flag') and not check_res.get('error'):
invoice_ids = decode_func(tree)
if invoice_ids:
invoice_ids._remove_ocr_option()
break
try:
return invoice_ids
except UnboundLocalError:
_logger.exception('No decoder was found for the xml file: {}. The file is badly formatted, not supported or the decoder is not installed'.format(attachment.name))
def _remove_ocr_option(self):
if 'extract_state' in self:
self.write({'extract_state': 'done'})
@@ -1,37 +0,0 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * account_facturx
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server saas~13.2\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2020-02-13 07:24+0000\n"
"PO-Revision-Date: 2020-02-13 07:24+0000\n"
"Last-Translator: \n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: \n"
#. module: account_facturx
#: model:ir.model,name:account_facturx.model_account_move
msgid "Journal Entries"
msgstr ""
#. module: account_facturx
#: code:addons/account_facturx/models/account_move.py:0
#, python-format
msgid "No information about the journal or the type of invoice is passed"
msgstr ""
#. module: account_facturx
#: model:ir.model,name:account_facturx.model_ir_actions_report
msgid "Report Action"
msgstr ""
#. module: account_facturx
#: model_terms:ir.ui.view,arch_db:account_facturx.account_invoice_facturx_export
msgid "urn:cen.eu:en16931:2017"
msgstr ""
-55
View File
@@ -1,55 +0,0 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * account_facturx
#
# Translators:
# Mustafa Rawi <mustafa@cubexco.com>, 2019
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server saas~12.4\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2019-08-12 11:32+0000\n"
"PO-Revision-Date: 2019-08-26 09:08+0000\n"
"Last-Translator: Mustafa Rawi <mustafa@cubexco.com>, 2019\n"
"Language-Team: Arabic (https://www.transifex.com/odoo/teams/41243/ar/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Language: ar\n"
"Plural-Forms: nplurals=6; plural=n==0 ? 0 : n==1 ? 1 : n==2 ? 2 : n%100>=3 && n%100<=10 ? 3 : n%100>=11 && n%100<=99 ? 4 : 5;\n"
#. module: account_facturx
#: model:ir.model,name:account_facturx.model_account_move
msgid "Journal Entries"
msgstr "القيود اليومية"
#. module: account_facturx
#: code:addons/account_facturx/models/account_move.py:328
#, python-format
msgid ""
"No decoder was found for the xml file: {}. The file is badly formatted, not "
"supported or the decoder is not installed"
msgstr ""
#. module: account_facturx
#: code:addons/account_facturx/models/account_move.py:65
#, python-format
msgid "No information about the journal or the type of invoice is passed"
msgstr ""
#. module: account_facturx
#: model:ir.model,name:account_facturx.model_ir_actions_report
msgid "Report Action"
msgstr "إجراء التقرير"
#. module: account_facturx
#: code:addons/account_facturx/models/account_move.py:314
#, python-format
msgid "The xml file is badly formatted : {}"
msgstr ""
#. module: account_facturx
#: model_terms:ir.ui.view,arch_db:account_facturx.account_invoice_facturx_export
msgid "urn:cen.eu:en16931:2017"
msgstr ""
-55
View File
@@ -1,55 +0,0 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * account_facturx
#
# Translators:
# Martin Trigaux, 2019
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server saas~12.4\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2019-08-12 11:32+0000\n"
"PO-Revision-Date: 2019-08-26 09:08+0000\n"
"Last-Translator: Martin Trigaux, 2019\n"
"Language-Team: Czech (https://www.transifex.com/odoo/teams/41243/cs/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Language: cs\n"
"Plural-Forms: nplurals=4; plural=(n == 1 && n % 1 == 0) ? 0 : (n >= 2 && n <= 4 && n % 1 == 0) ? 1: (n % 1 != 0 ) ? 2 : 3;\n"
#. module: account_facturx
#: model:ir.model,name:account_facturx.model_account_move
msgid "Journal Entries"
msgstr "Položky deníku"
#. module: account_facturx
#: code:addons/account_facturx/models/account_move.py:328
#, python-format
msgid ""
"No decoder was found for the xml file: {}. The file is badly formatted, not "
"supported or the decoder is not installed"
msgstr ""
#. module: account_facturx
#: code:addons/account_facturx/models/account_move.py:65
#, python-format
msgid "No information about the journal or the type of invoice is passed"
msgstr ""
#. module: account_facturx
#: model:ir.model,name:account_facturx.model_ir_actions_report
msgid "Report Action"
msgstr ""
#. module: account_facturx
#: code:addons/account_facturx/models/account_move.py:314
#, python-format
msgid "The xml file is badly formatted : {}"
msgstr ""
#. module: account_facturx
#: model_terms:ir.ui.view,arch_db:account_facturx.account_invoice_facturx_export
msgid "urn:cen.eu:en16931:2017"
msgstr ""
-55
View File
@@ -1,55 +0,0 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * account_facturx
#
# Translators:
# Ejner Sønniksen <ejner@vkdata.dk>, 2019
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server saas~12.4\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2019-08-12 11:32+0000\n"
"PO-Revision-Date: 2019-08-26 09:08+0000\n"
"Last-Translator: Ejner Sønniksen <ejner@vkdata.dk>, 2019\n"
"Language-Team: Danish (https://www.transifex.com/odoo/teams/41243/da/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Language: da\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
#. module: account_facturx
#: model:ir.model,name:account_facturx.model_account_move
msgid "Journal Entries"
msgstr "Journalposter"
#. module: account_facturx
#: code:addons/account_facturx/models/account_move.py:328
#, python-format
msgid ""
"No decoder was found for the xml file: {}. The file is badly formatted, not "
"supported or the decoder is not installed"
msgstr ""
#. module: account_facturx
#: code:addons/account_facturx/models/account_move.py:65
#, python-format
msgid "No information about the journal or the type of invoice is passed"
msgstr ""
#. module: account_facturx
#: model:ir.model,name:account_facturx.model_ir_actions_report
msgid "Report Action"
msgstr ""
#. module: account_facturx
#: code:addons/account_facturx/models/account_move.py:314
#, python-format
msgid "The xml file is badly formatted : {}"
msgstr ""
#. module: account_facturx
#: model_terms:ir.ui.view,arch_db:account_facturx.account_invoice_facturx_export
msgid "urn:cen.eu:en16931:2017"
msgstr ""
-60
View File
@@ -1,60 +0,0 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * account_facturx
#
# Translators:
# Martin Trigaux, 2019
# Leon Grill <leg@odoo.com>, 2019
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server saas~12.4\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2019-08-12 11:32+0000\n"
"PO-Revision-Date: 2019-08-26 09:08+0000\n"
"Last-Translator: Leon Grill <leg@odoo.com>, 2019\n"
"Language-Team: German (https://www.transifex.com/odoo/teams/41243/de/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Language: de\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
#. module: account_facturx
#: model:ir.model,name:account_facturx.model_account_move
msgid "Journal Entries"
msgstr "Buchungssätze"
#. module: account_facturx
#: code:addons/account_facturx/models/account_move.py:328
#, python-format
msgid ""
"No decoder was found for the xml file: {}. The file is badly formatted, not "
"supported or the decoder is not installed"
msgstr ""
"Es wurde kein Decoder für die Xml-Datei gefunden: {}. Die Datei ist schlecht"
" formatiert, nicht unterstützt oder der Decoder ist nicht installiert"
#. module: account_facturx
#: code:addons/account_facturx/models/account_move.py:65
#, python-format
msgid "No information about the journal or the type of invoice is passed"
msgstr ""
"Es werden keine Informationen über das Journal oder die Art der Rechnung "
"übergeben"
#. module: account_facturx
#: model:ir.model,name:account_facturx.model_ir_actions_report
msgid "Report Action"
msgstr ""
#. module: account_facturx
#: code:addons/account_facturx/models/account_move.py:314
#, python-format
msgid "The xml file is badly formatted : {}"
msgstr "Die Xml-Datei ist schlecht formatiert : {}"
#. module: account_facturx
#: model_terms:ir.ui.view,arch_db:account_facturx.account_invoice_facturx_export
msgid "urn:cen.eu:en16931:2017"
msgstr "urn:cen.eu:en16931:2017"
-59
View File
@@ -1,59 +0,0 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * account_facturx
#
# Translators:
# Martin Trigaux, 2019
# Pedro M. Baeza <pedro.baeza@gmail.com>, 2019
# John Guardado <jgu@odoo.com>, 2019
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server saas~12.4\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2019-08-12 11:32+0000\n"
"PO-Revision-Date: 2019-08-26 09:08+0000\n"
"Last-Translator: John Guardado <jgu@odoo.com>, 2019\n"
"Language-Team: Spanish (https://www.transifex.com/odoo/teams/41243/es/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Language: es\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
#. module: account_facturx
#: model:ir.model,name:account_facturx.model_account_move
msgid "Journal Entries"
msgstr "Asientos contables"
#. module: account_facturx
#: code:addons/account_facturx/models/account_move.py:328
#, python-format
msgid ""
"No decoder was found for the xml file: {}. The file is badly formatted, not "
"supported or the decoder is not installed"
msgstr ""
"No se encontró ningún decodificador para el archivo xml: {}. El archivo está"
" mal formateado, no es compatible o el decodificador no está instalado."
#. module: account_facturx
#: code:addons/account_facturx/models/account_move.py:65
#, python-format
msgid "No information about the journal or the type of invoice is passed"
msgstr "No hay información sobre el diario ni sobre el tipo de factura."
#. module: account_facturx
#: model:ir.model,name:account_facturx.model_ir_actions_report
msgid "Report Action"
msgstr "Acción de informe"
#. module: account_facturx
#: code:addons/account_facturx/models/account_move.py:314
#, python-format
msgid "The xml file is badly formatted : {}"
msgstr "El archivo xml está mal formateado : {}"
#. module: account_facturx
#: model_terms:ir.ui.view,arch_db:account_facturx.account_invoice_facturx_export
msgid "urn:cen.eu:en16931:2017"
msgstr "urn:cen.eu:en16931:2017"
-59
View File
@@ -1,59 +0,0 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * account_facturx
#
# Translators:
# Martin Trigaux, 2019
# Cécile Collart <cco@odoo.com>, 2019
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server saas~12.4\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2019-08-12 11:32+0000\n"
"PO-Revision-Date: 2019-08-26 09:08+0000\n"
"Last-Translator: Cécile Collart <cco@odoo.com>, 2019\n"
"Language-Team: French (https://www.transifex.com/odoo/teams/41243/fr/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Language: fr\n"
"Plural-Forms: nplurals=2; plural=(n > 1);\n"
#. module: account_facturx
#: model:ir.model,name:account_facturx.model_account_move
msgid "Journal Entries"
msgstr "Pièces comptables"
#. module: account_facturx
#: code:addons/account_facturx/models/account_move.py:328
#, python-format
msgid ""
"No decoder was found for the xml file: {}. The file is badly formatted, not "
"supported or the decoder is not installed"
msgstr ""
"Aucun décodeur n'a été trouvé pour le fichier XML: {}. Le fichier est mal "
"formaté, non supporté ou le décodeur n'est pas installé"
#. module: account_facturx
#: code:addons/account_facturx/models/account_move.py:65
#, python-format
msgid "No information about the journal or the type of invoice is passed"
msgstr ""
"Aucune information sur le journal ou le type de facture n'est transmise"
#. module: account_facturx
#: model:ir.model,name:account_facturx.model_ir_actions_report
msgid "Report Action"
msgstr "Signaler l'action"
#. module: account_facturx
#: code:addons/account_facturx/models/account_move.py:314
#, python-format
msgid "The xml file is badly formatted : {}"
msgstr "Le fichier XML est mal formaté: {}"
#. module: account_facturx
#: model_terms:ir.ui.view,arch_db:account_facturx.account_invoice_facturx_export
msgid "urn:cen.eu:en16931:2017"
msgstr "urn:cen.eu:en16931:2017"
-55
View File
@@ -1,55 +0,0 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * account_facturx
#
# Translators:
# דודי מלכה <Dudimalka6@gmail.com>, 2019
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server saas~12.4\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2019-08-12 11:32+0000\n"
"PO-Revision-Date: 2019-08-26 09:08+0000\n"
"Last-Translator: דודי מלכה <Dudimalka6@gmail.com>, 2019\n"
"Language-Team: Hebrew (https://www.transifex.com/odoo/teams/41243/he/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Language: he\n"
"Plural-Forms: nplurals=4; plural=(n == 1 && n % 1 == 0) ? 0 : (n == 2 && n % 1 == 0) ? 1: (n % 10 == 0 && n % 1 == 0 && n > 10) ? 2 : 3;\n"
#. module: account_facturx
#: model:ir.model,name:account_facturx.model_account_move
msgid "Journal Entries"
msgstr "רשומות יומן"
#. module: account_facturx
#: code:addons/account_facturx/models/account_move.py:328
#, python-format
msgid ""
"No decoder was found for the xml file: {}. The file is badly formatted, not "
"supported or the decoder is not installed"
msgstr ""
#. module: account_facturx
#: code:addons/account_facturx/models/account_move.py:65
#, python-format
msgid "No information about the journal or the type of invoice is passed"
msgstr ""
#. module: account_facturx
#: model:ir.model,name:account_facturx.model_ir_actions_report
msgid "Report Action"
msgstr "דוח פעולה"
#. module: account_facturx
#: code:addons/account_facturx/models/account_move.py:314
#, python-format
msgid "The xml file is badly formatted : {}"
msgstr ""
#. module: account_facturx
#: model_terms:ir.ui.view,arch_db:account_facturx.account_invoice_facturx_export
msgid "urn:cen.eu:en16931:2017"
msgstr ""
-55
View File
@@ -1,55 +0,0 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * account_facturx
#
# Translators:
# Martin Trigaux, 2019
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server saas~12.4\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2019-08-12 11:32+0000\n"
"PO-Revision-Date: 2019-08-26 09:08+0000\n"
"Last-Translator: Martin Trigaux, 2019\n"
"Language-Team: Croatian (https://www.transifex.com/odoo/teams/41243/hr/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Language: hr\n"
"Plural-Forms: nplurals=3; plural=n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2;\n"
#. module: account_facturx
#: model:ir.model,name:account_facturx.model_account_move
msgid "Journal Entries"
msgstr "Temeljnice"
#. module: account_facturx
#: code:addons/account_facturx/models/account_move.py:328
#, python-format
msgid ""
"No decoder was found for the xml file: {}. The file is badly formatted, not "
"supported or the decoder is not installed"
msgstr ""
#. module: account_facturx
#: code:addons/account_facturx/models/account_move.py:65
#, python-format
msgid "No information about the journal or the type of invoice is passed"
msgstr ""
#. module: account_facturx
#: model:ir.model,name:account_facturx.model_ir_actions_report
msgid "Report Action"
msgstr ""
#. module: account_facturx
#: code:addons/account_facturx/models/account_move.py:314
#, python-format
msgid "The xml file is badly formatted : {}"
msgstr ""
#. module: account_facturx
#: model_terms:ir.ui.view,arch_db:account_facturx.account_invoice_facturx_export
msgid "urn:cen.eu:en16931:2017"
msgstr ""
-55
View File
@@ -1,55 +0,0 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * account_facturx
#
# Translators:
# Martin Trigaux, 2019
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server saas~12.4\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2019-08-12 11:32+0000\n"
"PO-Revision-Date: 2019-08-26 09:08+0000\n"
"Last-Translator: Martin Trigaux, 2019\n"
"Language-Team: Hungarian (https://www.transifex.com/odoo/teams/41243/hu/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Language: hu\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
#. module: account_facturx
#: model:ir.model,name:account_facturx.model_account_move
msgid "Journal Entries"
msgstr "Könyvelési tételek"
#. module: account_facturx
#: code:addons/account_facturx/models/account_move.py:328
#, python-format
msgid ""
"No decoder was found for the xml file: {}. The file is badly formatted, not "
"supported or the decoder is not installed"
msgstr ""
#. module: account_facturx
#: code:addons/account_facturx/models/account_move.py:65
#, python-format
msgid "No information about the journal or the type of invoice is passed"
msgstr ""
#. module: account_facturx
#: model:ir.model,name:account_facturx.model_ir_actions_report
msgid "Report Action"
msgstr ""
#. module: account_facturx
#: code:addons/account_facturx/models/account_move.py:314
#, python-format
msgid "The xml file is badly formatted : {}"
msgstr ""
#. module: account_facturx
#: model_terms:ir.ui.view,arch_db:account_facturx.account_invoice_facturx_export
msgid "urn:cen.eu:en16931:2017"
msgstr ""
-55
View File
@@ -1,55 +0,0 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * account_facturx
#
# Translators:
# Sergio Zanchetta <primes2h@gmail.com>, 2019
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server saas~12.4\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2019-08-12 11:32+0000\n"
"PO-Revision-Date: 2019-08-26 09:08+0000\n"
"Last-Translator: Sergio Zanchetta <primes2h@gmail.com>, 2019\n"
"Language-Team: Italian (https://www.transifex.com/odoo/teams/41243/it/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Language: it\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
#. module: account_facturx
#: model:ir.model,name:account_facturx.model_account_move
msgid "Journal Entries"
msgstr "Registrazioni contabili"
#. module: account_facturx
#: code:addons/account_facturx/models/account_move.py:328
#, python-format
msgid ""
"No decoder was found for the xml file: {}. The file is badly formatted, not "
"supported or the decoder is not installed"
msgstr ""
#. module: account_facturx
#: code:addons/account_facturx/models/account_move.py:65
#, python-format
msgid "No information about the journal or the type of invoice is passed"
msgstr ""
#. module: account_facturx
#: model:ir.model,name:account_facturx.model_ir_actions_report
msgid "Report Action"
msgstr "Azione resoconto"
#. module: account_facturx
#: code:addons/account_facturx/models/account_move.py:314
#, python-format
msgid "The xml file is badly formatted : {}"
msgstr ""
#. module: account_facturx
#: model_terms:ir.ui.view,arch_db:account_facturx.account_invoice_facturx_export
msgid "urn:cen.eu:en16931:2017"
msgstr "urn:cen.eu:en16931:2017"
-51
View File
@@ -1,51 +0,0 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * account_facturx
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server saas~12.4\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2019-08-12 11:32+0000\n"
"PO-Revision-Date: 2019-08-26 09:08+0000\n"
"Language-Team: Luxembourgish (https://www.transifex.com/odoo/teams/41243/lb/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Language: lb\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
#. module: account_facturx
#: model:ir.model,name:account_facturx.model_account_move
msgid "Journal Entries"
msgstr ""
#. module: account_facturx
#: code:addons/account_facturx/models/account_move.py:328
#, python-format
msgid ""
"No decoder was found for the xml file: {}. The file is badly formatted, not "
"supported or the decoder is not installed"
msgstr ""
#. module: account_facturx
#: code:addons/account_facturx/models/account_move.py:65
#, python-format
msgid "No information about the journal or the type of invoice is passed"
msgstr ""
#. module: account_facturx
#: model:ir.model,name:account_facturx.model_ir_actions_report
msgid "Report Action"
msgstr ""
#. module: account_facturx
#: code:addons/account_facturx/models/account_move.py:314
#, python-format
msgid "The xml file is badly formatted : {}"
msgstr ""
#. module: account_facturx
#: model_terms:ir.ui.view,arch_db:account_facturx.account_invoice_facturx_export
msgid "urn:cen.eu:en16931:2017"
msgstr ""
-55
View File
@@ -1,55 +0,0 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * account_facturx
#
# Translators:
# Linas Versada <linaskrisiukenas@gmail.com>, 2019
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server saas~12.4\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2019-08-12 11:32+0000\n"
"PO-Revision-Date: 2019-08-26 09:08+0000\n"
"Last-Translator: Linas Versada <linaskrisiukenas@gmail.com>, 2019\n"
"Language-Team: Lithuanian (https://www.transifex.com/odoo/teams/41243/lt/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Language: lt\n"
"Plural-Forms: nplurals=4; plural=(n % 10 == 1 && (n % 100 > 19 || n % 100 < 11) ? 0 : (n % 10 >= 2 && n % 10 <=9) && (n % 100 > 19 || n % 100 < 11) ? 1 : n % 1 != 0 ? 2: 3);\n"
#. module: account_facturx
#: model:ir.model,name:account_facturx.model_account_move
msgid "Journal Entries"
msgstr "Žurnalo įrašai"
#. module: account_facturx
#: code:addons/account_facturx/models/account_move.py:328
#, python-format
msgid ""
"No decoder was found for the xml file: {}. The file is badly formatted, not "
"supported or the decoder is not installed"
msgstr ""
#. module: account_facturx
#: code:addons/account_facturx/models/account_move.py:65
#, python-format
msgid "No information about the journal or the type of invoice is passed"
msgstr ""
#. module: account_facturx
#: model:ir.model,name:account_facturx.model_ir_actions_report
msgid "Report Action"
msgstr ""
#. module: account_facturx
#: code:addons/account_facturx/models/account_move.py:314
#, python-format
msgid "The xml file is badly formatted : {}"
msgstr ""
#. module: account_facturx
#: model_terms:ir.ui.view,arch_db:account_facturx.account_invoice_facturx_export
msgid "urn:cen.eu:en16931:2017"
msgstr ""
-55
View File
@@ -1,55 +0,0 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * account_facturx
#
# Translators:
# Baskhuu Lodoikhuu <baskhuujacara@gmail.com>, 2019
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server saas~12.4\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2019-08-12 11:32+0000\n"
"PO-Revision-Date: 2019-08-26 09:08+0000\n"
"Last-Translator: Baskhuu Lodoikhuu <baskhuujacara@gmail.com>, 2019\n"
"Language-Team: Mongolian (https://www.transifex.com/odoo/teams/41243/mn/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Language: mn\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
#. module: account_facturx
#: model:ir.model,name:account_facturx.model_account_move
msgid "Journal Entries"
msgstr "Ажил гүйлгээ"
#. module: account_facturx
#: code:addons/account_facturx/models/account_move.py:328
#, python-format
msgid ""
"No decoder was found for the xml file: {}. The file is badly formatted, not "
"supported or the decoder is not installed"
msgstr ""
#. module: account_facturx
#: code:addons/account_facturx/models/account_move.py:65
#, python-format
msgid "No information about the journal or the type of invoice is passed"
msgstr ""
#. module: account_facturx
#: model:ir.model,name:account_facturx.model_ir_actions_report
msgid "Report Action"
msgstr ""
#. module: account_facturx
#: code:addons/account_facturx/models/account_move.py:314
#, python-format
msgid "The xml file is badly formatted : {}"
msgstr ""
#. module: account_facturx
#: model_terms:ir.ui.view,arch_db:account_facturx.account_invoice_facturx_export
msgid "urn:cen.eu:en16931:2017"
msgstr ""
-55
View File
@@ -1,55 +0,0 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * account_facturx
#
# Translators:
# Martin Trigaux, 2019
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server saas~12.4\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2019-08-12 11:32+0000\n"
"PO-Revision-Date: 2019-08-26 09:08+0000\n"
"Last-Translator: Martin Trigaux, 2019\n"
"Language-Team: Norwegian Bokmål (https://www.transifex.com/odoo/teams/41243/nb/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Language: nb\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
#. module: account_facturx
#: model:ir.model,name:account_facturx.model_account_move
msgid "Journal Entries"
msgstr "Journalregistreringer"
#. module: account_facturx
#: code:addons/account_facturx/models/account_move.py:328
#, python-format
msgid ""
"No decoder was found for the xml file: {}. The file is badly formatted, not "
"supported or the decoder is not installed"
msgstr ""
#. module: account_facturx
#: code:addons/account_facturx/models/account_move.py:65
#, python-format
msgid "No information about the journal or the type of invoice is passed"
msgstr ""
#. module: account_facturx
#: model:ir.model,name:account_facturx.model_ir_actions_report
msgid "Report Action"
msgstr ""
#. module: account_facturx
#: code:addons/account_facturx/models/account_move.py:314
#, python-format
msgid "The xml file is badly formatted : {}"
msgstr ""
#. module: account_facturx
#: model_terms:ir.ui.view,arch_db:account_facturx.account_invoice_facturx_export
msgid "urn:cen.eu:en16931:2017"
msgstr ""
-59
View File
@@ -1,59 +0,0 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * account_facturx
#
# Translators:
# Martin Trigaux, 2019
# Yenthe Van Ginneken <yenthespam@gmail.com>, 2019
# Gunther Clauwaert <gclauwae@hotmail.com>, 2019
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server saas~12.4\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2019-08-12 11:32+0000\n"
"PO-Revision-Date: 2019-08-26 09:08+0000\n"
"Last-Translator: Gunther Clauwaert <gclauwae@hotmail.com>, 2019\n"
"Language-Team: Dutch (https://www.transifex.com/odoo/teams/41243/nl/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Language: nl\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
#. module: account_facturx
#: model:ir.model,name:account_facturx.model_account_move
msgid "Journal Entries"
msgstr "Boekingen"
#. module: account_facturx
#: code:addons/account_facturx/models/account_move.py:328
#, python-format
msgid ""
"No decoder was found for the xml file: {}. The file is badly formatted, not "
"supported or the decoder is not installed"
msgstr ""
"Er werd geen decoder voor de xml file: {} gevonden. De file is slecht "
"geformatteerd, niet ondersteunt of de decoder is niet geïnstalleerd"
#. module: account_facturx
#: code:addons/account_facturx/models/account_move.py:65
#, python-format
msgid "No information about the journal or the type of invoice is passed"
msgstr ""
#. module: account_facturx
#: model:ir.model,name:account_facturx.model_ir_actions_report
msgid "Report Action"
msgstr "Rapport actie"
#. module: account_facturx
#: code:addons/account_facturx/models/account_move.py:314
#, python-format
msgid "The xml file is badly formatted : {}"
msgstr "Het XML bestand is slecht geformatteerd : {}"
#. module: account_facturx
#: model_terms:ir.ui.view,arch_db:account_facturx.account_invoice_facturx_export
msgid "urn:cen.eu:en16931:2017"
msgstr "urn:cen.eu:en16931:2017"
-55
View File
@@ -1,55 +0,0 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * account_facturx
#
# Translators:
# Martin Trigaux, 2019
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server saas~12.4\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2019-08-12 11:32+0000\n"
"PO-Revision-Date: 2019-08-26 09:08+0000\n"
"Last-Translator: Martin Trigaux, 2019\n"
"Language-Team: Polish (https://www.transifex.com/odoo/teams/41243/pl/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Language: pl\n"
"Plural-Forms: nplurals=4; plural=(n==1 ? 0 : (n%10>=2 && n%10<=4) && (n%100<12 || n%100>14) ? 1 : n!=1 && (n%10>=0 && n%10<=1) || (n%10>=5 && n%10<=9) || (n%100>=12 && n%100<=14) ? 2 : 3);\n"
#. module: account_facturx
#: model:ir.model,name:account_facturx.model_account_move
msgid "Journal Entries"
msgstr "Zapisy księgowe"
#. module: account_facturx
#: code:addons/account_facturx/models/account_move.py:328
#, python-format
msgid ""
"No decoder was found for the xml file: {}. The file is badly formatted, not "
"supported or the decoder is not installed"
msgstr ""
#. module: account_facturx
#: code:addons/account_facturx/models/account_move.py:65
#, python-format
msgid "No information about the journal or the type of invoice is passed"
msgstr ""
#. module: account_facturx
#: model:ir.model,name:account_facturx.model_ir_actions_report
msgid "Report Action"
msgstr ""
#. module: account_facturx
#: code:addons/account_facturx/models/account_move.py:314
#, python-format
msgid "The xml file is badly formatted : {}"
msgstr ""
#. module: account_facturx
#: model_terms:ir.ui.view,arch_db:account_facturx.account_invoice_facturx_export
msgid "urn:cen.eu:en16931:2017"
msgstr ""
-51
View File
@@ -1,51 +0,0 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * account_facturx
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server saas~12.4\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2019-08-12 11:32+0000\n"
"PO-Revision-Date: 2019-08-26 09:08+0000\n"
"Language-Team: Portuguese (https://www.transifex.com/odoo/teams/41243/pt/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Language: pt\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
#. module: account_facturx
#: model:ir.model,name:account_facturx.model_account_move
msgid "Journal Entries"
msgstr ""
#. module: account_facturx
#: code:addons/account_facturx/models/account_move.py:328
#, python-format
msgid ""
"No decoder was found for the xml file: {}. The file is badly formatted, not "
"supported or the decoder is not installed"
msgstr ""
#. module: account_facturx
#: code:addons/account_facturx/models/account_move.py:65
#, python-format
msgid "No information about the journal or the type of invoice is passed"
msgstr ""
#. module: account_facturx
#: model:ir.model,name:account_facturx.model_ir_actions_report
msgid "Report Action"
msgstr ""
#. module: account_facturx
#: code:addons/account_facturx/models/account_move.py:314
#, python-format
msgid "The xml file is badly formatted : {}"
msgstr ""
#. module: account_facturx
#: model_terms:ir.ui.view,arch_db:account_facturx.account_invoice_facturx_export
msgid "urn:cen.eu:en16931:2017"
msgstr ""
-55
View File
@@ -1,55 +0,0 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * account_facturx
#
# Translators:
# Martin Trigaux, 2019
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server saas~12.4\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2019-08-12 11:32+0000\n"
"PO-Revision-Date: 2019-08-26 09:08+0000\n"
"Last-Translator: Martin Trigaux, 2019\n"
"Language-Team: Portuguese (Brazil) (https://www.transifex.com/odoo/teams/41243/pt_BR/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Language: pt_BR\n"
"Plural-Forms: nplurals=2; plural=(n > 1);\n"
#. module: account_facturx
#: model:ir.model,name:account_facturx.model_account_move
msgid "Journal Entries"
msgstr "Lançamentos de Diário"
#. module: account_facturx
#: code:addons/account_facturx/models/account_move.py:328
#, python-format
msgid ""
"No decoder was found for the xml file: {}. The file is badly formatted, not "
"supported or the decoder is not installed"
msgstr ""
#. module: account_facturx
#: code:addons/account_facturx/models/account_move.py:65
#, python-format
msgid "No information about the journal or the type of invoice is passed"
msgstr ""
#. module: account_facturx
#: model:ir.model,name:account_facturx.model_ir_actions_report
msgid "Report Action"
msgstr ""
#. module: account_facturx
#: code:addons/account_facturx/models/account_move.py:314
#, python-format
msgid "The xml file is badly formatted : {}"
msgstr ""
#. module: account_facturx
#: model_terms:ir.ui.view,arch_db:account_facturx.account_invoice_facturx_export
msgid "urn:cen.eu:en16931:2017"
msgstr ""
-51
View File
@@ -1,51 +0,0 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * account_facturx
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server saas~12.4\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2019-08-12 11:32+0000\n"
"PO-Revision-Date: 2019-08-26 09:08+0000\n"
"Language-Team: Romanian (https://www.transifex.com/odoo/teams/41243/ro/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Language: ro\n"
"Plural-Forms: nplurals=3; plural=(n==1?0:(((n%100>19)||((n%100==0)&&(n!=0)))?2:1));\n"
#. module: account_facturx
#: model:ir.model,name:account_facturx.model_account_move
msgid "Journal Entries"
msgstr ""
#. module: account_facturx
#: code:addons/account_facturx/models/account_move.py:328
#, python-format
msgid ""
"No decoder was found for the xml file: {}. The file is badly formatted, not "
"supported or the decoder is not installed"
msgstr ""
#. module: account_facturx
#: code:addons/account_facturx/models/account_move.py:65
#, python-format
msgid "No information about the journal or the type of invoice is passed"
msgstr ""
#. module: account_facturx
#: model:ir.model,name:account_facturx.model_ir_actions_report
msgid "Report Action"
msgstr ""
#. module: account_facturx
#: code:addons/account_facturx/models/account_move.py:314
#, python-format
msgid "The xml file is badly formatted : {}"
msgstr ""
#. module: account_facturx
#: model_terms:ir.ui.view,arch_db:account_facturx.account_invoice_facturx_export
msgid "urn:cen.eu:en16931:2017"
msgstr ""
-55
View File
@@ -1,55 +0,0 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * account_facturx
#
# Translators:
# Martin Trigaux, 2019
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server saas~12.4\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2019-08-12 11:32+0000\n"
"PO-Revision-Date: 2019-08-26 09:08+0000\n"
"Last-Translator: Martin Trigaux, 2019\n"
"Language-Team: Russian (https://www.transifex.com/odoo/teams/41243/ru/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Language: ru\n"
"Plural-Forms: nplurals=4; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<12 || n%100>14) ? 1 : n%10==0 || (n%10>=5 && n%10<=9) || (n%100>=11 && n%100<=14)? 2 : 3);\n"
#. module: account_facturx
#: model:ir.model,name:account_facturx.model_account_move
msgid "Journal Entries"
msgstr "Записи журнала"
#. module: account_facturx
#: code:addons/account_facturx/models/account_move.py:328
#, python-format
msgid ""
"No decoder was found for the xml file: {}. The file is badly formatted, not "
"supported or the decoder is not installed"
msgstr ""
#. module: account_facturx
#: code:addons/account_facturx/models/account_move.py:65
#, python-format
msgid "No information about the journal or the type of invoice is passed"
msgstr ""
#. module: account_facturx
#: model:ir.model,name:account_facturx.model_ir_actions_report
msgid "Report Action"
msgstr ""
#. module: account_facturx
#: code:addons/account_facturx/models/account_move.py:314
#, python-format
msgid "The xml file is badly formatted : {}"
msgstr ""
#. module: account_facturx
#: model_terms:ir.ui.view,arch_db:account_facturx.account_invoice_facturx_export
msgid "urn:cen.eu:en16931:2017"
msgstr ""
-55
View File
@@ -1,55 +0,0 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * account_facturx
#
# Translators:
# Murat Kaplan <muratk@projetgrup.com>, 2019
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server saas~12.4\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2019-08-12 11:32+0000\n"
"PO-Revision-Date: 2019-08-26 09:08+0000\n"
"Last-Translator: Murat Kaplan <muratk@projetgrup.com>, 2019\n"
"Language-Team: Turkish (https://www.transifex.com/odoo/teams/41243/tr/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Language: tr\n"
"Plural-Forms: nplurals=2; plural=(n > 1);\n"
#. module: account_facturx
#: model:ir.model,name:account_facturx.model_account_move
msgid "Journal Entries"
msgstr "Yevmiye Kayıtları"
#. module: account_facturx
#: code:addons/account_facturx/models/account_move.py:328
#, python-format
msgid ""
"No decoder was found for the xml file: {}. The file is badly formatted, not "
"supported or the decoder is not installed"
msgstr ""
#. module: account_facturx
#: code:addons/account_facturx/models/account_move.py:65
#, python-format
msgid "No information about the journal or the type of invoice is passed"
msgstr ""
#. module: account_facturx
#: model:ir.model,name:account_facturx.model_ir_actions_report
msgid "Report Action"
msgstr ""
#. module: account_facturx
#: code:addons/account_facturx/models/account_move.py:314
#, python-format
msgid "The xml file is badly formatted : {}"
msgstr ""
#. module: account_facturx
#: model_terms:ir.ui.view,arch_db:account_facturx.account_invoice_facturx_export
msgid "urn:cen.eu:en16931:2017"
msgstr ""
-58
View File
@@ -1,58 +0,0 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * account_facturx
#
# Translators:
# Martin Trigaux, 2019
# Alina Lisnenko <alinasemeniuk1@gmail.com>, 2019
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server saas~12.4\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2019-08-12 11:32+0000\n"
"PO-Revision-Date: 2019-08-26 09:08+0000\n"
"Last-Translator: Alina Lisnenko <alinasemeniuk1@gmail.com>, 2019\n"
"Language-Team: Ukrainian (https://www.transifex.com/odoo/teams/41243/uk/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Language: uk\n"
"Plural-Forms: nplurals=4; plural=(n % 1 == 0 && n % 10 == 1 && n % 100 != 11 ? 0 : n % 1 == 0 && n % 10 >= 2 && n % 10 <= 4 && (n % 100 < 12 || n % 100 > 14) ? 1 : n % 1 == 0 && (n % 10 ==0 || (n % 10 >=5 && n % 10 <=9) || (n % 100 >=11 && n % 100 <=14 )) ? 2: 3);\n"
#. module: account_facturx
#: model:ir.model,name:account_facturx.model_account_move
msgid "Journal Entries"
msgstr "Записи в журналі"
#. module: account_facturx
#: code:addons/account_facturx/models/account_move.py:328
#, python-format
msgid ""
"No decoder was found for the xml file: {}. The file is badly formatted, not "
"supported or the decoder is not installed"
msgstr ""
"Не знайдено декодер для xml фалу: {}. Файл погано відформатований, не "
"підтримується або декодер не встановлено"
#. module: account_facturx
#: code:addons/account_facturx/models/account_move.py:65
#, python-format
msgid "No information about the journal or the type of invoice is passed"
msgstr "Пропущено інформацію про журнал або тип рахунку"
#. module: account_facturx
#: model:ir.model,name:account_facturx.model_ir_actions_report
msgid "Report Action"
msgstr "Дія звіту"
#. module: account_facturx
#: code:addons/account_facturx/models/account_move.py:314
#, python-format
msgid "The xml file is badly formatted : {}"
msgstr "Файл xml погано відформатовано : {}"
#. module: account_facturx
#: model_terms:ir.ui.view,arch_db:account_facturx.account_invoice_facturx_export
msgid "urn:cen.eu:en16931:2017"
msgstr "urn:cen.eu:en16931:2017"
-56
View File
@@ -1,56 +0,0 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * account_facturx
#
# Translators:
# Nancy Momoland <thanhnguyen.icsc@gmail.com>, 2019
# Chinh Chinh <trinhttp@trobz.com>, 2019
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server saas~12.4\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2019-08-12 11:32+0000\n"
"PO-Revision-Date: 2019-08-26 09:08+0000\n"
"Last-Translator: Chinh Chinh <trinhttp@trobz.com>, 2019\n"
"Language-Team: Vietnamese (https://www.transifex.com/odoo/teams/41243/vi/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Language: vi\n"
"Plural-Forms: nplurals=1; plural=0;\n"
#. module: account_facturx
#: model:ir.model,name:account_facturx.model_account_move
msgid "Journal Entries"
msgstr "Bút toán phát sinh"
#. module: account_facturx
#: code:addons/account_facturx/models/account_move.py:328
#, python-format
msgid ""
"No decoder was found for the xml file: {}. The file is badly formatted, not "
"supported or the decoder is not installed"
msgstr ""
#. module: account_facturx
#: code:addons/account_facturx/models/account_move.py:65
#, python-format
msgid "No information about the journal or the type of invoice is passed"
msgstr ""
#. module: account_facturx
#: model:ir.model,name:account_facturx.model_ir_actions_report
msgid "Report Action"
msgstr "Báo cáo hành động"
#. module: account_facturx
#: code:addons/account_facturx/models/account_move.py:314
#, python-format
msgid "The xml file is badly formatted : {}"
msgstr ""
#. module: account_facturx
#: model_terms:ir.ui.view,arch_db:account_facturx.account_invoice_facturx_export
msgid "urn:cen.eu:en16931:2017"
msgstr ""
-56
View File
@@ -1,56 +0,0 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * account_facturx
#
# Translators:
# Jeanphy <hzh0292@qq.com>, 2019
# niulin lnc. <admin@niulin.net>, 2019
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server saas~12.4\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2019-08-12 11:32+0000\n"
"PO-Revision-Date: 2019-08-26 09:08+0000\n"
"Last-Translator: niulin lnc. <admin@niulin.net>, 2019\n"
"Language-Team: Chinese (China) (https://www.transifex.com/odoo/teams/41243/zh_CN/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Language: zh_CN\n"
"Plural-Forms: nplurals=1; plural=0;\n"
#. module: account_facturx
#: model:ir.model,name:account_facturx.model_account_move
msgid "Journal Entries"
msgstr "日记账分录"
#. module: account_facturx
#: code:addons/account_facturx/models/account_move.py:328
#, python-format
msgid ""
"No decoder was found for the xml file: {}. The file is badly formatted, not "
"supported or the decoder is not installed"
msgstr ""
#. module: account_facturx
#: code:addons/account_facturx/models/account_move.py:65
#, python-format
msgid "No information about the journal or the type of invoice is passed"
msgstr ""
#. module: account_facturx
#: model:ir.model,name:account_facturx.model_ir_actions_report
msgid "Report Action"
msgstr "报告动作"
#. module: account_facturx
#: code:addons/account_facturx/models/account_move.py:314
#, python-format
msgid "The xml file is badly formatted : {}"
msgstr ""
#. module: account_facturx
#: model_terms:ir.ui.view,arch_db:account_facturx.account_invoice_facturx_export
msgid "urn:cen.eu:en16931:2017"
msgstr ""
-56
View File
@@ -1,56 +0,0 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * account_facturx
#
# Translators:
# Martin Trigaux, 2019
# 敬雲 林 <chingyun@yuanchih-consult.com>, 2019
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server saas~12.4\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2019-08-12 11:32+0000\n"
"PO-Revision-Date: 2019-08-26 09:08+0000\n"
"Last-Translator: 敬雲 林 <chingyun@yuanchih-consult.com>, 2019\n"
"Language-Team: Chinese (Taiwan) (https://www.transifex.com/odoo/teams/41243/zh_TW/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Language: zh_TW\n"
"Plural-Forms: nplurals=1; plural=0;\n"
#. module: account_facturx
#: model:ir.model,name:account_facturx.model_account_move
msgid "Journal Entries"
msgstr "日記帳分錄"
#. module: account_facturx
#: code:addons/account_facturx/models/account_move.py:328
#, python-format
msgid ""
"No decoder was found for the xml file: {}. The file is badly formatted, not "
"supported or the decoder is not installed"
msgstr ""
#. module: account_facturx
#: code:addons/account_facturx/models/account_move.py:65
#, python-format
msgid "No information about the journal or the type of invoice is passed"
msgstr ""
#. module: account_facturx
#: model:ir.model,name:account_facturx.model_ir_actions_report
msgid "Report Action"
msgstr "報告動作"
#. module: account_facturx
#: code:addons/account_facturx/models/account_move.py:314
#, python-format
msgid "The xml file is badly formatted : {}"
msgstr ""
#. module: account_facturx
#: model_terms:ir.ui.view,arch_db:account_facturx.account_invoice_facturx_export
msgid "urn:cen.eu:en16931:2017"
msgstr ""
@@ -1,4 +0,0 @@
# -*- encoding: utf-8 -*-
from . import account_move
from . import ir_actions_report
@@ -1,32 +0,0 @@
# -*- coding: utf-8 -*-
from odoo import models, fields, api, _
from PyPDF2 import PdfFileWriter, PdfFileReader
import io
class IrActionsReport(models.Model):
_inherit = 'ir.actions.report'
def _post_pdf(self, save_in_attachment, pdf_content=None, res_ids=None):
# OVERRIDE
if self.model == 'account.move' and res_ids and len(res_ids) == 1:
invoice = self.env['account.move'].browse(res_ids)
if invoice.is_sale_document() and invoice.state != 'draft':
xml_content = invoice._export_as_facturx_xml()
# Add attachment.
reader_buffer = io.BytesIO(pdf_content)
reader = PdfFileReader(reader_buffer)
writer = PdfFileWriter()
writer.cloneReaderDocumentRoot(reader)
writer.addAttachment('factur-x.xml', xml_content)
buffer = io.BytesIO()
writer.write(buffer)
pdf_content = buffer.getvalue()
reader_buffer.close()
buffer.close()
return super(IrActionsReport, self)._post_pdf(save_in_attachment, pdf_content=pdf_content, res_ids=res_ids)