first commit
This commit is contained in:
2
modules/document_incoming_invoice/__init__.py
Normal file
2
modules/document_incoming_invoice/__init__.py
Normal file
@@ -0,0 +1,2 @@
|
||||
# This file is part of Tryton. The COPYRIGHT file at the top level of
|
||||
# this repository contains the full copyright notices and license terms.
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
18
modules/document_incoming_invoice/account.py
Normal file
18
modules/document_incoming_invoice/account.py
Normal file
@@ -0,0 +1,18 @@
|
||||
# This file is part of Tryton. The COPYRIGHT file at the top level of
|
||||
# this repository contains the full copyright notices and license terms.
|
||||
|
||||
from trytond.model import fields
|
||||
from trytond.pool import PoolMeta
|
||||
|
||||
|
||||
class Invoice(metaclass=PoolMeta):
|
||||
__name__ = 'account.invoice'
|
||||
|
||||
documents_incoming = fields.One2Many(
|
||||
'document.incoming', 'result', "Incoming Documents", readonly=True)
|
||||
|
||||
@classmethod
|
||||
def copy(cls, invoices, default=None):
|
||||
default = default.copy() if default is not None else {}
|
||||
default.setdefault('documents_incoming')
|
||||
return super().copy(invoices, default=default)
|
||||
59
modules/document_incoming_invoice/document.py
Normal file
59
modules/document_incoming_invoice/document.py
Normal file
@@ -0,0 +1,59 @@
|
||||
# This file is part of Tryton. The COPYRIGHT file at the top level of
|
||||
# this repository contains the full copyright notices and license terms.
|
||||
|
||||
from trytond.i18n import gettext
|
||||
from trytond.model import fields
|
||||
from trytond.modules.document_incoming.exceptions import (
|
||||
DocumentIncomingProcessError)
|
||||
from trytond.pool import Pool, PoolMeta
|
||||
|
||||
|
||||
class IncomingConfiguration(metaclass=PoolMeta):
|
||||
__name__ = 'document.incoming.configuration'
|
||||
|
||||
default_supplier = fields.Many2One('party.party', "Default Supplier")
|
||||
|
||||
|
||||
class Incoming(metaclass=PoolMeta):
|
||||
__name__ = 'document.incoming'
|
||||
|
||||
@classmethod
|
||||
def __setup__(cls):
|
||||
super().__setup__()
|
||||
cls.type.selection.append(
|
||||
('supplier_invoice', "Supplier Invoice"))
|
||||
|
||||
@classmethod
|
||||
def _get_results(cls):
|
||||
return super()._get_results() | {'account.invoice'}
|
||||
|
||||
def _process_supplier_invoice(self):
|
||||
pool = Pool()
|
||||
Invoice = pool.get('account.invoice')
|
||||
Configuration = pool.get('document.incoming.configuration')
|
||||
config = Configuration(1)
|
||||
invoice = Invoice(
|
||||
type='in',
|
||||
company=self.company or self.supplier_invoice_company)
|
||||
if invoice.company:
|
||||
invoice.currency = invoice.company.currency
|
||||
else:
|
||||
raise DocumentIncomingProcessError(gettext(
|
||||
'document_incoming_invoice'
|
||||
'.msg_supplier_invoice_company',
|
||||
document=self.rec_name))
|
||||
invoice.on_change_type()
|
||||
invoice.on_change_company()
|
||||
# set party id after company for context
|
||||
party = self.supplier_invoice_party or config.default_supplier
|
||||
invoice.party = party.id if party else None
|
||||
invoice.on_change_party()
|
||||
return invoice
|
||||
|
||||
@property
|
||||
def supplier_invoice_company(self):
|
||||
pass
|
||||
|
||||
@property
|
||||
def supplier_invoice_party(self):
|
||||
pass
|
||||
12
modules/document_incoming_invoice/document.xml
Normal file
12
modules/document_incoming_invoice/document.xml
Normal file
@@ -0,0 +1,12 @@
|
||||
<?xml version="1.0"?>
|
||||
<!-- This file is part of Tryton. The COPYRIGHT file at the top level of
|
||||
this repository contains the full copyright notices and license terms. -->
|
||||
<tryton>
|
||||
<data>
|
||||
<record model="ir.ui.view" id="ddocument_incoming_configuration_view_form">
|
||||
<field name="model">document.incoming.configuration</field>
|
||||
<field name="inherit" ref="document_incoming.document_incoming_configuration_view_form"/>
|
||||
<field name="name">document_incoming_configuration_form</field>
|
||||
</record>
|
||||
</data>
|
||||
</tryton>
|
||||
24
modules/document_incoming_invoice/locale/bg.po
Normal file
24
modules/document_incoming_invoice/locale/bg.po
Normal file
@@ -0,0 +1,24 @@
|
||||
#
|
||||
msgid ""
|
||||
msgstr "Content-Type: text/plain; charset=utf-8\n"
|
||||
|
||||
msgctxt "field:account.invoice,documents_incoming:"
|
||||
msgid "Incoming Documents"
|
||||
msgstr ""
|
||||
|
||||
msgctxt "field:document.incoming.configuration,default_supplier:"
|
||||
msgid "Default Supplier"
|
||||
msgstr ""
|
||||
|
||||
#, python-format
|
||||
msgctxt "model:ir.message,text:msg_supplier_invoice_company"
|
||||
msgid "To process document \"%(document)s\" you must set a company on it."
|
||||
msgstr ""
|
||||
|
||||
msgctxt "selection:document.incoming,type:"
|
||||
msgid "Supplier Invoice"
|
||||
msgstr ""
|
||||
|
||||
msgctxt "view:document.incoming.configuration:"
|
||||
msgid "Supplier Invoice"
|
||||
msgstr ""
|
||||
25
modules/document_incoming_invoice/locale/ca.po
Normal file
25
modules/document_incoming_invoice/locale/ca.po
Normal file
@@ -0,0 +1,25 @@
|
||||
#
|
||||
#, fuzzy
|
||||
msgid ""
|
||||
msgstr "Content-Type: text/plain; charset=utf-8\n"
|
||||
|
||||
msgctxt "field:account.invoice,documents_incoming:"
|
||||
msgid "Incoming Documents"
|
||||
msgstr "Documents entrants"
|
||||
|
||||
msgctxt "field:document.incoming.configuration,default_supplier:"
|
||||
msgid "Default Supplier"
|
||||
msgstr "Proveïdor per defecte"
|
||||
|
||||
#, python-format
|
||||
msgctxt "model:ir.message,text:msg_supplier_invoice_company"
|
||||
msgid "To process document \"%(document)s\" you must set a company on it."
|
||||
msgstr "Per procesar el document \"%(document)s\" n'heu de definir l'empresa."
|
||||
|
||||
msgctxt "selection:document.incoming,type:"
|
||||
msgid "Supplier Invoice"
|
||||
msgstr "Factura proveïdor"
|
||||
|
||||
msgctxt "view:document.incoming.configuration:"
|
||||
msgid "Supplier Invoice"
|
||||
msgstr "Factura proveïdor"
|
||||
24
modules/document_incoming_invoice/locale/cs.po
Normal file
24
modules/document_incoming_invoice/locale/cs.po
Normal file
@@ -0,0 +1,24 @@
|
||||
#
|
||||
msgid ""
|
||||
msgstr "Content-Type: text/plain; charset=utf-8\n"
|
||||
|
||||
msgctxt "field:account.invoice,documents_incoming:"
|
||||
msgid "Incoming Documents"
|
||||
msgstr ""
|
||||
|
||||
msgctxt "field:document.incoming.configuration,default_supplier:"
|
||||
msgid "Default Supplier"
|
||||
msgstr ""
|
||||
|
||||
#, python-format
|
||||
msgctxt "model:ir.message,text:msg_supplier_invoice_company"
|
||||
msgid "To process document \"%(document)s\" you must set a company on it."
|
||||
msgstr ""
|
||||
|
||||
msgctxt "selection:document.incoming,type:"
|
||||
msgid "Supplier Invoice"
|
||||
msgstr ""
|
||||
|
||||
msgctxt "view:document.incoming.configuration:"
|
||||
msgid "Supplier Invoice"
|
||||
msgstr ""
|
||||
26
modules/document_incoming_invoice/locale/de.po
Normal file
26
modules/document_incoming_invoice/locale/de.po
Normal file
@@ -0,0 +1,26 @@
|
||||
#
|
||||
msgid ""
|
||||
msgstr "Content-Type: text/plain; charset=utf-8\n"
|
||||
|
||||
msgctxt "field:account.invoice,documents_incoming:"
|
||||
msgid "Incoming Documents"
|
||||
msgstr "Eingehende Dokumente"
|
||||
|
||||
msgctxt "field:document.incoming.configuration,default_supplier:"
|
||||
msgid "Default Supplier"
|
||||
msgstr "Voreinstellung Lieferant"
|
||||
|
||||
#, python-format
|
||||
msgctxt "model:ir.message,text:msg_supplier_invoice_company"
|
||||
msgid "To process document \"%(document)s\" you must set a company on it."
|
||||
msgstr ""
|
||||
"Um das Dokument \"%(document)s\" zu verarbeiten muss ein Unternehmen erfasst"
|
||||
" werden."
|
||||
|
||||
msgctxt "selection:document.incoming,type:"
|
||||
msgid "Supplier Invoice"
|
||||
msgstr "Lieferantenrechnung"
|
||||
|
||||
msgctxt "view:document.incoming.configuration:"
|
||||
msgid "Supplier Invoice"
|
||||
msgstr "Lieferantenrechnung"
|
||||
25
modules/document_incoming_invoice/locale/es.po
Normal file
25
modules/document_incoming_invoice/locale/es.po
Normal file
@@ -0,0 +1,25 @@
|
||||
#
|
||||
#, fuzzy
|
||||
msgid ""
|
||||
msgstr "Content-Type: text/plain; charset=utf-8\n"
|
||||
|
||||
msgctxt "field:account.invoice,documents_incoming:"
|
||||
msgid "Incoming Documents"
|
||||
msgstr "Documentos entrantes"
|
||||
|
||||
msgctxt "field:document.incoming.configuration,default_supplier:"
|
||||
msgid "Default Supplier"
|
||||
msgstr "Proveedor por defecto"
|
||||
|
||||
#, python-format
|
||||
msgctxt "model:ir.message,text:msg_supplier_invoice_company"
|
||||
msgid "To process document \"%(document)s\" you must set a company on it."
|
||||
msgstr "Para procesar el documento \"%(document)s\" debe definir su empresa."
|
||||
|
||||
msgctxt "selection:document.incoming,type:"
|
||||
msgid "Supplier Invoice"
|
||||
msgstr "Factura proveedor"
|
||||
|
||||
msgctxt "view:document.incoming.configuration:"
|
||||
msgid "Supplier Invoice"
|
||||
msgstr "Factura proveedor"
|
||||
24
modules/document_incoming_invoice/locale/es_419.po
Normal file
24
modules/document_incoming_invoice/locale/es_419.po
Normal file
@@ -0,0 +1,24 @@
|
||||
#
|
||||
msgid ""
|
||||
msgstr "Content-Type: text/plain; charset=utf-8\n"
|
||||
|
||||
msgctxt "field:account.invoice,documents_incoming:"
|
||||
msgid "Incoming Documents"
|
||||
msgstr ""
|
||||
|
||||
msgctxt "field:document.incoming.configuration,default_supplier:"
|
||||
msgid "Default Supplier"
|
||||
msgstr ""
|
||||
|
||||
#, python-format
|
||||
msgctxt "model:ir.message,text:msg_supplier_invoice_company"
|
||||
msgid "To process document \"%(document)s\" you must set a company on it."
|
||||
msgstr ""
|
||||
|
||||
msgctxt "selection:document.incoming,type:"
|
||||
msgid "Supplier Invoice"
|
||||
msgstr ""
|
||||
|
||||
msgctxt "view:document.incoming.configuration:"
|
||||
msgid "Supplier Invoice"
|
||||
msgstr ""
|
||||
24
modules/document_incoming_invoice/locale/et.po
Normal file
24
modules/document_incoming_invoice/locale/et.po
Normal file
@@ -0,0 +1,24 @@
|
||||
#
|
||||
msgid ""
|
||||
msgstr "Content-Type: text/plain; charset=utf-8\n"
|
||||
|
||||
msgctxt "field:account.invoice,documents_incoming:"
|
||||
msgid "Incoming Documents"
|
||||
msgstr ""
|
||||
|
||||
msgctxt "field:document.incoming.configuration,default_supplier:"
|
||||
msgid "Default Supplier"
|
||||
msgstr ""
|
||||
|
||||
#, python-format
|
||||
msgctxt "model:ir.message,text:msg_supplier_invoice_company"
|
||||
msgid "To process document \"%(document)s\" you must set a company on it."
|
||||
msgstr ""
|
||||
|
||||
msgctxt "selection:document.incoming,type:"
|
||||
msgid "Supplier Invoice"
|
||||
msgstr ""
|
||||
|
||||
msgctxt "view:document.incoming.configuration:"
|
||||
msgid "Supplier Invoice"
|
||||
msgstr ""
|
||||
24
modules/document_incoming_invoice/locale/fa.po
Normal file
24
modules/document_incoming_invoice/locale/fa.po
Normal file
@@ -0,0 +1,24 @@
|
||||
#
|
||||
msgid ""
|
||||
msgstr "Content-Type: text/plain; charset=utf-8\n"
|
||||
|
||||
msgctxt "field:account.invoice,documents_incoming:"
|
||||
msgid "Incoming Documents"
|
||||
msgstr ""
|
||||
|
||||
msgctxt "field:document.incoming.configuration,default_supplier:"
|
||||
msgid "Default Supplier"
|
||||
msgstr ""
|
||||
|
||||
#, python-format
|
||||
msgctxt "model:ir.message,text:msg_supplier_invoice_company"
|
||||
msgid "To process document \"%(document)s\" you must set a company on it."
|
||||
msgstr ""
|
||||
|
||||
msgctxt "selection:document.incoming,type:"
|
||||
msgid "Supplier Invoice"
|
||||
msgstr ""
|
||||
|
||||
msgctxt "view:document.incoming.configuration:"
|
||||
msgid "Supplier Invoice"
|
||||
msgstr ""
|
||||
24
modules/document_incoming_invoice/locale/fi.po
Normal file
24
modules/document_incoming_invoice/locale/fi.po
Normal file
@@ -0,0 +1,24 @@
|
||||
#
|
||||
msgid ""
|
||||
msgstr "Content-Type: text/plain; charset=utf-8\n"
|
||||
|
||||
msgctxt "field:account.invoice,documents_incoming:"
|
||||
msgid "Incoming Documents"
|
||||
msgstr ""
|
||||
|
||||
msgctxt "field:document.incoming.configuration,default_supplier:"
|
||||
msgid "Default Supplier"
|
||||
msgstr ""
|
||||
|
||||
#, python-format
|
||||
msgctxt "model:ir.message,text:msg_supplier_invoice_company"
|
||||
msgid "To process document \"%(document)s\" you must set a company on it."
|
||||
msgstr ""
|
||||
|
||||
msgctxt "selection:document.incoming,type:"
|
||||
msgid "Supplier Invoice"
|
||||
msgstr ""
|
||||
|
||||
msgctxt "view:document.incoming.configuration:"
|
||||
msgid "Supplier Invoice"
|
||||
msgstr ""
|
||||
26
modules/document_incoming_invoice/locale/fr.po
Normal file
26
modules/document_incoming_invoice/locale/fr.po
Normal file
@@ -0,0 +1,26 @@
|
||||
#
|
||||
#, fuzzy
|
||||
msgid ""
|
||||
msgstr "Content-Type: text/plain; charset=utf-8\n"
|
||||
|
||||
msgctxt "field:account.invoice,documents_incoming:"
|
||||
msgid "Incoming Documents"
|
||||
msgstr "Documents entrants"
|
||||
|
||||
msgctxt "field:document.incoming.configuration,default_supplier:"
|
||||
msgid "Default Supplier"
|
||||
msgstr "Fournisseur par défaut"
|
||||
|
||||
#, python-format
|
||||
msgctxt "model:ir.message,text:msg_supplier_invoice_company"
|
||||
msgid "To process document \"%(document)s\" you must set a company on it."
|
||||
msgstr ""
|
||||
"Pour traiter le document « %(document)s », vous devez y définir une société."
|
||||
|
||||
msgctxt "selection:document.incoming,type:"
|
||||
msgid "Supplier Invoice"
|
||||
msgstr "Facture fournisseur"
|
||||
|
||||
msgctxt "view:document.incoming.configuration:"
|
||||
msgid "Supplier Invoice"
|
||||
msgstr "Facture fournisseur"
|
||||
24
modules/document_incoming_invoice/locale/hu.po
Normal file
24
modules/document_incoming_invoice/locale/hu.po
Normal file
@@ -0,0 +1,24 @@
|
||||
#
|
||||
msgid ""
|
||||
msgstr "Content-Type: text/plain; charset=utf-8\n"
|
||||
|
||||
msgctxt "field:account.invoice,documents_incoming:"
|
||||
msgid "Incoming Documents"
|
||||
msgstr ""
|
||||
|
||||
msgctxt "field:document.incoming.configuration,default_supplier:"
|
||||
msgid "Default Supplier"
|
||||
msgstr ""
|
||||
|
||||
#, python-format
|
||||
msgctxt "model:ir.message,text:msg_supplier_invoice_company"
|
||||
msgid "To process document \"%(document)s\" you must set a company on it."
|
||||
msgstr ""
|
||||
|
||||
msgctxt "selection:document.incoming,type:"
|
||||
msgid "Supplier Invoice"
|
||||
msgstr ""
|
||||
|
||||
msgctxt "view:document.incoming.configuration:"
|
||||
msgid "Supplier Invoice"
|
||||
msgstr ""
|
||||
24
modules/document_incoming_invoice/locale/id.po
Normal file
24
modules/document_incoming_invoice/locale/id.po
Normal file
@@ -0,0 +1,24 @@
|
||||
#
|
||||
msgid ""
|
||||
msgstr "Content-Type: text/plain; charset=utf-8\n"
|
||||
|
||||
msgctxt "field:account.invoice,documents_incoming:"
|
||||
msgid "Incoming Documents"
|
||||
msgstr ""
|
||||
|
||||
msgctxt "field:document.incoming.configuration,default_supplier:"
|
||||
msgid "Default Supplier"
|
||||
msgstr ""
|
||||
|
||||
#, python-format
|
||||
msgctxt "model:ir.message,text:msg_supplier_invoice_company"
|
||||
msgid "To process document \"%(document)s\" you must set a company on it."
|
||||
msgstr ""
|
||||
|
||||
msgctxt "selection:document.incoming,type:"
|
||||
msgid "Supplier Invoice"
|
||||
msgstr ""
|
||||
|
||||
msgctxt "view:document.incoming.configuration:"
|
||||
msgid "Supplier Invoice"
|
||||
msgstr ""
|
||||
27
modules/document_incoming_invoice/locale/it.po
Normal file
27
modules/document_incoming_invoice/locale/it.po
Normal file
@@ -0,0 +1,27 @@
|
||||
#
|
||||
#, fuzzy
|
||||
msgid ""
|
||||
msgstr "Content-Type: text/plain; charset=utf-8\n"
|
||||
|
||||
msgctxt "field:account.invoice,documents_incoming:"
|
||||
msgid "Incoming Documents"
|
||||
msgstr "Documenti in Arrivo"
|
||||
|
||||
msgctxt "field:document.incoming.configuration,default_supplier:"
|
||||
msgid "Default Supplier"
|
||||
msgstr ""
|
||||
|
||||
#, python-format
|
||||
msgctxt "model:ir.message,text:msg_supplier_invoice_company"
|
||||
msgid "To process document \"%(document)s\" you must set a company on it."
|
||||
msgstr ""
|
||||
"Per elaborare il documento \"%(document)s\" è necessario impostarvi una "
|
||||
"azienda."
|
||||
|
||||
msgctxt "selection:document.incoming,type:"
|
||||
msgid "Supplier Invoice"
|
||||
msgstr "Fattura Fornitore"
|
||||
|
||||
msgctxt "view:document.incoming.configuration:"
|
||||
msgid "Supplier Invoice"
|
||||
msgstr "Fattura Fornitore"
|
||||
24
modules/document_incoming_invoice/locale/lo.po
Normal file
24
modules/document_incoming_invoice/locale/lo.po
Normal file
@@ -0,0 +1,24 @@
|
||||
#
|
||||
msgid ""
|
||||
msgstr "Content-Type: text/plain; charset=utf-8\n"
|
||||
|
||||
msgctxt "field:account.invoice,documents_incoming:"
|
||||
msgid "Incoming Documents"
|
||||
msgstr ""
|
||||
|
||||
msgctxt "field:document.incoming.configuration,default_supplier:"
|
||||
msgid "Default Supplier"
|
||||
msgstr ""
|
||||
|
||||
#, python-format
|
||||
msgctxt "model:ir.message,text:msg_supplier_invoice_company"
|
||||
msgid "To process document \"%(document)s\" you must set a company on it."
|
||||
msgstr ""
|
||||
|
||||
msgctxt "selection:document.incoming,type:"
|
||||
msgid "Supplier Invoice"
|
||||
msgstr ""
|
||||
|
||||
msgctxt "view:document.incoming.configuration:"
|
||||
msgid "Supplier Invoice"
|
||||
msgstr ""
|
||||
24
modules/document_incoming_invoice/locale/lt.po
Normal file
24
modules/document_incoming_invoice/locale/lt.po
Normal file
@@ -0,0 +1,24 @@
|
||||
#
|
||||
msgid ""
|
||||
msgstr "Content-Type: text/plain; charset=utf-8\n"
|
||||
|
||||
msgctxt "field:account.invoice,documents_incoming:"
|
||||
msgid "Incoming Documents"
|
||||
msgstr ""
|
||||
|
||||
msgctxt "field:document.incoming.configuration,default_supplier:"
|
||||
msgid "Default Supplier"
|
||||
msgstr ""
|
||||
|
||||
#, python-format
|
||||
msgctxt "model:ir.message,text:msg_supplier_invoice_company"
|
||||
msgid "To process document \"%(document)s\" you must set a company on it."
|
||||
msgstr ""
|
||||
|
||||
msgctxt "selection:document.incoming,type:"
|
||||
msgid "Supplier Invoice"
|
||||
msgstr ""
|
||||
|
||||
msgctxt "view:document.incoming.configuration:"
|
||||
msgid "Supplier Invoice"
|
||||
msgstr ""
|
||||
27
modules/document_incoming_invoice/locale/nl.po
Normal file
27
modules/document_incoming_invoice/locale/nl.po
Normal file
@@ -0,0 +1,27 @@
|
||||
#
|
||||
#, fuzzy
|
||||
msgid ""
|
||||
msgstr "Content-Type: text/plain; charset=utf-8\n"
|
||||
|
||||
msgctxt "field:account.invoice,documents_incoming:"
|
||||
msgid "Incoming Documents"
|
||||
msgstr "Inkomende documenten"
|
||||
|
||||
msgctxt "field:document.incoming.configuration,default_supplier:"
|
||||
msgid "Default Supplier"
|
||||
msgstr "Standaard leverancier"
|
||||
|
||||
#, python-format
|
||||
msgctxt "model:ir.message,text:msg_supplier_invoice_company"
|
||||
msgid "To process document \"%(document)s\" you must set a company on it."
|
||||
msgstr ""
|
||||
"Om document \"%(document)s\" te verwerken, moet er een bedrijf ingesteld "
|
||||
"worden."
|
||||
|
||||
msgctxt "selection:document.incoming,type:"
|
||||
msgid "Supplier Invoice"
|
||||
msgstr "Leverancier factuur"
|
||||
|
||||
msgctxt "view:document.incoming.configuration:"
|
||||
msgid "Supplier Invoice"
|
||||
msgstr "Leverancier factuur"
|
||||
24
modules/document_incoming_invoice/locale/pl.po
Normal file
24
modules/document_incoming_invoice/locale/pl.po
Normal file
@@ -0,0 +1,24 @@
|
||||
#
|
||||
msgid ""
|
||||
msgstr "Content-Type: text/plain; charset=utf-8\n"
|
||||
|
||||
msgctxt "field:account.invoice,documents_incoming:"
|
||||
msgid "Incoming Documents"
|
||||
msgstr ""
|
||||
|
||||
msgctxt "field:document.incoming.configuration,default_supplier:"
|
||||
msgid "Default Supplier"
|
||||
msgstr ""
|
||||
|
||||
#, python-format
|
||||
msgctxt "model:ir.message,text:msg_supplier_invoice_company"
|
||||
msgid "To process document \"%(document)s\" you must set a company on it."
|
||||
msgstr ""
|
||||
|
||||
msgctxt "selection:document.incoming,type:"
|
||||
msgid "Supplier Invoice"
|
||||
msgstr ""
|
||||
|
||||
msgctxt "view:document.incoming.configuration:"
|
||||
msgid "Supplier Invoice"
|
||||
msgstr ""
|
||||
24
modules/document_incoming_invoice/locale/pt.po
Normal file
24
modules/document_incoming_invoice/locale/pt.po
Normal file
@@ -0,0 +1,24 @@
|
||||
#
|
||||
msgid ""
|
||||
msgstr "Content-Type: text/plain; charset=utf-8\n"
|
||||
|
||||
msgctxt "field:account.invoice,documents_incoming:"
|
||||
msgid "Incoming Documents"
|
||||
msgstr ""
|
||||
|
||||
msgctxt "field:document.incoming.configuration,default_supplier:"
|
||||
msgid "Default Supplier"
|
||||
msgstr ""
|
||||
|
||||
#, python-format
|
||||
msgctxt "model:ir.message,text:msg_supplier_invoice_company"
|
||||
msgid "To process document \"%(document)s\" you must set a company on it."
|
||||
msgstr ""
|
||||
|
||||
msgctxt "selection:document.incoming,type:"
|
||||
msgid "Supplier Invoice"
|
||||
msgstr ""
|
||||
|
||||
msgctxt "view:document.incoming.configuration:"
|
||||
msgid "Supplier Invoice"
|
||||
msgstr ""
|
||||
25
modules/document_incoming_invoice/locale/ro.po
Normal file
25
modules/document_incoming_invoice/locale/ro.po
Normal file
@@ -0,0 +1,25 @@
|
||||
#
|
||||
#, fuzzy
|
||||
msgid ""
|
||||
msgstr "Content-Type: text/plain; charset=utf-8\n"
|
||||
|
||||
msgctxt "field:account.invoice,documents_incoming:"
|
||||
msgid "Incoming Documents"
|
||||
msgstr "Întrări (Documente)"
|
||||
|
||||
msgctxt "field:document.incoming.configuration,default_supplier:"
|
||||
msgid "Default Supplier"
|
||||
msgstr ""
|
||||
|
||||
#, python-format
|
||||
msgctxt "model:ir.message,text:msg_supplier_invoice_company"
|
||||
msgid "To process document \"%(document)s\" you must set a company on it."
|
||||
msgstr ""
|
||||
|
||||
msgctxt "selection:document.incoming,type:"
|
||||
msgid "Supplier Invoice"
|
||||
msgstr ""
|
||||
|
||||
msgctxt "view:document.incoming.configuration:"
|
||||
msgid "Supplier Invoice"
|
||||
msgstr ""
|
||||
24
modules/document_incoming_invoice/locale/ru.po
Normal file
24
modules/document_incoming_invoice/locale/ru.po
Normal file
@@ -0,0 +1,24 @@
|
||||
#
|
||||
msgid ""
|
||||
msgstr "Content-Type: text/plain; charset=utf-8\n"
|
||||
|
||||
msgctxt "field:account.invoice,documents_incoming:"
|
||||
msgid "Incoming Documents"
|
||||
msgstr ""
|
||||
|
||||
msgctxt "field:document.incoming.configuration,default_supplier:"
|
||||
msgid "Default Supplier"
|
||||
msgstr ""
|
||||
|
||||
#, python-format
|
||||
msgctxt "model:ir.message,text:msg_supplier_invoice_company"
|
||||
msgid "To process document \"%(document)s\" you must set a company on it."
|
||||
msgstr ""
|
||||
|
||||
msgctxt "selection:document.incoming,type:"
|
||||
msgid "Supplier Invoice"
|
||||
msgstr ""
|
||||
|
||||
msgctxt "view:document.incoming.configuration:"
|
||||
msgid "Supplier Invoice"
|
||||
msgstr ""
|
||||
25
modules/document_incoming_invoice/locale/sl.po
Normal file
25
modules/document_incoming_invoice/locale/sl.po
Normal file
@@ -0,0 +1,25 @@
|
||||
#
|
||||
#, fuzzy
|
||||
msgid ""
|
||||
msgstr "Content-Type: text/plain; charset=utf-8\n"
|
||||
|
||||
msgctxt "field:account.invoice,documents_incoming:"
|
||||
msgid "Incoming Documents"
|
||||
msgstr "Vhodni dokumenti"
|
||||
|
||||
msgctxt "field:document.incoming.configuration,default_supplier:"
|
||||
msgid "Default Supplier"
|
||||
msgstr "Privzeti dobavitelj"
|
||||
|
||||
#, fuzzy, python-format
|
||||
msgctxt "model:ir.message,text:msg_supplier_invoice_company"
|
||||
msgid "To process document \"%(document)s\" you must set a company on it."
|
||||
msgstr "Za obdelavo dokumenta \"%(dokument)s\" je potrebno nastaviti družbo."
|
||||
|
||||
msgctxt "selection:document.incoming,type:"
|
||||
msgid "Supplier Invoice"
|
||||
msgstr "Račun dobavitelja"
|
||||
|
||||
msgctxt "view:document.incoming.configuration:"
|
||||
msgid "Supplier Invoice"
|
||||
msgstr "Račun dobavitelja"
|
||||
24
modules/document_incoming_invoice/locale/tr.po
Normal file
24
modules/document_incoming_invoice/locale/tr.po
Normal file
@@ -0,0 +1,24 @@
|
||||
#
|
||||
msgid ""
|
||||
msgstr "Content-Type: text/plain; charset=utf-8\n"
|
||||
|
||||
msgctxt "field:account.invoice,documents_incoming:"
|
||||
msgid "Incoming Documents"
|
||||
msgstr ""
|
||||
|
||||
msgctxt "field:document.incoming.configuration,default_supplier:"
|
||||
msgid "Default Supplier"
|
||||
msgstr ""
|
||||
|
||||
#, python-format
|
||||
msgctxt "model:ir.message,text:msg_supplier_invoice_company"
|
||||
msgid "To process document \"%(document)s\" you must set a company on it."
|
||||
msgstr ""
|
||||
|
||||
msgctxt "selection:document.incoming,type:"
|
||||
msgid "Supplier Invoice"
|
||||
msgstr ""
|
||||
|
||||
msgctxt "view:document.incoming.configuration:"
|
||||
msgid "Supplier Invoice"
|
||||
msgstr ""
|
||||
24
modules/document_incoming_invoice/locale/uk.po
Normal file
24
modules/document_incoming_invoice/locale/uk.po
Normal file
@@ -0,0 +1,24 @@
|
||||
#
|
||||
msgid ""
|
||||
msgstr "Content-Type: text/plain; charset=utf-8\n"
|
||||
|
||||
msgctxt "field:account.invoice,documents_incoming:"
|
||||
msgid "Incoming Documents"
|
||||
msgstr ""
|
||||
|
||||
msgctxt "field:document.incoming.configuration,default_supplier:"
|
||||
msgid "Default Supplier"
|
||||
msgstr ""
|
||||
|
||||
#, python-format
|
||||
msgctxt "model:ir.message,text:msg_supplier_invoice_company"
|
||||
msgid "To process document \"%(document)s\" you must set a company on it."
|
||||
msgstr ""
|
||||
|
||||
msgctxt "selection:document.incoming,type:"
|
||||
msgid "Supplier Invoice"
|
||||
msgstr ""
|
||||
|
||||
msgctxt "view:document.incoming.configuration:"
|
||||
msgid "Supplier Invoice"
|
||||
msgstr ""
|
||||
24
modules/document_incoming_invoice/locale/zh_CN.po
Normal file
24
modules/document_incoming_invoice/locale/zh_CN.po
Normal file
@@ -0,0 +1,24 @@
|
||||
#
|
||||
msgid ""
|
||||
msgstr "Content-Type: text/plain; charset=utf-8\n"
|
||||
|
||||
msgctxt "field:account.invoice,documents_incoming:"
|
||||
msgid "Incoming Documents"
|
||||
msgstr ""
|
||||
|
||||
msgctxt "field:document.incoming.configuration,default_supplier:"
|
||||
msgid "Default Supplier"
|
||||
msgstr ""
|
||||
|
||||
#, python-format
|
||||
msgctxt "model:ir.message,text:msg_supplier_invoice_company"
|
||||
msgid "To process document \"%(document)s\" you must set a company on it."
|
||||
msgstr ""
|
||||
|
||||
msgctxt "selection:document.incoming,type:"
|
||||
msgid "Supplier Invoice"
|
||||
msgstr ""
|
||||
|
||||
msgctxt "view:document.incoming.configuration:"
|
||||
msgid "Supplier Invoice"
|
||||
msgstr ""
|
||||
10
modules/document_incoming_invoice/message.xml
Normal file
10
modules/document_incoming_invoice/message.xml
Normal file
@@ -0,0 +1,10 @@
|
||||
<?xml version="1.0"?>
|
||||
<!-- This file is part of Tryton. The COPYRIGHT file at the top level of
|
||||
this repository contains the full copyright notices and license terms. -->
|
||||
<tryton>
|
||||
<data grouped="1">
|
||||
<record model="ir.message" id="msg_supplier_invoice_company">
|
||||
<field name="text">To process document "%(document)s" you must set a company on it.</field>
|
||||
</record>
|
||||
</data>
|
||||
</tryton>
|
||||
2
modules/document_incoming_invoice/tests/__init__.py
Normal file
2
modules/document_incoming_invoice/tests/__init__.py
Normal file
@@ -0,0 +1,2 @@
|
||||
# This file is part of Tryton. The COPYRIGHT file at the top level of
|
||||
# this repository contains the full copyright notices and license terms.
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -0,0 +1,54 @@
|
||||
==================================
|
||||
Document Incoming Invoice Scenario
|
||||
==================================
|
||||
|
||||
Imports::
|
||||
|
||||
>>> from proteus import Model
|
||||
>>> from trytond.modules.account.tests.tools import create_chart, create_fiscalyear
|
||||
>>> from trytond.modules.account_invoice.tests.tools import (
|
||||
... set_fiscalyear_invoice_sequences)
|
||||
>>> from trytond.modules.company.tests.tools import create_company, get_company
|
||||
>>> from trytond.tests.tools import activate_modules, assertEqual
|
||||
|
||||
Activate modules::
|
||||
|
||||
>>> config = activate_modules(
|
||||
... 'document_incoming_invoice', create_company, create_chart)
|
||||
|
||||
>>> Document = Model.get('document.incoming')
|
||||
>>> DocumentConfiguration = Model.get('document.incoming.configuration')
|
||||
>>> Party = Model.get('party.party')
|
||||
|
||||
Get company::
|
||||
|
||||
>>> company = get_company()
|
||||
|
||||
Create fiscal year::
|
||||
|
||||
>>> fiscalyear = set_fiscalyear_invoice_sequences(create_fiscalyear())
|
||||
>>> fiscalyear.click('create_period')
|
||||
|
||||
Set default supplier::
|
||||
|
||||
>>> suppplier = Party(name="Supplier")
|
||||
>>> suppplier.save()
|
||||
|
||||
>>> document_configuration = DocumentConfiguration(1)
|
||||
>>> document_configuration.default_supplier = suppplier
|
||||
>>> document_configuration.save()
|
||||
|
||||
Create incoming document::
|
||||
|
||||
>>> document = Document()
|
||||
>>> document.name = 'invoice.pdf'
|
||||
>>> document.data = b'invoice'
|
||||
>>> document.company = company
|
||||
>>> document.type = 'supplier_invoice'
|
||||
>>> document.save()
|
||||
|
||||
Process document::
|
||||
|
||||
>>> document.click('process')
|
||||
>>> invoice = document.result
|
||||
>>> assertEqual(invoice.party, suppplier)
|
||||
11
modules/document_incoming_invoice/tests/test_module.py
Normal file
11
modules/document_incoming_invoice/tests/test_module.py
Normal file
@@ -0,0 +1,11 @@
|
||||
# This file is part of Tryton. The COPYRIGHT file at the top level of
|
||||
# this repository contains the full copyright notices and license terms.
|
||||
from trytond.tests.test_tryton import ModuleTestCase
|
||||
|
||||
|
||||
class DocumentIncomingInvoiceTestCase(ModuleTestCase):
|
||||
"Test Document Incoming Invoice module"
|
||||
module = 'document_incoming_invoice'
|
||||
|
||||
|
||||
del ModuleTestCase
|
||||
8
modules/document_incoming_invoice/tests/test_scenario.py
Normal file
8
modules/document_incoming_invoice/tests/test_scenario.py
Normal file
@@ -0,0 +1,8 @@
|
||||
# This file is part of Tryton. The COPYRIGHT file at the top level of
|
||||
# this repository contains the full copyright notices and license terms.
|
||||
|
||||
from trytond.tests.test_tryton import load_doc_tests
|
||||
|
||||
|
||||
def load_tests(*args, **kwargs):
|
||||
return load_doc_tests(__name__, __file__, *args, **kwargs)
|
||||
16
modules/document_incoming_invoice/tryton.cfg
Normal file
16
modules/document_incoming_invoice/tryton.cfg
Normal file
@@ -0,0 +1,16 @@
|
||||
[tryton]
|
||||
version=7.8.1
|
||||
depends:
|
||||
account_invoice
|
||||
document_incoming
|
||||
ir
|
||||
party
|
||||
xml:
|
||||
document.xml
|
||||
message.xml
|
||||
|
||||
[register]
|
||||
model:
|
||||
account.Invoice
|
||||
document.IncomingConfiguration
|
||||
document.Incoming
|
||||
@@ -0,0 +1,10 @@
|
||||
<?xml version="1.0"?>
|
||||
<!-- This file is part of Tryton. The COPYRIGHT file at the top level of
|
||||
this repository contains the full copyright notices and license terms. -->
|
||||
<data>
|
||||
<xpath expr="/form" position="inside">
|
||||
<separator string="Supplier Invoice" id="supplier_invoice" colspan="4"/>
|
||||
<label name="default_supplier"/>
|
||||
<field name="default_supplier"/>
|
||||
</xpath>
|
||||
</data>
|
||||
Reference in New Issue
Block a user