diff --git a/__openerp__.py b/__openerp__.py index ee5badb..90e7dee 100644 --- a/__openerp__.py +++ b/__openerp__.py @@ -28,8 +28,7 @@ "website": "http://avoin.systems", "images": ["static/description/icon.png"], "depends": [ - 'base', - 'account' + 'l10n_fi' ], "description": """ Finnish Invoice diff --git a/i18n/fi.po b/i18n/fi.po index 3722786..031c3b1 100644 --- a/i18n/fi.po +++ b/i18n/fi.po @@ -6,8 +6,8 @@ msgid "" msgstr "" "Project-Id-Version: Odoo Server 8.0-20150501\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2016-08-15 14:22+0000\n" -"PO-Revision-Date: 2016-08-15 17:26+0200\n" +"POT-Creation-Date: 2016-08-23 13:16+0000\n" +"PO-Revision-Date: 2016-08-23 16:20+0200\n" "Last-Translator: \n" "Language-Team: Avoin.Systems\n" "Language: fi_FI\n" @@ -23,7 +23,10 @@ msgstr "" #. module: l10n_fi_invoice #: model:ir.ui.view,arch_db:l10n_fi_invoice.report_invoice_finnish_document -msgid "Euro" +msgid "" +"\n" +" Euro\n" +" " msgstr "" #. module: l10n_fi_invoice @@ -62,6 +65,17 @@ msgstr "Summa" msgid "Barcode String" msgstr "Viivakoodi" +#. module: l10n_fi_invoice +#: code:addons/l10n_fi_invoice/model/account_invoice.py:94 +#: model:ir.model.fields,help:l10n_fi_invoice.field_account_invoice_barcode_string +#, python-format +msgid "" +"Barcode generated in accordance with http://www.finanssiala.fi/" +"maksujenvalitys/dokumentit/Pankkiviivakoodi-opas.pdf" +msgstr "" +"Viivakoodi finanssialan sääntöjen mukaisesti: http://www.finanssiala.fi/" +"maksujenvalitys/dokumentit/Pankkiviivakoodi-opas.pdf" + #. module: l10n_fi_invoice #: model:ir.ui.view,arch_db:l10n_fi_invoice.report_invoice_finnish_document msgid "Base" @@ -77,14 +91,16 @@ msgstr "" #. module: l10n_fi_invoice #: model:ir.ui.view,arch_db:l10n_fi_invoice.report_invoice_finnish_document msgid "" -"Betalningen fömedlas till mottagaren enligt villkoren för " -"betalningsförmedling\n" -" och endast till det kontonummer som " -"betalaren angivit." +"Betalningen fömedlas till mottagaren\n" +" enligt villkoren för\n" +" betalningsförmedling\n" +" och endast till det " +"kontonummer som\n" +" betalaren angivit." msgstr "" #. module: l10n_fi_invoice -#: model:ir.ui.view,arch_db:l10n_fi_invoice.report_invoice_finnish_document +#: model:ir.ui.view,arch_db:l10n_fi_invoice.report_layout_header_finnish msgid "Cancelled Invoice" msgstr "Peruttu Lasku" @@ -104,7 +120,7 @@ msgid "Discount (%)" msgstr "Alennus (%)" #. module: l10n_fi_invoice -#: model:ir.ui.view,arch_db:l10n_fi_invoice.report_invoice_finnish_document +#: model:ir.ui.view,arch_db:l10n_fi_invoice.report_layout_header_finnish msgid "Draft Invoice" msgstr "Laskuluonnos" @@ -124,11 +140,6 @@ msgstr "" msgid "Fax:" msgstr "Faksi:" -#. module: l10n_fi_invoice -#: model:ir.actions.report.xml,name:l10n_fi_invoice.report_invoice_finnish -msgid "Finnish Invoice" -msgstr "Suomalainen laskupohja" - # Swedish, do not translate #. module: l10n_fi_invoice #: model:ir.ui.view,arch_db:l10n_fi_invoice.report_invoice_finnish_document @@ -147,22 +158,9 @@ msgstr "" msgid "IBAN" msgstr "" -#. module: l10n_fi_invoice -#: code:addons/l10n_fi_invoice/model/account_invoice.py:75 -#: model:ir.model.fields,help:l10n_fi_invoice.field_account_invoice_invoice_number -#, python-format -msgid "" -"Identifier number used to refer to this invoice in accordance with https://" -"www.fkl.fi/teemasivut/sepa/tekninen_dokumentaatio/Dokumentit/" -"kotimaisen_viitteen_rakenneohje.pdf" -msgstr "" -"Laksun tunnistenumero jolla voidaan viitata yksiselitteisesti tähän laskuun. " -"Katso https://www.fkl.fi/teemasivut/sepa/tekninen_dokumentaatio/Dokumentit/" -"kotimaisen_viitteen_rakenneohje.pdf." - #. module: l10n_fi_invoice #: model:ir.model,name:l10n_fi_invoice.model_account_invoice -#: model:ir.ui.view,arch_db:l10n_fi_invoice.report_invoice_finnish_document +#: model:ir.ui.view,arch_db:l10n_fi_invoice.report_layout_header_finnish msgid "Invoice" msgstr "Lasku" @@ -171,23 +169,6 @@ msgstr "Lasku" msgid "Invoice Date" msgstr "Laskun pvm" -#. module: l10n_fi_invoice -#: model:ir.model.fields,field_description:l10n_fi_invoice.field_account_invoice_invoice_number -msgid "Invoice number" -msgstr "Laskun numero" - -#. module: l10n_fi_invoice -#: code:addons/l10n_fi_invoice/model/account_invoice.py:85 -#: model:ir.model.fields,help:l10n_fi_invoice.field_account_invoice_ref_number -#, python-format -msgid "" -"Invoice reference number in accordance with https://www.fkl.fi/teemasivut/" -"sepa/tekninen_dokumentaatio/Dokumentit/kotimaisen_viitteen_rakenneohje.pdf" -msgstr "" -"Viitenumero. Katso Invoice reference number in accordance with https://www." -"fkl.fi/teemasivut/sepa/tekninen_dokumentaatio/Dokumentit/" -"kotimaisen_viitteen_rakenneohje.pdf" - # Already Finnish #. module: l10n_fi_invoice #: model:ir.ui.view,arch_db:l10n_fi_invoice.report_invoice_finnish_document @@ -206,13 +187,13 @@ msgstr "" msgid "Maksaja" msgstr "" -# Already Finnish #. module: l10n_fi_invoice #: model:ir.ui.view,arch_db:l10n_fi_invoice.report_invoice_finnish_document msgid "" -"Maksu välitetään saajalle maksujenvälityksen ehtojen mukaisesti ja vain " -"maksajan\n" -" tilinumeron perusteella." +"Maksu välitetään saajalle\n" +" maksujenvälityksen ehtojen\n" +" mukaisesti ja vain maksajan\n" +" tilinumeron perusteella." msgstr "" # Swedish, do not translate @@ -226,7 +207,7 @@ msgstr "" #: model:ir.ui.view,arch_db:l10n_fi_invoice.report_invoice_finnish_document msgid "" "Mottagarens\n" -" kontonummer" +" kontonummer" msgstr "" #. module: l10n_fi_invoice @@ -235,7 +216,7 @@ msgid "Our reference" msgstr "Viitteemme" #. module: l10n_fi_invoice -#: model:ir.ui.view,arch_db:l10n_fi_invoice.report_invoice_finnish_document +#: model:ir.ui.view,arch_db:l10n_fi_invoice.report_layout_header_finnish msgid "PRO-FORMA" msgstr "" @@ -271,12 +252,7 @@ msgid "Ref.nr" msgstr "" #. module: l10n_fi_invoice -#: model:ir.model.fields,field_description:l10n_fi_invoice.field_account_invoice_ref_number -msgid "Reference Number" -msgstr "Viitenumero" - -#. module: l10n_fi_invoice -#: model:ir.ui.view,arch_db:l10n_fi_invoice.report_invoice_finnish_document +#: model:ir.ui.view,arch_db:l10n_fi_invoice.report_layout_header_finnish msgid "Refund" msgstr "Hyvitys" @@ -286,12 +262,11 @@ msgstr "Hyvitys" msgid "Saaja" msgstr "" -# Already Finnish #. module: l10n_fi_invoice #: model:ir.ui.view,arch_db:l10n_fi_invoice.report_invoice_finnish_document msgid "" "Saajan\n" -" tilinumero" +" tilinumero" msgstr "" #. module: l10n_fi_invoice @@ -305,7 +280,7 @@ msgid "Taxes" msgstr "Verot" #. module: l10n_fi_invoice -#: code:addons/l10n_fi_invoice/model/account_invoice.py:92 +#: code:addons/l10n_fi_invoice/model/account_invoice.py:87 #: model:ir.model.fields,help:l10n_fi_invoice.field_account_invoice_date_delivered #, python-format msgid "" @@ -323,8 +298,8 @@ msgstr "" #. module: l10n_fi_invoice #: model:ir.ui.view,arch_db:l10n_fi_invoice.report_invoice_finnish_document -msgid "Total" -msgstr "Summa" +msgid "To Pay" +msgstr "Maksettava summa" #. module: l10n_fi_invoice #: model:ir.ui.view,arch_db:l10n_fi_invoice.report_invoice_finnish_document @@ -348,12 +323,12 @@ msgid "VAT:" msgstr "ALV:" #. module: l10n_fi_invoice -#: model:ir.ui.view,arch_db:l10n_fi_invoice.report_invoice_finnish_document +#: model:ir.ui.view,arch_db:l10n_fi_invoice.report_layout_header_finnish msgid "Vendor Bill" msgstr "Ostolasku" #. module: l10n_fi_invoice -#: model:ir.ui.view,arch_db:l10n_fi_invoice.report_invoice_finnish_document +#: model:ir.ui.view,arch_db:l10n_fi_invoice.report_layout_header_finnish msgid "Vendor Refund" msgstr "Oston Hyvitys" @@ -379,23 +354,48 @@ msgstr "" msgid "Your reference" msgstr "Viitteenne" -#. module: l10n_fi_invoice -#: code:addons/l10n_fi_invoice/model/account_invoice.py:99 -#: model:ir.model.fields,help:l10n_fi_invoice.field_account_invoice_barcode_string -#, python-format -msgid "" -"https://www.fkl.fi/teemasivut/sepa/tekninen_dokumentaatio/Dokumentit/" -"Pankkiviivakoodi-opas.pdf" -msgstr "" -"https://www.fkl.fi/teemasivut/sepa/tekninen_dokumentaatio/Dokumentit/" -"kotimaisen_viitteen_rakenneohje.pdf" - # No need to translate #. module: l10n_fi_invoice #: model:ir.ui.view,arch_db:l10n_fi_invoice.report_invoice_finnish_document msgid "– BIC" msgstr "" +#~ msgid "Finnish Invoice" +#~ msgstr "Suomalainen laskupohja" + +#~ msgid "" +#~ "Identifier number used to refer to this invoice in accordance with " +#~ "https://www.fkl.fi/teemasivut/sepa/tekninen_dokumentaatio/Dokumentit/" +#~ "kotimaisen_viitteen_rakenneohje.pdf" +#~ msgstr "" +#~ "Laksun tunnistenumero jolla voidaan viitata yksiselitteisesti tähän " +#~ "laskuun. Katso https://www.fkl.fi/teemasivut/sepa/tekninen_dokumentaatio/" +#~ "Dokumentit/kotimaisen_viitteen_rakenneohje.pdf." + +#~ msgid "Invoice number" +#~ msgstr "Laskun numero" + +#~ msgid "" +#~ "Invoice reference number in accordance with https://www.fkl.fi/teemasivut/" +#~ "sepa/tekninen_dokumentaatio/Dokumentit/kotimaisen_viitteen_rakenneohje.pdf" +#~ msgstr "" +#~ "Viitenumero. Katso Invoice reference number in accordance with https://" +#~ "www.fkl.fi/teemasivut/sepa/tekninen_dokumentaatio/Dokumentit/" +#~ "kotimaisen_viitteen_rakenneohje.pdf" + +#~ msgid "Reference Number" +#~ msgstr "Viitenumero" + +#~ msgid "Total" +#~ msgstr "Summa" + +#~ msgid "" +#~ "https://www.fkl.fi/teemasivut/sepa/tekninen_dokumentaatio/Dokumentit/" +#~ "Pankkiviivakoodi-opas.pdf" +#~ msgstr "" +#~ "https://www.fkl.fi/teemasivut/sepa/tekninen_dokumentaatio/Dokumentit/" +#~ "kotimaisen_viitteen_rakenneohje.pdf" + #~ msgid "Date due" #~ msgstr "Eräpäivä" diff --git a/i18n/l10n_fi_invoice.pot b/i18n/l10n_fi_invoice.pot index 7769bc4..c944cea 100644 --- a/i18n/l10n_fi_invoice.pot +++ b/i18n/l10n_fi_invoice.pot @@ -6,8 +6,8 @@ msgid "" msgstr "" "Project-Id-Version: Odoo Server 9.0e-20160815\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2016-08-15 14:22+0000\n" -"PO-Revision-Date: 2016-08-15 14:22+0000\n" +"POT-Creation-Date: 2016-08-23 13:16+0000\n" +"PO-Revision-Date: 2016-08-23 13:16+0000\n" "Last-Translator: <>\n" "Language-Team: \n" "MIME-Version: 1.0\n" @@ -22,7 +22,9 @@ msgstr "" #. module: l10n_fi_invoice #: model:ir.ui.view,arch_db:l10n_fi_invoice.report_invoice_finnish_document -msgid "Euro" +msgid "\n" +" Euro\n" +" " msgstr "" #. module: l10n_fi_invoice @@ -60,6 +62,13 @@ msgstr "" msgid "Barcode String" msgstr "" +#. module: l10n_fi_invoice +#: code:addons/l10n_fi_invoice/model/account_invoice.py:94 +#: model:ir.model.fields,help:l10n_fi_invoice.field_account_invoice_barcode_string +#, python-format +msgid "Barcode generated in accordance with http://www.finanssiala.fi/maksujenvalitys/dokumentit/Pankkiviivakoodi-opas.pdf" +msgstr "" + #. module: l10n_fi_invoice #: model:ir.ui.view,arch_db:l10n_fi_invoice.report_invoice_finnish_document msgid "Base" @@ -72,12 +81,15 @@ msgstr "" #. module: l10n_fi_invoice #: model:ir.ui.view,arch_db:l10n_fi_invoice.report_invoice_finnish_document -msgid "Betalningen fömedlas till mottagaren enligt villkoren för betalningsförmedling\n" -" och endast till det kontonummer som betalaren angivit." +msgid "Betalningen fömedlas till mottagaren\n" +" enligt villkoren för\n" +" betalningsförmedling\n" +" och endast till det kontonummer som\n" +" betalaren angivit." msgstr "" #. module: l10n_fi_invoice -#: model:ir.ui.view,arch_db:l10n_fi_invoice.report_invoice_finnish_document +#: model:ir.ui.view,arch_db:l10n_fi_invoice.report_layout_header_finnish msgid "Cancelled Invoice" msgstr "" @@ -97,7 +109,7 @@ msgid "Discount (%)" msgstr "" #. module: l10n_fi_invoice -#: model:ir.ui.view,arch_db:l10n_fi_invoice.report_invoice_finnish_document +#: model:ir.ui.view,arch_db:l10n_fi_invoice.report_layout_header_finnish msgid "Draft Invoice" msgstr "" @@ -116,11 +128,6 @@ msgstr "" msgid "Fax:" msgstr "" -#. module: l10n_fi_invoice -#: model:ir.actions.report.xml,name:l10n_fi_invoice.report_invoice_finnish -msgid "Finnish Invoice" -msgstr "" - #. module: l10n_fi_invoice #: model:ir.ui.view,arch_db:l10n_fi_invoice.report_invoice_finnish_document msgid "Från konto nr" @@ -136,16 +143,9 @@ msgstr "" msgid "IBAN" msgstr "" -#. module: l10n_fi_invoice -#: code:addons/l10n_fi_invoice/model/account_invoice.py:75 -#: model:ir.model.fields,help:l10n_fi_invoice.field_account_invoice_invoice_number -#, python-format -msgid "Identifier number used to refer to this invoice in accordance with https://www.fkl.fi/teemasivut/sepa/tekninen_dokumentaatio/Dokumentit/kotimaisen_viitteen_rakenneohje.pdf" -msgstr "" - #. module: l10n_fi_invoice #: model:ir.model,name:l10n_fi_invoice.model_account_invoice -#: model:ir.ui.view,arch_db:l10n_fi_invoice.report_invoice_finnish_document +#: model:ir.ui.view,arch_db:l10n_fi_invoice.report_layout_header_finnish msgid "Invoice" msgstr "" @@ -154,18 +154,6 @@ msgstr "" msgid "Invoice Date" msgstr "" -#. module: l10n_fi_invoice -#: model:ir.model.fields,field_description:l10n_fi_invoice.field_account_invoice_invoice_number -msgid "Invoice number" -msgstr "" - -#. module: l10n_fi_invoice -#: code:addons/l10n_fi_invoice/model/account_invoice.py:85 -#: model:ir.model.fields,help:l10n_fi_invoice.field_account_invoice_ref_number -#, python-format -msgid "Invoice reference number in accordance with https://www.fkl.fi/teemasivut/sepa/tekninen_dokumentaatio/Dokumentit/kotimaisen_viitteen_rakenneohje.pdf" -msgstr "" - #. module: l10n_fi_invoice #: model:ir.ui.view,arch_db:l10n_fi_invoice.report_invoice_finnish_document msgid "Kotipaikka:" @@ -183,8 +171,10 @@ msgstr "" #. module: l10n_fi_invoice #: model:ir.ui.view,arch_db:l10n_fi_invoice.report_invoice_finnish_document -msgid "Maksu välitetään saajalle maksujenvälityksen ehtojen mukaisesti ja vain maksajan\n" -" tilinumeron perusteella." +msgid "Maksu välitetään saajalle\n" +" maksujenvälityksen ehtojen\n" +" mukaisesti ja vain maksajan\n" +" tilinumeron perusteella." msgstr "" #. module: l10n_fi_invoice @@ -195,7 +185,7 @@ msgstr "" #. module: l10n_fi_invoice #: model:ir.ui.view,arch_db:l10n_fi_invoice.report_invoice_finnish_document msgid "Mottagarens\n" -" kontonummer" +" kontonummer" msgstr "" #. module: l10n_fi_invoice @@ -204,7 +194,7 @@ msgid "Our reference" msgstr "" #. module: l10n_fi_invoice -#: model:ir.ui.view,arch_db:l10n_fi_invoice.report_invoice_finnish_document +#: model:ir.ui.view,arch_db:l10n_fi_invoice.report_layout_header_finnish msgid "PRO-FORMA" msgstr "" @@ -239,12 +229,7 @@ msgid "Ref.nr" msgstr "" #. module: l10n_fi_invoice -#: model:ir.model.fields,field_description:l10n_fi_invoice.field_account_invoice_ref_number -msgid "Reference Number" -msgstr "" - -#. module: l10n_fi_invoice -#: model:ir.ui.view,arch_db:l10n_fi_invoice.report_invoice_finnish_document +#: model:ir.ui.view,arch_db:l10n_fi_invoice.report_layout_header_finnish msgid "Refund" msgstr "" @@ -256,7 +241,7 @@ msgstr "" #. module: l10n_fi_invoice #: model:ir.ui.view,arch_db:l10n_fi_invoice.report_invoice_finnish_document msgid "Saajan\n" -" tilinumero" +" tilinumero" msgstr "" #. module: l10n_fi_invoice @@ -270,7 +255,7 @@ msgid "Taxes" msgstr "" #. module: l10n_fi_invoice -#: code:addons/l10n_fi_invoice/model/account_invoice.py:92 +#: code:addons/l10n_fi_invoice/model/account_invoice.py:87 #: model:ir.model.fields,help:l10n_fi_invoice.field_account_invoice_date_delivered #, python-format msgid "The date when the invoiced product or service was considered delivered, for taxation purposes." @@ -283,7 +268,7 @@ msgstr "" #. module: l10n_fi_invoice #: model:ir.ui.view,arch_db:l10n_fi_invoice.report_invoice_finnish_document -msgid "Total" +msgid "To Pay" msgstr "" #. module: l10n_fi_invoice @@ -307,12 +292,12 @@ msgid "VAT:" msgstr "" #. module: l10n_fi_invoice -#: model:ir.ui.view,arch_db:l10n_fi_invoice.report_invoice_finnish_document +#: model:ir.ui.view,arch_db:l10n_fi_invoice.report_layout_header_finnish msgid "Vendor Bill" msgstr "" #. module: l10n_fi_invoice -#: model:ir.ui.view,arch_db:l10n_fi_invoice.report_invoice_finnish_document +#: model:ir.ui.view,arch_db:l10n_fi_invoice.report_layout_header_finnish msgid "Vendor Refund" msgstr "" @@ -336,13 +321,6 @@ msgstr "" msgid "Your reference" msgstr "" -#. module: l10n_fi_invoice -#: code:addons/l10n_fi_invoice/model/account_invoice.py:99 -#: model:ir.model.fields,help:l10n_fi_invoice.field_account_invoice_barcode_string -#, python-format -msgid "https://www.fkl.fi/teemasivut/sepa/tekninen_dokumentaatio/Dokumentit/Pankkiviivakoodi-opas.pdf" -msgstr "" - #. module: l10n_fi_invoice #: model:ir.ui.view,arch_db:l10n_fi_invoice.report_invoice_finnish_document msgid "– BIC" diff --git a/model/account_invoice.py b/model/account_invoice.py index 3c6caf8..a0dd51d 100644 --- a/model/account_invoice.py +++ b/model/account_invoice.py @@ -31,64 +31,58 @@ class AccountInvoice(models.Model): _inherit = 'account.invoice' - @api.one - @api.depends('number', 'state') - def _compute_ref_number(self): - if self.number: - invoice_number = re.sub(r'\D', '', self.number) - checksum = sum((7, 3, 1)[idx % 3] * int(val) - for idx, val in enumerate(invoice_number[::-1])) - self.ref_number = invoice_number + str((10 - (checksum % 10)) % 10) - self.invoice_number = invoice_number - else: - self.invoice_number = False - self.ref_number = False - - @api.one + @api.multi def _compute_barcode_string(self): - primary_bank_account = self.partner_bank_id or \ - self.company_id.partner_id.bank_ids and self.company_id.partner_id.bank_ids[0] - if (self.amount_total and primary_bank_account.acc_number - and self.ref_number and self.date_due): - amount_total_string = str(self.amount_total) - if amount_total_string[-2:-1] == '.': - amount_total_string += '0' + for invoice in self: + primary_bank_account = invoice.partner_bank_id or \ + invoice.company_id.partner_id.bank_ids and \ + invoice.company_id.partner_id.bank_ids[0] + if not (invoice.amount_total and + primary_bank_account and + primary_bank_account.acc_number and + invoice.payment_reference_type and + invoice.payment_reference and + invoice.date_due): + invoice.barcode_string = False + return + if invoice.payment_reference_type == 'fi': + version = '4' + reserved = '000' + pay_ref = invoice.payment_reference.zfill(20) + elif invoice.payment_reference_type == 'rf': + version = '5' + reserved = '' + pay_ref = invoice.payment_reference[2:] # Cut off RF + length = 23 - len(pay_ref) + pay_ref = pay_ref[:2] + '0'*length + pay_ref[2:] + else: + invoice.barcode_string = False + return + # Bank account sans letters + bank_account = re.sub("[^0-9]", "", str(primary_bank_account.acc_number)) + amount_total_string = '%.2f' % invoice.amount_total amount_total_string = amount_total_string.zfill(9) - receiver_bank_account = re\ - .sub("[^0-9]", "", str(primary_bank_account.acc_number)) - ref_number_filled = self.ref_number.zfill(20) - self.barcode_string = '4' \ - + receiver_bank_account \ - + amount_total_string[:-3] \ - + amount_total_string[-2:] \ - + "000" + ref_number_filled \ - + self.date_due[2:4] \ - + self.date_due[5:-3] \ - + self.date_due[-2:] - else: - self.barcode_string = False + amount_euros = amount_total_string[:-3] + amount_cents = amount_total_string[-2:] + invoice.barcode_string = ''.join([ + version, + bank_account, + amount_euros, + amount_cents, + reserved, + pay_ref, + invoice.date_due[2:4], # Year + invoice.date_due[5:7], # Month + invoice.date_due[8:], # Date + ]) - invoice_number = fields.Char( - 'Invoice number', - compute='_compute_ref_number', - store=True, - help=_('Identifier number used to refer to this invoice in ' - 'accordance with https://www.fkl.fi/teemasivut/sepa/' - 'tekninen_dokumentaatio/Dokumentit/kotimaisen_viitte' - 'en_rakenneohje.pdf') - ) - ref_number = fields.Char( - 'Reference Number', - compute='_compute_ref_number', - store=True, - help=_('Invoice reference number in accordance with https://' - 'www.fkl.fi/teemasivut/sepa/tekninen_dokumentaatio/Do' - 'kumentit/kotimaisen_viitteen_rakenneohje.pdf') - ) + def _compute_default_delivered(self): + return fields.Date.today() date_delivered = fields.Date( 'Date delivered', + default=_compute_default_delivered, help=_('The date when the invoiced product or service was considered ' 'delivered, for taxation purposes.') ) @@ -96,6 +90,5 @@ def _compute_barcode_string(self): barcode_string = fields.Char( 'Barcode String', compute='_compute_barcode_string', - help=_('https://www.fkl.fi/teemasivut/sepa/tekninen_dokumentaatio/Dok' - 'umentit/Pankkiviivakoodi-opas.pdf') + help=_('Barcode generated in accordance with http://www.finanssiala.fi/maksujenvalitys/dokumentit/Pankkiviivakoodi-opas.pdf') ) diff --git a/report/report_invoice.xml b/report/report_invoice.xml index d4b5a61..577704f 100644 --- a/report/report_invoice.xml +++ b/report/report_invoice.xml @@ -124,8 +124,8 @@ style="margin-top: 5em; margin-bottom: 4em; font-size:1.1em;">
- VAT: - + + VAT:
@@ -141,11 +141,10 @@ - Invoice reference - + Invoice reference - + @@ -191,7 +190,7 @@

-
+
@@ -237,6 +236,32 @@
+
+
+ + + + + + + + + + + + + + + +
TaxBaseAmount
+ + + +
+
+
- - + +
Total
To Pay -
-
- - - - - - - - - - - - - - - -
Tax - Base - - Amount -
- - - - - -
-
-
@@ -481,7 +472,7 @@
diff --git a/report/report_layout_header.xml b/report/report_layout_header.xml index 63b16a0..a1ecbf5 100644 --- a/report/report_layout_header.xml +++ b/report/report_layout_header.xml @@ -25,7 +25,13 @@
- Invoice + Invoice + PRO-FORMA + Draft Invoice + Cancelled Invoice + Refund + Vendor Refund + Vendor Bill
diff --git a/static/description/index.html b/static/description/index.html index c192430..3c4db33 100644 --- a/static/description/index.html +++ b/static/description/index.html @@ -23,7 +23,7 @@

What's in it?

A beautiful invoice template that
  • meets the Finnish invoicing regulations,
  • -
  • generates invoice reference number,
  • +
  • uses a Finnish invoice reference number,
  • generates payment barcode,
  • ...you name it
@@ -60,10 +60,8 @@

- The installation of the module adds a new PDF template, that - can be used for printing and emailing invoices. Please note - that using this template with email requires setting the - invoice template to the email template manually. + The installation of the module replaces the base invoice + tempate with a Finnish version.

diff --git a/view/account_invoice.xml b/view/account_invoice.xml index 3576b0d..5b64ac7 100644 --- a/view/account_invoice.xml +++ b/view/account_invoice.xml @@ -10,12 +10,6 @@ - - - - - -