From 072c2af8982c88ba0a48f661126e4df1a64a17c4 Mon Sep 17 00:00:00 2001 From: "Pedro M. Baeza" Date: Mon, 9 Mar 2015 21:24:18 +0100 Subject: [PATCH 01/69] [ADD] hr_expense_invoice Set supplier invoices on HR expenses ==================================== This module should be used when a supplier invoice is paid by an employee. It allows to set a supplier invoice for each expense line, adding the corresponding journal items to transfer the debt to the employee. Installation ============ Install the module the regular way. Configuration ============= You don't need to configure anything more to use this module. Usage ===== Instead of coding a full expense line, select an existing supplier invoice, and then the rest of the fields will be auto-filled and grayed. When you generate the expenses account entries, lines with invoices filled will be generated as opposite of the payable move line of the invoice, and both will be reconciled, letting the employee payable account as the only open balance. Known issues / Roadmap ====================== * Multiple payment terms for a supplier invoice are not handled correctly. * Partial reconcile supplier invoices are also not correctly handled. OCA Transbot updated translations from Transifex --- hr_expense_invoice/README.rst | 67 +++ hr_expense_invoice/__init__.py | 5 + hr_expense_invoice/__openerp__.py | 36 ++ hr_expense_invoice/i18n/en.po | 46 ++ hr_expense_invoice/i18n/es.po | 46 ++ hr_expense_invoice/i18n/fr.po | 46 ++ .../i18n/hr_expense_invoice.pot | 27 ++ hr_expense_invoice/i18n/sl.po | 47 ++ hr_expense_invoice/models/__init__.py | 5 + .../models/hr_expense_expense.py | 103 +++++ .../static/description/icon.png | Bin 0 -> 11788 bytes .../static/description/icon.svg | 428 ++++++++++++++++++ .../views/hr_expense_expense_view.xml | 56 +++ 13 files changed, 912 insertions(+) create mode 100644 hr_expense_invoice/README.rst create mode 100644 hr_expense_invoice/__init__.py create mode 100644 hr_expense_invoice/__openerp__.py create mode 100644 hr_expense_invoice/i18n/en.po create mode 100644 hr_expense_invoice/i18n/es.po create mode 100644 hr_expense_invoice/i18n/fr.po create mode 100644 hr_expense_invoice/i18n/hr_expense_invoice.pot create mode 100644 hr_expense_invoice/i18n/sl.po create mode 100644 hr_expense_invoice/models/__init__.py create mode 100644 hr_expense_invoice/models/hr_expense_expense.py create mode 100644 hr_expense_invoice/static/description/icon.png create mode 100644 hr_expense_invoice/static/description/icon.svg create mode 100644 hr_expense_invoice/views/hr_expense_expense_view.xml diff --git a/hr_expense_invoice/README.rst b/hr_expense_invoice/README.rst new file mode 100644 index 000000000..e8ca941aa --- /dev/null +++ b/hr_expense_invoice/README.rst @@ -0,0 +1,67 @@ +.. image:: https://img.shields.io/badge/licence-AGPL--3-blue.svg + :alt: License + +Set supplier invoices on HR expenses +==================================== + +This module should be used when a supplier invoice is paid by an employee. It +allows to set a supplier invoice for each expense line, adding the +corresponding journal items to transfer the debt to the employee. + + +Installation +============ + +Install the module the regular way. + +Configuration +============= + +You don't need to configure anything more to use this module. + +Usage +===== + +Instead of coding a full expense line, select an existing supplier invoice, +and then the rest of the fields will be auto-filled and grayed. + +When you generate the expenses account entries, lines with invoices filled +will be generated as opposite of the payable move line of the invoice, and +both will be reconciled, letting the employee payable account as the only +open balance. + +Known issues / Roadmap +====================== + +* Multiple payment terms for a supplier invoice are not handled correctly. +* Partial reconcile supplier invoices are also not correctly handled. + +Credits +======= + +Contributors +------------ + +* Pedro M. Baeza + +Icon +---- + +* Thanks to https://openclipart.org/detail/201137/primary%20template%20invoice +* Thanks to https://openclipart.org/detail/15193/Arrow%20set%20%28Comic%29 +* Original hr_expense icon + +Maintainer +---------- + +.. image:: http://odoo-community.org/logo.png + :alt: Odoo Community Association + :target: http://odoo-community.org + +This module is maintained by the OCA. + +OCA, or the Odoo Community Association, is a nonprofit organization whose +mission is to support the collaborative development of Odoo features and +promote its widespread use. + +To contribute to this module, please visit http://odoo-community.org. diff --git a/hr_expense_invoice/__init__.py b/hr_expense_invoice/__init__.py new file mode 100644 index 000000000..49d04adeb --- /dev/null +++ b/hr_expense_invoice/__init__.py @@ -0,0 +1,5 @@ +# -*- encoding: utf-8 -*- +############################################################################## +# For copyright and license notices, see __openerp__.py file in root directory +############################################################################## +from . import models diff --git a/hr_expense_invoice/__openerp__.py b/hr_expense_invoice/__openerp__.py new file mode 100644 index 000000000..494a99673 --- /dev/null +++ b/hr_expense_invoice/__openerp__.py @@ -0,0 +1,36 @@ +# -*- encoding: utf-8 -*- +############################################################################## +# +# Copyright (c) 2015 Serv. Tecnol. Avanzados (http://www.serviciosbaeza.com) +# Pedro M. Baeza +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as published +# by the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# +############################################################################## + +{ + 'name': 'Supplier invoices on HR expenses', + 'version': '8.0.1.0.0', + 'category': 'HR', + 'author': 'Serv. Tecnol. Avanzados - Pedro M. Baeza, ' + 'Odoo Community Association (OCA)', + 'website': 'http://www.serviciosbaeza.com', + 'depends': [ + 'hr_expense', + ], + 'data': [ + 'views/hr_expense_expense_view.xml', + ], + "installable": True, +} diff --git a/hr_expense_invoice/i18n/en.po b/hr_expense_invoice/i18n/en.po new file mode 100644 index 000000000..3e163a52d --- /dev/null +++ b/hr_expense_invoice/i18n/en.po @@ -0,0 +1,46 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * hr_expense_invoice +# +# Translators: +msgid "" +msgstr "" +"Project-Id-Version: hr (8.0)\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2015-08-18 13:10+0000\n" +"PO-Revision-Date: 2015-07-27 23:44+0000\n" +"Last-Translator: OCA Transbot \n" +"Language-Team: English (http://www.transifex.com/oca/OCA-hr-8-0/language/en/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Language: en\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +#. module: hr_expense_invoice +#: code:addons/hr_expense_invoice/models/hr_expense_expense.py:49 +#, python-format +msgid "" +"Cannot reconcile supplier invoice payable with generated line. Please check " +"amounts and see if the invoice is already added or paid. Invoice: %s" +msgstr "Cannot reconcile supplier invoice payable with generated line. Please check amounts and see if the invoice is already added or paid. Invoice: %s" + +#. module: hr_expense_invoice +#: model:ir.model,name:hr_expense_invoice.model_hr_expense_expense +msgid "Expense" +msgstr "Expense" + +#. module: hr_expense_invoice +#: model:ir.model,name:hr_expense_invoice.model_hr_expense_line +msgid "Expense Line" +msgstr "Expense Line" + +#. module: hr_expense_invoice +#: field:hr.expense.line,invoice:0 +msgid "Invoice" +msgstr "Invoice" + +#. module: hr_expense_invoice +#: view:hr.expense.expense:hr_expense_invoice.view_expenses_form_invoice +msgid "{'readonly': [('invoice', '!=', False)]}" +msgstr "{'readonly': [('invoice', '!=', False)]}" diff --git a/hr_expense_invoice/i18n/es.po b/hr_expense_invoice/i18n/es.po new file mode 100644 index 000000000..8d4a04b88 --- /dev/null +++ b/hr_expense_invoice/i18n/es.po @@ -0,0 +1,46 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * hr_expense_invoice +# +# Translators: +msgid "" +msgstr "" +"Project-Id-Version: hr (8.0)\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2015-08-18 13:10+0000\n" +"PO-Revision-Date: 2015-07-27 23:44+0000\n" +"Last-Translator: OCA Transbot \n" +"Language-Team: Spanish (http://www.transifex.com/oca/OCA-hr-8-0/language/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: hr_expense_invoice +#: code:addons/hr_expense_invoice/models/hr_expense_expense.py:49 +#, python-format +msgid "" +"Cannot reconcile supplier invoice payable with generated line. Please check " +"amounts and see if the invoice is already added or paid. Invoice: %s" +msgstr "No se puede conciliar el saldo a pagar de la factura con la línea generada. Compruebe por favor las cantidades y vea si la factura ya está añadida previamente o pagada. Factura: %s" + +#. module: hr_expense_invoice +#: model:ir.model,name:hr_expense_invoice.model_hr_expense_expense +msgid "Expense" +msgstr "Gasto" + +#. module: hr_expense_invoice +#: model:ir.model,name:hr_expense_invoice.model_hr_expense_line +msgid "Expense Line" +msgstr "" + +#. module: hr_expense_invoice +#: field:hr.expense.line,invoice:0 +msgid "Invoice" +msgstr "Factura" + +#. module: hr_expense_invoice +#: view:hr.expense.expense:hr_expense_invoice.view_expenses_form_invoice +msgid "{'readonly': [('invoice', '!=', False)]}" +msgstr "" diff --git a/hr_expense_invoice/i18n/fr.po b/hr_expense_invoice/i18n/fr.po new file mode 100644 index 000000000..6b3cf3468 --- /dev/null +++ b/hr_expense_invoice/i18n/fr.po @@ -0,0 +1,46 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * hr_expense_invoice +# +# Translators: +msgid "" +msgstr "" +"Project-Id-Version: hr (8.0)\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2015-08-18 13:10+0000\n" +"PO-Revision-Date: 2015-07-27 23:44+0000\n" +"Last-Translator: <>\n" +"Language-Team: French (http://www.transifex.com/oca/OCA-hr-8-0/language/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: hr_expense_invoice +#: code:addons/hr_expense_invoice/models/hr_expense_expense.py:49 +#, python-format +msgid "" +"Cannot reconcile supplier invoice payable with generated line. Please check " +"amounts and see if the invoice is already added or paid. Invoice: %s" +msgstr "" + +#. module: hr_expense_invoice +#: model:ir.model,name:hr_expense_invoice.model_hr_expense_expense +msgid "Expense" +msgstr "Frais" + +#. module: hr_expense_invoice +#: model:ir.model,name:hr_expense_invoice.model_hr_expense_line +msgid "Expense Line" +msgstr "" + +#. module: hr_expense_invoice +#: field:hr.expense.line,invoice:0 +msgid "Invoice" +msgstr "" + +#. module: hr_expense_invoice +#: view:hr.expense.expense:hr_expense_invoice.view_expenses_form_invoice +msgid "{'readonly': [('invoice', '!=', False)]}" +msgstr "" diff --git a/hr_expense_invoice/i18n/hr_expense_invoice.pot b/hr_expense_invoice/i18n/hr_expense_invoice.pot new file mode 100644 index 000000000..ca5cec654 --- /dev/null +++ b/hr_expense_invoice/i18n/hr_expense_invoice.pot @@ -0,0 +1,27 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * hr_expense_invoice +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 8.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2015-03-09 20:07+0000\n" +"PO-Revision-Date: 2015-03-09 20:07+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: hr_expense_invoice +#: code:addons/hr_expense_invoice/models/hr_expense_expense.py:49 +#, python-format +msgid "Cannot reconcile supplier invoice payable with generated line. Please check amounts and see if the invoice is already added or paid. Invoice: %s" +msgstr "" + +#. module: hr_expense_invoice +#: field:hr.expense.line,invoice:0 +msgid "Invoice" +msgstr "" diff --git a/hr_expense_invoice/i18n/sl.po b/hr_expense_invoice/i18n/sl.po new file mode 100644 index 000000000..a8f656a5d --- /dev/null +++ b/hr_expense_invoice/i18n/sl.po @@ -0,0 +1,47 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * hr_expense_invoice +# +# Translators: +# Matjaž Mozetič , 2015 +msgid "" +msgstr "" +"Project-Id-Version: hr (8.0)\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2015-08-18 13:10+0000\n" +"PO-Revision-Date: 2015-08-01 16:12+0000\n" +"Last-Translator: Matjaž Mozetič \n" +"Language-Team: Slovenian (http://www.transifex.com/oca/OCA-hr-8-0/language/sl/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Language: sl\n" +"Plural-Forms: nplurals=4; plural=(n%100==1 ? 0 : n%100==2 ? 1 : n%100==3 || n%100==4 ? 2 : 3);\n" + +#. module: hr_expense_invoice +#: code:addons/hr_expense_invoice/models/hr_expense_expense.py:49 +#, python-format +msgid "" +"Cannot reconcile supplier invoice payable with generated line. Please check " +"amounts and see if the invoice is already added or paid. Invoice: %s" +msgstr "Ni mogoče uskladiti konta prejetih računov z ustvarjeno postavko. Preverite zneske in poglejte, če je račun že dodan ali plačan. Račun: %s" + +#. module: hr_expense_invoice +#: model:ir.model,name:hr_expense_invoice.model_hr_expense_expense +msgid "Expense" +msgstr "Izdatki" + +#. module: hr_expense_invoice +#: model:ir.model,name:hr_expense_invoice.model_hr_expense_line +msgid "Expense Line" +msgstr "Postavka izdatka" + +#. module: hr_expense_invoice +#: field:hr.expense.line,invoice:0 +msgid "Invoice" +msgstr "Račun" + +#. module: hr_expense_invoice +#: view:hr.expense.expense:hr_expense_invoice.view_expenses_form_invoice +msgid "{'readonly': [('invoice', '!=', False)]}" +msgstr "{'readonly': [('invoice', '!=', False)]}" diff --git a/hr_expense_invoice/models/__init__.py b/hr_expense_invoice/models/__init__.py new file mode 100644 index 000000000..5bd402a99 --- /dev/null +++ b/hr_expense_invoice/models/__init__.py @@ -0,0 +1,5 @@ +# -*- encoding: utf-8 -*- +############################################################################## +# For copyright and license notices, see __openerp__.py file in root directory +############################################################################## +from . import hr_expense_expense diff --git a/hr_expense_invoice/models/hr_expense_expense.py b/hr_expense_invoice/models/hr_expense_expense.py new file mode 100644 index 000000000..40b5bbff2 --- /dev/null +++ b/hr_expense_invoice/models/hr_expense_expense.py @@ -0,0 +1,103 @@ +# -*- encoding: utf-8 -*- +############################################################################## +# For copyright and license notices, see __openerp__.py file in root directory +############################################################################## + +from openerp import models, fields, api, exceptions, _ + + +class HrExpenseExpense(models.Model): + _inherit = 'hr.expense.expense' + + @api.model + def line_get_convert(self, x, part, date): + res = super(HrExpenseExpense, self).line_get_convert(x, part, date) + if x.get('invoice'): + res['partner_id'] = ( + x['invoice'].partner_id.commercial_partner_id.id) + return res + + @api.model + def move_line_get_item(self, line): + if line.invoice: + return { + 'account_id': line.invoice.account_id.id, + 'name': line.name, + 'price': line.total_amount, + 'invoice': line.invoice, + } + else: + return super(HrExpenseExpense, self).move_line_get_item(line) + + @api.multi + def action_move_create(self): + """Reconcile supplier invoice payables with the created move lines.""" + res = super(HrExpenseExpense, self).action_move_create() + for expense in self: + for line in expense.line_ids: + if line.invoice: + partner = line.invoice.partner_id.commercial_partner_id + move_lines = expense.account_move_id.line_id + c_move_lines = move_lines.filtered( + lambda x: x.partner_id == partner and + x.debit == line.invoice.residual) + c_move_lines |= line.invoice.move_id.line_id.filtered( + lambda x: x.account_id == line.invoice.account_id and + x.credit == line.invoice.residual) + if len(c_move_lines) != 2: + raise exceptions.Warning( + _('Cannot reconcile supplier invoice payable with ' + 'generated line. Please check amounts and see ' + 'if the invoice is already added or paid. ' + 'Invoice: %s') % line.invoice.name) + c_move_lines.reconcile() + return res + + @api.multi + def copy(self, default=None): + res = super(HrExpenseExpense, self).copy(default) + # Erase invoice references + res.line_ids.write({'invoice': False}) + return res + + +class HrExpenseLine(models.Model): + _inherit = 'hr.expense.line' + + invoice = fields.Many2one( + comodel_name="account.invoice", + domain="[('type', '=', 'in_invoice'), ('state', '=', 'open')]") + + @api.one + @api.onchange('invoice') + def onchange_invoice(self): + """Show in screen invoice data""" + self.product_id = False + self.date_value = self.invoice.date_invoice + self.name = self.invoice.number + self.ref = (self.invoice.supplier_invoice_number or + self.invoice.reference) + self.analytic_account = False + self.unit_amount = self.invoice.residual + self.unit_quantity = 1 + self.total_amount = self.unit_amount + + def _check_vals(self, vals): + if vals.get('invoice'): + # Rewrite values because readonly fields are not stored + invoice = self.env['account.invoice'].browse(vals['invoice']) + vals['product_id'] = False + vals['date_value'] = invoice.date_invoice + vals['analytic_account'] = False + vals['unit_amount'] = invoice.residual + vals['unit_quantity'] = 1 + + @api.model + def create(self, vals): + self._check_vals(vals) + return super(HrExpenseLine, self).create(vals) + + @api.multi + def write(self, vals): + self._check_vals(vals) + return super(HrExpenseLine, self).write(vals) diff --git a/hr_expense_invoice/static/description/icon.png b/hr_expense_invoice/static/description/icon.png new file mode 100644 index 0000000000000000000000000000000000000000..8e5a7f402d9eecc9c635f6d13de5eec9b8307b25 GIT binary patch literal 11788 zcmW++1ymbd6UC)K2~ym(#hv1AE$;3X+}(=1wzw57!QHJ`@!;+hDeeycet*tc!a~l= zzIiiuX6~IRWknf`cSP@CU|=xhWF=LB_n`kS6eQqhpRma&@P^TQntnaR&?z* zmLZMH9~x~o=5-m}@s$}j;lz_h7^HP@u*GlfljS&$I?u={&B8N6X=o^abz@3cP6*v) zyPmzQx#sTkO?t=oz-;Fc->o7Bn^7E*po0d^xisefNs2wM(jqk(2+&uXZ0gM+nNTq5 zbvmCV4Hv3$V(?o~lnd>EU=kK0hVWtX%LXbn7I+(dI=UD>{QQHjY;=7;5UB6p+p_n~ zAxjYYVQ^_&JNEHg)om;_NE!7P1B`H>sH{>fj|OkcG+M#}I`_XKbS+nkH^;M613oBC zB$UrTHwE8hsuoSpY!6FIn7XVUJhOQ^$66u+$Bs5FE`L+hdu*-smc+>DVzcY zj$evu9c$p65;YiR-mAPrS-SaOv4Srr5`@&B4*?yy!ocFQdW}~1%3`cs^^xW`96I@f z7!M3x6!9z+JbY3qiEM*k<(>?~9&4+Y(q}lVcF(&_f3N62-1-tf{>ql>vGrHi1aVr9 z8IPti`x_kRhm?RDeEj^L53!PuktzrO-fDjKC%;#B>`uwAMsY$r?=O&wAz(M{2jky9 z?B~^coak;INd?0X{AkI{jBGk+sB6P>l-lV@%x85%%kR8hw$(M-B!9b)Ktd2vE0I4; zaY5!(*O((Rs9X-WN7VK9ZuK~jO=<%V?VqNtZ#*dmjv!ctfm-~ZZmT;4VT?Hr63tN^ zVaB986G`l+X|;dwA$S#ZH-rS#!vBJd2;HqpI6FHpvWtQ4docrgzJF5lQQxaFXisM| zffMjNJubI=&wvsfL=h}BB3ZwpB;J53Dm%}W1F>;sAa108?b@0lH}qa#^!L|s>;~l* z7l&EpdLxz25MJE3IPdt#!`u@k!qn)*&T?~6j&fv{`~+tvZbRLOma`!xJ)ErF-FHJ@ z_v3x5tN$J2!)Y_&F)%WM!C+JYOEv;FqPR{L--RjzCjFMg=5?PVx6IGhCOrRsRj4HW zO_ZUgS>Yyaq1WJj41BqK^3}TifciL&Td{C7b>wSxIX*E#$HMYHZxTPb3QVL}nv&4` z7SSwnk15=phqx~^8u4QlF*so zJ!%2P=EXxghXc*qx=zpF)l%nuf-Qi}WQsI({Cq5V0W{@)NVuYr#x?X51f| z$-4T3wRJWu=|Zp=+Vv*Hhh?ZFjOCV+KJU&Pmc>*%LROD?ezwi+{H$#ayPC|1q#Bh? zDmg(SknVh+z#HUMz?@kUMxunI!rJOON<3$Dhlo1y{NWBMGrSKkY{`1l8jRR3A|kJ= z$|UoZksvo$d@qqk+Po+^BUKWt!wrF`8tfNUKvKcpg~PI6X{5|k6iOhx{(>kIJxai5CtK6b zOLUF?RY^?6T+#%@9)ttgLZx#1j=KCdXp{L1oSS_~SGmw9){V7UD)RD)-0xg0&6}m; zT%3cmyTNgGcDBZDiGzr!%Pmm_H%y~kGbt~RTz&=$<&uq!89cg4NlJ~J%D38H#Ok=7 zr_1$q7s^D^jLFzK{A9OLPhMy^)bKpjar5dSyyOd0Ez+}?L^wOodpVE1f+dwii)NYQ zOj$!34CTRXxYJBRfdQ3+u`}sQSEZ_Dp^gY_8S(~X_z0Bpq;_EN)@E-=i++`H=8|1W zNeLZ|k&7RC-;5gc2)9aCkUT^&!mu=d=F@+!O6Hh#Ys^DfqbvX4UDHQS@bE<}nJ}&# zwu%Nugi!Q7fj~4Bbx%GBPC)!~nT!qjdw%g5E>qFz^Ii4pV1yUxAYhvpFK2<>Gdr5) zKZ=Tq5*sKb!j)B3T}J9Kd`R(JiM_*Vh9XG5Dn_D?Zm^HrpwgBwkNAx|A`vlc3BiD7 z(U;|*RaCk6l;3zu>vVjdi|_89FX~!%@=g^EfaUYvp7)<0CIjDp&HE2?JdPv1;!D64 zI`!crBP0K9&~mCks`OZ;>mA^L%?nDis4jWY2&9dvx4AHaW(@kP?LIqXqje8Et zuXJ-BiXpzW*2?C6je&+LWDimbj`|#fYZ@^Vv)i=rjX@SjgNkr;ev8u`IY@( z*?KDHJ;iGKhx!-?V>T3DTu?x@UF&<+iEr)O;<@II&(3ad)0dNf^R>x>>F#>J(cVJ#7T9@ zdopVxy25yszUg08kl&7~Cyhe5}@xTRD-AftA-o){W~s6JS#qCR6%5~@xj$ChBS~lP$X9>2yXaoY;7-mI!zD` z?s;Y31;SKMZron@mQ{g^I|k)c?YZZ=jryaZW00YI=| zx?cyT3T5Qv<@+t`VcD!ENVpWtW=a&yt*j!-dNND4F1(!D*B0$~Vx_53QBk>gc&1lZ zV<8Z%DCnyJK1#kw(%#k6#Uosce}K&q(JzQ2Udql%*{?^o|36tF`AcN?>rJ)6o=&YP zV)xt2Sx7hhH<(G`C%Z+E)0+E&N%Kkw7)U$Q)2hJEYjrD0_}wBQ5C)I4_3_sI+?W#Z z^S;R27WAjYSguf3TN}Two?cW!0=p22dNobX<-wj%D#C3=T@q;*3@!i1qAWIbR>B+@5Vr0uiRu>_D24k@2D! zR8hfX81P_$$D)tY(7D#w*jQoIox8ZGovldE+IfwgX6WVLO(;KrYsm384ID2DA8gWd*%)JfjCU0PMEGE3Z1MrV5+JxA=R z#gdhGC*F-^yi{jVdi~t`d^su+kU-2E42xb3m!yF{8d2#1Grl}@!;U(1Uoo5=t&jLP|B$~r5`L3OHzr;a2&Y7 zUh|7YZ~wK{s6W6=#Ix{xJ_jmT|H2IvHq-vd8f1J@(s7{nn)&MuyeO;8eO}V|9R&XU z`}gP1AJJ5cV-ErTocO?(BO_c~+{CObw1(DVQX!x3aw&ARjvK=3fT4`fpc`Hff71Z3 z!F<=^(@9o1MWEUZ0H;BFDz!{}jrlM(a8hEm=AP z1OU}7QcjYX%JWBl(o72HbFaeCiR}1%<^x{1=gYKib0Atw4oA~i>AAVNxB0@t!eWVe zS&EPoEi$x>{C~u-c70B_tku@;@M5oHGGil8ZtBT29^i-_b!;m~uq9Vo-7 zs;TjvbzBkfxzGSE=p~p7+F$aZ`coH6BPT|6@7I-Ina@b|@f8L&Sw3e}#=t*hB7Y%g z#StMgI{Mw$6dKg})~jLsh`!$KftWs~Z#p_Uln+3l155Q1n{s4CMn#ELFCfoc`v{p0 z#)_5BnAB>YKlmNEwSiI~5QyM4v@d;}?zCkmzGkU;ok~D}SVN=l&%7{=P3B-WpX;BI zk#`wK3r9D*dwT^lhXg!!1VE%!#KzmJ<08r>FVBkRvD#@zN+L-m4S#WV@^h@M0RO8A zpzf)k6#fd7w~H8&@$skEB<*Vxu9HHZBXujJwER@bmH97wsKFo)>d}#rmg~Cm#m+lW z{^jYT!t+kp+fkkWT3A6gKg=M|J^a3Ow=1QQGk8~ivcMWm#h>$DCv`===e^|T41|*n zGsz5sa=9vdJHk0f1X)>G3QEeKGW$TZ1zf}!g^nXt>9;2D?(PcPuC%!ywOm4MFAhto z_m7bjEUqTb*gT$b*Zub~q!Y;2tlXu7DNy{y8*b}@@}JUyI=8vg-#U@zQz$6-V{)=F z{)lb%pxECJe)s1lWPazpY;yk3_ZRy9H*>uk7*(1)r=R^U4@*NQkN%czyhb-~c%gd# zsa8&QC|tu*CaO)%+$K*FaVEkPd?r5aIuVdnJwuo61g{*5Crj?_T7=(YF+^h*V7So) z^;!0wU16{^pR=0{D(mV-ubjLui7Jrw@$r!rjuDf2jm*74iFi-8n@QXyA(w&gKfxn; z)so^8`B8#=(2-<9>CCYAPlGicv+iv9(E)hn5$;4tEVAz?%0yD-dm?2|KG?iy*tC!Pmqen56=z5zTTH7wphPUzx&RVJ)UnUq+ACAjmH1s=OrBEIWb%p z*}sIPSQL41G(3TRWr|Yd=jJ$U2}ynZiWY;mZ3Rb~2yZ&c%WMwXeGX$|(cxGcA|o{}ywuZFKpan`%SSrkco;KcDd znVVb7)OB!b%;iurk`V2&JnY&CEgu-i47@0Xz$W0fIr(^$$cdaMiN6Gh{P^+XzwAjW z;GwLc5jM25HMcOYd?qJDcJV$kiN2c4k#OC=Rq&~Fqt5T)Qn;QVSFQnPv*HJ=&pVw| zApg?{2xI}UlKkUGm}2S9*Yx0BJuq?QH>sCNh)zFa4tuIHU z#gl^Nr_p&MB}_w^I8Yn_xEH^=s_)|J3Y6)^X@>F*uPCq7qhP&MtoMAcHXWDRr-7SR z2ypi7f#nd0*T1sT&jB4=OsTy~!D3d(p9!<>aJMcVo*Lv8G{6@G*0W>jrmCM9g~xt} z;h&E%R_}c3f(IXvQ{~bZ2@h_(@`SButq%TDDb#NKhbriR9}LQGZRI-%Xxd8Yb1OEv zMy8Q7cL#rc-!&n4*xaWl4QdY z#E)9w&GcoJBfxJ%>EWtgsrFx#6_$HcLlc*pfkE7ooiwf#UBVYqC+7TS)8Tyjpt;pR zvR>F2*eq`n6*?iLoKU7Hzo!B;ua~$FktG+Aspn8P(`liOr&BL7uT9uYp?A^DmNS`QP2@n;X?wXrBW@ncXpiH*SL6j z)wHx^Y?eU`40)n*PaBGpYA+ZxG&Bfn^%Fd9G(BNG&5u9h@4k79wnQ9I^jrc*X?@{5 zxED`hH6{xL@JD85DO@Q#6`zs!!tiBxAs`kOaMu^OE=vv$jzpTn3KArK!yhm;CVfbI zlOmOW%tTi*U$Y#$2$%Pe*OBq^JbwD4=S>bhd)IsIYIW~ql&-)zX4>^7x~tebXoz!} zUSi}wP-BbQzv8;8GvUP`hV+7(;@|9gM8U9B=gahZ8|Av6h1zB49hTK_SMAGLe}ai7 z9{DqA1xBm7Gp4txn*8o5!;sMu%~+)rpV;f1&C@IpvWexsDpq$SA40Y?Cfj@?`{vllZ(9dAD>Ok8Pb>!1FSY}Zj!S>3$||^ z6Cjj(EN*gSG=`6?pNgs=!IToo!+&J|_PnlrKP5~c@g#KlHwnVX2|aT3O8Lpx2UIcC z?3C~8mt01CFiC|b&ab}XL^1eU}|@64RiF-k^^V}ja)%hQ>IF*H_6Avm|p9W*5Rmv zgLCgryY+iK_FB|f0?yRbJx%n=9*ZgdI zAG}r_gqQ1bB-$gW>DQyPU08!jLNs5|q~pk>EW8Pk-`y%3=?x!b3r5G2&`>iHBZ$va zNiO|f>)}=~+aJox_K@oG+qC1bjkw8{Gau%0II3$F5;XZ1u86Mk&!)$RhcQ zEQNm@kO(c48Vq#yvgX;6DZJ;u-6t9y)TB;W!Fuc{6NYuk;w!?vj1XQus#&6n&r>z>A@^6SMTiOiY@pw|9!QM1$ZNkNTb|>w6_u z9J3#<)na(sqRG7X3tu=IIJ?2lNe%}-z>!&2UO9MnXOSN8l4!;v=Jww7Uf%x5fwcA8Dp+I@%rgrX%s>`!ASHY(9hL;ppQ<2YULSOGWcb^d&4eq1&*K_J<~?p=X0BA>OceLyb+gIo0*L)M6|&$Xs#k zCM{=&m5znDNPcwz?(*e^?WWmL@|B3bjo-h=1lt0 zL}oX3Kit_iL^?$aD@dl)Z*R2xbLOy3|HPLeo2e0KE(#M~unZpi?h8uP_Lz$su2J$x zKZ!bZN3D1VE%u|+DQ1n#F1ZqLdcY;Gwo0xkYxQ+D8}#{Oz9sE8Py!}V-gvlio0nEl zn_9wV1HY@yoW5PNl$p`{RBc-_awzOB=0|wDCpwiDV>x;xaQwkw=YjxQNx_Pf8x>bSebWG6DOx<4Cjy@Zrg4Zb=z54sxYuvd%R(I~xuKj769cJ@LU z&EiVH^r5Qqw|gD?!-b!-$R?AR2ul-mp9&uCBA5q5@buOmbbBgQ*6d zZ%l)hC$-Ly7mP-N_GV8P&#kMwb=Bp+IV}Kr*p9wpS-s75_MJHb%?|y$XS-}@E`PY!K>NXR%>N|-k_a(M)?8!d<$8)Ot z(R@;7CK3B7bm4;m_U2Xux#ivIn#m#1S}T?!e0DnkUF}bnmX&=DVmA&8_xS|6z(9K~fi@LIMxNz)uryW$dZ^>?qN9zGuVQBc+ zq@)UNZr2N4_`sf;Hv)XqY>Wk(9M(pz4`;sd(8mBW7o8nS%T_pXjW(518Uzwu0{$3{ z&4p!~8E#lTv~#0kWF&J~tNI>aSo&|(hmWaP*0;2OYPBeGO((iuw&4FnF@A14@;qK? zPH1T00(@Mt9RHpn|0^7ckWYhN7{Fd3qt*Z#USx{w@bIv{$C5=7G36)?Ev@tG!@ioK zp(4OR1$2`q4E1eoy8!&ku&k2RGz~9HT1;IX$1S;E&Tk>ipW0Vg+m15vog|@E{+9?Z zAh%l`pk{BE&*X~Q-8DDYdDXpx1Kc8<*x^9)`ZR;n3aNV%aP3OH=5TEgGaecaz2b2P zR$Xl076m;$J;CA1q1!YR8YJV1tAlOr;Ii$p5UfbSY=#h3CXpfRk1YkzPOb~@1dBza zzxbl?HQDOHPo-Ugd(G??+ai81!vMHUCg5sAWVh&z@H3+Ps1b*!{U(p(aLRj)xtSNR zb8T&HDY{h?AhAqOcd4%-h*5}$h|nw+_8Lc8`yGC4h%AU4Fzq$BSy|$wq=fC>P!gJo zRjl7~Zr*loFDtA3x%9W7tu0f!G-dWX?&amxeMf!}vz}wG)(ib^1-^JTFTZ$Qo|3{8 zDS@?#Y(xLSF#@{K>bT#|gt%p_9NO|hI|c^NF_XEp!=%Pq71R=y>Cl(*d`gBq?iZ3r z=;&Y5iEO^!jXeKbLO_N^J%n}RCw1(8;knuyKdNIA1Bn+{HulP?=>B8nHi8w?-p9K9P31>T{Jy{U!eccg$r-l=1Cs;(|IGrFATDk0vo*=;kmuyF2vUSJny7D2qnn{WM6?6CRoEvFi*NwR>4bH_4!j(p;JM6rd| zoni`x-o~JlpG&?XB2FHKqvc(HQ}w)#Dx1ZpfwpUIZY~F+q@bYid~79xrUoDQyhDEX z+3mPYSxv3a=M3tSnHI4Q#vE3rl$61P?1zcS-Hn7K?pB3;Iwr=oG;l!#(HX*BmA$w^NmRB zLrK=fLl=q7uLs7*R9@&220A*>ho}sqU^o;Xvj75+K5G1F5|2})zhn&vu&M*{D+IRHAu|9D)0+YlB-bM%jI9W?$1H-Xv<7Uu9*KKw>;Nux7$TlP(0r7XaIPoi4}6#{n@Lh-xU;2_qE#I)&&z6S)A_ zZHKbXdrHy3*y^&fvaw9=7(m=qQ&kO~IV@^y{7^pk#m0uAj;V0rsCLP&S9Dmj{DZ>G z^8Cw^T~TTC4T9B9!9@7{gpB}Da(YknBvtwyn$7B$x+q1BOaV4{HQ?#QB(>*aXDDKKhAQ?bhf>v0 z1sA~bzuB%6y?QS;hbQcg@UR$SC=~NNKc`L`XFwO(T|p(ig9ZleqwZlh0&U$CCEd=NAG_70 zi}SURlz2OxwXo`4W_&CJmuu=Hm&_ur!M@M1KN4j~-BFQ{dAcp7>_alC(a14Q;RU5OwW!Z%PW97+_PN8Ocm_b?3otB3(% zKH_F`_ltcV*FW`x)6?w`LfVCiyTi14y z%udTTo1zl9QWctv9_^%3Q&X$@GIDb40G%Jv_sy`H9++Y1G)w>p&qr=Re>7zy2)2Q+ z(;{nVJaOf#w@b)Qo=!y>$Uaqk=e{?|A$H2e7MbZEqyR5|mp3Ux0TNB70kXegbsCT$I&K=p zg0Bf5sYUxmH-YHbeYx8hvaEN1kd|zM3oR@zMg-E&f7(KuJ0rD>#|hgq4j|uH%IA$; zO?Hdcm&1y2n7GJ?i{h-$t3K!Iay2qTS_?P}Kl~n<;C201k$UvG*ZLcm)={^2Dh5DlkfH3f`^%bgf+?HMP0VrjY|YT|_1~2^dkQ z-ty`^g*B1SR6St@`|{jhSXWPV?Ft43d8@iDW7;g zl9=j8$Lkbq+szQAuTLIu5G_~i5K$CCLcL}O3}ib2dvojFKF zzqanZbPC@;WXWct&W}SE-)qx&+e);!GCi>v0GrhI*3ltI7WjMtG79#PP44I0zZT3U zY7qK^xSux!Xpn&HpivDpoJwXNQTL%S+SYpxh^)t1>67&b8&Mc8jNRUW&KCg@$hWB@q_K`fRK9* z5CPH;?uQSxR%fs_HjpHo?g+{=MFiTa8GhJVpsODDxV*ds^cOO>iPDgA?$RiLHxGXx z70q(oG4Na)_@!d+B1!?uud0d<4u<>k<;$Nx(>e>$x(j zlvG3_1{f4b|A?wZExWcNrC#a(&6#hhe{c{R2j>a{Hvf&ucWP>i$)JsksWU%6sQt7J zt<#YF_%bUq^Rve>0U*5sQzL*PWo=_q(A1Q=WAOtQ@5l6_a@0Bx-gpzP{{(I1-h@S@ zEcE&2-p0`E^u{yk$Bz%_zuZeIGewoH3H04aDDM4)|C3^GPga&%k2q~?a=7>z6V1`S z%zCNs=!X_%q}N%wKPe!KUhN3IGJe0e#d4Fo9}SfGG6JGg%8ebjBzAKYK^KPu@MYV> zlgwk>n9cZjOSda!>+Y%bqU5ZAp|95m)l^(~aO~Mw{d_&r+UAII_V-_e%v*}bFG=Bo zq1DIEEL{&oz?MT?;X^R2+)xhWaX$Zl0%LD)50HTJ!iyRk8qOyJUpdY1CV*_o(s@0d zm}RIx_b1%Ierwip%;3*_4%H>pD0_Y27nz?$!nVjOXhYXYSVxD`>oIKdJnbc%K!yvL zRG?*NcRoM)#HAe(q&7hFk>!0t#NG4N;of-GPza{5tf(5w_qTA`1y-vA=ud*UL9vJ1 zJ_?#1z~6?GsB^0GCMVu+IPXHrtEhN*c=}iVSaT((rQs(lfe?0aYG0%ih=v=$oJ%Ut zxGwlv;yLKdo4<|fiE968X`?%wKIiGRygmX`X*a+*eM!*TEPqP`gmM;uYTVx5Msk;| zzCxErKO?am>?V+*OA5kU<#+9=&bwUw^!_LTh3@r#r(e%%nCB>M1=$*9&oOcIlqsW znmGa3bPyVAKkbME&y-|yvm+zr;GLfZz6orD0QNul=b^a{9WdhHWjFHuli%~j&{|b9 zbt<#opcUd%RDvrAhckJ0ww!>|QoetnV(oCSy3NKr;WF+=JNuwTolU>y@s zZDGf%=>r96ijuIL>s8v;JPtOtcCG2arw!fur7=gc!0T(`fK*dxMlkgN&1b@Z?mPf8 zC}8I+bov0}k*7MYcX(5(^$bA_I+{zln2cz$Q?f$c@JjQ@`OAQAMc85Ojw z&j5rAgg_(Laqiu}f5XbY(F=r^3}*7t^ZtGn!lKAU-0?IrhGO+>Ic0Njt&w`JVo`0% zB};mEc*q(ydu3%675Ba&lcBr@?8NZ`gA3qDJmXsJ z#ZF&OC~T40+Q#Nr;1MY3=)$L`tA-BK)6)|-`XVr`hLdScBt-4(?7AB+%0tCuf&iCD z0Cttg)xJhnaGPVdO2}!6UanP5mU!zw$98ZGgNDz7t_FW~dAZnVt5y0JP~T!@$h>LB zuq7DyIX+U2-;Pi|q#Sf8@iQ=Q zwhzSH|Cb964o;-pBqpRF0lw`3!*VRWxAShD_|nOp-ylzh{)J(iQ7kAn7M;xJ;3wx= zY&~{}A__@lTX%2T{UF;b_YmPB?6N|`iF77?o?qS9guEFk3kzB(j~FgF`G(_7wt}^d zLzW{Uly7o><8?Q3WoN?9-W||?yiXqJmu`Dk;57qZW3MvYCYq5dy2Rp|g0MB-fb5k= Vb`c1*04BF# + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/hr_expense_invoice/views/hr_expense_expense_view.xml b/hr_expense_invoice/views/hr_expense_expense_view.xml new file mode 100644 index 000000000..ad436cf51 --- /dev/null +++ b/hr_expense_invoice/views/hr_expense_expense_view.xml @@ -0,0 +1,56 @@ + + + + + + hr.expense.form.invoice + hr.expense.expense + + + + + + + {'readonly': [('invoice', '!=', False)]} + + + {'readonly': [('invoice', '!=', False)]} + + + {'readonly': [('invoice', '!=', False)]} + + + {'readonly': [('invoice', '!=', False)]} + + + {'readonly': [('invoice', '!=', False)]} + + + {'readonly': [('invoice', '!=', False)]} + + + + + + {'readonly': [('invoice', '!=', False)]} + + + {'readonly': [('invoice', '!=', False)]} + + + {'readonly': [('invoice', '!=', False)]} + + + {'readonly': [('invoice', '!=', False)]} + + + {'readonly': [('invoice', '!=', False)]} + + + {'readonly': [('invoice', '!=', False)]} + + + + + + From 679ac67c0505dc9c457b513bebb547697fd1aa99 Mon Sep 17 00:00:00 2001 From: "Pedro M. Baeza" Date: Fri, 6 Nov 2015 01:20:52 +0100 Subject: [PATCH 02/69] [IMP] hr_expense_invoice: Allow to create supplier invoice from expense view OCA Transbot updated translations from Transifex --- hr_expense_invoice/i18n/de.po | 49 +++++++++++++++++++ hr_expense_invoice/i18n/es.po | 12 +++-- hr_expense_invoice/i18n/{en.po => fi.po} | 21 ++++---- hr_expense_invoice/i18n/fr.po | 11 +++-- hr_expense_invoice/i18n/it.po | 47 ++++++++++++++++++ hr_expense_invoice/i18n/pt_BR.po | 47 ++++++++++++++++++ .../views/hr_expense_expense_view.xml | 8 ++- 7 files changed, 173 insertions(+), 22 deletions(-) create mode 100644 hr_expense_invoice/i18n/de.po rename hr_expense_invoice/i18n/{en.po => fi.po} (68%) create mode 100644 hr_expense_invoice/i18n/it.po create mode 100644 hr_expense_invoice/i18n/pt_BR.po diff --git a/hr_expense_invoice/i18n/de.po b/hr_expense_invoice/i18n/de.po new file mode 100644 index 000000000..77e7b0ed3 --- /dev/null +++ b/hr_expense_invoice/i18n/de.po @@ -0,0 +1,49 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * hr_expense_invoice +# +# Translators: +# Rudolf Schnapka , 2016 +# Thomas A. Jaeger, 2015 +# Thomas A. Jaeger, 2015 +msgid "" +msgstr "" +"Project-Id-Version: hr (8.0)\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2015-11-30 05:19+0000\n" +"PO-Revision-Date: 2016-01-26 09:44+0000\n" +"Last-Translator: Rudolf Schnapka \n" +"Language-Team: German (http://www.transifex.com/oca/OCA-hr-8-0/language/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: hr_expense_invoice +#: code:addons/hr_expense_invoice/models/hr_expense_expense.py:49 +#, python-format +msgid "" +"Cannot reconcile supplier invoice payable with generated line. Please check " +"amounts and see if the invoice is already added or paid. Invoice: %s" +msgstr "Die erstellte Zeile kann nicht mit der Lieferantenrechnung ausgeglichen werden. Prüfen Sie, ob die Rechnung bereits hinzugefügt oder bezahlt ist. Rechnung: %s" + +#. module: hr_expense_invoice +#: model:ir.model,name:hr_expense_invoice.model_hr_expense_expense +msgid "Expense" +msgstr "Aufwand" + +#. module: hr_expense_invoice +#: model:ir.model,name:hr_expense_invoice.model_hr_expense_line +msgid "Expense Line" +msgstr "Spesendetail" + +#. module: hr_expense_invoice +#: field:hr.expense.line,invoice:0 +msgid "Invoice" +msgstr "Rechnung" + +#. module: hr_expense_invoice +#: view:hr.expense.expense:hr_expense_invoice.view_expenses_form_invoice +msgid "{'readonly': [('invoice', '!=', False)]}" +msgstr "{'readonly': [('invoice', '!=', False)]}" diff --git a/hr_expense_invoice/i18n/es.po b/hr_expense_invoice/i18n/es.po index 8d4a04b88..fd9135a10 100644 --- a/hr_expense_invoice/i18n/es.po +++ b/hr_expense_invoice/i18n/es.po @@ -3,13 +3,15 @@ # * hr_expense_invoice # # Translators: +# Antonio Trueba, 2016 +# Antonio Trueba, 2016 msgid "" msgstr "" "Project-Id-Version: hr (8.0)\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2015-08-18 13:10+0000\n" -"PO-Revision-Date: 2015-07-27 23:44+0000\n" -"Last-Translator: OCA Transbot \n" +"POT-Creation-Date: 2015-11-30 05:19+0000\n" +"PO-Revision-Date: 2016-02-16 14:59+0000\n" +"Last-Translator: Antonio Trueba\n" "Language-Team: Spanish (http://www.transifex.com/oca/OCA-hr-8-0/language/es/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" @@ -33,7 +35,7 @@ msgstr "Gasto" #. module: hr_expense_invoice #: model:ir.model,name:hr_expense_invoice.model_hr_expense_line msgid "Expense Line" -msgstr "" +msgstr "Línea de gasto" #. module: hr_expense_invoice #: field:hr.expense.line,invoice:0 @@ -43,4 +45,4 @@ msgstr "Factura" #. module: hr_expense_invoice #: view:hr.expense.expense:hr_expense_invoice.view_expenses_form_invoice msgid "{'readonly': [('invoice', '!=', False)]}" -msgstr "" +msgstr "{'readonly': [('invoice', '!=', False)]}" diff --git a/hr_expense_invoice/i18n/en.po b/hr_expense_invoice/i18n/fi.po similarity index 68% rename from hr_expense_invoice/i18n/en.po rename to hr_expense_invoice/i18n/fi.po index 3e163a52d..7deb8fe47 100644 --- a/hr_expense_invoice/i18n/en.po +++ b/hr_expense_invoice/i18n/fi.po @@ -3,18 +3,19 @@ # * hr_expense_invoice # # Translators: +# Jarmo Kortetjärvi , 2016 msgid "" msgstr "" "Project-Id-Version: hr (8.0)\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2015-08-18 13:10+0000\n" -"PO-Revision-Date: 2015-07-27 23:44+0000\n" -"Last-Translator: OCA Transbot \n" -"Language-Team: English (http://www.transifex.com/oca/OCA-hr-8-0/language/en/)\n" +"POT-Creation-Date: 2016-04-14 04:15+0000\n" +"PO-Revision-Date: 2016-04-04 11:09+0000\n" +"Last-Translator: Jarmo Kortetjärvi \n" +"Language-Team: Finnish (http://www.transifex.com/oca/OCA-hr-8-0/language/fi/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: \n" -"Language: en\n" +"Language: fi\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" #. module: hr_expense_invoice @@ -23,24 +24,24 @@ msgstr "" msgid "" "Cannot reconcile supplier invoice payable with generated line. Please check " "amounts and see if the invoice is already added or paid. Invoice: %s" -msgstr "Cannot reconcile supplier invoice payable with generated line. Please check amounts and see if the invoice is already added or paid. Invoice: %s" +msgstr "" #. module: hr_expense_invoice #: model:ir.model,name:hr_expense_invoice.model_hr_expense_expense msgid "Expense" -msgstr "Expense" +msgstr "Kulu" #. module: hr_expense_invoice #: model:ir.model,name:hr_expense_invoice.model_hr_expense_line msgid "Expense Line" -msgstr "Expense Line" +msgstr "" #. module: hr_expense_invoice #: field:hr.expense.line,invoice:0 msgid "Invoice" -msgstr "Invoice" +msgstr "Lasku" #. module: hr_expense_invoice #: view:hr.expense.expense:hr_expense_invoice.view_expenses_form_invoice msgid "{'readonly': [('invoice', '!=', False)]}" -msgstr "{'readonly': [('invoice', '!=', False)]}" +msgstr "" diff --git a/hr_expense_invoice/i18n/fr.po b/hr_expense_invoice/i18n/fr.po index 6b3cf3468..ee1946481 100644 --- a/hr_expense_invoice/i18n/fr.po +++ b/hr_expense_invoice/i18n/fr.po @@ -3,13 +3,14 @@ # * hr_expense_invoice # # Translators: +# Mohamed HABOU , 2016 msgid "" msgstr "" "Project-Id-Version: hr (8.0)\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2015-08-18 13:10+0000\n" -"PO-Revision-Date: 2015-07-27 23:44+0000\n" -"Last-Translator: <>\n" +"POT-Creation-Date: 2015-11-30 05:19+0000\n" +"PO-Revision-Date: 2016-01-11 17:13+0000\n" +"Last-Translator: Mohamed HABOU \n" "Language-Team: French (http://www.transifex.com/oca/OCA-hr-8-0/language/fr/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" @@ -33,12 +34,12 @@ msgstr "Frais" #. module: hr_expense_invoice #: model:ir.model,name:hr_expense_invoice.model_hr_expense_line msgid "Expense Line" -msgstr "" +msgstr "Ligne de frais" #. module: hr_expense_invoice #: field:hr.expense.line,invoice:0 msgid "Invoice" -msgstr "" +msgstr "Facture" #. module: hr_expense_invoice #: view:hr.expense.expense:hr_expense_invoice.view_expenses_form_invoice diff --git a/hr_expense_invoice/i18n/it.po b/hr_expense_invoice/i18n/it.po new file mode 100644 index 000000000..3ddf3b073 --- /dev/null +++ b/hr_expense_invoice/i18n/it.po @@ -0,0 +1,47 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * hr_expense_invoice +# +# Translators: +# Paolo Valier, 2016 +msgid "" +msgstr "" +"Project-Id-Version: hr (8.0)\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2016-03-12 12:02+0000\n" +"PO-Revision-Date: 2016-03-19 10:40+0000\n" +"Last-Translator: Paolo Valier\n" +"Language-Team: Italian (http://www.transifex.com/oca/OCA-hr-8-0/language/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: hr_expense_invoice +#: code:addons/hr_expense_invoice/models/hr_expense_expense.py:49 +#, python-format +msgid "" +"Cannot reconcile supplier invoice payable with generated line. Please check " +"amounts and see if the invoice is already added or paid. Invoice: %s" +msgstr "" + +#. module: hr_expense_invoice +#: model:ir.model,name:hr_expense_invoice.model_hr_expense_expense +msgid "Expense" +msgstr "" + +#. module: hr_expense_invoice +#: model:ir.model,name:hr_expense_invoice.model_hr_expense_line +msgid "Expense Line" +msgstr "" + +#. module: hr_expense_invoice +#: field:hr.expense.line,invoice:0 +msgid "Invoice" +msgstr "Fattura" + +#. module: hr_expense_invoice +#: view:hr.expense.expense:hr_expense_invoice.view_expenses_form_invoice +msgid "{'readonly': [('invoice', '!=', False)]}" +msgstr "" diff --git a/hr_expense_invoice/i18n/pt_BR.po b/hr_expense_invoice/i18n/pt_BR.po new file mode 100644 index 000000000..2b890fe7b --- /dev/null +++ b/hr_expense_invoice/i18n/pt_BR.po @@ -0,0 +1,47 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * hr_expense_invoice +# +# Translators: +# danimaribeiro , 2016 +msgid "" +msgstr "" +"Project-Id-Version: hr (8.0)\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2016-03-11 01:48+0000\n" +"PO-Revision-Date: 2016-03-08 03:18+0000\n" +"Last-Translator: danimaribeiro \n" +"Language-Team: Portuguese (Brazil) (http://www.transifex.com/oca/OCA-hr-8-0/language/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: hr_expense_invoice +#: code:addons/hr_expense_invoice/models/hr_expense_expense.py:49 +#, python-format +msgid "" +"Cannot reconcile supplier invoice payable with generated line. Please check " +"amounts and see if the invoice is already added or paid. Invoice: %s" +msgstr "" + +#. module: hr_expense_invoice +#: model:ir.model,name:hr_expense_invoice.model_hr_expense_expense +msgid "Expense" +msgstr "Despesa" + +#. module: hr_expense_invoice +#: model:ir.model,name:hr_expense_invoice.model_hr_expense_line +msgid "Expense Line" +msgstr "Linha da despesa" + +#. module: hr_expense_invoice +#: field:hr.expense.line,invoice:0 +msgid "Invoice" +msgstr "Fatura" + +#. module: hr_expense_invoice +#: view:hr.expense.expense:hr_expense_invoice.view_expenses_form_invoice +msgid "{'readonly': [('invoice', '!=', False)]}" +msgstr "" diff --git a/hr_expense_invoice/views/hr_expense_expense_view.xml b/hr_expense_invoice/views/hr_expense_expense_view.xml index ad436cf51..c21ba5dd0 100644 --- a/hr_expense_invoice/views/hr_expense_expense_view.xml +++ b/hr_expense_invoice/views/hr_expense_expense_view.xml @@ -8,7 +8,9 @@ - + {'readonly': [('invoice', '!=', False)]} @@ -29,7 +31,9 @@ {'readonly': [('invoice', '!=', False)]} - + {'readonly': [('invoice', '!=', False)]} From 9027bc251bde2ed7dc7f6b7b0945f40eac8935af Mon Sep 17 00:00:00 2001 From: Christophe CHAUVET Date: Mon, 17 Oct 2016 22:31:35 +0200 Subject: [PATCH 03/69] [FIX] Fix issue with 2 invoices on the same partner and the same total amount (#237) On the same expense, when we have 2 or more lines with different invoices, and each invoices have the same total amount, reconcile is not possible. The fix is to exclude reconcile account.move.line, and the first time if we have more than one line to reconcile on the same amount, we keep the first. OCA Transbot updated translations from Transifex --- hr_expense_invoice/i18n/ar.po | 46 +++++++++++++++++++ hr_expense_invoice/i18n/bg.po | 46 +++++++++++++++++++ hr_expense_invoice/i18n/bs.po | 46 +++++++++++++++++++ hr_expense_invoice/i18n/ca.po | 46 +++++++++++++++++++ hr_expense_invoice/i18n/cs.po | 46 +++++++++++++++++++ hr_expense_invoice/i18n/de.po | 6 +-- hr_expense_invoice/i18n/el_GR.po | 46 +++++++++++++++++++ hr_expense_invoice/i18n/en_GB.po | 46 +++++++++++++++++++ hr_expense_invoice/i18n/es.po | 6 +-- hr_expense_invoice/i18n/es_CR.po | 46 +++++++++++++++++++ hr_expense_invoice/i18n/es_EC.po | 46 +++++++++++++++++++ hr_expense_invoice/i18n/es_MX.po | 46 +++++++++++++++++++ hr_expense_invoice/i18n/et.po | 46 +++++++++++++++++++ hr_expense_invoice/i18n/fr.po | 13 +++--- hr_expense_invoice/i18n/fr_CA.po | 46 +++++++++++++++++++ hr_expense_invoice/i18n/fr_CH.po | 46 +++++++++++++++++++ hr_expense_invoice/i18n/gl.po | 46 +++++++++++++++++++ hr_expense_invoice/i18n/hr.po | 46 +++++++++++++++++++ hr_expense_invoice/i18n/hr_HR.po | 46 +++++++++++++++++++ hr_expense_invoice/i18n/hu.po | 46 +++++++++++++++++++ hr_expense_invoice/i18n/id.po | 46 +++++++++++++++++++ hr_expense_invoice/i18n/ja.po | 46 +++++++++++++++++++ hr_expense_invoice/i18n/lt.po | 46 +++++++++++++++++++ hr_expense_invoice/i18n/mk.po | 46 +++++++++++++++++++ hr_expense_invoice/i18n/mn.po | 46 +++++++++++++++++++ hr_expense_invoice/i18n/nb.po | 46 +++++++++++++++++++ hr_expense_invoice/i18n/nb_NO.po | 46 +++++++++++++++++++ hr_expense_invoice/i18n/nl.po | 46 +++++++++++++++++++ hr_expense_invoice/i18n/nl_BE.po | 46 +++++++++++++++++++ hr_expense_invoice/i18n/nl_NL.po | 46 +++++++++++++++++++ hr_expense_invoice/i18n/pl.po | 46 +++++++++++++++++++ hr_expense_invoice/i18n/pt.po | 46 +++++++++++++++++++ hr_expense_invoice/i18n/pt_PT.po | 46 +++++++++++++++++++ hr_expense_invoice/i18n/ro.po | 46 +++++++++++++++++++ hr_expense_invoice/i18n/ru.po | 46 +++++++++++++++++++ hr_expense_invoice/i18n/sk_SK.po | 46 +++++++++++++++++++ hr_expense_invoice/i18n/sl.po | 6 +-- hr_expense_invoice/i18n/sv.po | 46 +++++++++++++++++++ hr_expense_invoice/i18n/th.po | 46 +++++++++++++++++++ hr_expense_invoice/i18n/tr.po | 46 +++++++++++++++++++ hr_expense_invoice/i18n/tr_TR.po | 46 +++++++++++++++++++ hr_expense_invoice/i18n/zh_CN.po | 46 +++++++++++++++++++ hr_expense_invoice/i18n/zh_TW.po | 46 +++++++++++++++++++ .../models/hr_expense_expense.py | 5 +- 44 files changed, 1814 insertions(+), 16 deletions(-) create mode 100644 hr_expense_invoice/i18n/ar.po create mode 100644 hr_expense_invoice/i18n/bg.po create mode 100644 hr_expense_invoice/i18n/bs.po create mode 100644 hr_expense_invoice/i18n/ca.po create mode 100644 hr_expense_invoice/i18n/cs.po create mode 100644 hr_expense_invoice/i18n/el_GR.po create mode 100644 hr_expense_invoice/i18n/en_GB.po create mode 100644 hr_expense_invoice/i18n/es_CR.po create mode 100644 hr_expense_invoice/i18n/es_EC.po create mode 100644 hr_expense_invoice/i18n/es_MX.po create mode 100644 hr_expense_invoice/i18n/et.po create mode 100644 hr_expense_invoice/i18n/fr_CA.po create mode 100644 hr_expense_invoice/i18n/fr_CH.po create mode 100644 hr_expense_invoice/i18n/gl.po create mode 100644 hr_expense_invoice/i18n/hr.po create mode 100644 hr_expense_invoice/i18n/hr_HR.po create mode 100644 hr_expense_invoice/i18n/hu.po create mode 100644 hr_expense_invoice/i18n/id.po create mode 100644 hr_expense_invoice/i18n/ja.po create mode 100644 hr_expense_invoice/i18n/lt.po create mode 100644 hr_expense_invoice/i18n/mk.po create mode 100644 hr_expense_invoice/i18n/mn.po create mode 100644 hr_expense_invoice/i18n/nb.po create mode 100644 hr_expense_invoice/i18n/nb_NO.po create mode 100644 hr_expense_invoice/i18n/nl.po create mode 100644 hr_expense_invoice/i18n/nl_BE.po create mode 100644 hr_expense_invoice/i18n/nl_NL.po create mode 100644 hr_expense_invoice/i18n/pl.po create mode 100644 hr_expense_invoice/i18n/pt.po create mode 100644 hr_expense_invoice/i18n/pt_PT.po create mode 100644 hr_expense_invoice/i18n/ro.po create mode 100644 hr_expense_invoice/i18n/ru.po create mode 100644 hr_expense_invoice/i18n/sk_SK.po create mode 100644 hr_expense_invoice/i18n/sv.po create mode 100644 hr_expense_invoice/i18n/th.po create mode 100644 hr_expense_invoice/i18n/tr.po create mode 100644 hr_expense_invoice/i18n/tr_TR.po create mode 100644 hr_expense_invoice/i18n/zh_CN.po create mode 100644 hr_expense_invoice/i18n/zh_TW.po diff --git a/hr_expense_invoice/i18n/ar.po b/hr_expense_invoice/i18n/ar.po new file mode 100644 index 000000000..19701264d --- /dev/null +++ b/hr_expense_invoice/i18n/ar.po @@ -0,0 +1,46 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * hr_expense_invoice +# +# Translators: +msgid "" +msgstr "" +"Project-Id-Version: hr (8.0)\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2016-12-24 02:15+0000\n" +"PO-Revision-Date: 2015-07-27 23:44+0000\n" +"Last-Translator: <>\n" +"Language-Team: Arabic (http://www.transifex.com/oca/OCA-hr-8-0/language/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: hr_expense_invoice +#: code:addons/hr_expense_invoice/models/hr_expense_expense.py:52 +#, python-format +msgid "" +"Cannot reconcile supplier invoice payable with generated line. Please check " +"amounts and see if the invoice is already added or paid. Invoice: %s" +msgstr "" + +#. module: hr_expense_invoice +#: model:ir.model,name:hr_expense_invoice.model_hr_expense_expense +msgid "Expense" +msgstr "" + +#. module: hr_expense_invoice +#: model:ir.model,name:hr_expense_invoice.model_hr_expense_line +msgid "Expense Line" +msgstr "" + +#. module: hr_expense_invoice +#: field:hr.expense.line,invoice:0 +msgid "Invoice" +msgstr "فاتورة" + +#. module: hr_expense_invoice +#: view:hr.expense.expense:hr_expense_invoice.view_expenses_form_invoice +msgid "{'readonly': [('invoice', '!=', False)]}" +msgstr "" diff --git a/hr_expense_invoice/i18n/bg.po b/hr_expense_invoice/i18n/bg.po new file mode 100644 index 000000000..1dd67ee04 --- /dev/null +++ b/hr_expense_invoice/i18n/bg.po @@ -0,0 +1,46 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * hr_expense_invoice +# +# Translators: +msgid "" +msgstr "" +"Project-Id-Version: hr (8.0)\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2016-12-24 02:15+0000\n" +"PO-Revision-Date: 2015-07-27 23:44+0000\n" +"Last-Translator: <>\n" +"Language-Team: Bulgarian (http://www.transifex.com/oca/OCA-hr-8-0/language/bg/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Language: bg\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +#. module: hr_expense_invoice +#: code:addons/hr_expense_invoice/models/hr_expense_expense.py:52 +#, python-format +msgid "" +"Cannot reconcile supplier invoice payable with generated line. Please check " +"amounts and see if the invoice is already added or paid. Invoice: %s" +msgstr "" + +#. module: hr_expense_invoice +#: model:ir.model,name:hr_expense_invoice.model_hr_expense_expense +msgid "Expense" +msgstr "" + +#. module: hr_expense_invoice +#: model:ir.model,name:hr_expense_invoice.model_hr_expense_line +msgid "Expense Line" +msgstr "" + +#. module: hr_expense_invoice +#: field:hr.expense.line,invoice:0 +msgid "Invoice" +msgstr "Фактура" + +#. module: hr_expense_invoice +#: view:hr.expense.expense:hr_expense_invoice.view_expenses_form_invoice +msgid "{'readonly': [('invoice', '!=', False)]}" +msgstr "" diff --git a/hr_expense_invoice/i18n/bs.po b/hr_expense_invoice/i18n/bs.po new file mode 100644 index 000000000..de3419dda --- /dev/null +++ b/hr_expense_invoice/i18n/bs.po @@ -0,0 +1,46 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * hr_expense_invoice +# +# Translators: +msgid "" +msgstr "" +"Project-Id-Version: hr (8.0)\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2016-12-24 02:15+0000\n" +"PO-Revision-Date: 2015-07-27 23:44+0000\n" +"Last-Translator: <>\n" +"Language-Team: Bosnian (http://www.transifex.com/oca/OCA-hr-8-0/language/bs/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Language: bs\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: hr_expense_invoice +#: code:addons/hr_expense_invoice/models/hr_expense_expense.py:52 +#, python-format +msgid "" +"Cannot reconcile supplier invoice payable with generated line. Please check " +"amounts and see if the invoice is already added or paid. Invoice: %s" +msgstr "" + +#. module: hr_expense_invoice +#: model:ir.model,name:hr_expense_invoice.model_hr_expense_expense +msgid "Expense" +msgstr "" + +#. module: hr_expense_invoice +#: model:ir.model,name:hr_expense_invoice.model_hr_expense_line +msgid "Expense Line" +msgstr "" + +#. module: hr_expense_invoice +#: field:hr.expense.line,invoice:0 +msgid "Invoice" +msgstr "Faktura" + +#. module: hr_expense_invoice +#: view:hr.expense.expense:hr_expense_invoice.view_expenses_form_invoice +msgid "{'readonly': [('invoice', '!=', False)]}" +msgstr "" diff --git a/hr_expense_invoice/i18n/ca.po b/hr_expense_invoice/i18n/ca.po new file mode 100644 index 000000000..33ff034e9 --- /dev/null +++ b/hr_expense_invoice/i18n/ca.po @@ -0,0 +1,46 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * hr_expense_invoice +# +# Translators: +msgid "" +msgstr "" +"Project-Id-Version: hr (8.0)\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2016-12-24 02:15+0000\n" +"PO-Revision-Date: 2015-07-27 23:44+0000\n" +"Last-Translator: <>\n" +"Language-Team: Catalan (http://www.transifex.com/oca/OCA-hr-8-0/language/ca/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Language: ca\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +#. module: hr_expense_invoice +#: code:addons/hr_expense_invoice/models/hr_expense_expense.py:52 +#, python-format +msgid "" +"Cannot reconcile supplier invoice payable with generated line. Please check " +"amounts and see if the invoice is already added or paid. Invoice: %s" +msgstr "" + +#. module: hr_expense_invoice +#: model:ir.model,name:hr_expense_invoice.model_hr_expense_expense +msgid "Expense" +msgstr "" + +#. module: hr_expense_invoice +#: model:ir.model,name:hr_expense_invoice.model_hr_expense_line +msgid "Expense Line" +msgstr "" + +#. module: hr_expense_invoice +#: field:hr.expense.line,invoice:0 +msgid "Invoice" +msgstr "Factura" + +#. module: hr_expense_invoice +#: view:hr.expense.expense:hr_expense_invoice.view_expenses_form_invoice +msgid "{'readonly': [('invoice', '!=', False)]}" +msgstr "" diff --git a/hr_expense_invoice/i18n/cs.po b/hr_expense_invoice/i18n/cs.po new file mode 100644 index 000000000..8d7db4205 --- /dev/null +++ b/hr_expense_invoice/i18n/cs.po @@ -0,0 +1,46 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * hr_expense_invoice +# +# Translators: +msgid "" +msgstr "" +"Project-Id-Version: hr (8.0)\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2016-12-24 02:15+0000\n" +"PO-Revision-Date: 2015-07-27 23:44+0000\n" +"Last-Translator: <>\n" +"Language-Team: Czech (http://www.transifex.com/oca/OCA-hr-8-0/language/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=3; plural=(n==1) ? 0 : (n>=2 && n<=4) ? 1 : 2;\n" + +#. module: hr_expense_invoice +#: code:addons/hr_expense_invoice/models/hr_expense_expense.py:52 +#, python-format +msgid "" +"Cannot reconcile supplier invoice payable with generated line. Please check " +"amounts and see if the invoice is already added or paid. Invoice: %s" +msgstr "" + +#. module: hr_expense_invoice +#: model:ir.model,name:hr_expense_invoice.model_hr_expense_expense +msgid "Expense" +msgstr "" + +#. module: hr_expense_invoice +#: model:ir.model,name:hr_expense_invoice.model_hr_expense_line +msgid "Expense Line" +msgstr "" + +#. module: hr_expense_invoice +#: field:hr.expense.line,invoice:0 +msgid "Invoice" +msgstr "Faktura" + +#. module: hr_expense_invoice +#: view:hr.expense.expense:hr_expense_invoice.view_expenses_form_invoice +msgid "{'readonly': [('invoice', '!=', False)]}" +msgstr "" diff --git a/hr_expense_invoice/i18n/de.po b/hr_expense_invoice/i18n/de.po index 77e7b0ed3..68eee0143 100644 --- a/hr_expense_invoice/i18n/de.po +++ b/hr_expense_invoice/i18n/de.po @@ -10,8 +10,8 @@ msgid "" msgstr "" "Project-Id-Version: hr (8.0)\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2015-11-30 05:19+0000\n" -"PO-Revision-Date: 2016-01-26 09:44+0000\n" +"POT-Creation-Date: 2016-10-17 20:43+0000\n" +"PO-Revision-Date: 2016-10-13 13:17+0000\n" "Last-Translator: Rudolf Schnapka \n" "Language-Team: German (http://www.transifex.com/oca/OCA-hr-8-0/language/de/)\n" "MIME-Version: 1.0\n" @@ -21,7 +21,7 @@ msgstr "" "Plural-Forms: nplurals=2; plural=(n != 1);\n" #. module: hr_expense_invoice -#: code:addons/hr_expense_invoice/models/hr_expense_expense.py:49 +#: code:addons/hr_expense_invoice/models/hr_expense_expense.py:52 #, python-format msgid "" "Cannot reconcile supplier invoice payable with generated line. Please check " diff --git a/hr_expense_invoice/i18n/el_GR.po b/hr_expense_invoice/i18n/el_GR.po new file mode 100644 index 000000000..95d30b8a8 --- /dev/null +++ b/hr_expense_invoice/i18n/el_GR.po @@ -0,0 +1,46 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * hr_expense_invoice +# +# Translators: +msgid "" +msgstr "" +"Project-Id-Version: hr (8.0)\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2016-10-17 20:43+0000\n" +"PO-Revision-Date: 2015-07-27 23:44+0000\n" +"Last-Translator: <>\n" +"Language-Team: Greek (Greece) (http://www.transifex.com/oca/OCA-hr-8-0/language/el_GR/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Language: el_GR\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +#. module: hr_expense_invoice +#: code:addons/hr_expense_invoice/models/hr_expense_expense.py:52 +#, python-format +msgid "" +"Cannot reconcile supplier invoice payable with generated line. Please check " +"amounts and see if the invoice is already added or paid. Invoice: %s" +msgstr "" + +#. module: hr_expense_invoice +#: model:ir.model,name:hr_expense_invoice.model_hr_expense_expense +msgid "Expense" +msgstr "" + +#. module: hr_expense_invoice +#: model:ir.model,name:hr_expense_invoice.model_hr_expense_line +msgid "Expense Line" +msgstr "" + +#. module: hr_expense_invoice +#: field:hr.expense.line,invoice:0 +msgid "Invoice" +msgstr "Τιμολόγιο" + +#. module: hr_expense_invoice +#: view:hr.expense.expense:hr_expense_invoice.view_expenses_form_invoice +msgid "{'readonly': [('invoice', '!=', False)]}" +msgstr "" diff --git a/hr_expense_invoice/i18n/en_GB.po b/hr_expense_invoice/i18n/en_GB.po new file mode 100644 index 000000000..5e29c4647 --- /dev/null +++ b/hr_expense_invoice/i18n/en_GB.po @@ -0,0 +1,46 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * hr_expense_invoice +# +# Translators: +msgid "" +msgstr "" +"Project-Id-Version: hr (8.0)\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2016-12-24 02:15+0000\n" +"PO-Revision-Date: 2015-07-27 23:44+0000\n" +"Last-Translator: <>\n" +"Language-Team: English (United Kingdom) (http://www.transifex.com/oca/OCA-hr-8-0/language/en_GB/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Language: en_GB\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +#. module: hr_expense_invoice +#: code:addons/hr_expense_invoice/models/hr_expense_expense.py:52 +#, python-format +msgid "" +"Cannot reconcile supplier invoice payable with generated line. Please check " +"amounts and see if the invoice is already added or paid. Invoice: %s" +msgstr "" + +#. module: hr_expense_invoice +#: model:ir.model,name:hr_expense_invoice.model_hr_expense_expense +msgid "Expense" +msgstr "" + +#. module: hr_expense_invoice +#: model:ir.model,name:hr_expense_invoice.model_hr_expense_line +msgid "Expense Line" +msgstr "" + +#. module: hr_expense_invoice +#: field:hr.expense.line,invoice:0 +msgid "Invoice" +msgstr "Invoice" + +#. module: hr_expense_invoice +#: view:hr.expense.expense:hr_expense_invoice.view_expenses_form_invoice +msgid "{'readonly': [('invoice', '!=', False)]}" +msgstr "" diff --git a/hr_expense_invoice/i18n/es.po b/hr_expense_invoice/i18n/es.po index fd9135a10..df06b3a23 100644 --- a/hr_expense_invoice/i18n/es.po +++ b/hr_expense_invoice/i18n/es.po @@ -9,8 +9,8 @@ msgid "" msgstr "" "Project-Id-Version: hr (8.0)\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2015-11-30 05:19+0000\n" -"PO-Revision-Date: 2016-02-16 14:59+0000\n" +"POT-Creation-Date: 2016-10-17 20:43+0000\n" +"PO-Revision-Date: 2016-11-11 13:00+0000\n" "Last-Translator: Antonio Trueba\n" "Language-Team: Spanish (http://www.transifex.com/oca/OCA-hr-8-0/language/es/)\n" "MIME-Version: 1.0\n" @@ -20,7 +20,7 @@ msgstr "" "Plural-Forms: nplurals=2; plural=(n != 1);\n" #. module: hr_expense_invoice -#: code:addons/hr_expense_invoice/models/hr_expense_expense.py:49 +#: code:addons/hr_expense_invoice/models/hr_expense_expense.py:52 #, python-format msgid "" "Cannot reconcile supplier invoice payable with generated line. Please check " diff --git a/hr_expense_invoice/i18n/es_CR.po b/hr_expense_invoice/i18n/es_CR.po new file mode 100644 index 000000000..5c9ae5665 --- /dev/null +++ b/hr_expense_invoice/i18n/es_CR.po @@ -0,0 +1,46 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * hr_expense_invoice +# +# Translators: +msgid "" +msgstr "" +"Project-Id-Version: hr (8.0)\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2016-12-24 02:15+0000\n" +"PO-Revision-Date: 2015-07-27 23:44+0000\n" +"Last-Translator: <>\n" +"Language-Team: Spanish (Costa Rica) (http://www.transifex.com/oca/OCA-hr-8-0/language/es_CR/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Language: es_CR\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +#. module: hr_expense_invoice +#: code:addons/hr_expense_invoice/models/hr_expense_expense.py:52 +#, python-format +msgid "" +"Cannot reconcile supplier invoice payable with generated line. Please check " +"amounts and see if the invoice is already added or paid. Invoice: %s" +msgstr "" + +#. module: hr_expense_invoice +#: model:ir.model,name:hr_expense_invoice.model_hr_expense_expense +msgid "Expense" +msgstr "" + +#. module: hr_expense_invoice +#: model:ir.model,name:hr_expense_invoice.model_hr_expense_line +msgid "Expense Line" +msgstr "" + +#. module: hr_expense_invoice +#: field:hr.expense.line,invoice:0 +msgid "Invoice" +msgstr "Factura" + +#. module: hr_expense_invoice +#: view:hr.expense.expense:hr_expense_invoice.view_expenses_form_invoice +msgid "{'readonly': [('invoice', '!=', False)]}" +msgstr "" diff --git a/hr_expense_invoice/i18n/es_EC.po b/hr_expense_invoice/i18n/es_EC.po new file mode 100644 index 000000000..685ee8da2 --- /dev/null +++ b/hr_expense_invoice/i18n/es_EC.po @@ -0,0 +1,46 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * hr_expense_invoice +# +# Translators: +msgid "" +msgstr "" +"Project-Id-Version: hr (8.0)\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2016-12-24 02:15+0000\n" +"PO-Revision-Date: 2015-07-27 23:44+0000\n" +"Last-Translator: <>\n" +"Language-Team: Spanish (Ecuador) (http://www.transifex.com/oca/OCA-hr-8-0/language/es_EC/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Language: es_EC\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +#. module: hr_expense_invoice +#: code:addons/hr_expense_invoice/models/hr_expense_expense.py:52 +#, python-format +msgid "" +"Cannot reconcile supplier invoice payable with generated line. Please check " +"amounts and see if the invoice is already added or paid. Invoice: %s" +msgstr "" + +#. module: hr_expense_invoice +#: model:ir.model,name:hr_expense_invoice.model_hr_expense_expense +msgid "Expense" +msgstr "" + +#. module: hr_expense_invoice +#: model:ir.model,name:hr_expense_invoice.model_hr_expense_line +msgid "Expense Line" +msgstr "" + +#. module: hr_expense_invoice +#: field:hr.expense.line,invoice:0 +msgid "Invoice" +msgstr "Factura" + +#. module: hr_expense_invoice +#: view:hr.expense.expense:hr_expense_invoice.view_expenses_form_invoice +msgid "{'readonly': [('invoice', '!=', False)]}" +msgstr "" diff --git a/hr_expense_invoice/i18n/es_MX.po b/hr_expense_invoice/i18n/es_MX.po new file mode 100644 index 000000000..5cb9ce968 --- /dev/null +++ b/hr_expense_invoice/i18n/es_MX.po @@ -0,0 +1,46 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * hr_expense_invoice +# +# Translators: +msgid "" +msgstr "" +"Project-Id-Version: hr (8.0)\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2016-12-06 03:44+0000\n" +"PO-Revision-Date: 2015-07-27 23:44+0000\n" +"Last-Translator: <>\n" +"Language-Team: Spanish (Mexico) (http://www.transifex.com/oca/OCA-hr-8-0/language/es_MX/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Language: es_MX\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +#. module: hr_expense_invoice +#: code:addons/hr_expense_invoice/models/hr_expense_expense.py:52 +#, python-format +msgid "" +"Cannot reconcile supplier invoice payable with generated line. Please check " +"amounts and see if the invoice is already added or paid. Invoice: %s" +msgstr "" + +#. module: hr_expense_invoice +#: model:ir.model,name:hr_expense_invoice.model_hr_expense_expense +msgid "Expense" +msgstr "" + +#. module: hr_expense_invoice +#: model:ir.model,name:hr_expense_invoice.model_hr_expense_line +msgid "Expense Line" +msgstr "" + +#. module: hr_expense_invoice +#: field:hr.expense.line,invoice:0 +msgid "Invoice" +msgstr "Factura" + +#. module: hr_expense_invoice +#: view:hr.expense.expense:hr_expense_invoice.view_expenses_form_invoice +msgid "{'readonly': [('invoice', '!=', False)]}" +msgstr "" diff --git a/hr_expense_invoice/i18n/et.po b/hr_expense_invoice/i18n/et.po new file mode 100644 index 000000000..61e5f2df6 --- /dev/null +++ b/hr_expense_invoice/i18n/et.po @@ -0,0 +1,46 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * hr_expense_invoice +# +# Translators: +msgid "" +msgstr "" +"Project-Id-Version: hr (8.0)\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2016-12-24 02:15+0000\n" +"PO-Revision-Date: 2015-07-27 23:44+0000\n" +"Last-Translator: <>\n" +"Language-Team: Estonian (http://www.transifex.com/oca/OCA-hr-8-0/language/et/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Language: et\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +#. module: hr_expense_invoice +#: code:addons/hr_expense_invoice/models/hr_expense_expense.py:52 +#, python-format +msgid "" +"Cannot reconcile supplier invoice payable with generated line. Please check " +"amounts and see if the invoice is already added or paid. Invoice: %s" +msgstr "" + +#. module: hr_expense_invoice +#: model:ir.model,name:hr_expense_invoice.model_hr_expense_expense +msgid "Expense" +msgstr "" + +#. module: hr_expense_invoice +#: model:ir.model,name:hr_expense_invoice.model_hr_expense_line +msgid "Expense Line" +msgstr "" + +#. module: hr_expense_invoice +#: field:hr.expense.line,invoice:0 +msgid "Invoice" +msgstr "Arve" + +#. module: hr_expense_invoice +#: view:hr.expense.expense:hr_expense_invoice.view_expenses_form_invoice +msgid "{'readonly': [('invoice', '!=', False)]}" +msgstr "" diff --git a/hr_expense_invoice/i18n/fr.po b/hr_expense_invoice/i18n/fr.po index ee1946481..93fa1a170 100644 --- a/hr_expense_invoice/i18n/fr.po +++ b/hr_expense_invoice/i18n/fr.po @@ -3,14 +3,15 @@ # * hr_expense_invoice # # Translators: +# Christophe CHAUVET , 2016 # Mohamed HABOU , 2016 msgid "" msgstr "" "Project-Id-Version: hr (8.0)\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2015-11-30 05:19+0000\n" -"PO-Revision-Date: 2016-01-11 17:13+0000\n" -"Last-Translator: Mohamed HABOU \n" +"POT-Creation-Date: 2016-10-17 20:43+0000\n" +"PO-Revision-Date: 2016-10-17 12:12+0000\n" +"Last-Translator: Christophe CHAUVET \n" "Language-Team: French (http://www.transifex.com/oca/OCA-hr-8-0/language/fr/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" @@ -19,12 +20,12 @@ msgstr "" "Plural-Forms: nplurals=2; plural=(n > 1);\n" #. module: hr_expense_invoice -#: code:addons/hr_expense_invoice/models/hr_expense_expense.py:49 +#: code:addons/hr_expense_invoice/models/hr_expense_expense.py:52 #, python-format msgid "" "Cannot reconcile supplier invoice payable with generated line. Please check " "amounts and see if the invoice is already added or paid. Invoice: %s" -msgstr "" +msgstr "Impossible de reconcilier une facture fournisseur avec les lignes générées. Veuillez vérifier les montant et voir si la facture est déjà créé ou payer. Facture %s" #. module: hr_expense_invoice #: model:ir.model,name:hr_expense_invoice.model_hr_expense_expense @@ -44,4 +45,4 @@ msgstr "Facture" #. module: hr_expense_invoice #: view:hr.expense.expense:hr_expense_invoice.view_expenses_form_invoice msgid "{'readonly': [('invoice', '!=', False)]}" -msgstr "" +msgstr "{'readonly': [('invoice', '!=', False)]}" diff --git a/hr_expense_invoice/i18n/fr_CA.po b/hr_expense_invoice/i18n/fr_CA.po new file mode 100644 index 000000000..31f9c2e60 --- /dev/null +++ b/hr_expense_invoice/i18n/fr_CA.po @@ -0,0 +1,46 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * hr_expense_invoice +# +# Translators: +msgid "" +msgstr "" +"Project-Id-Version: hr (8.0)\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2017-07-29 02:35+0000\n" +"PO-Revision-Date: 2015-07-27 23:44+0000\n" +"Last-Translator: <>\n" +"Language-Team: French (Canada) (http://www.transifex.com/oca/OCA-hr-8-0/language/fr_CA/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Language: fr_CA\n" +"Plural-Forms: nplurals=2; plural=(n > 1);\n" + +#. module: hr_expense_invoice +#: code:addons/hr_expense_invoice/models/hr_expense_expense.py:52 +#, python-format +msgid "" +"Cannot reconcile supplier invoice payable with generated line. Please check " +"amounts and see if the invoice is already added or paid. Invoice: %s" +msgstr "" + +#. module: hr_expense_invoice +#: model:ir.model,name:hr_expense_invoice.model_hr_expense_expense +msgid "Expense" +msgstr "" + +#. module: hr_expense_invoice +#: model:ir.model,name:hr_expense_invoice.model_hr_expense_line +msgid "Expense Line" +msgstr "" + +#. module: hr_expense_invoice +#: field:hr.expense.line,invoice:0 +msgid "Invoice" +msgstr "Facture" + +#. module: hr_expense_invoice +#: view:hr.expense.expense:hr_expense_invoice.view_expenses_form_invoice +msgid "{'readonly': [('invoice', '!=', False)]}" +msgstr "" diff --git a/hr_expense_invoice/i18n/fr_CH.po b/hr_expense_invoice/i18n/fr_CH.po new file mode 100644 index 000000000..2e9425c88 --- /dev/null +++ b/hr_expense_invoice/i18n/fr_CH.po @@ -0,0 +1,46 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * hr_expense_invoice +# +# Translators: +msgid "" +msgstr "" +"Project-Id-Version: hr (8.0)\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2016-12-24 02:15+0000\n" +"PO-Revision-Date: 2015-07-27 23:44+0000\n" +"Last-Translator: <>\n" +"Language-Team: French (Switzerland) (http://www.transifex.com/oca/OCA-hr-8-0/language/fr_CH/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Language: fr_CH\n" +"Plural-Forms: nplurals=2; plural=(n > 1);\n" + +#. module: hr_expense_invoice +#: code:addons/hr_expense_invoice/models/hr_expense_expense.py:52 +#, python-format +msgid "" +"Cannot reconcile supplier invoice payable with generated line. Please check " +"amounts and see if the invoice is already added or paid. Invoice: %s" +msgstr "" + +#. module: hr_expense_invoice +#: model:ir.model,name:hr_expense_invoice.model_hr_expense_expense +msgid "Expense" +msgstr "" + +#. module: hr_expense_invoice +#: model:ir.model,name:hr_expense_invoice.model_hr_expense_line +msgid "Expense Line" +msgstr "" + +#. module: hr_expense_invoice +#: field:hr.expense.line,invoice:0 +msgid "Invoice" +msgstr "Facture" + +#. module: hr_expense_invoice +#: view:hr.expense.expense:hr_expense_invoice.view_expenses_form_invoice +msgid "{'readonly': [('invoice', '!=', False)]}" +msgstr "" diff --git a/hr_expense_invoice/i18n/gl.po b/hr_expense_invoice/i18n/gl.po new file mode 100644 index 000000000..3a82c4302 --- /dev/null +++ b/hr_expense_invoice/i18n/gl.po @@ -0,0 +1,46 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * hr_expense_invoice +# +# Translators: +msgid "" +msgstr "" +"Project-Id-Version: hr (8.0)\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2016-12-24 02:15+0000\n" +"PO-Revision-Date: 2015-07-27 23:44+0000\n" +"Last-Translator: <>\n" +"Language-Team: Galician (http://www.transifex.com/oca/OCA-hr-8-0/language/gl/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Language: gl\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +#. module: hr_expense_invoice +#: code:addons/hr_expense_invoice/models/hr_expense_expense.py:52 +#, python-format +msgid "" +"Cannot reconcile supplier invoice payable with generated line. Please check " +"amounts and see if the invoice is already added or paid. Invoice: %s" +msgstr "" + +#. module: hr_expense_invoice +#: model:ir.model,name:hr_expense_invoice.model_hr_expense_expense +msgid "Expense" +msgstr "" + +#. module: hr_expense_invoice +#: model:ir.model,name:hr_expense_invoice.model_hr_expense_line +msgid "Expense Line" +msgstr "" + +#. module: hr_expense_invoice +#: field:hr.expense.line,invoice:0 +msgid "Invoice" +msgstr "Factura" + +#. module: hr_expense_invoice +#: view:hr.expense.expense:hr_expense_invoice.view_expenses_form_invoice +msgid "{'readonly': [('invoice', '!=', False)]}" +msgstr "" diff --git a/hr_expense_invoice/i18n/hr.po b/hr_expense_invoice/i18n/hr.po new file mode 100644 index 000000000..0f2563c8a --- /dev/null +++ b/hr_expense_invoice/i18n/hr.po @@ -0,0 +1,46 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * hr_expense_invoice +# +# Translators: +msgid "" +msgstr "" +"Project-Id-Version: hr (8.0)\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2016-10-17 20:43+0000\n" +"PO-Revision-Date: 2015-07-27 23:44+0000\n" +"Last-Translator: <>\n" +"Language-Team: Croatian (http://www.transifex.com/oca/OCA-hr-8-0/language/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: hr_expense_invoice +#: code:addons/hr_expense_invoice/models/hr_expense_expense.py:52 +#, python-format +msgid "" +"Cannot reconcile supplier invoice payable with generated line. Please check " +"amounts and see if the invoice is already added or paid. Invoice: %s" +msgstr "" + +#. module: hr_expense_invoice +#: model:ir.model,name:hr_expense_invoice.model_hr_expense_expense +msgid "Expense" +msgstr "" + +#. module: hr_expense_invoice +#: model:ir.model,name:hr_expense_invoice.model_hr_expense_line +msgid "Expense Line" +msgstr "" + +#. module: hr_expense_invoice +#: field:hr.expense.line,invoice:0 +msgid "Invoice" +msgstr "Račun" + +#. module: hr_expense_invoice +#: view:hr.expense.expense:hr_expense_invoice.view_expenses_form_invoice +msgid "{'readonly': [('invoice', '!=', False)]}" +msgstr "" diff --git a/hr_expense_invoice/i18n/hr_HR.po b/hr_expense_invoice/i18n/hr_HR.po new file mode 100644 index 000000000..ef4875053 --- /dev/null +++ b/hr_expense_invoice/i18n/hr_HR.po @@ -0,0 +1,46 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * hr_expense_invoice +# +# Translators: +msgid "" +msgstr "" +"Project-Id-Version: hr (8.0)\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2016-12-24 02:15+0000\n" +"PO-Revision-Date: 2015-07-27 23:44+0000\n" +"Last-Translator: <>\n" +"Language-Team: Croatian (Croatia) (http://www.transifex.com/oca/OCA-hr-8-0/language/hr_HR/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Language: hr_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: hr_expense_invoice +#: code:addons/hr_expense_invoice/models/hr_expense_expense.py:52 +#, python-format +msgid "" +"Cannot reconcile supplier invoice payable with generated line. Please check " +"amounts and see if the invoice is already added or paid. Invoice: %s" +msgstr "" + +#. module: hr_expense_invoice +#: model:ir.model,name:hr_expense_invoice.model_hr_expense_expense +msgid "Expense" +msgstr "" + +#. module: hr_expense_invoice +#: model:ir.model,name:hr_expense_invoice.model_hr_expense_line +msgid "Expense Line" +msgstr "" + +#. module: hr_expense_invoice +#: field:hr.expense.line,invoice:0 +msgid "Invoice" +msgstr "Račun" + +#. module: hr_expense_invoice +#: view:hr.expense.expense:hr_expense_invoice.view_expenses_form_invoice +msgid "{'readonly': [('invoice', '!=', False)]}" +msgstr "" diff --git a/hr_expense_invoice/i18n/hu.po b/hr_expense_invoice/i18n/hu.po new file mode 100644 index 000000000..15c596d33 --- /dev/null +++ b/hr_expense_invoice/i18n/hu.po @@ -0,0 +1,46 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * hr_expense_invoice +# +# Translators: +msgid "" +msgstr "" +"Project-Id-Version: hr (8.0)\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2017-07-29 02:35+0000\n" +"PO-Revision-Date: 2015-07-27 23:44+0000\n" +"Last-Translator: <>\n" +"Language-Team: Hungarian (http://www.transifex.com/oca/OCA-hr-8-0/language/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: hr_expense_invoice +#: code:addons/hr_expense_invoice/models/hr_expense_expense.py:52 +#, python-format +msgid "" +"Cannot reconcile supplier invoice payable with generated line. Please check " +"amounts and see if the invoice is already added or paid. Invoice: %s" +msgstr "" + +#. module: hr_expense_invoice +#: model:ir.model,name:hr_expense_invoice.model_hr_expense_expense +msgid "Expense" +msgstr "" + +#. module: hr_expense_invoice +#: model:ir.model,name:hr_expense_invoice.model_hr_expense_line +msgid "Expense Line" +msgstr "" + +#. module: hr_expense_invoice +#: field:hr.expense.line,invoice:0 +msgid "Invoice" +msgstr "Számla" + +#. module: hr_expense_invoice +#: view:hr.expense.expense:hr_expense_invoice.view_expenses_form_invoice +msgid "{'readonly': [('invoice', '!=', False)]}" +msgstr "" diff --git a/hr_expense_invoice/i18n/id.po b/hr_expense_invoice/i18n/id.po new file mode 100644 index 000000000..420809610 --- /dev/null +++ b/hr_expense_invoice/i18n/id.po @@ -0,0 +1,46 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * hr_expense_invoice +# +# Translators: +msgid "" +msgstr "" +"Project-Id-Version: hr (8.0)\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2016-12-24 02:15+0000\n" +"PO-Revision-Date: 2015-07-27 23:44+0000\n" +"Last-Translator: <>\n" +"Language-Team: Indonesian (http://www.transifex.com/oca/OCA-hr-8-0/language/id/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Language: id\n" +"Plural-Forms: nplurals=1; plural=0;\n" + +#. module: hr_expense_invoice +#: code:addons/hr_expense_invoice/models/hr_expense_expense.py:52 +#, python-format +msgid "" +"Cannot reconcile supplier invoice payable with generated line. Please check " +"amounts and see if the invoice is already added or paid. Invoice: %s" +msgstr "" + +#. module: hr_expense_invoice +#: model:ir.model,name:hr_expense_invoice.model_hr_expense_expense +msgid "Expense" +msgstr "" + +#. module: hr_expense_invoice +#: model:ir.model,name:hr_expense_invoice.model_hr_expense_line +msgid "Expense Line" +msgstr "" + +#. module: hr_expense_invoice +#: field:hr.expense.line,invoice:0 +msgid "Invoice" +msgstr "Faktur" + +#. module: hr_expense_invoice +#: view:hr.expense.expense:hr_expense_invoice.view_expenses_form_invoice +msgid "{'readonly': [('invoice', '!=', False)]}" +msgstr "" diff --git a/hr_expense_invoice/i18n/ja.po b/hr_expense_invoice/i18n/ja.po new file mode 100644 index 000000000..8937b94fb --- /dev/null +++ b/hr_expense_invoice/i18n/ja.po @@ -0,0 +1,46 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * hr_expense_invoice +# +# Translators: +msgid "" +msgstr "" +"Project-Id-Version: hr (8.0)\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2016-12-24 02:15+0000\n" +"PO-Revision-Date: 2015-07-27 23:44+0000\n" +"Last-Translator: <>\n" +"Language-Team: Japanese (http://www.transifex.com/oca/OCA-hr-8-0/language/ja/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Language: ja\n" +"Plural-Forms: nplurals=1; plural=0;\n" + +#. module: hr_expense_invoice +#: code:addons/hr_expense_invoice/models/hr_expense_expense.py:52 +#, python-format +msgid "" +"Cannot reconcile supplier invoice payable with generated line. Please check " +"amounts and see if the invoice is already added or paid. Invoice: %s" +msgstr "" + +#. module: hr_expense_invoice +#: model:ir.model,name:hr_expense_invoice.model_hr_expense_expense +msgid "Expense" +msgstr "" + +#. module: hr_expense_invoice +#: model:ir.model,name:hr_expense_invoice.model_hr_expense_line +msgid "Expense Line" +msgstr "" + +#. module: hr_expense_invoice +#: field:hr.expense.line,invoice:0 +msgid "Invoice" +msgstr "請求書" + +#. module: hr_expense_invoice +#: view:hr.expense.expense:hr_expense_invoice.view_expenses_form_invoice +msgid "{'readonly': [('invoice', '!=', False)]}" +msgstr "" diff --git a/hr_expense_invoice/i18n/lt.po b/hr_expense_invoice/i18n/lt.po new file mode 100644 index 000000000..07634813a --- /dev/null +++ b/hr_expense_invoice/i18n/lt.po @@ -0,0 +1,46 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * hr_expense_invoice +# +# Translators: +msgid "" +msgstr "" +"Project-Id-Version: hr (8.0)\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2016-12-24 02:15+0000\n" +"PO-Revision-Date: 2015-07-27 23:44+0000\n" +"Last-Translator: <>\n" +"Language-Team: Lithuanian (http://www.transifex.com/oca/OCA-hr-8-0/language/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=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && (n%100<10 || n%100>=20) ? 1 : 2);\n" + +#. module: hr_expense_invoice +#: code:addons/hr_expense_invoice/models/hr_expense_expense.py:52 +#, python-format +msgid "" +"Cannot reconcile supplier invoice payable with generated line. Please check " +"amounts and see if the invoice is already added or paid. Invoice: %s" +msgstr "" + +#. module: hr_expense_invoice +#: model:ir.model,name:hr_expense_invoice.model_hr_expense_expense +msgid "Expense" +msgstr "" + +#. module: hr_expense_invoice +#: model:ir.model,name:hr_expense_invoice.model_hr_expense_line +msgid "Expense Line" +msgstr "" + +#. module: hr_expense_invoice +#: field:hr.expense.line,invoice:0 +msgid "Invoice" +msgstr "Sąskaita faktūra" + +#. module: hr_expense_invoice +#: view:hr.expense.expense:hr_expense_invoice.view_expenses_form_invoice +msgid "{'readonly': [('invoice', '!=', False)]}" +msgstr "" diff --git a/hr_expense_invoice/i18n/mk.po b/hr_expense_invoice/i18n/mk.po new file mode 100644 index 000000000..bc40c1123 --- /dev/null +++ b/hr_expense_invoice/i18n/mk.po @@ -0,0 +1,46 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * hr_expense_invoice +# +# Translators: +msgid "" +msgstr "" +"Project-Id-Version: hr (8.0)\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2016-12-24 02:15+0000\n" +"PO-Revision-Date: 2015-07-27 23:44+0000\n" +"Last-Translator: <>\n" +"Language-Team: Macedonian (http://www.transifex.com/oca/OCA-hr-8-0/language/mk/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Language: mk\n" +"Plural-Forms: nplurals=2; plural=(n % 10 == 1 && n % 100 != 11) ? 0 : 1;\n" + +#. module: hr_expense_invoice +#: code:addons/hr_expense_invoice/models/hr_expense_expense.py:52 +#, python-format +msgid "" +"Cannot reconcile supplier invoice payable with generated line. Please check " +"amounts and see if the invoice is already added or paid. Invoice: %s" +msgstr "" + +#. module: hr_expense_invoice +#: model:ir.model,name:hr_expense_invoice.model_hr_expense_expense +msgid "Expense" +msgstr "" + +#. module: hr_expense_invoice +#: model:ir.model,name:hr_expense_invoice.model_hr_expense_line +msgid "Expense Line" +msgstr "" + +#. module: hr_expense_invoice +#: field:hr.expense.line,invoice:0 +msgid "Invoice" +msgstr "Фактура" + +#. module: hr_expense_invoice +#: view:hr.expense.expense:hr_expense_invoice.view_expenses_form_invoice +msgid "{'readonly': [('invoice', '!=', False)]}" +msgstr "" diff --git a/hr_expense_invoice/i18n/mn.po b/hr_expense_invoice/i18n/mn.po new file mode 100644 index 000000000..93df1f557 --- /dev/null +++ b/hr_expense_invoice/i18n/mn.po @@ -0,0 +1,46 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * hr_expense_invoice +# +# Translators: +msgid "" +msgstr "" +"Project-Id-Version: hr (8.0)\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2016-12-24 02:15+0000\n" +"PO-Revision-Date: 2015-07-27 23:44+0000\n" +"Last-Translator: <>\n" +"Language-Team: Mongolian (http://www.transifex.com/oca/OCA-hr-8-0/language/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: hr_expense_invoice +#: code:addons/hr_expense_invoice/models/hr_expense_expense.py:52 +#, python-format +msgid "" +"Cannot reconcile supplier invoice payable with generated line. Please check " +"amounts and see if the invoice is already added or paid. Invoice: %s" +msgstr "" + +#. module: hr_expense_invoice +#: model:ir.model,name:hr_expense_invoice.model_hr_expense_expense +msgid "Expense" +msgstr "" + +#. module: hr_expense_invoice +#: model:ir.model,name:hr_expense_invoice.model_hr_expense_line +msgid "Expense Line" +msgstr "" + +#. module: hr_expense_invoice +#: field:hr.expense.line,invoice:0 +msgid "Invoice" +msgstr "Нэхэмжлэл" + +#. module: hr_expense_invoice +#: view:hr.expense.expense:hr_expense_invoice.view_expenses_form_invoice +msgid "{'readonly': [('invoice', '!=', False)]}" +msgstr "" diff --git a/hr_expense_invoice/i18n/nb.po b/hr_expense_invoice/i18n/nb.po new file mode 100644 index 000000000..8ed2c07c7 --- /dev/null +++ b/hr_expense_invoice/i18n/nb.po @@ -0,0 +1,46 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * hr_expense_invoice +# +# Translators: +msgid "" +msgstr "" +"Project-Id-Version: hr (8.0)\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2017-03-28 03:12+0000\n" +"PO-Revision-Date: 2015-07-27 23:44+0000\n" +"Last-Translator: <>\n" +"Language-Team: Norwegian Bokmål (http://www.transifex.com/oca/OCA-hr-8-0/language/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: hr_expense_invoice +#: code:addons/hr_expense_invoice/models/hr_expense_expense.py:52 +#, python-format +msgid "" +"Cannot reconcile supplier invoice payable with generated line. Please check " +"amounts and see if the invoice is already added or paid. Invoice: %s" +msgstr "" + +#. module: hr_expense_invoice +#: model:ir.model,name:hr_expense_invoice.model_hr_expense_expense +msgid "Expense" +msgstr "" + +#. module: hr_expense_invoice +#: model:ir.model,name:hr_expense_invoice.model_hr_expense_line +msgid "Expense Line" +msgstr "" + +#. module: hr_expense_invoice +#: field:hr.expense.line,invoice:0 +msgid "Invoice" +msgstr "Faktura" + +#. module: hr_expense_invoice +#: view:hr.expense.expense:hr_expense_invoice.view_expenses_form_invoice +msgid "{'readonly': [('invoice', '!=', False)]}" +msgstr "" diff --git a/hr_expense_invoice/i18n/nb_NO.po b/hr_expense_invoice/i18n/nb_NO.po new file mode 100644 index 000000000..e544ca56d --- /dev/null +++ b/hr_expense_invoice/i18n/nb_NO.po @@ -0,0 +1,46 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * hr_expense_invoice +# +# Translators: +msgid "" +msgstr "" +"Project-Id-Version: hr (8.0)\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2016-12-24 02:15+0000\n" +"PO-Revision-Date: 2015-07-27 23:44+0000\n" +"Last-Translator: <>\n" +"Language-Team: Norwegian Bokmål (Norway) (http://www.transifex.com/oca/OCA-hr-8-0/language/nb_NO/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Language: nb_NO\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +#. module: hr_expense_invoice +#: code:addons/hr_expense_invoice/models/hr_expense_expense.py:52 +#, python-format +msgid "" +"Cannot reconcile supplier invoice payable with generated line. Please check " +"amounts and see if the invoice is already added or paid. Invoice: %s" +msgstr "" + +#. module: hr_expense_invoice +#: model:ir.model,name:hr_expense_invoice.model_hr_expense_expense +msgid "Expense" +msgstr "" + +#. module: hr_expense_invoice +#: model:ir.model,name:hr_expense_invoice.model_hr_expense_line +msgid "Expense Line" +msgstr "" + +#. module: hr_expense_invoice +#: field:hr.expense.line,invoice:0 +msgid "Invoice" +msgstr "Innmelding" + +#. module: hr_expense_invoice +#: view:hr.expense.expense:hr_expense_invoice.view_expenses_form_invoice +msgid "{'readonly': [('invoice', '!=', False)]}" +msgstr "" diff --git a/hr_expense_invoice/i18n/nl.po b/hr_expense_invoice/i18n/nl.po new file mode 100644 index 000000000..58d771453 --- /dev/null +++ b/hr_expense_invoice/i18n/nl.po @@ -0,0 +1,46 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * hr_expense_invoice +# +# Translators: +msgid "" +msgstr "" +"Project-Id-Version: hr (8.0)\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2016-12-06 03:44+0000\n" +"PO-Revision-Date: 2015-07-27 23:44+0000\n" +"Last-Translator: <>\n" +"Language-Team: Dutch (http://www.transifex.com/oca/OCA-hr-8-0/language/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: hr_expense_invoice +#: code:addons/hr_expense_invoice/models/hr_expense_expense.py:52 +#, python-format +msgid "" +"Cannot reconcile supplier invoice payable with generated line. Please check " +"amounts and see if the invoice is already added or paid. Invoice: %s" +msgstr "" + +#. module: hr_expense_invoice +#: model:ir.model,name:hr_expense_invoice.model_hr_expense_expense +msgid "Expense" +msgstr "" + +#. module: hr_expense_invoice +#: model:ir.model,name:hr_expense_invoice.model_hr_expense_line +msgid "Expense Line" +msgstr "" + +#. module: hr_expense_invoice +#: field:hr.expense.line,invoice:0 +msgid "Invoice" +msgstr "Factuur" + +#. module: hr_expense_invoice +#: view:hr.expense.expense:hr_expense_invoice.view_expenses_form_invoice +msgid "{'readonly': [('invoice', '!=', False)]}" +msgstr "" diff --git a/hr_expense_invoice/i18n/nl_BE.po b/hr_expense_invoice/i18n/nl_BE.po new file mode 100644 index 000000000..7c19ff9dc --- /dev/null +++ b/hr_expense_invoice/i18n/nl_BE.po @@ -0,0 +1,46 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * hr_expense_invoice +# +# Translators: +msgid "" +msgstr "" +"Project-Id-Version: hr (8.0)\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2016-12-24 02:15+0000\n" +"PO-Revision-Date: 2015-07-27 23:44+0000\n" +"Last-Translator: <>\n" +"Language-Team: Dutch (Belgium) (http://www.transifex.com/oca/OCA-hr-8-0/language/nl_BE/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Language: nl_BE\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +#. module: hr_expense_invoice +#: code:addons/hr_expense_invoice/models/hr_expense_expense.py:52 +#, python-format +msgid "" +"Cannot reconcile supplier invoice payable with generated line. Please check " +"amounts and see if the invoice is already added or paid. Invoice: %s" +msgstr "" + +#. module: hr_expense_invoice +#: model:ir.model,name:hr_expense_invoice.model_hr_expense_expense +msgid "Expense" +msgstr "" + +#. module: hr_expense_invoice +#: model:ir.model,name:hr_expense_invoice.model_hr_expense_line +msgid "Expense Line" +msgstr "" + +#. module: hr_expense_invoice +#: field:hr.expense.line,invoice:0 +msgid "Invoice" +msgstr "Factuur" + +#. module: hr_expense_invoice +#: view:hr.expense.expense:hr_expense_invoice.view_expenses_form_invoice +msgid "{'readonly': [('invoice', '!=', False)]}" +msgstr "" diff --git a/hr_expense_invoice/i18n/nl_NL.po b/hr_expense_invoice/i18n/nl_NL.po new file mode 100644 index 000000000..134fdbbb4 --- /dev/null +++ b/hr_expense_invoice/i18n/nl_NL.po @@ -0,0 +1,46 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * hr_expense_invoice +# +# Translators: +msgid "" +msgstr "" +"Project-Id-Version: hr (8.0)\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2017-08-19 02:40+0000\n" +"PO-Revision-Date: 2015-07-27 23:44+0000\n" +"Last-Translator: <>\n" +"Language-Team: Dutch (Netherlands) (http://www.transifex.com/oca/OCA-hr-8-0/language/nl_NL/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Language: nl_NL\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +#. module: hr_expense_invoice +#: code:addons/hr_expense_invoice/models/hr_expense_expense.py:52 +#, python-format +msgid "" +"Cannot reconcile supplier invoice payable with generated line. Please check " +"amounts and see if the invoice is already added or paid. Invoice: %s" +msgstr "" + +#. module: hr_expense_invoice +#: model:ir.model,name:hr_expense_invoice.model_hr_expense_expense +msgid "Expense" +msgstr "" + +#. module: hr_expense_invoice +#: model:ir.model,name:hr_expense_invoice.model_hr_expense_line +msgid "Expense Line" +msgstr "" + +#. module: hr_expense_invoice +#: field:hr.expense.line,invoice:0 +msgid "Invoice" +msgstr "Factuur" + +#. module: hr_expense_invoice +#: view:hr.expense.expense:hr_expense_invoice.view_expenses_form_invoice +msgid "{'readonly': [('invoice', '!=', False)]}" +msgstr "" diff --git a/hr_expense_invoice/i18n/pl.po b/hr_expense_invoice/i18n/pl.po new file mode 100644 index 000000000..1dc52e3fe --- /dev/null +++ b/hr_expense_invoice/i18n/pl.po @@ -0,0 +1,46 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * hr_expense_invoice +# +# Translators: +msgid "" +msgstr "" +"Project-Id-Version: hr (8.0)\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2016-12-24 02:15+0000\n" +"PO-Revision-Date: 2015-07-27 23:44+0000\n" +"Last-Translator: <>\n" +"Language-Team: Polish (http://www.transifex.com/oca/OCA-hr-8-0/language/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=3; plural=(n==1 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n" + +#. module: hr_expense_invoice +#: code:addons/hr_expense_invoice/models/hr_expense_expense.py:52 +#, python-format +msgid "" +"Cannot reconcile supplier invoice payable with generated line. Please check " +"amounts and see if the invoice is already added or paid. Invoice: %s" +msgstr "" + +#. module: hr_expense_invoice +#: model:ir.model,name:hr_expense_invoice.model_hr_expense_expense +msgid "Expense" +msgstr "" + +#. module: hr_expense_invoice +#: model:ir.model,name:hr_expense_invoice.model_hr_expense_line +msgid "Expense Line" +msgstr "" + +#. module: hr_expense_invoice +#: field:hr.expense.line,invoice:0 +msgid "Invoice" +msgstr "Faktura" + +#. module: hr_expense_invoice +#: view:hr.expense.expense:hr_expense_invoice.view_expenses_form_invoice +msgid "{'readonly': [('invoice', '!=', False)]}" +msgstr "" diff --git a/hr_expense_invoice/i18n/pt.po b/hr_expense_invoice/i18n/pt.po new file mode 100644 index 000000000..a4a7a4ff5 --- /dev/null +++ b/hr_expense_invoice/i18n/pt.po @@ -0,0 +1,46 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * hr_expense_invoice +# +# Translators: +msgid "" +msgstr "" +"Project-Id-Version: hr (8.0)\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2016-12-24 02:15+0000\n" +"PO-Revision-Date: 2015-07-27 23:44+0000\n" +"Last-Translator: <>\n" +"Language-Team: Portuguese (http://www.transifex.com/oca/OCA-hr-8-0/language/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: hr_expense_invoice +#: code:addons/hr_expense_invoice/models/hr_expense_expense.py:52 +#, python-format +msgid "" +"Cannot reconcile supplier invoice payable with generated line. Please check " +"amounts and see if the invoice is already added or paid. Invoice: %s" +msgstr "" + +#. module: hr_expense_invoice +#: model:ir.model,name:hr_expense_invoice.model_hr_expense_expense +msgid "Expense" +msgstr "" + +#. module: hr_expense_invoice +#: model:ir.model,name:hr_expense_invoice.model_hr_expense_line +msgid "Expense Line" +msgstr "" + +#. module: hr_expense_invoice +#: field:hr.expense.line,invoice:0 +msgid "Invoice" +msgstr "Fatura" + +#. module: hr_expense_invoice +#: view:hr.expense.expense:hr_expense_invoice.view_expenses_form_invoice +msgid "{'readonly': [('invoice', '!=', False)]}" +msgstr "" diff --git a/hr_expense_invoice/i18n/pt_PT.po b/hr_expense_invoice/i18n/pt_PT.po new file mode 100644 index 000000000..a8cde51c2 --- /dev/null +++ b/hr_expense_invoice/i18n/pt_PT.po @@ -0,0 +1,46 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * hr_expense_invoice +# +# Translators: +msgid "" +msgstr "" +"Project-Id-Version: hr (8.0)\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2016-12-13 16:26+0000\n" +"PO-Revision-Date: 2015-07-27 23:44+0000\n" +"Last-Translator: <>\n" +"Language-Team: Portuguese (Portugal) (http://www.transifex.com/oca/OCA-hr-8-0/language/pt_PT/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Language: pt_PT\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +#. module: hr_expense_invoice +#: code:addons/hr_expense_invoice/models/hr_expense_expense.py:52 +#, python-format +msgid "" +"Cannot reconcile supplier invoice payable with generated line. Please check " +"amounts and see if the invoice is already added or paid. Invoice: %s" +msgstr "" + +#. module: hr_expense_invoice +#: model:ir.model,name:hr_expense_invoice.model_hr_expense_expense +msgid "Expense" +msgstr "" + +#. module: hr_expense_invoice +#: model:ir.model,name:hr_expense_invoice.model_hr_expense_line +msgid "Expense Line" +msgstr "" + +#. module: hr_expense_invoice +#: field:hr.expense.line,invoice:0 +msgid "Invoice" +msgstr "Fatura" + +#. module: hr_expense_invoice +#: view:hr.expense.expense:hr_expense_invoice.view_expenses_form_invoice +msgid "{'readonly': [('invoice', '!=', False)]}" +msgstr "" diff --git a/hr_expense_invoice/i18n/ro.po b/hr_expense_invoice/i18n/ro.po new file mode 100644 index 000000000..10b1f5622 --- /dev/null +++ b/hr_expense_invoice/i18n/ro.po @@ -0,0 +1,46 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * hr_expense_invoice +# +# Translators: +msgid "" +msgstr "" +"Project-Id-Version: hr (8.0)\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2016-12-24 02:15+0000\n" +"PO-Revision-Date: 2015-07-27 23:44+0000\n" +"Last-Translator: <>\n" +"Language-Team: Romanian (http://www.transifex.com/oca/OCA-hr-8-0/language/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: hr_expense_invoice +#: code:addons/hr_expense_invoice/models/hr_expense_expense.py:52 +#, python-format +msgid "" +"Cannot reconcile supplier invoice payable with generated line. Please check " +"amounts and see if the invoice is already added or paid. Invoice: %s" +msgstr "" + +#. module: hr_expense_invoice +#: model:ir.model,name:hr_expense_invoice.model_hr_expense_expense +msgid "Expense" +msgstr "" + +#. module: hr_expense_invoice +#: model:ir.model,name:hr_expense_invoice.model_hr_expense_line +msgid "Expense Line" +msgstr "" + +#. module: hr_expense_invoice +#: field:hr.expense.line,invoice:0 +msgid "Invoice" +msgstr "Factura" + +#. module: hr_expense_invoice +#: view:hr.expense.expense:hr_expense_invoice.view_expenses_form_invoice +msgid "{'readonly': [('invoice', '!=', False)]}" +msgstr "" diff --git a/hr_expense_invoice/i18n/ru.po b/hr_expense_invoice/i18n/ru.po new file mode 100644 index 000000000..54200241f --- /dev/null +++ b/hr_expense_invoice/i18n/ru.po @@ -0,0 +1,46 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * hr_expense_invoice +# +# Translators: +msgid "" +msgstr "" +"Project-Id-Version: hr (8.0)\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2016-12-24 02:15+0000\n" +"PO-Revision-Date: 2015-07-27 23:44+0000\n" +"Last-Translator: <>\n" +"Language-Team: Russian (http://www.transifex.com/oca/OCA-hr-8-0/language/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: hr_expense_invoice +#: code:addons/hr_expense_invoice/models/hr_expense_expense.py:52 +#, python-format +msgid "" +"Cannot reconcile supplier invoice payable with generated line. Please check " +"amounts and see if the invoice is already added or paid. Invoice: %s" +msgstr "" + +#. module: hr_expense_invoice +#: model:ir.model,name:hr_expense_invoice.model_hr_expense_expense +msgid "Expense" +msgstr "" + +#. module: hr_expense_invoice +#: model:ir.model,name:hr_expense_invoice.model_hr_expense_line +msgid "Expense Line" +msgstr "" + +#. module: hr_expense_invoice +#: field:hr.expense.line,invoice:0 +msgid "Invoice" +msgstr "Счет" + +#. module: hr_expense_invoice +#: view:hr.expense.expense:hr_expense_invoice.view_expenses_form_invoice +msgid "{'readonly': [('invoice', '!=', False)]}" +msgstr "" diff --git a/hr_expense_invoice/i18n/sk_SK.po b/hr_expense_invoice/i18n/sk_SK.po new file mode 100644 index 000000000..6e97b182d --- /dev/null +++ b/hr_expense_invoice/i18n/sk_SK.po @@ -0,0 +1,46 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * hr_expense_invoice +# +# Translators: +msgid "" +msgstr "" +"Project-Id-Version: hr (8.0)\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2016-12-24 02:15+0000\n" +"PO-Revision-Date: 2015-07-27 23:44+0000\n" +"Last-Translator: <>\n" +"Language-Team: Slovak (Slovakia) (http://www.transifex.com/oca/OCA-hr-8-0/language/sk_SK/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Language: sk_SK\n" +"Plural-Forms: nplurals=3; plural=(n==1) ? 0 : (n>=2 && n<=4) ? 1 : 2;\n" + +#. module: hr_expense_invoice +#: code:addons/hr_expense_invoice/models/hr_expense_expense.py:52 +#, python-format +msgid "" +"Cannot reconcile supplier invoice payable with generated line. Please check " +"amounts and see if the invoice is already added or paid. Invoice: %s" +msgstr "" + +#. module: hr_expense_invoice +#: model:ir.model,name:hr_expense_invoice.model_hr_expense_expense +msgid "Expense" +msgstr "" + +#. module: hr_expense_invoice +#: model:ir.model,name:hr_expense_invoice.model_hr_expense_line +msgid "Expense Line" +msgstr "" + +#. module: hr_expense_invoice +#: field:hr.expense.line,invoice:0 +msgid "Invoice" +msgstr "Faktúra" + +#. module: hr_expense_invoice +#: view:hr.expense.expense:hr_expense_invoice.view_expenses_form_invoice +msgid "{'readonly': [('invoice', '!=', False)]}" +msgstr "" diff --git a/hr_expense_invoice/i18n/sl.po b/hr_expense_invoice/i18n/sl.po index a8f656a5d..f6e629d77 100644 --- a/hr_expense_invoice/i18n/sl.po +++ b/hr_expense_invoice/i18n/sl.po @@ -8,8 +8,8 @@ msgid "" msgstr "" "Project-Id-Version: hr (8.0)\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2015-08-18 13:10+0000\n" -"PO-Revision-Date: 2015-08-01 16:12+0000\n" +"POT-Creation-Date: 2016-10-17 20:43+0000\n" +"PO-Revision-Date: 2016-11-11 13:00+0000\n" "Last-Translator: Matjaž Mozetič \n" "Language-Team: Slovenian (http://www.transifex.com/oca/OCA-hr-8-0/language/sl/)\n" "MIME-Version: 1.0\n" @@ -19,7 +19,7 @@ msgstr "" "Plural-Forms: nplurals=4; plural=(n%100==1 ? 0 : n%100==2 ? 1 : n%100==3 || n%100==4 ? 2 : 3);\n" #. module: hr_expense_invoice -#: code:addons/hr_expense_invoice/models/hr_expense_expense.py:49 +#: code:addons/hr_expense_invoice/models/hr_expense_expense.py:52 #, python-format msgid "" "Cannot reconcile supplier invoice payable with generated line. Please check " diff --git a/hr_expense_invoice/i18n/sv.po b/hr_expense_invoice/i18n/sv.po new file mode 100644 index 000000000..4610c5d5f --- /dev/null +++ b/hr_expense_invoice/i18n/sv.po @@ -0,0 +1,46 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * hr_expense_invoice +# +# Translators: +msgid "" +msgstr "" +"Project-Id-Version: hr (8.0)\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2016-12-24 02:15+0000\n" +"PO-Revision-Date: 2015-07-27 23:44+0000\n" +"Last-Translator: <>\n" +"Language-Team: Swedish (http://www.transifex.com/oca/OCA-hr-8-0/language/sv/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Language: sv\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +#. module: hr_expense_invoice +#: code:addons/hr_expense_invoice/models/hr_expense_expense.py:52 +#, python-format +msgid "" +"Cannot reconcile supplier invoice payable with generated line. Please check " +"amounts and see if the invoice is already added or paid. Invoice: %s" +msgstr "" + +#. module: hr_expense_invoice +#: model:ir.model,name:hr_expense_invoice.model_hr_expense_expense +msgid "Expense" +msgstr "" + +#. module: hr_expense_invoice +#: model:ir.model,name:hr_expense_invoice.model_hr_expense_line +msgid "Expense Line" +msgstr "" + +#. module: hr_expense_invoice +#: field:hr.expense.line,invoice:0 +msgid "Invoice" +msgstr "Faktura" + +#. module: hr_expense_invoice +#: view:hr.expense.expense:hr_expense_invoice.view_expenses_form_invoice +msgid "{'readonly': [('invoice', '!=', False)]}" +msgstr "" diff --git a/hr_expense_invoice/i18n/th.po b/hr_expense_invoice/i18n/th.po new file mode 100644 index 000000000..a03fba261 --- /dev/null +++ b/hr_expense_invoice/i18n/th.po @@ -0,0 +1,46 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * hr_expense_invoice +# +# Translators: +msgid "" +msgstr "" +"Project-Id-Version: hr (8.0)\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2016-12-24 02:15+0000\n" +"PO-Revision-Date: 2015-07-27 23:44+0000\n" +"Last-Translator: <>\n" +"Language-Team: Thai (http://www.transifex.com/oca/OCA-hr-8-0/language/th/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Language: th\n" +"Plural-Forms: nplurals=1; plural=0;\n" + +#. module: hr_expense_invoice +#: code:addons/hr_expense_invoice/models/hr_expense_expense.py:52 +#, python-format +msgid "" +"Cannot reconcile supplier invoice payable with generated line. Please check " +"amounts and see if the invoice is already added or paid. Invoice: %s" +msgstr "" + +#. module: hr_expense_invoice +#: model:ir.model,name:hr_expense_invoice.model_hr_expense_expense +msgid "Expense" +msgstr "" + +#. module: hr_expense_invoice +#: model:ir.model,name:hr_expense_invoice.model_hr_expense_line +msgid "Expense Line" +msgstr "" + +#. module: hr_expense_invoice +#: field:hr.expense.line,invoice:0 +msgid "Invoice" +msgstr "ใบแจ้งหนี้" + +#. module: hr_expense_invoice +#: view:hr.expense.expense:hr_expense_invoice.view_expenses_form_invoice +msgid "{'readonly': [('invoice', '!=', False)]}" +msgstr "" diff --git a/hr_expense_invoice/i18n/tr.po b/hr_expense_invoice/i18n/tr.po new file mode 100644 index 000000000..81e56ad6b --- /dev/null +++ b/hr_expense_invoice/i18n/tr.po @@ -0,0 +1,46 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * hr_expense_invoice +# +# Translators: +msgid "" +msgstr "" +"Project-Id-Version: hr (8.0)\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2016-12-24 02:15+0000\n" +"PO-Revision-Date: 2015-07-27 23:44+0000\n" +"Last-Translator: <>\n" +"Language-Team: Turkish (http://www.transifex.com/oca/OCA-hr-8-0/language/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: hr_expense_invoice +#: code:addons/hr_expense_invoice/models/hr_expense_expense.py:52 +#, python-format +msgid "" +"Cannot reconcile supplier invoice payable with generated line. Please check " +"amounts and see if the invoice is already added or paid. Invoice: %s" +msgstr "" + +#. module: hr_expense_invoice +#: model:ir.model,name:hr_expense_invoice.model_hr_expense_expense +msgid "Expense" +msgstr "" + +#. module: hr_expense_invoice +#: model:ir.model,name:hr_expense_invoice.model_hr_expense_line +msgid "Expense Line" +msgstr "" + +#. module: hr_expense_invoice +#: field:hr.expense.line,invoice:0 +msgid "Invoice" +msgstr "Fatura" + +#. module: hr_expense_invoice +#: view:hr.expense.expense:hr_expense_invoice.view_expenses_form_invoice +msgid "{'readonly': [('invoice', '!=', False)]}" +msgstr "" diff --git a/hr_expense_invoice/i18n/tr_TR.po b/hr_expense_invoice/i18n/tr_TR.po new file mode 100644 index 000000000..0733b8800 --- /dev/null +++ b/hr_expense_invoice/i18n/tr_TR.po @@ -0,0 +1,46 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * hr_expense_invoice +# +# Translators: +msgid "" +msgstr "" +"Project-Id-Version: hr (8.0)\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2016-12-31 03:30+0000\n" +"PO-Revision-Date: 2015-07-27 23:44+0000\n" +"Last-Translator: <>\n" +"Language-Team: Turkish (Turkey) (http://www.transifex.com/oca/OCA-hr-8-0/language/tr_TR/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Language: tr_TR\n" +"Plural-Forms: nplurals=1; plural=0;\n" + +#. module: hr_expense_invoice +#: code:addons/hr_expense_invoice/models/hr_expense_expense.py:52 +#, python-format +msgid "" +"Cannot reconcile supplier invoice payable with generated line. Please check " +"amounts and see if the invoice is already added or paid. Invoice: %s" +msgstr "" + +#. module: hr_expense_invoice +#: model:ir.model,name:hr_expense_invoice.model_hr_expense_expense +msgid "Expense" +msgstr "" + +#. module: hr_expense_invoice +#: model:ir.model,name:hr_expense_invoice.model_hr_expense_line +msgid "Expense Line" +msgstr "" + +#. module: hr_expense_invoice +#: field:hr.expense.line,invoice:0 +msgid "Invoice" +msgstr "Fatura" + +#. module: hr_expense_invoice +#: view:hr.expense.expense:hr_expense_invoice.view_expenses_form_invoice +msgid "{'readonly': [('invoice', '!=', False)]}" +msgstr "" diff --git a/hr_expense_invoice/i18n/zh_CN.po b/hr_expense_invoice/i18n/zh_CN.po new file mode 100644 index 000000000..b820d0b43 --- /dev/null +++ b/hr_expense_invoice/i18n/zh_CN.po @@ -0,0 +1,46 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * hr_expense_invoice +# +# Translators: +msgid "" +msgstr "" +"Project-Id-Version: hr (8.0)\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2016-12-06 03:44+0000\n" +"PO-Revision-Date: 2015-07-27 23:44+0000\n" +"Last-Translator: <>\n" +"Language-Team: Chinese (China) (http://www.transifex.com/oca/OCA-hr-8-0/language/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: hr_expense_invoice +#: code:addons/hr_expense_invoice/models/hr_expense_expense.py:52 +#, python-format +msgid "" +"Cannot reconcile supplier invoice payable with generated line. Please check " +"amounts and see if the invoice is already added or paid. Invoice: %s" +msgstr "" + +#. module: hr_expense_invoice +#: model:ir.model,name:hr_expense_invoice.model_hr_expense_expense +msgid "Expense" +msgstr "" + +#. module: hr_expense_invoice +#: model:ir.model,name:hr_expense_invoice.model_hr_expense_line +msgid "Expense Line" +msgstr "" + +#. module: hr_expense_invoice +#: field:hr.expense.line,invoice:0 +msgid "Invoice" +msgstr "发票" + +#. module: hr_expense_invoice +#: view:hr.expense.expense:hr_expense_invoice.view_expenses_form_invoice +msgid "{'readonly': [('invoice', '!=', False)]}" +msgstr "" diff --git a/hr_expense_invoice/i18n/zh_TW.po b/hr_expense_invoice/i18n/zh_TW.po new file mode 100644 index 000000000..5c390ff71 --- /dev/null +++ b/hr_expense_invoice/i18n/zh_TW.po @@ -0,0 +1,46 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * hr_expense_invoice +# +# Translators: +msgid "" +msgstr "" +"Project-Id-Version: hr (8.0)\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2016-12-24 02:15+0000\n" +"PO-Revision-Date: 2015-07-27 23:44+0000\n" +"Last-Translator: <>\n" +"Language-Team: Chinese (Taiwan) (http://www.transifex.com/oca/OCA-hr-8-0/language/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: hr_expense_invoice +#: code:addons/hr_expense_invoice/models/hr_expense_expense.py:52 +#, python-format +msgid "" +"Cannot reconcile supplier invoice payable with generated line. Please check " +"amounts and see if the invoice is already added or paid. Invoice: %s" +msgstr "" + +#. module: hr_expense_invoice +#: model:ir.model,name:hr_expense_invoice.model_hr_expense_expense +msgid "Expense" +msgstr "" + +#. module: hr_expense_invoice +#: model:ir.model,name:hr_expense_invoice.model_hr_expense_line +msgid "Expense Line" +msgstr "" + +#. module: hr_expense_invoice +#: field:hr.expense.line,invoice:0 +msgid "Invoice" +msgstr "發票" + +#. module: hr_expense_invoice +#: view:hr.expense.expense:hr_expense_invoice.view_expenses_form_invoice +msgid "{'readonly': [('invoice', '!=', False)]}" +msgstr "" diff --git a/hr_expense_invoice/models/hr_expense_expense.py b/hr_expense_invoice/models/hr_expense_expense.py index 40b5bbff2..c406274a2 100644 --- a/hr_expense_invoice/models/hr_expense_expense.py +++ b/hr_expense_invoice/models/hr_expense_expense.py @@ -40,7 +40,10 @@ def action_move_create(self): move_lines = expense.account_move_id.line_id c_move_lines = move_lines.filtered( lambda x: x.partner_id == partner and - x.debit == line.invoice.residual) + x.debit == line.invoice.residual and + not x.reconcile_id) + if len(c_move_lines) > 1: + c_move_lines = c_move_lines[0] c_move_lines |= line.invoice.move_id.line_id.filtered( lambda x: x.account_id == line.invoice.account_id and x.credit == line.invoice.residual) From 1c4c2be0630befdb904a40f8200c67ce96607895 Mon Sep 17 00:00:00 2001 From: cubells Date: Wed, 27 Sep 2017 18:42:52 +0200 Subject: [PATCH 04/69] [MIG] hr_expense_invoice: Migration to 10.0 OCA Transbot updated translations from Transifex --- hr_expense_invoice/README.rst | 26 +- hr_expense_invoice/__init__.py | 7 +- hr_expense_invoice/__manifest__.py | 21 + hr_expense_invoice/__openerp__.py | 36 -- hr_expense_invoice/i18n/ar.po | 46 -- hr_expense_invoice/i18n/bg.po | 46 -- hr_expense_invoice/i18n/bs.po | 46 -- hr_expense_invoice/i18n/ca.po | 46 -- hr_expense_invoice/i18n/cs.po | 46 -- hr_expense_invoice/i18n/cs_CZ.po | 46 ++ hr_expense_invoice/i18n/de.po | 49 -- hr_expense_invoice/i18n/el_GR.po | 46 -- hr_expense_invoice/i18n/en_GB.po | 46 -- hr_expense_invoice/i18n/es.po | 43 +- hr_expense_invoice/i18n/es_CR.po | 46 -- hr_expense_invoice/i18n/es_EC.po | 46 -- hr_expense_invoice/i18n/es_MX.po | 46 -- hr_expense_invoice/i18n/et.po | 46 -- hr_expense_invoice/i18n/fi.po | 47 -- hr_expense_invoice/i18n/fr.po | 41 +- hr_expense_invoice/i18n/fr_CA.po | 46 -- hr_expense_invoice/i18n/fr_CH.po | 46 -- hr_expense_invoice/i18n/gl.po | 46 -- hr_expense_invoice/i18n/hr.po | 39 +- hr_expense_invoice/i18n/hr_HR.po | 46 -- .../i18n/hr_expense_invoice.pot | 19 +- hr_expense_invoice/i18n/hu.po | 46 -- hr_expense_invoice/i18n/id.po | 46 -- hr_expense_invoice/i18n/it.po | 47 -- hr_expense_invoice/i18n/ja.po | 46 -- hr_expense_invoice/i18n/lt.po | 46 -- hr_expense_invoice/i18n/mk.po | 46 -- hr_expense_invoice/i18n/mn.po | 46 -- hr_expense_invoice/i18n/nb.po | 46 -- hr_expense_invoice/i18n/nb_NO.po | 46 -- hr_expense_invoice/i18n/nl.po | 46 -- hr_expense_invoice/i18n/nl_BE.po | 46 -- hr_expense_invoice/i18n/nl_NL.po | 33 +- hr_expense_invoice/i18n/pl.po | 46 -- hr_expense_invoice/i18n/pt.po | 45 +- hr_expense_invoice/i18n/pt_BR.po | 47 -- hr_expense_invoice/i18n/pt_PT.po | 46 -- hr_expense_invoice/i18n/ro.po | 46 -- hr_expense_invoice/i18n/ru.po | 46 -- hr_expense_invoice/i18n/sk_SK.po | 46 -- hr_expense_invoice/i18n/sl.po | 47 -- hr_expense_invoice/i18n/sv.po | 46 -- hr_expense_invoice/i18n/th.po | 46 -- hr_expense_invoice/i18n/tr.po | 46 -- hr_expense_invoice/i18n/tr_TR.po | 46 -- hr_expense_invoice/i18n/zh_CN.po | 46 -- hr_expense_invoice/i18n/zh_TW.po | 46 -- hr_expense_invoice/models/__init__.py | 10 +- hr_expense_invoice/models/hr_expense.py | 55 +++ .../models/hr_expense_expense.py | 106 ----- hr_expense_invoice/models/hr_expense_sheet.py | 42 ++ .../static/description/icon.svg | 428 ------------------ hr_expense_invoice/tests/__init__.py | 4 + .../tests/test_hr_expense_invoice.py | 69 +++ .../views/hr_expense_expense_view.xml | 60 --- hr_expense_invoice/views/hr_expense_views.xml | 33 ++ 61 files changed, 397 insertions(+), 2659 deletions(-) create mode 100644 hr_expense_invoice/__manifest__.py delete mode 100644 hr_expense_invoice/__openerp__.py delete mode 100644 hr_expense_invoice/i18n/ar.po delete mode 100644 hr_expense_invoice/i18n/bg.po delete mode 100644 hr_expense_invoice/i18n/bs.po delete mode 100644 hr_expense_invoice/i18n/ca.po delete mode 100644 hr_expense_invoice/i18n/cs.po create mode 100644 hr_expense_invoice/i18n/cs_CZ.po delete mode 100644 hr_expense_invoice/i18n/de.po delete mode 100644 hr_expense_invoice/i18n/el_GR.po delete mode 100644 hr_expense_invoice/i18n/en_GB.po delete mode 100644 hr_expense_invoice/i18n/es_CR.po delete mode 100644 hr_expense_invoice/i18n/es_EC.po delete mode 100644 hr_expense_invoice/i18n/es_MX.po delete mode 100644 hr_expense_invoice/i18n/et.po delete mode 100644 hr_expense_invoice/i18n/fi.po delete mode 100644 hr_expense_invoice/i18n/fr_CA.po delete mode 100644 hr_expense_invoice/i18n/fr_CH.po delete mode 100644 hr_expense_invoice/i18n/gl.po delete mode 100644 hr_expense_invoice/i18n/hr_HR.po delete mode 100644 hr_expense_invoice/i18n/hu.po delete mode 100644 hr_expense_invoice/i18n/id.po delete mode 100644 hr_expense_invoice/i18n/it.po delete mode 100644 hr_expense_invoice/i18n/ja.po delete mode 100644 hr_expense_invoice/i18n/lt.po delete mode 100644 hr_expense_invoice/i18n/mk.po delete mode 100644 hr_expense_invoice/i18n/mn.po delete mode 100644 hr_expense_invoice/i18n/nb.po delete mode 100644 hr_expense_invoice/i18n/nb_NO.po delete mode 100644 hr_expense_invoice/i18n/nl.po delete mode 100644 hr_expense_invoice/i18n/nl_BE.po delete mode 100644 hr_expense_invoice/i18n/pl.po delete mode 100644 hr_expense_invoice/i18n/pt_BR.po delete mode 100644 hr_expense_invoice/i18n/pt_PT.po delete mode 100644 hr_expense_invoice/i18n/ro.po delete mode 100644 hr_expense_invoice/i18n/ru.po delete mode 100644 hr_expense_invoice/i18n/sk_SK.po delete mode 100644 hr_expense_invoice/i18n/sl.po delete mode 100644 hr_expense_invoice/i18n/sv.po delete mode 100644 hr_expense_invoice/i18n/th.po delete mode 100644 hr_expense_invoice/i18n/tr.po delete mode 100644 hr_expense_invoice/i18n/tr_TR.po delete mode 100644 hr_expense_invoice/i18n/zh_CN.po delete mode 100644 hr_expense_invoice/i18n/zh_TW.po create mode 100644 hr_expense_invoice/models/hr_expense.py delete mode 100644 hr_expense_invoice/models/hr_expense_expense.py create mode 100644 hr_expense_invoice/models/hr_expense_sheet.py delete mode 100644 hr_expense_invoice/static/description/icon.svg create mode 100644 hr_expense_invoice/tests/__init__.py create mode 100644 hr_expense_invoice/tests/test_hr_expense_invoice.py delete mode 100644 hr_expense_invoice/views/hr_expense_expense_view.xml create mode 100644 hr_expense_invoice/views/hr_expense_views.xml diff --git a/hr_expense_invoice/README.rst b/hr_expense_invoice/README.rst index e8ca941aa..619611e09 100644 --- a/hr_expense_invoice/README.rst +++ b/hr_expense_invoice/README.rst @@ -1,11 +1,13 @@ .. image:: https://img.shields.io/badge/licence-AGPL--3-blue.svg - :alt: License + :target: http://www.gnu.org/licenses/agpl + :alt: License: AGPL-3 +==================================== Set supplier invoices on HR expenses ==================================== This module should be used when a supplier invoice is paid by an employee. It -allows to set a supplier invoice for each expense line, adding the +allows to set a supplier invoice for each expense line, adding the corresponding journal items to transfer the debt to the employee. @@ -22,13 +24,10 @@ You don't need to configure anything more to use this module. Usage ===== -Instead of coding a full expense line, select an existing supplier invoice, -and then the rest of the fields will be auto-filled and grayed. - -When you generate the expenses account entries, lines with invoices filled -will be generated as opposite of the payable move line of the invoice, and -both will be reconciled, letting the employee payable account as the only -open balance. +* Create an expense sheet. +* Add an expense line to sheet with an invoice_id selected or create one new. +* Process expense sheet. +* On paying expense sheet, you are reconciling supplier invoice too. Known issues / Roadmap ====================== @@ -42,7 +41,8 @@ Credits Contributors ------------ -* Pedro M. Baeza +* Pedro M. Baeza +* Vicent Cubells Icon ---- @@ -54,9 +54,9 @@ Icon Maintainer ---------- -.. image:: http://odoo-community.org/logo.png +.. image:: https://odoo-community.org/logo.png :alt: Odoo Community Association - :target: http://odoo-community.org + :target: https://odoo-community.org This module is maintained by the OCA. @@ -64,4 +64,4 @@ OCA, or the Odoo Community Association, is a nonprofit organization whose mission is to support the collaborative development of Odoo features and promote its widespread use. -To contribute to this module, please visit http://odoo-community.org. +To contribute to this module, please visit https://odoo-community.org. diff --git a/hr_expense_invoice/__init__.py b/hr_expense_invoice/__init__.py index 49d04adeb..ec50cfc0f 100644 --- a/hr_expense_invoice/__init__.py +++ b/hr_expense_invoice/__init__.py @@ -1,5 +1,4 @@ -# -*- encoding: utf-8 -*- -############################################################################## -# For copyright and license notices, see __openerp__.py file in root directory -############################################################################## +# -*- coding: utf-8 -*- +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). + from . import models diff --git a/hr_expense_invoice/__manifest__.py b/hr_expense_invoice/__manifest__.py new file mode 100644 index 000000000..e1bbd78aa --- /dev/null +++ b/hr_expense_invoice/__manifest__.py @@ -0,0 +1,21 @@ +# -*- coding: utf-8 -*- +# Copyright 2015 Pedro M. Baeza +# Copyright 2017 Vicent Cubells +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). + +{ + 'name': 'Supplier invoices on HR expenses', + 'version': '10.0.1.0.0', + 'category': 'Human Resources', + 'author': 'Tecnativa, ' + 'Odoo Community Association (OCA)', + 'license': 'AGPL-3', + 'website': 'https://www.tecnativa.com', + 'depends': [ + 'hr_expense', + ], + 'data': [ + 'views/hr_expense_views.xml', + ], + 'installable': True, +} diff --git a/hr_expense_invoice/__openerp__.py b/hr_expense_invoice/__openerp__.py deleted file mode 100644 index 494a99673..000000000 --- a/hr_expense_invoice/__openerp__.py +++ /dev/null @@ -1,36 +0,0 @@ -# -*- encoding: utf-8 -*- -############################################################################## -# -# Copyright (c) 2015 Serv. Tecnol. Avanzados (http://www.serviciosbaeza.com) -# Pedro M. Baeza -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as published -# by the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# -############################################################################## - -{ - 'name': 'Supplier invoices on HR expenses', - 'version': '8.0.1.0.0', - 'category': 'HR', - 'author': 'Serv. Tecnol. Avanzados - Pedro M. Baeza, ' - 'Odoo Community Association (OCA)', - 'website': 'http://www.serviciosbaeza.com', - 'depends': [ - 'hr_expense', - ], - 'data': [ - 'views/hr_expense_expense_view.xml', - ], - "installable": True, -} diff --git a/hr_expense_invoice/i18n/ar.po b/hr_expense_invoice/i18n/ar.po deleted file mode 100644 index 19701264d..000000000 --- a/hr_expense_invoice/i18n/ar.po +++ /dev/null @@ -1,46 +0,0 @@ -# Translation of Odoo Server. -# This file contains the translation of the following modules: -# * hr_expense_invoice -# -# Translators: -msgid "" -msgstr "" -"Project-Id-Version: hr (8.0)\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2016-12-24 02:15+0000\n" -"PO-Revision-Date: 2015-07-27 23:44+0000\n" -"Last-Translator: <>\n" -"Language-Team: Arabic (http://www.transifex.com/oca/OCA-hr-8-0/language/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: hr_expense_invoice -#: code:addons/hr_expense_invoice/models/hr_expense_expense.py:52 -#, python-format -msgid "" -"Cannot reconcile supplier invoice payable with generated line. Please check " -"amounts and see if the invoice is already added or paid. Invoice: %s" -msgstr "" - -#. module: hr_expense_invoice -#: model:ir.model,name:hr_expense_invoice.model_hr_expense_expense -msgid "Expense" -msgstr "" - -#. module: hr_expense_invoice -#: model:ir.model,name:hr_expense_invoice.model_hr_expense_line -msgid "Expense Line" -msgstr "" - -#. module: hr_expense_invoice -#: field:hr.expense.line,invoice:0 -msgid "Invoice" -msgstr "فاتورة" - -#. module: hr_expense_invoice -#: view:hr.expense.expense:hr_expense_invoice.view_expenses_form_invoice -msgid "{'readonly': [('invoice', '!=', False)]}" -msgstr "" diff --git a/hr_expense_invoice/i18n/bg.po b/hr_expense_invoice/i18n/bg.po deleted file mode 100644 index 1dd67ee04..000000000 --- a/hr_expense_invoice/i18n/bg.po +++ /dev/null @@ -1,46 +0,0 @@ -# Translation of Odoo Server. -# This file contains the translation of the following modules: -# * hr_expense_invoice -# -# Translators: -msgid "" -msgstr "" -"Project-Id-Version: hr (8.0)\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2016-12-24 02:15+0000\n" -"PO-Revision-Date: 2015-07-27 23:44+0000\n" -"Last-Translator: <>\n" -"Language-Team: Bulgarian (http://www.transifex.com/oca/OCA-hr-8-0/language/bg/)\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: \n" -"Language: bg\n" -"Plural-Forms: nplurals=2; plural=(n != 1);\n" - -#. module: hr_expense_invoice -#: code:addons/hr_expense_invoice/models/hr_expense_expense.py:52 -#, python-format -msgid "" -"Cannot reconcile supplier invoice payable with generated line. Please check " -"amounts and see if the invoice is already added or paid. Invoice: %s" -msgstr "" - -#. module: hr_expense_invoice -#: model:ir.model,name:hr_expense_invoice.model_hr_expense_expense -msgid "Expense" -msgstr "" - -#. module: hr_expense_invoice -#: model:ir.model,name:hr_expense_invoice.model_hr_expense_line -msgid "Expense Line" -msgstr "" - -#. module: hr_expense_invoice -#: field:hr.expense.line,invoice:0 -msgid "Invoice" -msgstr "Фактура" - -#. module: hr_expense_invoice -#: view:hr.expense.expense:hr_expense_invoice.view_expenses_form_invoice -msgid "{'readonly': [('invoice', '!=', False)]}" -msgstr "" diff --git a/hr_expense_invoice/i18n/bs.po b/hr_expense_invoice/i18n/bs.po deleted file mode 100644 index de3419dda..000000000 --- a/hr_expense_invoice/i18n/bs.po +++ /dev/null @@ -1,46 +0,0 @@ -# Translation of Odoo Server. -# This file contains the translation of the following modules: -# * hr_expense_invoice -# -# Translators: -msgid "" -msgstr "" -"Project-Id-Version: hr (8.0)\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2016-12-24 02:15+0000\n" -"PO-Revision-Date: 2015-07-27 23:44+0000\n" -"Last-Translator: <>\n" -"Language-Team: Bosnian (http://www.transifex.com/oca/OCA-hr-8-0/language/bs/)\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: \n" -"Language: bs\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: hr_expense_invoice -#: code:addons/hr_expense_invoice/models/hr_expense_expense.py:52 -#, python-format -msgid "" -"Cannot reconcile supplier invoice payable with generated line. Please check " -"amounts and see if the invoice is already added or paid. Invoice: %s" -msgstr "" - -#. module: hr_expense_invoice -#: model:ir.model,name:hr_expense_invoice.model_hr_expense_expense -msgid "Expense" -msgstr "" - -#. module: hr_expense_invoice -#: model:ir.model,name:hr_expense_invoice.model_hr_expense_line -msgid "Expense Line" -msgstr "" - -#. module: hr_expense_invoice -#: field:hr.expense.line,invoice:0 -msgid "Invoice" -msgstr "Faktura" - -#. module: hr_expense_invoice -#: view:hr.expense.expense:hr_expense_invoice.view_expenses_form_invoice -msgid "{'readonly': [('invoice', '!=', False)]}" -msgstr "" diff --git a/hr_expense_invoice/i18n/ca.po b/hr_expense_invoice/i18n/ca.po deleted file mode 100644 index 33ff034e9..000000000 --- a/hr_expense_invoice/i18n/ca.po +++ /dev/null @@ -1,46 +0,0 @@ -# Translation of Odoo Server. -# This file contains the translation of the following modules: -# * hr_expense_invoice -# -# Translators: -msgid "" -msgstr "" -"Project-Id-Version: hr (8.0)\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2016-12-24 02:15+0000\n" -"PO-Revision-Date: 2015-07-27 23:44+0000\n" -"Last-Translator: <>\n" -"Language-Team: Catalan (http://www.transifex.com/oca/OCA-hr-8-0/language/ca/)\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: \n" -"Language: ca\n" -"Plural-Forms: nplurals=2; plural=(n != 1);\n" - -#. module: hr_expense_invoice -#: code:addons/hr_expense_invoice/models/hr_expense_expense.py:52 -#, python-format -msgid "" -"Cannot reconcile supplier invoice payable with generated line. Please check " -"amounts and see if the invoice is already added or paid. Invoice: %s" -msgstr "" - -#. module: hr_expense_invoice -#: model:ir.model,name:hr_expense_invoice.model_hr_expense_expense -msgid "Expense" -msgstr "" - -#. module: hr_expense_invoice -#: model:ir.model,name:hr_expense_invoice.model_hr_expense_line -msgid "Expense Line" -msgstr "" - -#. module: hr_expense_invoice -#: field:hr.expense.line,invoice:0 -msgid "Invoice" -msgstr "Factura" - -#. module: hr_expense_invoice -#: view:hr.expense.expense:hr_expense_invoice.view_expenses_form_invoice -msgid "{'readonly': [('invoice', '!=', False)]}" -msgstr "" diff --git a/hr_expense_invoice/i18n/cs.po b/hr_expense_invoice/i18n/cs.po deleted file mode 100644 index 8d7db4205..000000000 --- a/hr_expense_invoice/i18n/cs.po +++ /dev/null @@ -1,46 +0,0 @@ -# Translation of Odoo Server. -# This file contains the translation of the following modules: -# * hr_expense_invoice -# -# Translators: -msgid "" -msgstr "" -"Project-Id-Version: hr (8.0)\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2016-12-24 02:15+0000\n" -"PO-Revision-Date: 2015-07-27 23:44+0000\n" -"Last-Translator: <>\n" -"Language-Team: Czech (http://www.transifex.com/oca/OCA-hr-8-0/language/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=3; plural=(n==1) ? 0 : (n>=2 && n<=4) ? 1 : 2;\n" - -#. module: hr_expense_invoice -#: code:addons/hr_expense_invoice/models/hr_expense_expense.py:52 -#, python-format -msgid "" -"Cannot reconcile supplier invoice payable with generated line. Please check " -"amounts and see if the invoice is already added or paid. Invoice: %s" -msgstr "" - -#. module: hr_expense_invoice -#: model:ir.model,name:hr_expense_invoice.model_hr_expense_expense -msgid "Expense" -msgstr "" - -#. module: hr_expense_invoice -#: model:ir.model,name:hr_expense_invoice.model_hr_expense_line -msgid "Expense Line" -msgstr "" - -#. module: hr_expense_invoice -#: field:hr.expense.line,invoice:0 -msgid "Invoice" -msgstr "Faktura" - -#. module: hr_expense_invoice -#: view:hr.expense.expense:hr_expense_invoice.view_expenses_form_invoice -msgid "{'readonly': [('invoice', '!=', False)]}" -msgstr "" diff --git a/hr_expense_invoice/i18n/cs_CZ.po b/hr_expense_invoice/i18n/cs_CZ.po new file mode 100644 index 000000000..379a3777e --- /dev/null +++ b/hr_expense_invoice/i18n/cs_CZ.po @@ -0,0 +1,46 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * hr_expense_invoice +# +# Translators: +# Lukáš Spurný , 2018 +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 10.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2018-02-23 03:45+0000\n" +"PO-Revision-Date: 2018-02-23 03:45+0000\n" +"Last-Translator: Lukáš Spurný , 2018\n" +"Language-Team: Czech (Czech Republic) (https://www.transifex.com/oca/" +"teams/23907/cs_CZ/)\n" +"Language: cs_CZ\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: nplurals=3; plural=(n==1) ? 0 : (n>=2 && n<=4) ? 1 : 2;\n" + +#. module: hr_expense_invoice +#: code:addons/hr_expense_invoice/models/hr_expense_sheet.py:37 +#, python-format +msgid "" +"Cannot reconcile supplier invoice payable with generated line. Please check " +"amounts and see if the invoice is already added or paid. Invoice: %s" +msgstr "" +"Nelze sladit dodavatelskou fakturu se zaplacenou generovanou linkou. " +"Zkontrolujte částky a zjistěte, zda již faktura již byla přidána nebo " +"zaplacena. Faktura: %s" + +#. module: hr_expense_invoice +#: model:ir.model,name:hr_expense_invoice.model_hr_expense +msgid "Expense" +msgstr "Výdaje" + +#. module: hr_expense_invoice +#: model:ir.model,name:hr_expense_invoice.model_hr_expense_sheet +msgid "Expense Report" +msgstr "Zpráva o výdajích" + +#. module: hr_expense_invoice +#: model:ir.model.fields,field_description:hr_expense_invoice.field_hr_expense_invoice_id +msgid "Invoice" +msgstr "Faktura" diff --git a/hr_expense_invoice/i18n/de.po b/hr_expense_invoice/i18n/de.po deleted file mode 100644 index 68eee0143..000000000 --- a/hr_expense_invoice/i18n/de.po +++ /dev/null @@ -1,49 +0,0 @@ -# Translation of Odoo Server. -# This file contains the translation of the following modules: -# * hr_expense_invoice -# -# Translators: -# Rudolf Schnapka , 2016 -# Thomas A. Jaeger, 2015 -# Thomas A. Jaeger, 2015 -msgid "" -msgstr "" -"Project-Id-Version: hr (8.0)\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2016-10-17 20:43+0000\n" -"PO-Revision-Date: 2016-10-13 13:17+0000\n" -"Last-Translator: Rudolf Schnapka \n" -"Language-Team: German (http://www.transifex.com/oca/OCA-hr-8-0/language/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: hr_expense_invoice -#: code:addons/hr_expense_invoice/models/hr_expense_expense.py:52 -#, python-format -msgid "" -"Cannot reconcile supplier invoice payable with generated line. Please check " -"amounts and see if the invoice is already added or paid. Invoice: %s" -msgstr "Die erstellte Zeile kann nicht mit der Lieferantenrechnung ausgeglichen werden. Prüfen Sie, ob die Rechnung bereits hinzugefügt oder bezahlt ist. Rechnung: %s" - -#. module: hr_expense_invoice -#: model:ir.model,name:hr_expense_invoice.model_hr_expense_expense -msgid "Expense" -msgstr "Aufwand" - -#. module: hr_expense_invoice -#: model:ir.model,name:hr_expense_invoice.model_hr_expense_line -msgid "Expense Line" -msgstr "Spesendetail" - -#. module: hr_expense_invoice -#: field:hr.expense.line,invoice:0 -msgid "Invoice" -msgstr "Rechnung" - -#. module: hr_expense_invoice -#: view:hr.expense.expense:hr_expense_invoice.view_expenses_form_invoice -msgid "{'readonly': [('invoice', '!=', False)]}" -msgstr "{'readonly': [('invoice', '!=', False)]}" diff --git a/hr_expense_invoice/i18n/el_GR.po b/hr_expense_invoice/i18n/el_GR.po deleted file mode 100644 index 95d30b8a8..000000000 --- a/hr_expense_invoice/i18n/el_GR.po +++ /dev/null @@ -1,46 +0,0 @@ -# Translation of Odoo Server. -# This file contains the translation of the following modules: -# * hr_expense_invoice -# -# Translators: -msgid "" -msgstr "" -"Project-Id-Version: hr (8.0)\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2016-10-17 20:43+0000\n" -"PO-Revision-Date: 2015-07-27 23:44+0000\n" -"Last-Translator: <>\n" -"Language-Team: Greek (Greece) (http://www.transifex.com/oca/OCA-hr-8-0/language/el_GR/)\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: \n" -"Language: el_GR\n" -"Plural-Forms: nplurals=2; plural=(n != 1);\n" - -#. module: hr_expense_invoice -#: code:addons/hr_expense_invoice/models/hr_expense_expense.py:52 -#, python-format -msgid "" -"Cannot reconcile supplier invoice payable with generated line. Please check " -"amounts and see if the invoice is already added or paid. Invoice: %s" -msgstr "" - -#. module: hr_expense_invoice -#: model:ir.model,name:hr_expense_invoice.model_hr_expense_expense -msgid "Expense" -msgstr "" - -#. module: hr_expense_invoice -#: model:ir.model,name:hr_expense_invoice.model_hr_expense_line -msgid "Expense Line" -msgstr "" - -#. module: hr_expense_invoice -#: field:hr.expense.line,invoice:0 -msgid "Invoice" -msgstr "Τιμολόγιο" - -#. module: hr_expense_invoice -#: view:hr.expense.expense:hr_expense_invoice.view_expenses_form_invoice -msgid "{'readonly': [('invoice', '!=', False)]}" -msgstr "" diff --git a/hr_expense_invoice/i18n/en_GB.po b/hr_expense_invoice/i18n/en_GB.po deleted file mode 100644 index 5e29c4647..000000000 --- a/hr_expense_invoice/i18n/en_GB.po +++ /dev/null @@ -1,46 +0,0 @@ -# Translation of Odoo Server. -# This file contains the translation of the following modules: -# * hr_expense_invoice -# -# Translators: -msgid "" -msgstr "" -"Project-Id-Version: hr (8.0)\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2016-12-24 02:15+0000\n" -"PO-Revision-Date: 2015-07-27 23:44+0000\n" -"Last-Translator: <>\n" -"Language-Team: English (United Kingdom) (http://www.transifex.com/oca/OCA-hr-8-0/language/en_GB/)\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: \n" -"Language: en_GB\n" -"Plural-Forms: nplurals=2; plural=(n != 1);\n" - -#. module: hr_expense_invoice -#: code:addons/hr_expense_invoice/models/hr_expense_expense.py:52 -#, python-format -msgid "" -"Cannot reconcile supplier invoice payable with generated line. Please check " -"amounts and see if the invoice is already added or paid. Invoice: %s" -msgstr "" - -#. module: hr_expense_invoice -#: model:ir.model,name:hr_expense_invoice.model_hr_expense_expense -msgid "Expense" -msgstr "" - -#. module: hr_expense_invoice -#: model:ir.model,name:hr_expense_invoice.model_hr_expense_line -msgid "Expense Line" -msgstr "" - -#. module: hr_expense_invoice -#: field:hr.expense.line,invoice:0 -msgid "Invoice" -msgstr "Invoice" - -#. module: hr_expense_invoice -#: view:hr.expense.expense:hr_expense_invoice.view_expenses_form_invoice -msgid "{'readonly': [('invoice', '!=', False)]}" -msgstr "" diff --git a/hr_expense_invoice/i18n/es.po b/hr_expense_invoice/i18n/es.po index df06b3a23..10d8adce2 100644 --- a/hr_expense_invoice/i18n/es.po +++ b/hr_expense_invoice/i18n/es.po @@ -1,48 +1,43 @@ # Translation of Odoo Server. # This file contains the translation of the following modules: -# * hr_expense_invoice -# -# Translators: -# Antonio Trueba, 2016 -# Antonio Trueba, 2016 +# * hr_expense_invoice +# msgid "" msgstr "" -"Project-Id-Version: hr (8.0)\n" +"Project-Id-Version: Odoo Server 10.0\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2016-10-17 20:43+0000\n" -"PO-Revision-Date: 2016-11-11 13:00+0000\n" -"Last-Translator: Antonio Trueba\n" -"Language-Team: Spanish (http://www.transifex.com/oca/OCA-hr-8-0/language/es/)\n" +"POT-Creation-Date: 2017-09-27 16:34+0000\n" +"PO-Revision-Date: 2017-09-27 16:34+0000\n" +"Last-Translator: <>\n" +"Language-Team: \n" +"Language: \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" +"Plural-Forms: \n" #. module: hr_expense_invoice -#: code:addons/hr_expense_invoice/models/hr_expense_expense.py:52 +#: code:addons/hr_expense_invoice/models/hr_expense_sheet.py:37 #, python-format msgid "" "Cannot reconcile supplier invoice payable with generated line. Please check " "amounts and see if the invoice is already added or paid. Invoice: %s" -msgstr "No se puede conciliar el saldo a pagar de la factura con la línea generada. Compruebe por favor las cantidades y vea si la factura ya está añadida previamente o pagada. Factura: %s" +msgstr "" +"No se puede conciliar el saldo a pagar de la factura con la línea generada. " +"Compruebe por favor las cantidades y vea si la factura ya está añadida " +"previamente o pagada. Factura: %s" #. module: hr_expense_invoice -#: model:ir.model,name:hr_expense_invoice.model_hr_expense_expense +#: model:ir.model,name:hr_expense_invoice.model_hr_expense msgid "Expense" msgstr "Gasto" #. module: hr_expense_invoice -#: model:ir.model,name:hr_expense_invoice.model_hr_expense_line -msgid "Expense Line" -msgstr "Línea de gasto" +#: model:ir.model,name:hr_expense_invoice.model_hr_expense_sheet +msgid "Expense Report" +msgstr "Informe de gastos" #. module: hr_expense_invoice -#: field:hr.expense.line,invoice:0 +#: model:ir.model.fields,field_description:hr_expense_invoice.field_hr_expense_invoice_id msgid "Invoice" msgstr "Factura" - -#. module: hr_expense_invoice -#: view:hr.expense.expense:hr_expense_invoice.view_expenses_form_invoice -msgid "{'readonly': [('invoice', '!=', False)]}" -msgstr "{'readonly': [('invoice', '!=', False)]}" diff --git a/hr_expense_invoice/i18n/es_CR.po b/hr_expense_invoice/i18n/es_CR.po deleted file mode 100644 index 5c9ae5665..000000000 --- a/hr_expense_invoice/i18n/es_CR.po +++ /dev/null @@ -1,46 +0,0 @@ -# Translation of Odoo Server. -# This file contains the translation of the following modules: -# * hr_expense_invoice -# -# Translators: -msgid "" -msgstr "" -"Project-Id-Version: hr (8.0)\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2016-12-24 02:15+0000\n" -"PO-Revision-Date: 2015-07-27 23:44+0000\n" -"Last-Translator: <>\n" -"Language-Team: Spanish (Costa Rica) (http://www.transifex.com/oca/OCA-hr-8-0/language/es_CR/)\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: \n" -"Language: es_CR\n" -"Plural-Forms: nplurals=2; plural=(n != 1);\n" - -#. module: hr_expense_invoice -#: code:addons/hr_expense_invoice/models/hr_expense_expense.py:52 -#, python-format -msgid "" -"Cannot reconcile supplier invoice payable with generated line. Please check " -"amounts and see if the invoice is already added or paid. Invoice: %s" -msgstr "" - -#. module: hr_expense_invoice -#: model:ir.model,name:hr_expense_invoice.model_hr_expense_expense -msgid "Expense" -msgstr "" - -#. module: hr_expense_invoice -#: model:ir.model,name:hr_expense_invoice.model_hr_expense_line -msgid "Expense Line" -msgstr "" - -#. module: hr_expense_invoice -#: field:hr.expense.line,invoice:0 -msgid "Invoice" -msgstr "Factura" - -#. module: hr_expense_invoice -#: view:hr.expense.expense:hr_expense_invoice.view_expenses_form_invoice -msgid "{'readonly': [('invoice', '!=', False)]}" -msgstr "" diff --git a/hr_expense_invoice/i18n/es_EC.po b/hr_expense_invoice/i18n/es_EC.po deleted file mode 100644 index 685ee8da2..000000000 --- a/hr_expense_invoice/i18n/es_EC.po +++ /dev/null @@ -1,46 +0,0 @@ -# Translation of Odoo Server. -# This file contains the translation of the following modules: -# * hr_expense_invoice -# -# Translators: -msgid "" -msgstr "" -"Project-Id-Version: hr (8.0)\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2016-12-24 02:15+0000\n" -"PO-Revision-Date: 2015-07-27 23:44+0000\n" -"Last-Translator: <>\n" -"Language-Team: Spanish (Ecuador) (http://www.transifex.com/oca/OCA-hr-8-0/language/es_EC/)\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: \n" -"Language: es_EC\n" -"Plural-Forms: nplurals=2; plural=(n != 1);\n" - -#. module: hr_expense_invoice -#: code:addons/hr_expense_invoice/models/hr_expense_expense.py:52 -#, python-format -msgid "" -"Cannot reconcile supplier invoice payable with generated line. Please check " -"amounts and see if the invoice is already added or paid. Invoice: %s" -msgstr "" - -#. module: hr_expense_invoice -#: model:ir.model,name:hr_expense_invoice.model_hr_expense_expense -msgid "Expense" -msgstr "" - -#. module: hr_expense_invoice -#: model:ir.model,name:hr_expense_invoice.model_hr_expense_line -msgid "Expense Line" -msgstr "" - -#. module: hr_expense_invoice -#: field:hr.expense.line,invoice:0 -msgid "Invoice" -msgstr "Factura" - -#. module: hr_expense_invoice -#: view:hr.expense.expense:hr_expense_invoice.view_expenses_form_invoice -msgid "{'readonly': [('invoice', '!=', False)]}" -msgstr "" diff --git a/hr_expense_invoice/i18n/es_MX.po b/hr_expense_invoice/i18n/es_MX.po deleted file mode 100644 index 5cb9ce968..000000000 --- a/hr_expense_invoice/i18n/es_MX.po +++ /dev/null @@ -1,46 +0,0 @@ -# Translation of Odoo Server. -# This file contains the translation of the following modules: -# * hr_expense_invoice -# -# Translators: -msgid "" -msgstr "" -"Project-Id-Version: hr (8.0)\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2016-12-06 03:44+0000\n" -"PO-Revision-Date: 2015-07-27 23:44+0000\n" -"Last-Translator: <>\n" -"Language-Team: Spanish (Mexico) (http://www.transifex.com/oca/OCA-hr-8-0/language/es_MX/)\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: \n" -"Language: es_MX\n" -"Plural-Forms: nplurals=2; plural=(n != 1);\n" - -#. module: hr_expense_invoice -#: code:addons/hr_expense_invoice/models/hr_expense_expense.py:52 -#, python-format -msgid "" -"Cannot reconcile supplier invoice payable with generated line. Please check " -"amounts and see if the invoice is already added or paid. Invoice: %s" -msgstr "" - -#. module: hr_expense_invoice -#: model:ir.model,name:hr_expense_invoice.model_hr_expense_expense -msgid "Expense" -msgstr "" - -#. module: hr_expense_invoice -#: model:ir.model,name:hr_expense_invoice.model_hr_expense_line -msgid "Expense Line" -msgstr "" - -#. module: hr_expense_invoice -#: field:hr.expense.line,invoice:0 -msgid "Invoice" -msgstr "Factura" - -#. module: hr_expense_invoice -#: view:hr.expense.expense:hr_expense_invoice.view_expenses_form_invoice -msgid "{'readonly': [('invoice', '!=', False)]}" -msgstr "" diff --git a/hr_expense_invoice/i18n/et.po b/hr_expense_invoice/i18n/et.po deleted file mode 100644 index 61e5f2df6..000000000 --- a/hr_expense_invoice/i18n/et.po +++ /dev/null @@ -1,46 +0,0 @@ -# Translation of Odoo Server. -# This file contains the translation of the following modules: -# * hr_expense_invoice -# -# Translators: -msgid "" -msgstr "" -"Project-Id-Version: hr (8.0)\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2016-12-24 02:15+0000\n" -"PO-Revision-Date: 2015-07-27 23:44+0000\n" -"Last-Translator: <>\n" -"Language-Team: Estonian (http://www.transifex.com/oca/OCA-hr-8-0/language/et/)\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: \n" -"Language: et\n" -"Plural-Forms: nplurals=2; plural=(n != 1);\n" - -#. module: hr_expense_invoice -#: code:addons/hr_expense_invoice/models/hr_expense_expense.py:52 -#, python-format -msgid "" -"Cannot reconcile supplier invoice payable with generated line. Please check " -"amounts and see if the invoice is already added or paid. Invoice: %s" -msgstr "" - -#. module: hr_expense_invoice -#: model:ir.model,name:hr_expense_invoice.model_hr_expense_expense -msgid "Expense" -msgstr "" - -#. module: hr_expense_invoice -#: model:ir.model,name:hr_expense_invoice.model_hr_expense_line -msgid "Expense Line" -msgstr "" - -#. module: hr_expense_invoice -#: field:hr.expense.line,invoice:0 -msgid "Invoice" -msgstr "Arve" - -#. module: hr_expense_invoice -#: view:hr.expense.expense:hr_expense_invoice.view_expenses_form_invoice -msgid "{'readonly': [('invoice', '!=', False)]}" -msgstr "" diff --git a/hr_expense_invoice/i18n/fi.po b/hr_expense_invoice/i18n/fi.po deleted file mode 100644 index 7deb8fe47..000000000 --- a/hr_expense_invoice/i18n/fi.po +++ /dev/null @@ -1,47 +0,0 @@ -# Translation of Odoo Server. -# This file contains the translation of the following modules: -# * hr_expense_invoice -# -# Translators: -# Jarmo Kortetjärvi , 2016 -msgid "" -msgstr "" -"Project-Id-Version: hr (8.0)\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2016-04-14 04:15+0000\n" -"PO-Revision-Date: 2016-04-04 11:09+0000\n" -"Last-Translator: Jarmo Kortetjärvi \n" -"Language-Team: Finnish (http://www.transifex.com/oca/OCA-hr-8-0/language/fi/)\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: \n" -"Language: fi\n" -"Plural-Forms: nplurals=2; plural=(n != 1);\n" - -#. module: hr_expense_invoice -#: code:addons/hr_expense_invoice/models/hr_expense_expense.py:49 -#, python-format -msgid "" -"Cannot reconcile supplier invoice payable with generated line. Please check " -"amounts and see if the invoice is already added or paid. Invoice: %s" -msgstr "" - -#. module: hr_expense_invoice -#: model:ir.model,name:hr_expense_invoice.model_hr_expense_expense -msgid "Expense" -msgstr "Kulu" - -#. module: hr_expense_invoice -#: model:ir.model,name:hr_expense_invoice.model_hr_expense_line -msgid "Expense Line" -msgstr "" - -#. module: hr_expense_invoice -#: field:hr.expense.line,invoice:0 -msgid "Invoice" -msgstr "Lasku" - -#. module: hr_expense_invoice -#: view:hr.expense.expense:hr_expense_invoice.view_expenses_form_invoice -msgid "{'readonly': [('invoice', '!=', False)]}" -msgstr "" diff --git a/hr_expense_invoice/i18n/fr.po b/hr_expense_invoice/i18n/fr.po index 93fa1a170..32ea1d2f7 100644 --- a/hr_expense_invoice/i18n/fr.po +++ b/hr_expense_invoice/i18n/fr.po @@ -1,48 +1,45 @@ # Translation of Odoo Server. # This file contains the translation of the following modules: # * hr_expense_invoice -# +# # Translators: -# Christophe CHAUVET , 2016 -# Mohamed HABOU , 2016 +# guillaume bauer , 2017 +# Alexandre Fayolle , 2018 msgid "" msgstr "" -"Project-Id-Version: hr (8.0)\n" +"Project-Id-Version: Odoo Server 10.0\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2016-10-17 20:43+0000\n" -"PO-Revision-Date: 2016-10-17 12:12+0000\n" -"Last-Translator: Christophe CHAUVET \n" -"Language-Team: French (http://www.transifex.com/oca/OCA-hr-8-0/language/fr/)\n" +"POT-Creation-Date: 2018-02-23 03:45+0000\n" +"PO-Revision-Date: 2018-02-23 03:45+0000\n" +"Last-Translator: Alexandre Fayolle , 2018\n" +"Language-Team: French (https://www.transifex.com/oca/teams/23907/fr/)\n" +"Language: 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: hr_expense_invoice -#: code:addons/hr_expense_invoice/models/hr_expense_expense.py:52 +#: code:addons/hr_expense_invoice/models/hr_expense_sheet.py:37 #, python-format msgid "" "Cannot reconcile supplier invoice payable with generated line. Please check " "amounts and see if the invoice is already added or paid. Invoice: %s" -msgstr "Impossible de reconcilier une facture fournisseur avec les lignes générées. Veuillez vérifier les montant et voir si la facture est déjà créé ou payer. Facture %s" +msgstr "" +"Impossible de réconcilier la facture fournisseur avec la ligne générée. " +"Vérifiez le montant et si la facture est déjà ajoutée ou payée. Facture: %s" #. module: hr_expense_invoice -#: model:ir.model,name:hr_expense_invoice.model_hr_expense_expense +#: model:ir.model,name:hr_expense_invoice.model_hr_expense msgid "Expense" -msgstr "Frais" +msgstr "Note de frais" #. module: hr_expense_invoice -#: model:ir.model,name:hr_expense_invoice.model_hr_expense_line -msgid "Expense Line" -msgstr "Ligne de frais" +#: model:ir.model,name:hr_expense_invoice.model_hr_expense_sheet +msgid "Expense Report" +msgstr "Rapport de dépenses" #. module: hr_expense_invoice -#: field:hr.expense.line,invoice:0 +#: model:ir.model.fields,field_description:hr_expense_invoice.field_hr_expense_invoice_id msgid "Invoice" msgstr "Facture" - -#. module: hr_expense_invoice -#: view:hr.expense.expense:hr_expense_invoice.view_expenses_form_invoice -msgid "{'readonly': [('invoice', '!=', False)]}" -msgstr "{'readonly': [('invoice', '!=', False)]}" diff --git a/hr_expense_invoice/i18n/fr_CA.po b/hr_expense_invoice/i18n/fr_CA.po deleted file mode 100644 index 31f9c2e60..000000000 --- a/hr_expense_invoice/i18n/fr_CA.po +++ /dev/null @@ -1,46 +0,0 @@ -# Translation of Odoo Server. -# This file contains the translation of the following modules: -# * hr_expense_invoice -# -# Translators: -msgid "" -msgstr "" -"Project-Id-Version: hr (8.0)\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2017-07-29 02:35+0000\n" -"PO-Revision-Date: 2015-07-27 23:44+0000\n" -"Last-Translator: <>\n" -"Language-Team: French (Canada) (http://www.transifex.com/oca/OCA-hr-8-0/language/fr_CA/)\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: \n" -"Language: fr_CA\n" -"Plural-Forms: nplurals=2; plural=(n > 1);\n" - -#. module: hr_expense_invoice -#: code:addons/hr_expense_invoice/models/hr_expense_expense.py:52 -#, python-format -msgid "" -"Cannot reconcile supplier invoice payable with generated line. Please check " -"amounts and see if the invoice is already added or paid. Invoice: %s" -msgstr "" - -#. module: hr_expense_invoice -#: model:ir.model,name:hr_expense_invoice.model_hr_expense_expense -msgid "Expense" -msgstr "" - -#. module: hr_expense_invoice -#: model:ir.model,name:hr_expense_invoice.model_hr_expense_line -msgid "Expense Line" -msgstr "" - -#. module: hr_expense_invoice -#: field:hr.expense.line,invoice:0 -msgid "Invoice" -msgstr "Facture" - -#. module: hr_expense_invoice -#: view:hr.expense.expense:hr_expense_invoice.view_expenses_form_invoice -msgid "{'readonly': [('invoice', '!=', False)]}" -msgstr "" diff --git a/hr_expense_invoice/i18n/fr_CH.po b/hr_expense_invoice/i18n/fr_CH.po deleted file mode 100644 index 2e9425c88..000000000 --- a/hr_expense_invoice/i18n/fr_CH.po +++ /dev/null @@ -1,46 +0,0 @@ -# Translation of Odoo Server. -# This file contains the translation of the following modules: -# * hr_expense_invoice -# -# Translators: -msgid "" -msgstr "" -"Project-Id-Version: hr (8.0)\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2016-12-24 02:15+0000\n" -"PO-Revision-Date: 2015-07-27 23:44+0000\n" -"Last-Translator: <>\n" -"Language-Team: French (Switzerland) (http://www.transifex.com/oca/OCA-hr-8-0/language/fr_CH/)\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: \n" -"Language: fr_CH\n" -"Plural-Forms: nplurals=2; plural=(n > 1);\n" - -#. module: hr_expense_invoice -#: code:addons/hr_expense_invoice/models/hr_expense_expense.py:52 -#, python-format -msgid "" -"Cannot reconcile supplier invoice payable with generated line. Please check " -"amounts and see if the invoice is already added or paid. Invoice: %s" -msgstr "" - -#. module: hr_expense_invoice -#: model:ir.model,name:hr_expense_invoice.model_hr_expense_expense -msgid "Expense" -msgstr "" - -#. module: hr_expense_invoice -#: model:ir.model,name:hr_expense_invoice.model_hr_expense_line -msgid "Expense Line" -msgstr "" - -#. module: hr_expense_invoice -#: field:hr.expense.line,invoice:0 -msgid "Invoice" -msgstr "Facture" - -#. module: hr_expense_invoice -#: view:hr.expense.expense:hr_expense_invoice.view_expenses_form_invoice -msgid "{'readonly': [('invoice', '!=', False)]}" -msgstr "" diff --git a/hr_expense_invoice/i18n/gl.po b/hr_expense_invoice/i18n/gl.po deleted file mode 100644 index 3a82c4302..000000000 --- a/hr_expense_invoice/i18n/gl.po +++ /dev/null @@ -1,46 +0,0 @@ -# Translation of Odoo Server. -# This file contains the translation of the following modules: -# * hr_expense_invoice -# -# Translators: -msgid "" -msgstr "" -"Project-Id-Version: hr (8.0)\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2016-12-24 02:15+0000\n" -"PO-Revision-Date: 2015-07-27 23:44+0000\n" -"Last-Translator: <>\n" -"Language-Team: Galician (http://www.transifex.com/oca/OCA-hr-8-0/language/gl/)\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: \n" -"Language: gl\n" -"Plural-Forms: nplurals=2; plural=(n != 1);\n" - -#. module: hr_expense_invoice -#: code:addons/hr_expense_invoice/models/hr_expense_expense.py:52 -#, python-format -msgid "" -"Cannot reconcile supplier invoice payable with generated line. Please check " -"amounts and see if the invoice is already added or paid. Invoice: %s" -msgstr "" - -#. module: hr_expense_invoice -#: model:ir.model,name:hr_expense_invoice.model_hr_expense_expense -msgid "Expense" -msgstr "" - -#. module: hr_expense_invoice -#: model:ir.model,name:hr_expense_invoice.model_hr_expense_line -msgid "Expense Line" -msgstr "" - -#. module: hr_expense_invoice -#: field:hr.expense.line,invoice:0 -msgid "Invoice" -msgstr "Factura" - -#. module: hr_expense_invoice -#: view:hr.expense.expense:hr_expense_invoice.view_expenses_form_invoice -msgid "{'readonly': [('invoice', '!=', False)]}" -msgstr "" diff --git a/hr_expense_invoice/i18n/hr.po b/hr_expense_invoice/i18n/hr.po index 0f2563c8a..a6b3f56bb 100644 --- a/hr_expense_invoice/i18n/hr.po +++ b/hr_expense_invoice/i18n/hr.po @@ -1,46 +1,45 @@ # Translation of Odoo Server. # This file contains the translation of the following modules: # * hr_expense_invoice -# +# # Translators: +# Bole , 2017 msgid "" msgstr "" -"Project-Id-Version: hr (8.0)\n" +"Project-Id-Version: Odoo Server 10.0\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2016-10-17 20:43+0000\n" -"PO-Revision-Date: 2015-07-27 23:44+0000\n" -"Last-Translator: <>\n" -"Language-Team: Croatian (http://www.transifex.com/oca/OCA-hr-8-0/language/hr/)\n" +"POT-Creation-Date: 2018-02-23 03:45+0000\n" +"PO-Revision-Date: 2018-02-23 03:45+0000\n" +"Last-Translator: Bole , 2017\n" +"Language-Team: Croatian (https://www.transifex.com/oca/teams/23907/hr/)\n" +"Language: 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" +"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: hr_expense_invoice -#: code:addons/hr_expense_invoice/models/hr_expense_expense.py:52 +#: code:addons/hr_expense_invoice/models/hr_expense_sheet.py:37 #, python-format msgid "" "Cannot reconcile supplier invoice payable with generated line. Please check " "amounts and see if the invoice is already added or paid. Invoice: %s" msgstr "" +"Nije moguće zatvaranje računa dobavljača sa generiranom stavkom. Molimo " +"provjerite iznose i plaćanja: %s" #. module: hr_expense_invoice -#: model:ir.model,name:hr_expense_invoice.model_hr_expense_expense +#: model:ir.model,name:hr_expense_invoice.model_hr_expense msgid "Expense" -msgstr "" +msgstr "Trošak" #. module: hr_expense_invoice -#: model:ir.model,name:hr_expense_invoice.model_hr_expense_line -msgid "Expense Line" -msgstr "" +#: model:ir.model,name:hr_expense_invoice.model_hr_expense_sheet +msgid "Expense Report" +msgstr "Izvještaj troškova" #. module: hr_expense_invoice -#: field:hr.expense.line,invoice:0 +#: model:ir.model.fields,field_description:hr_expense_invoice.field_hr_expense_invoice_id msgid "Invoice" msgstr "Račun" - -#. module: hr_expense_invoice -#: view:hr.expense.expense:hr_expense_invoice.view_expenses_form_invoice -msgid "{'readonly': [('invoice', '!=', False)]}" -msgstr "" diff --git a/hr_expense_invoice/i18n/hr_HR.po b/hr_expense_invoice/i18n/hr_HR.po deleted file mode 100644 index ef4875053..000000000 --- a/hr_expense_invoice/i18n/hr_HR.po +++ /dev/null @@ -1,46 +0,0 @@ -# Translation of Odoo Server. -# This file contains the translation of the following modules: -# * hr_expense_invoice -# -# Translators: -msgid "" -msgstr "" -"Project-Id-Version: hr (8.0)\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2016-12-24 02:15+0000\n" -"PO-Revision-Date: 2015-07-27 23:44+0000\n" -"Last-Translator: <>\n" -"Language-Team: Croatian (Croatia) (http://www.transifex.com/oca/OCA-hr-8-0/language/hr_HR/)\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: \n" -"Language: hr_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: hr_expense_invoice -#: code:addons/hr_expense_invoice/models/hr_expense_expense.py:52 -#, python-format -msgid "" -"Cannot reconcile supplier invoice payable with generated line. Please check " -"amounts and see if the invoice is already added or paid. Invoice: %s" -msgstr "" - -#. module: hr_expense_invoice -#: model:ir.model,name:hr_expense_invoice.model_hr_expense_expense -msgid "Expense" -msgstr "" - -#. module: hr_expense_invoice -#: model:ir.model,name:hr_expense_invoice.model_hr_expense_line -msgid "Expense Line" -msgstr "" - -#. module: hr_expense_invoice -#: field:hr.expense.line,invoice:0 -msgid "Invoice" -msgstr "Račun" - -#. module: hr_expense_invoice -#: view:hr.expense.expense:hr_expense_invoice.view_expenses_form_invoice -msgid "{'readonly': [('invoice', '!=', False)]}" -msgstr "" diff --git a/hr_expense_invoice/i18n/hr_expense_invoice.pot b/hr_expense_invoice/i18n/hr_expense_invoice.pot index ca5cec654..24612c803 100644 --- a/hr_expense_invoice/i18n/hr_expense_invoice.pot +++ b/hr_expense_invoice/i18n/hr_expense_invoice.pot @@ -4,10 +4,8 @@ # msgid "" msgstr "" -"Project-Id-Version: Odoo Server 8.0\n" +"Project-Id-Version: Odoo Server 10.0\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2015-03-09 20:07+0000\n" -"PO-Revision-Date: 2015-03-09 20:07+0000\n" "Last-Translator: <>\n" "Language-Team: \n" "MIME-Version: 1.0\n" @@ -16,12 +14,23 @@ msgstr "" "Plural-Forms: \n" #. module: hr_expense_invoice -#: code:addons/hr_expense_invoice/models/hr_expense_expense.py:49 +#: code:addons/hr_expense_invoice/models/hr_expense_sheet.py:37 #, python-format msgid "Cannot reconcile supplier invoice payable with generated line. Please check amounts and see if the invoice is already added or paid. Invoice: %s" msgstr "" #. module: hr_expense_invoice -#: field:hr.expense.line,invoice:0 +#: model:ir.model,name:hr_expense_invoice.model_hr_expense +msgid "Expense" +msgstr "" + +#. module: hr_expense_invoice +#: model:ir.model,name:hr_expense_invoice.model_hr_expense_sheet +msgid "Expense Report" +msgstr "" + +#. module: hr_expense_invoice +#: model:ir.model.fields,field_description:hr_expense_invoice.field_hr_expense_invoice_id msgid "Invoice" msgstr "" + diff --git a/hr_expense_invoice/i18n/hu.po b/hr_expense_invoice/i18n/hu.po deleted file mode 100644 index 15c596d33..000000000 --- a/hr_expense_invoice/i18n/hu.po +++ /dev/null @@ -1,46 +0,0 @@ -# Translation of Odoo Server. -# This file contains the translation of the following modules: -# * hr_expense_invoice -# -# Translators: -msgid "" -msgstr "" -"Project-Id-Version: hr (8.0)\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2017-07-29 02:35+0000\n" -"PO-Revision-Date: 2015-07-27 23:44+0000\n" -"Last-Translator: <>\n" -"Language-Team: Hungarian (http://www.transifex.com/oca/OCA-hr-8-0/language/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: hr_expense_invoice -#: code:addons/hr_expense_invoice/models/hr_expense_expense.py:52 -#, python-format -msgid "" -"Cannot reconcile supplier invoice payable with generated line. Please check " -"amounts and see if the invoice is already added or paid. Invoice: %s" -msgstr "" - -#. module: hr_expense_invoice -#: model:ir.model,name:hr_expense_invoice.model_hr_expense_expense -msgid "Expense" -msgstr "" - -#. module: hr_expense_invoice -#: model:ir.model,name:hr_expense_invoice.model_hr_expense_line -msgid "Expense Line" -msgstr "" - -#. module: hr_expense_invoice -#: field:hr.expense.line,invoice:0 -msgid "Invoice" -msgstr "Számla" - -#. module: hr_expense_invoice -#: view:hr.expense.expense:hr_expense_invoice.view_expenses_form_invoice -msgid "{'readonly': [('invoice', '!=', False)]}" -msgstr "" diff --git a/hr_expense_invoice/i18n/id.po b/hr_expense_invoice/i18n/id.po deleted file mode 100644 index 420809610..000000000 --- a/hr_expense_invoice/i18n/id.po +++ /dev/null @@ -1,46 +0,0 @@ -# Translation of Odoo Server. -# This file contains the translation of the following modules: -# * hr_expense_invoice -# -# Translators: -msgid "" -msgstr "" -"Project-Id-Version: hr (8.0)\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2016-12-24 02:15+0000\n" -"PO-Revision-Date: 2015-07-27 23:44+0000\n" -"Last-Translator: <>\n" -"Language-Team: Indonesian (http://www.transifex.com/oca/OCA-hr-8-0/language/id/)\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: \n" -"Language: id\n" -"Plural-Forms: nplurals=1; plural=0;\n" - -#. module: hr_expense_invoice -#: code:addons/hr_expense_invoice/models/hr_expense_expense.py:52 -#, python-format -msgid "" -"Cannot reconcile supplier invoice payable with generated line. Please check " -"amounts and see if the invoice is already added or paid. Invoice: %s" -msgstr "" - -#. module: hr_expense_invoice -#: model:ir.model,name:hr_expense_invoice.model_hr_expense_expense -msgid "Expense" -msgstr "" - -#. module: hr_expense_invoice -#: model:ir.model,name:hr_expense_invoice.model_hr_expense_line -msgid "Expense Line" -msgstr "" - -#. module: hr_expense_invoice -#: field:hr.expense.line,invoice:0 -msgid "Invoice" -msgstr "Faktur" - -#. module: hr_expense_invoice -#: view:hr.expense.expense:hr_expense_invoice.view_expenses_form_invoice -msgid "{'readonly': [('invoice', '!=', False)]}" -msgstr "" diff --git a/hr_expense_invoice/i18n/it.po b/hr_expense_invoice/i18n/it.po deleted file mode 100644 index 3ddf3b073..000000000 --- a/hr_expense_invoice/i18n/it.po +++ /dev/null @@ -1,47 +0,0 @@ -# Translation of Odoo Server. -# This file contains the translation of the following modules: -# * hr_expense_invoice -# -# Translators: -# Paolo Valier, 2016 -msgid "" -msgstr "" -"Project-Id-Version: hr (8.0)\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2016-03-12 12:02+0000\n" -"PO-Revision-Date: 2016-03-19 10:40+0000\n" -"Last-Translator: Paolo Valier\n" -"Language-Team: Italian (http://www.transifex.com/oca/OCA-hr-8-0/language/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: hr_expense_invoice -#: code:addons/hr_expense_invoice/models/hr_expense_expense.py:49 -#, python-format -msgid "" -"Cannot reconcile supplier invoice payable with generated line. Please check " -"amounts and see if the invoice is already added or paid. Invoice: %s" -msgstr "" - -#. module: hr_expense_invoice -#: model:ir.model,name:hr_expense_invoice.model_hr_expense_expense -msgid "Expense" -msgstr "" - -#. module: hr_expense_invoice -#: model:ir.model,name:hr_expense_invoice.model_hr_expense_line -msgid "Expense Line" -msgstr "" - -#. module: hr_expense_invoice -#: field:hr.expense.line,invoice:0 -msgid "Invoice" -msgstr "Fattura" - -#. module: hr_expense_invoice -#: view:hr.expense.expense:hr_expense_invoice.view_expenses_form_invoice -msgid "{'readonly': [('invoice', '!=', False)]}" -msgstr "" diff --git a/hr_expense_invoice/i18n/ja.po b/hr_expense_invoice/i18n/ja.po deleted file mode 100644 index 8937b94fb..000000000 --- a/hr_expense_invoice/i18n/ja.po +++ /dev/null @@ -1,46 +0,0 @@ -# Translation of Odoo Server. -# This file contains the translation of the following modules: -# * hr_expense_invoice -# -# Translators: -msgid "" -msgstr "" -"Project-Id-Version: hr (8.0)\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2016-12-24 02:15+0000\n" -"PO-Revision-Date: 2015-07-27 23:44+0000\n" -"Last-Translator: <>\n" -"Language-Team: Japanese (http://www.transifex.com/oca/OCA-hr-8-0/language/ja/)\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: \n" -"Language: ja\n" -"Plural-Forms: nplurals=1; plural=0;\n" - -#. module: hr_expense_invoice -#: code:addons/hr_expense_invoice/models/hr_expense_expense.py:52 -#, python-format -msgid "" -"Cannot reconcile supplier invoice payable with generated line. Please check " -"amounts and see if the invoice is already added or paid. Invoice: %s" -msgstr "" - -#. module: hr_expense_invoice -#: model:ir.model,name:hr_expense_invoice.model_hr_expense_expense -msgid "Expense" -msgstr "" - -#. module: hr_expense_invoice -#: model:ir.model,name:hr_expense_invoice.model_hr_expense_line -msgid "Expense Line" -msgstr "" - -#. module: hr_expense_invoice -#: field:hr.expense.line,invoice:0 -msgid "Invoice" -msgstr "請求書" - -#. module: hr_expense_invoice -#: view:hr.expense.expense:hr_expense_invoice.view_expenses_form_invoice -msgid "{'readonly': [('invoice', '!=', False)]}" -msgstr "" diff --git a/hr_expense_invoice/i18n/lt.po b/hr_expense_invoice/i18n/lt.po deleted file mode 100644 index 07634813a..000000000 --- a/hr_expense_invoice/i18n/lt.po +++ /dev/null @@ -1,46 +0,0 @@ -# Translation of Odoo Server. -# This file contains the translation of the following modules: -# * hr_expense_invoice -# -# Translators: -msgid "" -msgstr "" -"Project-Id-Version: hr (8.0)\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2016-12-24 02:15+0000\n" -"PO-Revision-Date: 2015-07-27 23:44+0000\n" -"Last-Translator: <>\n" -"Language-Team: Lithuanian (http://www.transifex.com/oca/OCA-hr-8-0/language/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=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && (n%100<10 || n%100>=20) ? 1 : 2);\n" - -#. module: hr_expense_invoice -#: code:addons/hr_expense_invoice/models/hr_expense_expense.py:52 -#, python-format -msgid "" -"Cannot reconcile supplier invoice payable with generated line. Please check " -"amounts and see if the invoice is already added or paid. Invoice: %s" -msgstr "" - -#. module: hr_expense_invoice -#: model:ir.model,name:hr_expense_invoice.model_hr_expense_expense -msgid "Expense" -msgstr "" - -#. module: hr_expense_invoice -#: model:ir.model,name:hr_expense_invoice.model_hr_expense_line -msgid "Expense Line" -msgstr "" - -#. module: hr_expense_invoice -#: field:hr.expense.line,invoice:0 -msgid "Invoice" -msgstr "Sąskaita faktūra" - -#. module: hr_expense_invoice -#: view:hr.expense.expense:hr_expense_invoice.view_expenses_form_invoice -msgid "{'readonly': [('invoice', '!=', False)]}" -msgstr "" diff --git a/hr_expense_invoice/i18n/mk.po b/hr_expense_invoice/i18n/mk.po deleted file mode 100644 index bc40c1123..000000000 --- a/hr_expense_invoice/i18n/mk.po +++ /dev/null @@ -1,46 +0,0 @@ -# Translation of Odoo Server. -# This file contains the translation of the following modules: -# * hr_expense_invoice -# -# Translators: -msgid "" -msgstr "" -"Project-Id-Version: hr (8.0)\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2016-12-24 02:15+0000\n" -"PO-Revision-Date: 2015-07-27 23:44+0000\n" -"Last-Translator: <>\n" -"Language-Team: Macedonian (http://www.transifex.com/oca/OCA-hr-8-0/language/mk/)\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: \n" -"Language: mk\n" -"Plural-Forms: nplurals=2; plural=(n % 10 == 1 && n % 100 != 11) ? 0 : 1;\n" - -#. module: hr_expense_invoice -#: code:addons/hr_expense_invoice/models/hr_expense_expense.py:52 -#, python-format -msgid "" -"Cannot reconcile supplier invoice payable with generated line. Please check " -"amounts and see if the invoice is already added or paid. Invoice: %s" -msgstr "" - -#. module: hr_expense_invoice -#: model:ir.model,name:hr_expense_invoice.model_hr_expense_expense -msgid "Expense" -msgstr "" - -#. module: hr_expense_invoice -#: model:ir.model,name:hr_expense_invoice.model_hr_expense_line -msgid "Expense Line" -msgstr "" - -#. module: hr_expense_invoice -#: field:hr.expense.line,invoice:0 -msgid "Invoice" -msgstr "Фактура" - -#. module: hr_expense_invoice -#: view:hr.expense.expense:hr_expense_invoice.view_expenses_form_invoice -msgid "{'readonly': [('invoice', '!=', False)]}" -msgstr "" diff --git a/hr_expense_invoice/i18n/mn.po b/hr_expense_invoice/i18n/mn.po deleted file mode 100644 index 93df1f557..000000000 --- a/hr_expense_invoice/i18n/mn.po +++ /dev/null @@ -1,46 +0,0 @@ -# Translation of Odoo Server. -# This file contains the translation of the following modules: -# * hr_expense_invoice -# -# Translators: -msgid "" -msgstr "" -"Project-Id-Version: hr (8.0)\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2016-12-24 02:15+0000\n" -"PO-Revision-Date: 2015-07-27 23:44+0000\n" -"Last-Translator: <>\n" -"Language-Team: Mongolian (http://www.transifex.com/oca/OCA-hr-8-0/language/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: hr_expense_invoice -#: code:addons/hr_expense_invoice/models/hr_expense_expense.py:52 -#, python-format -msgid "" -"Cannot reconcile supplier invoice payable with generated line. Please check " -"amounts and see if the invoice is already added or paid. Invoice: %s" -msgstr "" - -#. module: hr_expense_invoice -#: model:ir.model,name:hr_expense_invoice.model_hr_expense_expense -msgid "Expense" -msgstr "" - -#. module: hr_expense_invoice -#: model:ir.model,name:hr_expense_invoice.model_hr_expense_line -msgid "Expense Line" -msgstr "" - -#. module: hr_expense_invoice -#: field:hr.expense.line,invoice:0 -msgid "Invoice" -msgstr "Нэхэмжлэл" - -#. module: hr_expense_invoice -#: view:hr.expense.expense:hr_expense_invoice.view_expenses_form_invoice -msgid "{'readonly': [('invoice', '!=', False)]}" -msgstr "" diff --git a/hr_expense_invoice/i18n/nb.po b/hr_expense_invoice/i18n/nb.po deleted file mode 100644 index 8ed2c07c7..000000000 --- a/hr_expense_invoice/i18n/nb.po +++ /dev/null @@ -1,46 +0,0 @@ -# Translation of Odoo Server. -# This file contains the translation of the following modules: -# * hr_expense_invoice -# -# Translators: -msgid "" -msgstr "" -"Project-Id-Version: hr (8.0)\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2017-03-28 03:12+0000\n" -"PO-Revision-Date: 2015-07-27 23:44+0000\n" -"Last-Translator: <>\n" -"Language-Team: Norwegian Bokmål (http://www.transifex.com/oca/OCA-hr-8-0/language/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: hr_expense_invoice -#: code:addons/hr_expense_invoice/models/hr_expense_expense.py:52 -#, python-format -msgid "" -"Cannot reconcile supplier invoice payable with generated line. Please check " -"amounts and see if the invoice is already added or paid. Invoice: %s" -msgstr "" - -#. module: hr_expense_invoice -#: model:ir.model,name:hr_expense_invoice.model_hr_expense_expense -msgid "Expense" -msgstr "" - -#. module: hr_expense_invoice -#: model:ir.model,name:hr_expense_invoice.model_hr_expense_line -msgid "Expense Line" -msgstr "" - -#. module: hr_expense_invoice -#: field:hr.expense.line,invoice:0 -msgid "Invoice" -msgstr "Faktura" - -#. module: hr_expense_invoice -#: view:hr.expense.expense:hr_expense_invoice.view_expenses_form_invoice -msgid "{'readonly': [('invoice', '!=', False)]}" -msgstr "" diff --git a/hr_expense_invoice/i18n/nb_NO.po b/hr_expense_invoice/i18n/nb_NO.po deleted file mode 100644 index e544ca56d..000000000 --- a/hr_expense_invoice/i18n/nb_NO.po +++ /dev/null @@ -1,46 +0,0 @@ -# Translation of Odoo Server. -# This file contains the translation of the following modules: -# * hr_expense_invoice -# -# Translators: -msgid "" -msgstr "" -"Project-Id-Version: hr (8.0)\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2016-12-24 02:15+0000\n" -"PO-Revision-Date: 2015-07-27 23:44+0000\n" -"Last-Translator: <>\n" -"Language-Team: Norwegian Bokmål (Norway) (http://www.transifex.com/oca/OCA-hr-8-0/language/nb_NO/)\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: \n" -"Language: nb_NO\n" -"Plural-Forms: nplurals=2; plural=(n != 1);\n" - -#. module: hr_expense_invoice -#: code:addons/hr_expense_invoice/models/hr_expense_expense.py:52 -#, python-format -msgid "" -"Cannot reconcile supplier invoice payable with generated line. Please check " -"amounts and see if the invoice is already added or paid. Invoice: %s" -msgstr "" - -#. module: hr_expense_invoice -#: model:ir.model,name:hr_expense_invoice.model_hr_expense_expense -msgid "Expense" -msgstr "" - -#. module: hr_expense_invoice -#: model:ir.model,name:hr_expense_invoice.model_hr_expense_line -msgid "Expense Line" -msgstr "" - -#. module: hr_expense_invoice -#: field:hr.expense.line,invoice:0 -msgid "Invoice" -msgstr "Innmelding" - -#. module: hr_expense_invoice -#: view:hr.expense.expense:hr_expense_invoice.view_expenses_form_invoice -msgid "{'readonly': [('invoice', '!=', False)]}" -msgstr "" diff --git a/hr_expense_invoice/i18n/nl.po b/hr_expense_invoice/i18n/nl.po deleted file mode 100644 index 58d771453..000000000 --- a/hr_expense_invoice/i18n/nl.po +++ /dev/null @@ -1,46 +0,0 @@ -# Translation of Odoo Server. -# This file contains the translation of the following modules: -# * hr_expense_invoice -# -# Translators: -msgid "" -msgstr "" -"Project-Id-Version: hr (8.0)\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2016-12-06 03:44+0000\n" -"PO-Revision-Date: 2015-07-27 23:44+0000\n" -"Last-Translator: <>\n" -"Language-Team: Dutch (http://www.transifex.com/oca/OCA-hr-8-0/language/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: hr_expense_invoice -#: code:addons/hr_expense_invoice/models/hr_expense_expense.py:52 -#, python-format -msgid "" -"Cannot reconcile supplier invoice payable with generated line. Please check " -"amounts and see if the invoice is already added or paid. Invoice: %s" -msgstr "" - -#. module: hr_expense_invoice -#: model:ir.model,name:hr_expense_invoice.model_hr_expense_expense -msgid "Expense" -msgstr "" - -#. module: hr_expense_invoice -#: model:ir.model,name:hr_expense_invoice.model_hr_expense_line -msgid "Expense Line" -msgstr "" - -#. module: hr_expense_invoice -#: field:hr.expense.line,invoice:0 -msgid "Invoice" -msgstr "Factuur" - -#. module: hr_expense_invoice -#: view:hr.expense.expense:hr_expense_invoice.view_expenses_form_invoice -msgid "{'readonly': [('invoice', '!=', False)]}" -msgstr "" diff --git a/hr_expense_invoice/i18n/nl_BE.po b/hr_expense_invoice/i18n/nl_BE.po deleted file mode 100644 index 7c19ff9dc..000000000 --- a/hr_expense_invoice/i18n/nl_BE.po +++ /dev/null @@ -1,46 +0,0 @@ -# Translation of Odoo Server. -# This file contains the translation of the following modules: -# * hr_expense_invoice -# -# Translators: -msgid "" -msgstr "" -"Project-Id-Version: hr (8.0)\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2016-12-24 02:15+0000\n" -"PO-Revision-Date: 2015-07-27 23:44+0000\n" -"Last-Translator: <>\n" -"Language-Team: Dutch (Belgium) (http://www.transifex.com/oca/OCA-hr-8-0/language/nl_BE/)\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: \n" -"Language: nl_BE\n" -"Plural-Forms: nplurals=2; plural=(n != 1);\n" - -#. module: hr_expense_invoice -#: code:addons/hr_expense_invoice/models/hr_expense_expense.py:52 -#, python-format -msgid "" -"Cannot reconcile supplier invoice payable with generated line. Please check " -"amounts and see if the invoice is already added or paid. Invoice: %s" -msgstr "" - -#. module: hr_expense_invoice -#: model:ir.model,name:hr_expense_invoice.model_hr_expense_expense -msgid "Expense" -msgstr "" - -#. module: hr_expense_invoice -#: model:ir.model,name:hr_expense_invoice.model_hr_expense_line -msgid "Expense Line" -msgstr "" - -#. module: hr_expense_invoice -#: field:hr.expense.line,invoice:0 -msgid "Invoice" -msgstr "Factuur" - -#. module: hr_expense_invoice -#: view:hr.expense.expense:hr_expense_invoice.view_expenses_form_invoice -msgid "{'readonly': [('invoice', '!=', False)]}" -msgstr "" diff --git a/hr_expense_invoice/i18n/nl_NL.po b/hr_expense_invoice/i18n/nl_NL.po index 134fdbbb4..95a651c14 100644 --- a/hr_expense_invoice/i18n/nl_NL.po +++ b/hr_expense_invoice/i18n/nl_NL.po @@ -1,24 +1,26 @@ # Translation of Odoo Server. # This file contains the translation of the following modules: # * hr_expense_invoice -# +# # Translators: +# Peter Hageman , 2017 msgid "" msgstr "" -"Project-Id-Version: hr (8.0)\n" +"Project-Id-Version: Odoo Server 10.0\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2017-08-19 02:40+0000\n" -"PO-Revision-Date: 2015-07-27 23:44+0000\n" -"Last-Translator: <>\n" -"Language-Team: Dutch (Netherlands) (http://www.transifex.com/oca/OCA-hr-8-0/language/nl_NL/)\n" +"POT-Creation-Date: 2017-11-28 01:43+0000\n" +"PO-Revision-Date: 2017-11-28 01:43+0000\n" +"Last-Translator: Peter Hageman , 2017\n" +"Language-Team: Dutch (Netherlands) (https://www.transifex.com/oca/" +"teams/23907/nl_NL/)\n" +"Language: nl_NL\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: \n" -"Language: nl_NL\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" #. module: hr_expense_invoice -#: code:addons/hr_expense_invoice/models/hr_expense_expense.py:52 +#: code:addons/hr_expense_invoice/models/hr_expense_sheet.py:37 #, python-format msgid "" "Cannot reconcile supplier invoice payable with generated line. Please check " @@ -26,21 +28,16 @@ msgid "" msgstr "" #. module: hr_expense_invoice -#: model:ir.model,name:hr_expense_invoice.model_hr_expense_expense +#: model:ir.model,name:hr_expense_invoice.model_hr_expense msgid "Expense" msgstr "" #. module: hr_expense_invoice -#: model:ir.model,name:hr_expense_invoice.model_hr_expense_line -msgid "Expense Line" -msgstr "" +#: model:ir.model,name:hr_expense_invoice.model_hr_expense_sheet +msgid "Expense Report" +msgstr "Onkostennota" #. module: hr_expense_invoice -#: field:hr.expense.line,invoice:0 +#: model:ir.model.fields,field_description:hr_expense_invoice.field_hr_expense_invoice_id msgid "Invoice" -msgstr "Factuur" - -#. module: hr_expense_invoice -#: view:hr.expense.expense:hr_expense_invoice.view_expenses_form_invoice -msgid "{'readonly': [('invoice', '!=', False)]}" msgstr "" diff --git a/hr_expense_invoice/i18n/pl.po b/hr_expense_invoice/i18n/pl.po deleted file mode 100644 index 1dc52e3fe..000000000 --- a/hr_expense_invoice/i18n/pl.po +++ /dev/null @@ -1,46 +0,0 @@ -# Translation of Odoo Server. -# This file contains the translation of the following modules: -# * hr_expense_invoice -# -# Translators: -msgid "" -msgstr "" -"Project-Id-Version: hr (8.0)\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2016-12-24 02:15+0000\n" -"PO-Revision-Date: 2015-07-27 23:44+0000\n" -"Last-Translator: <>\n" -"Language-Team: Polish (http://www.transifex.com/oca/OCA-hr-8-0/language/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=3; plural=(n==1 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n" - -#. module: hr_expense_invoice -#: code:addons/hr_expense_invoice/models/hr_expense_expense.py:52 -#, python-format -msgid "" -"Cannot reconcile supplier invoice payable with generated line. Please check " -"amounts and see if the invoice is already added or paid. Invoice: %s" -msgstr "" - -#. module: hr_expense_invoice -#: model:ir.model,name:hr_expense_invoice.model_hr_expense_expense -msgid "Expense" -msgstr "" - -#. module: hr_expense_invoice -#: model:ir.model,name:hr_expense_invoice.model_hr_expense_line -msgid "Expense Line" -msgstr "" - -#. module: hr_expense_invoice -#: field:hr.expense.line,invoice:0 -msgid "Invoice" -msgstr "Faktura" - -#. module: hr_expense_invoice -#: view:hr.expense.expense:hr_expense_invoice.view_expenses_form_invoice -msgid "{'readonly': [('invoice', '!=', False)]}" -msgstr "" diff --git a/hr_expense_invoice/i18n/pt.po b/hr_expense_invoice/i18n/pt.po index a4a7a4ff5..2205df116 100644 --- a/hr_expense_invoice/i18n/pt.po +++ b/hr_expense_invoice/i18n/pt.po @@ -1,46 +1,41 @@ # Translation of Odoo Server. # This file contains the translation of the following modules: -# * hr_expense_invoice -# -# Translators: +# * hr_expense_invoice +# msgid "" msgstr "" -"Project-Id-Version: hr (8.0)\n" +"Project-Id-Version: Odoo Server 10.0\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2016-12-24 02:15+0000\n" -"PO-Revision-Date: 2015-07-27 23:44+0000\n" -"Last-Translator: <>\n" -"Language-Team: Portuguese (http://www.transifex.com/oca/OCA-hr-8-0/language/pt/)\n" +"PO-Revision-Date: 2018-10-10 12:08+0000\n" +"Last-Translator: Pedro Castro Silva \n" +"Language-Team: none\n" +"Language: 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" +"Plural-Forms: nplurals=2; plural=n > 1;\n" +"X-Generator: Weblate 3.1.1\n" #. module: hr_expense_invoice -#: code:addons/hr_expense_invoice/models/hr_expense_expense.py:52 +#: code:addons/hr_expense_invoice/models/hr_expense_sheet.py:37 #, python-format -msgid "" -"Cannot reconcile supplier invoice payable with generated line. Please check " -"amounts and see if the invoice is already added or paid. Invoice: %s" +msgid "Cannot reconcile supplier invoice payable with generated line. Please check amounts and see if the invoice is already added or paid. Invoice: %s" msgstr "" +"Não foi possível reconciliar a fatura a pagar ao fornecedor com a linha " +"gerada. Por favor, verifique os montantes e veja se a fatura já está " +"adicionada ou paga. Fatura: %s" #. module: hr_expense_invoice -#: model:ir.model,name:hr_expense_invoice.model_hr_expense_expense +#: model:ir.model,name:hr_expense_invoice.model_hr_expense msgid "Expense" -msgstr "" +msgstr "Despesa" #. module: hr_expense_invoice -#: model:ir.model,name:hr_expense_invoice.model_hr_expense_line -msgid "Expense Line" -msgstr "" +#: model:ir.model,name:hr_expense_invoice.model_hr_expense_sheet +msgid "Expense Report" +msgstr "Relatório de Despesas" #. module: hr_expense_invoice -#: field:hr.expense.line,invoice:0 +#: model:ir.model.fields,field_description:hr_expense_invoice.field_hr_expense_invoice_id msgid "Invoice" msgstr "Fatura" - -#. module: hr_expense_invoice -#: view:hr.expense.expense:hr_expense_invoice.view_expenses_form_invoice -msgid "{'readonly': [('invoice', '!=', False)]}" -msgstr "" diff --git a/hr_expense_invoice/i18n/pt_BR.po b/hr_expense_invoice/i18n/pt_BR.po deleted file mode 100644 index 2b890fe7b..000000000 --- a/hr_expense_invoice/i18n/pt_BR.po +++ /dev/null @@ -1,47 +0,0 @@ -# Translation of Odoo Server. -# This file contains the translation of the following modules: -# * hr_expense_invoice -# -# Translators: -# danimaribeiro , 2016 -msgid "" -msgstr "" -"Project-Id-Version: hr (8.0)\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2016-03-11 01:48+0000\n" -"PO-Revision-Date: 2016-03-08 03:18+0000\n" -"Last-Translator: danimaribeiro \n" -"Language-Team: Portuguese (Brazil) (http://www.transifex.com/oca/OCA-hr-8-0/language/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: hr_expense_invoice -#: code:addons/hr_expense_invoice/models/hr_expense_expense.py:49 -#, python-format -msgid "" -"Cannot reconcile supplier invoice payable with generated line. Please check " -"amounts and see if the invoice is already added or paid. Invoice: %s" -msgstr "" - -#. module: hr_expense_invoice -#: model:ir.model,name:hr_expense_invoice.model_hr_expense_expense -msgid "Expense" -msgstr "Despesa" - -#. module: hr_expense_invoice -#: model:ir.model,name:hr_expense_invoice.model_hr_expense_line -msgid "Expense Line" -msgstr "Linha da despesa" - -#. module: hr_expense_invoice -#: field:hr.expense.line,invoice:0 -msgid "Invoice" -msgstr "Fatura" - -#. module: hr_expense_invoice -#: view:hr.expense.expense:hr_expense_invoice.view_expenses_form_invoice -msgid "{'readonly': [('invoice', '!=', False)]}" -msgstr "" diff --git a/hr_expense_invoice/i18n/pt_PT.po b/hr_expense_invoice/i18n/pt_PT.po deleted file mode 100644 index a8cde51c2..000000000 --- a/hr_expense_invoice/i18n/pt_PT.po +++ /dev/null @@ -1,46 +0,0 @@ -# Translation of Odoo Server. -# This file contains the translation of the following modules: -# * hr_expense_invoice -# -# Translators: -msgid "" -msgstr "" -"Project-Id-Version: hr (8.0)\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2016-12-13 16:26+0000\n" -"PO-Revision-Date: 2015-07-27 23:44+0000\n" -"Last-Translator: <>\n" -"Language-Team: Portuguese (Portugal) (http://www.transifex.com/oca/OCA-hr-8-0/language/pt_PT/)\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: \n" -"Language: pt_PT\n" -"Plural-Forms: nplurals=2; plural=(n != 1);\n" - -#. module: hr_expense_invoice -#: code:addons/hr_expense_invoice/models/hr_expense_expense.py:52 -#, python-format -msgid "" -"Cannot reconcile supplier invoice payable with generated line. Please check " -"amounts and see if the invoice is already added or paid. Invoice: %s" -msgstr "" - -#. module: hr_expense_invoice -#: model:ir.model,name:hr_expense_invoice.model_hr_expense_expense -msgid "Expense" -msgstr "" - -#. module: hr_expense_invoice -#: model:ir.model,name:hr_expense_invoice.model_hr_expense_line -msgid "Expense Line" -msgstr "" - -#. module: hr_expense_invoice -#: field:hr.expense.line,invoice:0 -msgid "Invoice" -msgstr "Fatura" - -#. module: hr_expense_invoice -#: view:hr.expense.expense:hr_expense_invoice.view_expenses_form_invoice -msgid "{'readonly': [('invoice', '!=', False)]}" -msgstr "" diff --git a/hr_expense_invoice/i18n/ro.po b/hr_expense_invoice/i18n/ro.po deleted file mode 100644 index 10b1f5622..000000000 --- a/hr_expense_invoice/i18n/ro.po +++ /dev/null @@ -1,46 +0,0 @@ -# Translation of Odoo Server. -# This file contains the translation of the following modules: -# * hr_expense_invoice -# -# Translators: -msgid "" -msgstr "" -"Project-Id-Version: hr (8.0)\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2016-12-24 02:15+0000\n" -"PO-Revision-Date: 2015-07-27 23:44+0000\n" -"Last-Translator: <>\n" -"Language-Team: Romanian (http://www.transifex.com/oca/OCA-hr-8-0/language/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: hr_expense_invoice -#: code:addons/hr_expense_invoice/models/hr_expense_expense.py:52 -#, python-format -msgid "" -"Cannot reconcile supplier invoice payable with generated line. Please check " -"amounts and see if the invoice is already added or paid. Invoice: %s" -msgstr "" - -#. module: hr_expense_invoice -#: model:ir.model,name:hr_expense_invoice.model_hr_expense_expense -msgid "Expense" -msgstr "" - -#. module: hr_expense_invoice -#: model:ir.model,name:hr_expense_invoice.model_hr_expense_line -msgid "Expense Line" -msgstr "" - -#. module: hr_expense_invoice -#: field:hr.expense.line,invoice:0 -msgid "Invoice" -msgstr "Factura" - -#. module: hr_expense_invoice -#: view:hr.expense.expense:hr_expense_invoice.view_expenses_form_invoice -msgid "{'readonly': [('invoice', '!=', False)]}" -msgstr "" diff --git a/hr_expense_invoice/i18n/ru.po b/hr_expense_invoice/i18n/ru.po deleted file mode 100644 index 54200241f..000000000 --- a/hr_expense_invoice/i18n/ru.po +++ /dev/null @@ -1,46 +0,0 @@ -# Translation of Odoo Server. -# This file contains the translation of the following modules: -# * hr_expense_invoice -# -# Translators: -msgid "" -msgstr "" -"Project-Id-Version: hr (8.0)\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2016-12-24 02:15+0000\n" -"PO-Revision-Date: 2015-07-27 23:44+0000\n" -"Last-Translator: <>\n" -"Language-Team: Russian (http://www.transifex.com/oca/OCA-hr-8-0/language/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: hr_expense_invoice -#: code:addons/hr_expense_invoice/models/hr_expense_expense.py:52 -#, python-format -msgid "" -"Cannot reconcile supplier invoice payable with generated line. Please check " -"amounts and see if the invoice is already added or paid. Invoice: %s" -msgstr "" - -#. module: hr_expense_invoice -#: model:ir.model,name:hr_expense_invoice.model_hr_expense_expense -msgid "Expense" -msgstr "" - -#. module: hr_expense_invoice -#: model:ir.model,name:hr_expense_invoice.model_hr_expense_line -msgid "Expense Line" -msgstr "" - -#. module: hr_expense_invoice -#: field:hr.expense.line,invoice:0 -msgid "Invoice" -msgstr "Счет" - -#. module: hr_expense_invoice -#: view:hr.expense.expense:hr_expense_invoice.view_expenses_form_invoice -msgid "{'readonly': [('invoice', '!=', False)]}" -msgstr "" diff --git a/hr_expense_invoice/i18n/sk_SK.po b/hr_expense_invoice/i18n/sk_SK.po deleted file mode 100644 index 6e97b182d..000000000 --- a/hr_expense_invoice/i18n/sk_SK.po +++ /dev/null @@ -1,46 +0,0 @@ -# Translation of Odoo Server. -# This file contains the translation of the following modules: -# * hr_expense_invoice -# -# Translators: -msgid "" -msgstr "" -"Project-Id-Version: hr (8.0)\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2016-12-24 02:15+0000\n" -"PO-Revision-Date: 2015-07-27 23:44+0000\n" -"Last-Translator: <>\n" -"Language-Team: Slovak (Slovakia) (http://www.transifex.com/oca/OCA-hr-8-0/language/sk_SK/)\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: \n" -"Language: sk_SK\n" -"Plural-Forms: nplurals=3; plural=(n==1) ? 0 : (n>=2 && n<=4) ? 1 : 2;\n" - -#. module: hr_expense_invoice -#: code:addons/hr_expense_invoice/models/hr_expense_expense.py:52 -#, python-format -msgid "" -"Cannot reconcile supplier invoice payable with generated line. Please check " -"amounts and see if the invoice is already added or paid. Invoice: %s" -msgstr "" - -#. module: hr_expense_invoice -#: model:ir.model,name:hr_expense_invoice.model_hr_expense_expense -msgid "Expense" -msgstr "" - -#. module: hr_expense_invoice -#: model:ir.model,name:hr_expense_invoice.model_hr_expense_line -msgid "Expense Line" -msgstr "" - -#. module: hr_expense_invoice -#: field:hr.expense.line,invoice:0 -msgid "Invoice" -msgstr "Faktúra" - -#. module: hr_expense_invoice -#: view:hr.expense.expense:hr_expense_invoice.view_expenses_form_invoice -msgid "{'readonly': [('invoice', '!=', False)]}" -msgstr "" diff --git a/hr_expense_invoice/i18n/sl.po b/hr_expense_invoice/i18n/sl.po deleted file mode 100644 index f6e629d77..000000000 --- a/hr_expense_invoice/i18n/sl.po +++ /dev/null @@ -1,47 +0,0 @@ -# Translation of Odoo Server. -# This file contains the translation of the following modules: -# * hr_expense_invoice -# -# Translators: -# Matjaž Mozetič , 2015 -msgid "" -msgstr "" -"Project-Id-Version: hr (8.0)\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2016-10-17 20:43+0000\n" -"PO-Revision-Date: 2016-11-11 13:00+0000\n" -"Last-Translator: Matjaž Mozetič \n" -"Language-Team: Slovenian (http://www.transifex.com/oca/OCA-hr-8-0/language/sl/)\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: \n" -"Language: sl\n" -"Plural-Forms: nplurals=4; plural=(n%100==1 ? 0 : n%100==2 ? 1 : n%100==3 || n%100==4 ? 2 : 3);\n" - -#. module: hr_expense_invoice -#: code:addons/hr_expense_invoice/models/hr_expense_expense.py:52 -#, python-format -msgid "" -"Cannot reconcile supplier invoice payable with generated line. Please check " -"amounts and see if the invoice is already added or paid. Invoice: %s" -msgstr "Ni mogoče uskladiti konta prejetih računov z ustvarjeno postavko. Preverite zneske in poglejte, če je račun že dodan ali plačan. Račun: %s" - -#. module: hr_expense_invoice -#: model:ir.model,name:hr_expense_invoice.model_hr_expense_expense -msgid "Expense" -msgstr "Izdatki" - -#. module: hr_expense_invoice -#: model:ir.model,name:hr_expense_invoice.model_hr_expense_line -msgid "Expense Line" -msgstr "Postavka izdatka" - -#. module: hr_expense_invoice -#: field:hr.expense.line,invoice:0 -msgid "Invoice" -msgstr "Račun" - -#. module: hr_expense_invoice -#: view:hr.expense.expense:hr_expense_invoice.view_expenses_form_invoice -msgid "{'readonly': [('invoice', '!=', False)]}" -msgstr "{'readonly': [('invoice', '!=', False)]}" diff --git a/hr_expense_invoice/i18n/sv.po b/hr_expense_invoice/i18n/sv.po deleted file mode 100644 index 4610c5d5f..000000000 --- a/hr_expense_invoice/i18n/sv.po +++ /dev/null @@ -1,46 +0,0 @@ -# Translation of Odoo Server. -# This file contains the translation of the following modules: -# * hr_expense_invoice -# -# Translators: -msgid "" -msgstr "" -"Project-Id-Version: hr (8.0)\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2016-12-24 02:15+0000\n" -"PO-Revision-Date: 2015-07-27 23:44+0000\n" -"Last-Translator: <>\n" -"Language-Team: Swedish (http://www.transifex.com/oca/OCA-hr-8-0/language/sv/)\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: \n" -"Language: sv\n" -"Plural-Forms: nplurals=2; plural=(n != 1);\n" - -#. module: hr_expense_invoice -#: code:addons/hr_expense_invoice/models/hr_expense_expense.py:52 -#, python-format -msgid "" -"Cannot reconcile supplier invoice payable with generated line. Please check " -"amounts and see if the invoice is already added or paid. Invoice: %s" -msgstr "" - -#. module: hr_expense_invoice -#: model:ir.model,name:hr_expense_invoice.model_hr_expense_expense -msgid "Expense" -msgstr "" - -#. module: hr_expense_invoice -#: model:ir.model,name:hr_expense_invoice.model_hr_expense_line -msgid "Expense Line" -msgstr "" - -#. module: hr_expense_invoice -#: field:hr.expense.line,invoice:0 -msgid "Invoice" -msgstr "Faktura" - -#. module: hr_expense_invoice -#: view:hr.expense.expense:hr_expense_invoice.view_expenses_form_invoice -msgid "{'readonly': [('invoice', '!=', False)]}" -msgstr "" diff --git a/hr_expense_invoice/i18n/th.po b/hr_expense_invoice/i18n/th.po deleted file mode 100644 index a03fba261..000000000 --- a/hr_expense_invoice/i18n/th.po +++ /dev/null @@ -1,46 +0,0 @@ -# Translation of Odoo Server. -# This file contains the translation of the following modules: -# * hr_expense_invoice -# -# Translators: -msgid "" -msgstr "" -"Project-Id-Version: hr (8.0)\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2016-12-24 02:15+0000\n" -"PO-Revision-Date: 2015-07-27 23:44+0000\n" -"Last-Translator: <>\n" -"Language-Team: Thai (http://www.transifex.com/oca/OCA-hr-8-0/language/th/)\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: \n" -"Language: th\n" -"Plural-Forms: nplurals=1; plural=0;\n" - -#. module: hr_expense_invoice -#: code:addons/hr_expense_invoice/models/hr_expense_expense.py:52 -#, python-format -msgid "" -"Cannot reconcile supplier invoice payable with generated line. Please check " -"amounts and see if the invoice is already added or paid. Invoice: %s" -msgstr "" - -#. module: hr_expense_invoice -#: model:ir.model,name:hr_expense_invoice.model_hr_expense_expense -msgid "Expense" -msgstr "" - -#. module: hr_expense_invoice -#: model:ir.model,name:hr_expense_invoice.model_hr_expense_line -msgid "Expense Line" -msgstr "" - -#. module: hr_expense_invoice -#: field:hr.expense.line,invoice:0 -msgid "Invoice" -msgstr "ใบแจ้งหนี้" - -#. module: hr_expense_invoice -#: view:hr.expense.expense:hr_expense_invoice.view_expenses_form_invoice -msgid "{'readonly': [('invoice', '!=', False)]}" -msgstr "" diff --git a/hr_expense_invoice/i18n/tr.po b/hr_expense_invoice/i18n/tr.po deleted file mode 100644 index 81e56ad6b..000000000 --- a/hr_expense_invoice/i18n/tr.po +++ /dev/null @@ -1,46 +0,0 @@ -# Translation of Odoo Server. -# This file contains the translation of the following modules: -# * hr_expense_invoice -# -# Translators: -msgid "" -msgstr "" -"Project-Id-Version: hr (8.0)\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2016-12-24 02:15+0000\n" -"PO-Revision-Date: 2015-07-27 23:44+0000\n" -"Last-Translator: <>\n" -"Language-Team: Turkish (http://www.transifex.com/oca/OCA-hr-8-0/language/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: hr_expense_invoice -#: code:addons/hr_expense_invoice/models/hr_expense_expense.py:52 -#, python-format -msgid "" -"Cannot reconcile supplier invoice payable with generated line. Please check " -"amounts and see if the invoice is already added or paid. Invoice: %s" -msgstr "" - -#. module: hr_expense_invoice -#: model:ir.model,name:hr_expense_invoice.model_hr_expense_expense -msgid "Expense" -msgstr "" - -#. module: hr_expense_invoice -#: model:ir.model,name:hr_expense_invoice.model_hr_expense_line -msgid "Expense Line" -msgstr "" - -#. module: hr_expense_invoice -#: field:hr.expense.line,invoice:0 -msgid "Invoice" -msgstr "Fatura" - -#. module: hr_expense_invoice -#: view:hr.expense.expense:hr_expense_invoice.view_expenses_form_invoice -msgid "{'readonly': [('invoice', '!=', False)]}" -msgstr "" diff --git a/hr_expense_invoice/i18n/tr_TR.po b/hr_expense_invoice/i18n/tr_TR.po deleted file mode 100644 index 0733b8800..000000000 --- a/hr_expense_invoice/i18n/tr_TR.po +++ /dev/null @@ -1,46 +0,0 @@ -# Translation of Odoo Server. -# This file contains the translation of the following modules: -# * hr_expense_invoice -# -# Translators: -msgid "" -msgstr "" -"Project-Id-Version: hr (8.0)\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2016-12-31 03:30+0000\n" -"PO-Revision-Date: 2015-07-27 23:44+0000\n" -"Last-Translator: <>\n" -"Language-Team: Turkish (Turkey) (http://www.transifex.com/oca/OCA-hr-8-0/language/tr_TR/)\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: \n" -"Language: tr_TR\n" -"Plural-Forms: nplurals=1; plural=0;\n" - -#. module: hr_expense_invoice -#: code:addons/hr_expense_invoice/models/hr_expense_expense.py:52 -#, python-format -msgid "" -"Cannot reconcile supplier invoice payable with generated line. Please check " -"amounts and see if the invoice is already added or paid. Invoice: %s" -msgstr "" - -#. module: hr_expense_invoice -#: model:ir.model,name:hr_expense_invoice.model_hr_expense_expense -msgid "Expense" -msgstr "" - -#. module: hr_expense_invoice -#: model:ir.model,name:hr_expense_invoice.model_hr_expense_line -msgid "Expense Line" -msgstr "" - -#. module: hr_expense_invoice -#: field:hr.expense.line,invoice:0 -msgid "Invoice" -msgstr "Fatura" - -#. module: hr_expense_invoice -#: view:hr.expense.expense:hr_expense_invoice.view_expenses_form_invoice -msgid "{'readonly': [('invoice', '!=', False)]}" -msgstr "" diff --git a/hr_expense_invoice/i18n/zh_CN.po b/hr_expense_invoice/i18n/zh_CN.po deleted file mode 100644 index b820d0b43..000000000 --- a/hr_expense_invoice/i18n/zh_CN.po +++ /dev/null @@ -1,46 +0,0 @@ -# Translation of Odoo Server. -# This file contains the translation of the following modules: -# * hr_expense_invoice -# -# Translators: -msgid "" -msgstr "" -"Project-Id-Version: hr (8.0)\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2016-12-06 03:44+0000\n" -"PO-Revision-Date: 2015-07-27 23:44+0000\n" -"Last-Translator: <>\n" -"Language-Team: Chinese (China) (http://www.transifex.com/oca/OCA-hr-8-0/language/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: hr_expense_invoice -#: code:addons/hr_expense_invoice/models/hr_expense_expense.py:52 -#, python-format -msgid "" -"Cannot reconcile supplier invoice payable with generated line. Please check " -"amounts and see if the invoice is already added or paid. Invoice: %s" -msgstr "" - -#. module: hr_expense_invoice -#: model:ir.model,name:hr_expense_invoice.model_hr_expense_expense -msgid "Expense" -msgstr "" - -#. module: hr_expense_invoice -#: model:ir.model,name:hr_expense_invoice.model_hr_expense_line -msgid "Expense Line" -msgstr "" - -#. module: hr_expense_invoice -#: field:hr.expense.line,invoice:0 -msgid "Invoice" -msgstr "发票" - -#. module: hr_expense_invoice -#: view:hr.expense.expense:hr_expense_invoice.view_expenses_form_invoice -msgid "{'readonly': [('invoice', '!=', False)]}" -msgstr "" diff --git a/hr_expense_invoice/i18n/zh_TW.po b/hr_expense_invoice/i18n/zh_TW.po deleted file mode 100644 index 5c390ff71..000000000 --- a/hr_expense_invoice/i18n/zh_TW.po +++ /dev/null @@ -1,46 +0,0 @@ -# Translation of Odoo Server. -# This file contains the translation of the following modules: -# * hr_expense_invoice -# -# Translators: -msgid "" -msgstr "" -"Project-Id-Version: hr (8.0)\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2016-12-24 02:15+0000\n" -"PO-Revision-Date: 2015-07-27 23:44+0000\n" -"Last-Translator: <>\n" -"Language-Team: Chinese (Taiwan) (http://www.transifex.com/oca/OCA-hr-8-0/language/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: hr_expense_invoice -#: code:addons/hr_expense_invoice/models/hr_expense_expense.py:52 -#, python-format -msgid "" -"Cannot reconcile supplier invoice payable with generated line. Please check " -"amounts and see if the invoice is already added or paid. Invoice: %s" -msgstr "" - -#. module: hr_expense_invoice -#: model:ir.model,name:hr_expense_invoice.model_hr_expense_expense -msgid "Expense" -msgstr "" - -#. module: hr_expense_invoice -#: model:ir.model,name:hr_expense_invoice.model_hr_expense_line -msgid "Expense Line" -msgstr "" - -#. module: hr_expense_invoice -#: field:hr.expense.line,invoice:0 -msgid "Invoice" -msgstr "發票" - -#. module: hr_expense_invoice -#: view:hr.expense.expense:hr_expense_invoice.view_expenses_form_invoice -msgid "{'readonly': [('invoice', '!=', False)]}" -msgstr "" diff --git a/hr_expense_invoice/models/__init__.py b/hr_expense_invoice/models/__init__.py index 5bd402a99..8b7d1125e 100644 --- a/hr_expense_invoice/models/__init__.py +++ b/hr_expense_invoice/models/__init__.py @@ -1,5 +1,5 @@ -# -*- encoding: utf-8 -*- -############################################################################## -# For copyright and license notices, see __openerp__.py file in root directory -############################################################################## -from . import hr_expense_expense +# -*- coding: utf-8 -*- +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). + +from . import hr_expense +from . import hr_expense_sheet diff --git a/hr_expense_invoice/models/hr_expense.py b/hr_expense_invoice/models/hr_expense.py new file mode 100644 index 000000000..3d5f4da82 --- /dev/null +++ b/hr_expense_invoice/models/hr_expense.py @@ -0,0 +1,55 @@ +# -*- coding: utf-8 -*- +# Copyright 2015 Pedro M. Baeza +# Copyright 2017 Vicent Cubells +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). + +from odoo import api, fields, models + + +class HrExpense(models.Model): + _inherit = 'hr.expense' + + invoice_id = fields.Many2one( + comodel_name="account.invoice", + string='Invoice', + domain="[('type', '=', 'in_invoice'), ('state', '=', 'open')]", + oldname='invoice', + ) + + @api.onchange('invoice_id') + def onchange_invoice_id(self): + self.date = self.invoice_id.date_invoice + self.name = self.invoice_id.number + self.reference = self.invoice_id.number or self.invoice_id.reference + self.analytic_account_id = False + self.unit_amount = self.invoice_id.residual + self.quantity = 1.0 + self.total_amount = self.unit_amount + + def _check_vals(self, vals): + if vals.get('invoice_id'): + # Rewrite values because readonly fields are not stored + invoice = self.env['account.invoice'].browse(vals['invoice_id']) + vals['date'] = invoice.date_invoice + vals['analytic_account_id'] = False + vals['unit_amount'] = invoice.residual + vals['total_amount'] = invoice.residual + vals['quantity'] = 1.0 + + @api.model + def create(self, vals): + self._check_vals(vals) + return super(HrExpense, self).create(vals) + + @api.multi + def write(self, vals): + self._check_vals(vals) + return super(HrExpense, self).write(vals) + + def _prepare_move_line(self, line): + expense = super(HrExpense, self)._prepare_move_line(line) + if self.invoice_id and expense['debit']: + expense['partner_id'] = \ + self.invoice_id.partner_id.commercial_partner_id.id + expense['account_id'] = self.invoice_id.account_id.id + return expense diff --git a/hr_expense_invoice/models/hr_expense_expense.py b/hr_expense_invoice/models/hr_expense_expense.py deleted file mode 100644 index c406274a2..000000000 --- a/hr_expense_invoice/models/hr_expense_expense.py +++ /dev/null @@ -1,106 +0,0 @@ -# -*- encoding: utf-8 -*- -############################################################################## -# For copyright and license notices, see __openerp__.py file in root directory -############################################################################## - -from openerp import models, fields, api, exceptions, _ - - -class HrExpenseExpense(models.Model): - _inherit = 'hr.expense.expense' - - @api.model - def line_get_convert(self, x, part, date): - res = super(HrExpenseExpense, self).line_get_convert(x, part, date) - if x.get('invoice'): - res['partner_id'] = ( - x['invoice'].partner_id.commercial_partner_id.id) - return res - - @api.model - def move_line_get_item(self, line): - if line.invoice: - return { - 'account_id': line.invoice.account_id.id, - 'name': line.name, - 'price': line.total_amount, - 'invoice': line.invoice, - } - else: - return super(HrExpenseExpense, self).move_line_get_item(line) - - @api.multi - def action_move_create(self): - """Reconcile supplier invoice payables with the created move lines.""" - res = super(HrExpenseExpense, self).action_move_create() - for expense in self: - for line in expense.line_ids: - if line.invoice: - partner = line.invoice.partner_id.commercial_partner_id - move_lines = expense.account_move_id.line_id - c_move_lines = move_lines.filtered( - lambda x: x.partner_id == partner and - x.debit == line.invoice.residual and - not x.reconcile_id) - if len(c_move_lines) > 1: - c_move_lines = c_move_lines[0] - c_move_lines |= line.invoice.move_id.line_id.filtered( - lambda x: x.account_id == line.invoice.account_id and - x.credit == line.invoice.residual) - if len(c_move_lines) != 2: - raise exceptions.Warning( - _('Cannot reconcile supplier invoice payable with ' - 'generated line. Please check amounts and see ' - 'if the invoice is already added or paid. ' - 'Invoice: %s') % line.invoice.name) - c_move_lines.reconcile() - return res - - @api.multi - def copy(self, default=None): - res = super(HrExpenseExpense, self).copy(default) - # Erase invoice references - res.line_ids.write({'invoice': False}) - return res - - -class HrExpenseLine(models.Model): - _inherit = 'hr.expense.line' - - invoice = fields.Many2one( - comodel_name="account.invoice", - domain="[('type', '=', 'in_invoice'), ('state', '=', 'open')]") - - @api.one - @api.onchange('invoice') - def onchange_invoice(self): - """Show in screen invoice data""" - self.product_id = False - self.date_value = self.invoice.date_invoice - self.name = self.invoice.number - self.ref = (self.invoice.supplier_invoice_number or - self.invoice.reference) - self.analytic_account = False - self.unit_amount = self.invoice.residual - self.unit_quantity = 1 - self.total_amount = self.unit_amount - - def _check_vals(self, vals): - if vals.get('invoice'): - # Rewrite values because readonly fields are not stored - invoice = self.env['account.invoice'].browse(vals['invoice']) - vals['product_id'] = False - vals['date_value'] = invoice.date_invoice - vals['analytic_account'] = False - vals['unit_amount'] = invoice.residual - vals['unit_quantity'] = 1 - - @api.model - def create(self, vals): - self._check_vals(vals) - return super(HrExpenseLine, self).create(vals) - - @api.multi - def write(self, vals): - self._check_vals(vals) - return super(HrExpenseLine, self).write(vals) diff --git a/hr_expense_invoice/models/hr_expense_sheet.py b/hr_expense_invoice/models/hr_expense_sheet.py new file mode 100644 index 000000000..090ed829e --- /dev/null +++ b/hr_expense_invoice/models/hr_expense_sheet.py @@ -0,0 +1,42 @@ +# -*- coding: utf-8 -*- +# Copyright 2015 Pedro M. Baeza +# Copyright 2017 Vicent Cubells +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). + +from odoo import _, api, exceptions, models + + +class HrExpenseSheet(models.Model): + _inherit = "hr.expense.sheet" + + @api.multi + def action_sheet_move_create(self): + expense_line_ids = self.mapped('expense_line_ids').filtered( + lambda r: r.invoice_id, + ) + res = super(HrExpenseSheet, self).action_sheet_move_create() + move_lines = self.env['account.move'].search( + [('ref', 'in', self.mapped('name'))], + ).mapped('line_ids') + for line in expense_line_ids: + partner = line.invoice_id.partner_id.commercial_partner_id + c_move_lines = move_lines.filtered( + lambda x: + x.partner_id == partner and + x.debit == line.invoice_id.residual and + not x.reconciled + ) + if len(c_move_lines) > 1: + c_move_lines = c_move_lines[0] + c_move_lines |= line.invoice_id.move_id.line_ids.filtered( + lambda x: + x.account_id == line.invoice_id.account_id and + x.credit == line.invoice_id.residual) + if len(c_move_lines) != 2: + raise exceptions.Warning( + _('Cannot reconcile supplier invoice payable with ' + 'generated line. Please check amounts and see ' + 'if the invoice is already added or paid. ' + 'Invoice: %s') % line.invoice.name) + c_move_lines.reconcile() + return res diff --git a/hr_expense_invoice/static/description/icon.svg b/hr_expense_invoice/static/description/icon.svg deleted file mode 100644 index 639423180..000000000 --- a/hr_expense_invoice/static/description/icon.svg +++ /dev/null @@ -1,428 +0,0 @@ - - - - - - - - image/svg+xml - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/hr_expense_invoice/tests/__init__.py b/hr_expense_invoice/tests/__init__.py new file mode 100644 index 000000000..d9a7c87e0 --- /dev/null +++ b/hr_expense_invoice/tests/__init__.py @@ -0,0 +1,4 @@ +# -*- coding: utf-8 -*- +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). + +from . import test_hr_expense_invoice diff --git a/hr_expense_invoice/tests/test_hr_expense_invoice.py b/hr_expense_invoice/tests/test_hr_expense_invoice.py new file mode 100644 index 000000000..2b835b909 --- /dev/null +++ b/hr_expense_invoice/tests/test_hr_expense_invoice.py @@ -0,0 +1,69 @@ +# -*- coding: utf-8 -*- +# Copyright 2017 Vicent Cubells - +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). + +from odoo.tests import common + + +class TestHrExpenseInvoice(common.SavepointCase): + @classmethod + def setUpClass(cls): + super(TestHrExpenseInvoice, cls).setUpClass() + + partner = cls.env['res.partner'].create({ + 'name': 'Test partner', + 'supplier': True, + }) + receivable = cls.env.ref('account.data_account_type_receivable').id + expenses = cls.env.ref('account.data_account_type_expenses').id + invoice_account = cls.env['account.account'].search( + [('user_type_id', '=', receivable)], limit=1).id + invoice_line_account = cls.env['account.account'].search( + [('user_type_id', '=', expenses)], limit=1).id + product = cls.env['product.product'].create({ + 'name': 'Product test', + 'type': 'service', + }) + cls.invoice = cls.env['account.invoice'].create({ + 'partner_id': partner.id, + 'account_id': invoice_account, + 'type': 'in_invoice', + 'invoice_line_ids': [(0, 0, { + 'product_id': product.id, + 'quantity': 1.0, + 'price_unit': 100.0, + 'name': 'product that cost 100', + 'account_id': invoice_line_account, + })] + }) + cls.sheet = cls.env['hr.expense.sheet'].create({ + 'name': 'Test expense sheet', + }) + cls.expense = cls.env['hr.expense'].create({ + 'name': 'Expense test', + 'product_id': product.id, + 'unit_amount': 0.0, + }) + + def test_hr_test_invoice(self): + # There is not expense lines in sheet + self.assertEqual(len(self.sheet.expense_line_ids), 0) + # We add an expense + self.sheet.expense_line_ids = [(6, 0, [self.expense.id])] + self.assertEqual(len(self.sheet.expense_line_ids), 1) + # We add invoice to expense + self.invoice.action_invoice_open() + self.expense.invoice_id = self.invoice.id + self.expense.onchange_invoice_id() + self.assertAlmostEqual(self.expense.total_amount, 100.0) + # We approve sheet + self.sheet.approve_expense_sheets() + self.assertEqual(self.sheet.state, 'approve') + self.assertFalse(self.sheet.account_move_id) + self.assertEqual(self.invoice.state, 'open') + # We posrt journal entries + self.sheet.action_sheet_move_create() + self.assertEqual(self.sheet.state, 'post') + self.assertTrue(self.sheet.account_move_id) + # Invoice is now paid + self.assertEqual(self.invoice.state, 'paid') diff --git a/hr_expense_invoice/views/hr_expense_expense_view.xml b/hr_expense_invoice/views/hr_expense_expense_view.xml deleted file mode 100644 index c21ba5dd0..000000000 --- a/hr_expense_invoice/views/hr_expense_expense_view.xml +++ /dev/null @@ -1,60 +0,0 @@ - - - - - - hr.expense.form.invoice - hr.expense.expense - - - - - - - {'readonly': [('invoice', '!=', False)]} - - - {'readonly': [('invoice', '!=', False)]} - - - {'readonly': [('invoice', '!=', False)]} - - - {'readonly': [('invoice', '!=', False)]} - - - {'readonly': [('invoice', '!=', False)]} - - - {'readonly': [('invoice', '!=', False)]} - - - - - - {'readonly': [('invoice', '!=', False)]} - - - {'readonly': [('invoice', '!=', False)]} - - - {'readonly': [('invoice', '!=', False)]} - - - {'readonly': [('invoice', '!=', False)]} - - - {'readonly': [('invoice', '!=', False)]} - - - {'readonly': [('invoice', '!=', False)]} - - - - - - diff --git a/hr_expense_invoice/views/hr_expense_views.xml b/hr_expense_invoice/views/hr_expense_views.xml new file mode 100644 index 000000000..dedb7f734 --- /dev/null +++ b/hr_expense_invoice/views/hr_expense_views.xml @@ -0,0 +1,33 @@ + + + + + hr.expense.form + hr.expense + + + + + + + {'readonly': [('invoice_id', '!=', False)]} + + + {'readonly': [('invoice_id', '!=', False)]} + + + {'readonly': [('invoice_id', '!=', False)]} + + + {'readonly': [('invoice_id', '!=', False)]} + + + {'readonly': [('invoice_id', '!=', False)]} + + + {'readonly': [('invoice_id', '!=', False)]} + + + + + From 4171f337fe01f5845ae6fe05dc8985d265b17442 Mon Sep 17 00:00:00 2001 From: cubells Date: Tue, 11 Dec 2018 12:09:33 +0100 Subject: [PATCH 05/69] [MIG] hr_expense_invoice: Migration to 11.0 [UPD] Update hr_expense_invoice.pot --- hr_expense_invoice/README.rst | 83 ++-- hr_expense_invoice/__init__.py | 3 - hr_expense_invoice/__manifest__.py | 5 +- .../i18n/hr_expense_invoice.pot | 4 +- hr_expense_invoice/models/__init__.py | 3 - hr_expense_invoice/models/hr_expense.py | 2 +- hr_expense_invoice/models/hr_expense_sheet.py | 13 +- hr_expense_invoice/readme/CONTRIBUTORS.rst | 4 + hr_expense_invoice/readme/DESCRIPTION.rst | 3 + hr_expense_invoice/readme/ROADMAP.rst | 2 + hr_expense_invoice/readme/USAGE.rst | 4 + .../static/description/index.html | 443 ++++++++++++++++++ hr_expense_invoice/tests/__init__.py | 3 - .../tests/test_hr_expense_invoice.py | 3 +- hr_expense_invoice/views/hr_expense_views.xml | 4 +- 15 files changed, 526 insertions(+), 53 deletions(-) create mode 100644 hr_expense_invoice/readme/CONTRIBUTORS.rst create mode 100644 hr_expense_invoice/readme/DESCRIPTION.rst create mode 100644 hr_expense_invoice/readme/ROADMAP.rst create mode 100644 hr_expense_invoice/readme/USAGE.rst create mode 100644 hr_expense_invoice/static/description/index.html diff --git a/hr_expense_invoice/README.rst b/hr_expense_invoice/README.rst index 619611e09..23ef5723e 100644 --- a/hr_expense_invoice/README.rst +++ b/hr_expense_invoice/README.rst @@ -1,25 +1,38 @@ -.. image:: https://img.shields.io/badge/licence-AGPL--3-blue.svg - :target: http://www.gnu.org/licenses/agpl - :alt: License: AGPL-3 - -==================================== -Set supplier invoices on HR expenses -==================================== +================================ +Supplier invoices on HR expenses +================================ + +.. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + !! This file is generated by oca-gen-addon-readme !! + !! changes will be overwritten. !! + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + +.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png + :target: https://odoo-community.org/page/development-status + :alt: Beta +.. |badge2| image:: https://img.shields.io/badge/licence-AGPL--3-blue.png + :target: http://www.gnu.org/licenses/agpl-3.0-standalone.html + :alt: License: AGPL-3 +.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fhr-lightgray.png?logo=github + :target: https://github.com/OCA/hr/tree/11.0/hr_expense_invoice + :alt: OCA/hr +.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png + :target: https://translation.odoo-community.org/projects/hr-11-0/hr-11-0-hr_expense_invoice + :alt: Translate me on Weblate +.. |badge5| image:: https://img.shields.io/badge/runbot-Try%20me-875A7B.png + :target: https://runbot.odoo-community.org/runbot/116/11.0 + :alt: Try me on Runbot + +|badge1| |badge2| |badge3| |badge4| |badge5| This module should be used when a supplier invoice is paid by an employee. It allows to set a supplier invoice for each expense line, adding the corresponding journal items to transfer the debt to the employee. +**Table of contents** -Installation -============ - -Install the module the regular way. - -Configuration -============= - -You don't need to configure anything more to use this module. +.. contents:: + :local: Usage ===== @@ -35,33 +48,45 @@ Known issues / Roadmap * Multiple payment terms for a supplier invoice are not handled correctly. * Partial reconcile supplier invoices are also not correctly handled. +Bug Tracker +=========== + +Bugs are tracked on `GitHub Issues `_. +In case of trouble, please check there if your issue has already been reported. +If you spotted it first, help us smashing it by providing a detailed and welcomed +`feedback `_. + +Do not contact contributors directly about support or help with technical issues. + Credits ======= +Authors +~~~~~~~ + +* Tecnativa + Contributors ------------- +~~~~~~~~~~~~ -* Pedro M. Baeza -* Vicent Cubells +* `Tecnativa `_: -Icon ----- + * Pedro M. Baeza + * Vicent Cubells -* Thanks to https://openclipart.org/detail/201137/primary%20template%20invoice -* Thanks to https://openclipart.org/detail/15193/Arrow%20set%20%28Comic%29 -* Original hr_expense icon +Maintainers +~~~~~~~~~~~ -Maintainer ----------- +This module is maintained by the OCA. .. image:: https://odoo-community.org/logo.png :alt: Odoo Community Association :target: https://odoo-community.org -This module is maintained by the OCA. - OCA, or the Odoo Community Association, is a nonprofit organization whose mission is to support the collaborative development of Odoo features and promote its widespread use. -To contribute to this module, please visit https://odoo-community.org. +This module is part of the `OCA/hr `_ project on GitHub. + +You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute. diff --git a/hr_expense_invoice/__init__.py b/hr_expense_invoice/__init__.py index ec50cfc0f..0650744f6 100644 --- a/hr_expense_invoice/__init__.py +++ b/hr_expense_invoice/__init__.py @@ -1,4 +1 @@ -# -*- coding: utf-8 -*- -# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). - from . import models diff --git a/hr_expense_invoice/__manifest__.py b/hr_expense_invoice/__manifest__.py index e1bbd78aa..35a5fa94e 100644 --- a/hr_expense_invoice/__manifest__.py +++ b/hr_expense_invoice/__manifest__.py @@ -1,16 +1,15 @@ -# -*- coding: utf-8 -*- # Copyright 2015 Pedro M. Baeza # Copyright 2017 Vicent Cubells # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). { 'name': 'Supplier invoices on HR expenses', - 'version': '10.0.1.0.0', + 'version': '11.0.1.0.0', 'category': 'Human Resources', 'author': 'Tecnativa, ' 'Odoo Community Association (OCA)', 'license': 'AGPL-3', - 'website': 'https://www.tecnativa.com', + 'website': 'https://github.com/OCA/hr', 'depends': [ 'hr_expense', ], diff --git a/hr_expense_invoice/i18n/hr_expense_invoice.pot b/hr_expense_invoice/i18n/hr_expense_invoice.pot index 24612c803..db4996e63 100644 --- a/hr_expense_invoice/i18n/hr_expense_invoice.pot +++ b/hr_expense_invoice/i18n/hr_expense_invoice.pot @@ -4,7 +4,7 @@ # msgid "" msgstr "" -"Project-Id-Version: Odoo Server 10.0\n" +"Project-Id-Version: Odoo Server 11.0\n" "Report-Msgid-Bugs-To: \n" "Last-Translator: <>\n" "Language-Team: \n" @@ -14,7 +14,7 @@ msgstr "" "Plural-Forms: \n" #. module: hr_expense_invoice -#: code:addons/hr_expense_invoice/models/hr_expense_sheet.py:37 +#: code:addons/hr_expense_invoice/models/hr_expense_sheet.py:40 #, python-format msgid "Cannot reconcile supplier invoice payable with generated line. Please check amounts and see if the invoice is already added or paid. Invoice: %s" msgstr "" diff --git a/hr_expense_invoice/models/__init__.py b/hr_expense_invoice/models/__init__.py index 8b7d1125e..945a814c7 100644 --- a/hr_expense_invoice/models/__init__.py +++ b/hr_expense_invoice/models/__init__.py @@ -1,5 +1,2 @@ -# -*- coding: utf-8 -*- -# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). - from . import hr_expense from . import hr_expense_sheet diff --git a/hr_expense_invoice/models/hr_expense.py b/hr_expense_invoice/models/hr_expense.py index 3d5f4da82..ff2f806f6 100644 --- a/hr_expense_invoice/models/hr_expense.py +++ b/hr_expense_invoice/models/hr_expense.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- # Copyright 2015 Pedro M. Baeza # Copyright 2017 Vicent Cubells # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). @@ -25,6 +24,7 @@ def onchange_invoice_id(self): self.unit_amount = self.invoice_id.residual self.quantity = 1.0 self.total_amount = self.unit_amount + self.description = self.invoice_id.reference def _check_vals(self, vals): if vals.get('invoice_id'): diff --git a/hr_expense_invoice/models/hr_expense_sheet.py b/hr_expense_invoice/models/hr_expense_sheet.py index 090ed829e..3dc09a83a 100644 --- a/hr_expense_invoice/models/hr_expense_sheet.py +++ b/hr_expense_invoice/models/hr_expense_sheet.py @@ -1,9 +1,10 @@ -# -*- coding: utf-8 -*- # Copyright 2015 Pedro M. Baeza # Copyright 2017 Vicent Cubells # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). -from odoo import _, api, exceptions, models +from odoo import _, api, models +from odoo.exceptions import UserError +from odoo.tools import float_compare class HrExpenseSheet(models.Model): @@ -11,6 +12,7 @@ class HrExpenseSheet(models.Model): @api.multi def action_sheet_move_create(self): + precision = self.env['decimal.precision'].precision_get('Account') expense_line_ids = self.mapped('expense_line_ids').filtered( lambda r: r.invoice_id, ) @@ -28,15 +30,16 @@ def action_sheet_move_create(self): ) if len(c_move_lines) > 1: c_move_lines = c_move_lines[0] + residual = line.invoice_id.residual c_move_lines |= line.invoice_id.move_id.line_ids.filtered( lambda x: x.account_id == line.invoice_id.account_id and - x.credit == line.invoice_id.residual) + float_compare(x.credit, residual, precision) == 0) if len(c_move_lines) != 2: - raise exceptions.Warning( + raise UserError( _('Cannot reconcile supplier invoice payable with ' 'generated line. Please check amounts and see ' 'if the invoice is already added or paid. ' - 'Invoice: %s') % line.invoice.name) + 'Invoice: %s') % line.invoice_id.number) c_move_lines.reconcile() return res diff --git a/hr_expense_invoice/readme/CONTRIBUTORS.rst b/hr_expense_invoice/readme/CONTRIBUTORS.rst new file mode 100644 index 000000000..2b46ba347 --- /dev/null +++ b/hr_expense_invoice/readme/CONTRIBUTORS.rst @@ -0,0 +1,4 @@ +* `Tecnativa `_: + + * Pedro M. Baeza + * Vicent Cubells diff --git a/hr_expense_invoice/readme/DESCRIPTION.rst b/hr_expense_invoice/readme/DESCRIPTION.rst new file mode 100644 index 000000000..15395cc77 --- /dev/null +++ b/hr_expense_invoice/readme/DESCRIPTION.rst @@ -0,0 +1,3 @@ +This module should be used when a supplier invoice is paid by an employee. It +allows to set a supplier invoice for each expense line, adding the +corresponding journal items to transfer the debt to the employee. diff --git a/hr_expense_invoice/readme/ROADMAP.rst b/hr_expense_invoice/readme/ROADMAP.rst new file mode 100644 index 000000000..bf2442348 --- /dev/null +++ b/hr_expense_invoice/readme/ROADMAP.rst @@ -0,0 +1,2 @@ +* Multiple payment terms for a supplier invoice are not handled correctly. +* Partial reconcile supplier invoices are also not correctly handled. diff --git a/hr_expense_invoice/readme/USAGE.rst b/hr_expense_invoice/readme/USAGE.rst new file mode 100644 index 000000000..894cbb1a4 --- /dev/null +++ b/hr_expense_invoice/readme/USAGE.rst @@ -0,0 +1,4 @@ +* Create an expense sheet. +* Add an expense line to sheet with an invoice_id selected or create one new. +* Process expense sheet. +* On paying expense sheet, you are reconciling supplier invoice too. diff --git a/hr_expense_invoice/static/description/index.html b/hr_expense_invoice/static/description/index.html new file mode 100644 index 000000000..f2e32b42a --- /dev/null +++ b/hr_expense_invoice/static/description/index.html @@ -0,0 +1,443 @@ + + + + + + +Supplier invoices on HR expenses + + + +
+

Supplier invoices on HR expenses

+ + +

Beta License: AGPL-3 OCA/hr Translate me on Weblate Try me on Runbot

+

This module should be used when a supplier invoice is paid by an employee. It +allows to set a supplier invoice for each expense line, adding the +corresponding journal items to transfer the debt to the employee.

+

Table of contents

+ +
+

Usage

+
    +
  • Create an expense sheet.
  • +
  • Add an expense line to sheet with an invoice_id selected or create one new.
  • +
  • Process expense sheet.
  • +
  • On paying expense sheet, you are reconciling supplier invoice too.
  • +
+
+
+

Known issues / Roadmap

+
    +
  • Multiple payment terms for a supplier invoice are not handled correctly.
  • +
  • Partial reconcile supplier invoices are also not correctly handled.
  • +
+
+
+

Bug Tracker

+

Bugs are tracked on GitHub Issues. +In case of trouble, please check there if your issue has already been reported. +If you spotted it first, help us smashing it by providing a detailed and welcomed +feedback.

+

Do not contact contributors directly about support or help with technical issues.

+
+
+

Credits

+
+

Authors

+
    +
  • Tecnativa
  • +
+
+
+

Contributors

+
    +
  • Tecnativa:
      +
    • Pedro M. Baeza
    • +
    • Vicent Cubells
    • +
    +
  • +
+
+
+

Maintainers

+

This module is maintained by the OCA.

+Odoo Community Association +

OCA, or the Odoo Community Association, is a nonprofit organization whose +mission is to support the collaborative development of Odoo features and +promote its widespread use.

+

This module is part of the OCA/hr project on GitHub.

+

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.

+
+
+
+ + diff --git a/hr_expense_invoice/tests/__init__.py b/hr_expense_invoice/tests/__init__.py index d9a7c87e0..571c2e78e 100644 --- a/hr_expense_invoice/tests/__init__.py +++ b/hr_expense_invoice/tests/__init__.py @@ -1,4 +1 @@ -# -*- coding: utf-8 -*- -# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). - from . import test_hr_expense_invoice diff --git a/hr_expense_invoice/tests/test_hr_expense_invoice.py b/hr_expense_invoice/tests/test_hr_expense_invoice.py index 2b835b909..e8378cead 100644 --- a/hr_expense_invoice/tests/test_hr_expense_invoice.py +++ b/hr_expense_invoice/tests/test_hr_expense_invoice.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- # Copyright 2017 Vicent Cubells - # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). @@ -61,7 +60,7 @@ def test_hr_test_invoice(self): self.assertEqual(self.sheet.state, 'approve') self.assertFalse(self.sheet.account_move_id) self.assertEqual(self.invoice.state, 'open') - # We posrt journal entries + # We post journal entries self.sheet.action_sheet_move_create() self.assertEqual(self.sheet.state, 'post') self.assertTrue(self.sheet.account_move_id) diff --git a/hr_expense_invoice/views/hr_expense_views.xml b/hr_expense_invoice/views/hr_expense_views.xml index dedb7f734..d87ae5bed 100644 --- a/hr_expense_invoice/views/hr_expense_views.xml +++ b/hr_expense_invoice/views/hr_expense_views.xml @@ -6,9 +6,9 @@ hr.expense - + - + {'readonly': [('invoice_id', '!=', False)]} From 65d9d38a859a77b442373b8e2c9e8bc79ee96aad Mon Sep 17 00:00:00 2001 From: Maria Sparenberg Date: Tue, 18 Dec 2018 11:38:59 +0000 Subject: [PATCH 06/69] Added translation using Weblate (German) --- hr_expense_invoice/i18n/de.po | 36 +++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 hr_expense_invoice/i18n/de.po diff --git a/hr_expense_invoice/i18n/de.po b/hr_expense_invoice/i18n/de.po new file mode 100644 index 000000000..ff48179c6 --- /dev/null +++ b/hr_expense_invoice/i18n/de.po @@ -0,0 +1,36 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * hr_expense_invoice +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 11.0\n" +"Report-Msgid-Bugs-To: \n" +"Last-Translator: Automatically generated\n" +"Language-Team: none\n" +"Language: de\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: nplurals=2; plural=n != 1;\n" + +#. module: hr_expense_invoice +#: code:addons/hr_expense_invoice/models/hr_expense_sheet.py:40 +#, python-format +msgid "Cannot reconcile supplier invoice payable with generated line. Please check amounts and see if the invoice is already added or paid. Invoice: %s" +msgstr "" + +#. module: hr_expense_invoice +#: model:ir.model,name:hr_expense_invoice.model_hr_expense +msgid "Expense" +msgstr "" + +#. module: hr_expense_invoice +#: model:ir.model,name:hr_expense_invoice.model_hr_expense_sheet +msgid "Expense Report" +msgstr "" + +#. module: hr_expense_invoice +#: model:ir.model.fields,field_description:hr_expense_invoice.field_hr_expense_invoice_id +msgid "Invoice" +msgstr "" From 89d2a2f7e1ae2b70b479dcaafcff7ea3796710ef Mon Sep 17 00:00:00 2001 From: Maria Sparenberg Date: Tue, 18 Dec 2018 11:43:25 +0000 Subject: [PATCH 07/69] Translated using Weblate (German) Currently translated at 100.0% (4 of 4 strings) Translation: hr-11.0/hr-11.0-hr_expense_invoice Translate-URL: https://translation.odoo-community.org/projects/hr-11-0/hr-11-0-hr_expense_invoice/de/ Update translation files Updated by Update PO files to match POT (msgmerge) hook in Weblate. --- hr_expense_invoice/i18n/cs_CZ.po | 2 +- hr_expense_invoice/i18n/de.po | 13 +++++++++---- hr_expense_invoice/i18n/es.po | 2 +- hr_expense_invoice/i18n/fr.po | 2 +- hr_expense_invoice/i18n/hr.po | 2 +- hr_expense_invoice/i18n/nl_NL.po | 2 +- hr_expense_invoice/i18n/pt.po | 8 +++++--- 7 files changed, 19 insertions(+), 12 deletions(-) diff --git a/hr_expense_invoice/i18n/cs_CZ.po b/hr_expense_invoice/i18n/cs_CZ.po index 379a3777e..38ec83c70 100644 --- a/hr_expense_invoice/i18n/cs_CZ.po +++ b/hr_expense_invoice/i18n/cs_CZ.po @@ -20,7 +20,7 @@ msgstr "" "Plural-Forms: nplurals=3; plural=(n==1) ? 0 : (n>=2 && n<=4) ? 1 : 2;\n" #. module: hr_expense_invoice -#: code:addons/hr_expense_invoice/models/hr_expense_sheet.py:37 +#: code:addons/hr_expense_invoice/models/hr_expense_sheet.py:40 #, python-format msgid "" "Cannot reconcile supplier invoice payable with generated line. Please check " diff --git a/hr_expense_invoice/i18n/de.po b/hr_expense_invoice/i18n/de.po index ff48179c6..a7542629d 100644 --- a/hr_expense_invoice/i18n/de.po +++ b/hr_expense_invoice/i18n/de.po @@ -6,31 +6,36 @@ msgid "" msgstr "" "Project-Id-Version: Odoo Server 11.0\n" "Report-Msgid-Bugs-To: \n" -"Last-Translator: Automatically generated\n" +"PO-Revision-Date: 2018-12-18 13:07+0000\n" +"Last-Translator: Maria Sparenberg \n" "Language-Team: none\n" "Language: de\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: \n" "Plural-Forms: nplurals=2; plural=n != 1;\n" +"X-Generator: Weblate 3.3\n" #. module: hr_expense_invoice #: code:addons/hr_expense_invoice/models/hr_expense_sheet.py:40 #, python-format msgid "Cannot reconcile supplier invoice payable with generated line. Please check amounts and see if the invoice is already added or paid. Invoice: %s" msgstr "" +"Der zu zahlende Restbetrag der Rechnung kann nicht mit der erstellten Zeile " +"abgeglichen werden. Bitte prüfen Sie die Mengen und ob die Rechnung schon " +"hinzugefügt oder bezahlt wurde. Rechnung: %s" #. module: hr_expense_invoice #: model:ir.model,name:hr_expense_invoice.model_hr_expense msgid "Expense" -msgstr "" +msgstr "Spesen" #. module: hr_expense_invoice #: model:ir.model,name:hr_expense_invoice.model_hr_expense_sheet msgid "Expense Report" -msgstr "" +msgstr "Spesen-Bericht" #. module: hr_expense_invoice #: model:ir.model.fields,field_description:hr_expense_invoice.field_hr_expense_invoice_id msgid "Invoice" -msgstr "" +msgstr "Rechnung" diff --git a/hr_expense_invoice/i18n/es.po b/hr_expense_invoice/i18n/es.po index 10d8adce2..dafe69011 100644 --- a/hr_expense_invoice/i18n/es.po +++ b/hr_expense_invoice/i18n/es.po @@ -17,7 +17,7 @@ msgstr "" "Plural-Forms: \n" #. module: hr_expense_invoice -#: code:addons/hr_expense_invoice/models/hr_expense_sheet.py:37 +#: code:addons/hr_expense_invoice/models/hr_expense_sheet.py:40 #, python-format msgid "" "Cannot reconcile supplier invoice payable with generated line. Please check " diff --git a/hr_expense_invoice/i18n/fr.po b/hr_expense_invoice/i18n/fr.po index 32ea1d2f7..879019d9e 100644 --- a/hr_expense_invoice/i18n/fr.po +++ b/hr_expense_invoice/i18n/fr.po @@ -20,7 +20,7 @@ msgstr "" "Plural-Forms: nplurals=2; plural=(n > 1);\n" #. module: hr_expense_invoice -#: code:addons/hr_expense_invoice/models/hr_expense_sheet.py:37 +#: code:addons/hr_expense_invoice/models/hr_expense_sheet.py:40 #, python-format msgid "" "Cannot reconcile supplier invoice payable with generated line. Please check " diff --git a/hr_expense_invoice/i18n/hr.po b/hr_expense_invoice/i18n/hr.po index a6b3f56bb..28e1a2566 100644 --- a/hr_expense_invoice/i18n/hr.po +++ b/hr_expense_invoice/i18n/hr.po @@ -20,7 +20,7 @@ msgstr "" "%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2;\n" #. module: hr_expense_invoice -#: code:addons/hr_expense_invoice/models/hr_expense_sheet.py:37 +#: code:addons/hr_expense_invoice/models/hr_expense_sheet.py:40 #, python-format msgid "" "Cannot reconcile supplier invoice payable with generated line. Please check " diff --git a/hr_expense_invoice/i18n/nl_NL.po b/hr_expense_invoice/i18n/nl_NL.po index 95a651c14..3c5188dd3 100644 --- a/hr_expense_invoice/i18n/nl_NL.po +++ b/hr_expense_invoice/i18n/nl_NL.po @@ -20,7 +20,7 @@ msgstr "" "Plural-Forms: nplurals=2; plural=(n != 1);\n" #. module: hr_expense_invoice -#: code:addons/hr_expense_invoice/models/hr_expense_sheet.py:37 +#: code:addons/hr_expense_invoice/models/hr_expense_sheet.py:40 #, python-format msgid "" "Cannot reconcile supplier invoice payable with generated line. Please check " diff --git a/hr_expense_invoice/i18n/pt.po b/hr_expense_invoice/i18n/pt.po index 2205df116..0bd60eba1 100644 --- a/hr_expense_invoice/i18n/pt.po +++ b/hr_expense_invoice/i18n/pt.po @@ -1,6 +1,6 @@ # Translation of Odoo Server. # This file contains the translation of the following modules: -# * hr_expense_invoice +# * hr_expense_invoice # msgid "" msgstr "" @@ -17,9 +17,11 @@ msgstr "" "X-Generator: Weblate 3.1.1\n" #. module: hr_expense_invoice -#: code:addons/hr_expense_invoice/models/hr_expense_sheet.py:37 +#: code:addons/hr_expense_invoice/models/hr_expense_sheet.py:40 #, python-format -msgid "Cannot reconcile supplier invoice payable with generated line. Please check amounts and see if the invoice is already added or paid. Invoice: %s" +msgid "" +"Cannot reconcile supplier invoice payable with generated line. Please check " +"amounts and see if the invoice is already added or paid. Invoice: %s" msgstr "" "Não foi possível reconciliar a fatura a pagar ao fornecedor com a linha " "gerada. Por favor, verifique os montantes e veja se a fatura já está " From 7cf6d2be8c1fbf533274cf6cadfdcdc1436e24bc Mon Sep 17 00:00:00 2001 From: Kitti U Date: Tue, 23 Apr 2019 13:39:15 +0700 Subject: [PATCH 08/69] [12.0][MIG] hr_expense_invoice [UPD] Update hr_expense_invoice.pot Update translation files Updated by "Update PO files to match POT (msgmerge)" hook in Weblate. Translation: hr-12.0/hr-12.0-hr_expense_invoice Translate-URL: https://translation.odoo-community.org/projects/hr-12-0/hr-12-0-hr_expense_invoice/ --- hr_expense_invoice/README.rst | 12 ++-- hr_expense_invoice/__manifest__.py | 2 +- hr_expense_invoice/i18n/cs_CZ.po | 9 ++- hr_expense_invoice/i18n/de.po | 15 +++-- hr_expense_invoice/i18n/es.po | 9 ++- hr_expense_invoice/i18n/fr.po | 9 ++- hr_expense_invoice/i18n/hr.po | 9 ++- .../i18n/hr_expense_invoice.pot | 6 +- hr_expense_invoice/i18n/nl_NL.po | 4 +- hr_expense_invoice/i18n/pt.po | 9 ++- hr_expense_invoice/models/hr_expense.py | 24 ++++--- hr_expense_invoice/models/hr_expense_sheet.py | 8 +-- hr_expense_invoice/readme/CONTRIBUTORS.rst | 2 + .../static/description/index.html | 7 +- .../tests/test_hr_expense_invoice.py | 67 ++++++++++++++++++- hr_expense_invoice/views/hr_expense_views.xml | 4 +- 16 files changed, 145 insertions(+), 51 deletions(-) diff --git a/hr_expense_invoice/README.rst b/hr_expense_invoice/README.rst index 23ef5723e..b6c57ccbc 100644 --- a/hr_expense_invoice/README.rst +++ b/hr_expense_invoice/README.rst @@ -14,13 +14,13 @@ Supplier invoices on HR expenses :target: http://www.gnu.org/licenses/agpl-3.0-standalone.html :alt: License: AGPL-3 .. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fhr-lightgray.png?logo=github - :target: https://github.com/OCA/hr/tree/11.0/hr_expense_invoice + :target: https://github.com/OCA/hr/tree/12.0/hr_expense_invoice :alt: OCA/hr .. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png - :target: https://translation.odoo-community.org/projects/hr-11-0/hr-11-0-hr_expense_invoice + :target: https://translation.odoo-community.org/projects/hr-12-0/hr-12-0-hr_expense_invoice :alt: Translate me on Weblate .. |badge5| image:: https://img.shields.io/badge/runbot-Try%20me-875A7B.png - :target: https://runbot.odoo-community.org/runbot/116/11.0 + :target: https://runbot.odoo-community.org/runbot/116/12.0 :alt: Try me on Runbot |badge1| |badge2| |badge3| |badge4| |badge5| @@ -54,7 +54,7 @@ Bug Tracker Bugs are tracked on `GitHub Issues `_. In case of trouble, please check there if your issue has already been reported. If you spotted it first, help us smashing it by providing a detailed and welcomed -`feedback `_. +`feedback `_. Do not contact contributors directly about support or help with technical issues. @@ -74,6 +74,8 @@ Contributors * Pedro M. Baeza * Vicent Cubells +* Kitti Upariphutthiphong + Maintainers ~~~~~~~~~~~ @@ -87,6 +89,6 @@ OCA, or the Odoo Community Association, is a nonprofit organization whose mission is to support the collaborative development of Odoo features and promote its widespread use. -This module is part of the `OCA/hr `_ project on GitHub. +This module is part of the `OCA/hr `_ project on GitHub. You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute. diff --git a/hr_expense_invoice/__manifest__.py b/hr_expense_invoice/__manifest__.py index 35a5fa94e..48e5df6d4 100644 --- a/hr_expense_invoice/__manifest__.py +++ b/hr_expense_invoice/__manifest__.py @@ -4,7 +4,7 @@ { 'name': 'Supplier invoices on HR expenses', - 'version': '11.0.1.0.0', + 'version': '12.0.1.0.0', 'category': 'Human Resources', 'author': 'Tecnativa, ' 'Odoo Community Association (OCA)', diff --git a/hr_expense_invoice/i18n/cs_CZ.po b/hr_expense_invoice/i18n/cs_CZ.po index 38ec83c70..f48ab549a 100644 --- a/hr_expense_invoice/i18n/cs_CZ.po +++ b/hr_expense_invoice/i18n/cs_CZ.po @@ -41,6 +41,9 @@ msgid "Expense Report" msgstr "Zpráva o výdajích" #. module: hr_expense_invoice -#: model:ir.model.fields,field_description:hr_expense_invoice.field_hr_expense_invoice_id -msgid "Invoice" -msgstr "Faktura" +#: model:ir.model.fields,field_description:hr_expense_invoice.field_hr_expense__invoice_id +msgid "Vendor Bill" +msgstr "" + +#~ msgid "Invoice" +#~ msgstr "Faktura" diff --git a/hr_expense_invoice/i18n/de.po b/hr_expense_invoice/i18n/de.po index a7542629d..8360545df 100644 --- a/hr_expense_invoice/i18n/de.po +++ b/hr_expense_invoice/i18n/de.po @@ -1,6 +1,6 @@ # Translation of Odoo Server. # This file contains the translation of the following modules: -# * hr_expense_invoice +# * hr_expense_invoice # msgid "" msgstr "" @@ -19,7 +19,9 @@ msgstr "" #. module: hr_expense_invoice #: code:addons/hr_expense_invoice/models/hr_expense_sheet.py:40 #, python-format -msgid "Cannot reconcile supplier invoice payable with generated line. Please check amounts and see if the invoice is already added or paid. Invoice: %s" +msgid "" +"Cannot reconcile supplier invoice payable with generated line. Please check " +"amounts and see if the invoice is already added or paid. Invoice: %s" msgstr "" "Der zu zahlende Restbetrag der Rechnung kann nicht mit der erstellten Zeile " "abgeglichen werden. Bitte prüfen Sie die Mengen und ob die Rechnung schon " @@ -36,6 +38,9 @@ msgid "Expense Report" msgstr "Spesen-Bericht" #. module: hr_expense_invoice -#: model:ir.model.fields,field_description:hr_expense_invoice.field_hr_expense_invoice_id -msgid "Invoice" -msgstr "Rechnung" +#: model:ir.model.fields,field_description:hr_expense_invoice.field_hr_expense__invoice_id +msgid "Vendor Bill" +msgstr "" + +#~ msgid "Invoice" +#~ msgstr "Rechnung" diff --git a/hr_expense_invoice/i18n/es.po b/hr_expense_invoice/i18n/es.po index dafe69011..2e98fadc7 100644 --- a/hr_expense_invoice/i18n/es.po +++ b/hr_expense_invoice/i18n/es.po @@ -38,6 +38,9 @@ msgid "Expense Report" msgstr "Informe de gastos" #. module: hr_expense_invoice -#: model:ir.model.fields,field_description:hr_expense_invoice.field_hr_expense_invoice_id -msgid "Invoice" -msgstr "Factura" +#: model:ir.model.fields,field_description:hr_expense_invoice.field_hr_expense__invoice_id +msgid "Vendor Bill" +msgstr "" + +#~ msgid "Invoice" +#~ msgstr "Factura" diff --git a/hr_expense_invoice/i18n/fr.po b/hr_expense_invoice/i18n/fr.po index 879019d9e..7b6e9d02d 100644 --- a/hr_expense_invoice/i18n/fr.po +++ b/hr_expense_invoice/i18n/fr.po @@ -40,6 +40,9 @@ msgid "Expense Report" msgstr "Rapport de dépenses" #. module: hr_expense_invoice -#: model:ir.model.fields,field_description:hr_expense_invoice.field_hr_expense_invoice_id -msgid "Invoice" -msgstr "Facture" +#: model:ir.model.fields,field_description:hr_expense_invoice.field_hr_expense__invoice_id +msgid "Vendor Bill" +msgstr "" + +#~ msgid "Invoice" +#~ msgstr "Facture" diff --git a/hr_expense_invoice/i18n/hr.po b/hr_expense_invoice/i18n/hr.po index 28e1a2566..483539569 100644 --- a/hr_expense_invoice/i18n/hr.po +++ b/hr_expense_invoice/i18n/hr.po @@ -40,6 +40,9 @@ msgid "Expense Report" msgstr "Izvještaj troškova" #. module: hr_expense_invoice -#: model:ir.model.fields,field_description:hr_expense_invoice.field_hr_expense_invoice_id -msgid "Invoice" -msgstr "Račun" +#: model:ir.model.fields,field_description:hr_expense_invoice.field_hr_expense__invoice_id +msgid "Vendor Bill" +msgstr "" + +#~ msgid "Invoice" +#~ msgstr "Račun" diff --git a/hr_expense_invoice/i18n/hr_expense_invoice.pot b/hr_expense_invoice/i18n/hr_expense_invoice.pot index db4996e63..32bb6be5e 100644 --- a/hr_expense_invoice/i18n/hr_expense_invoice.pot +++ b/hr_expense_invoice/i18n/hr_expense_invoice.pot @@ -4,7 +4,7 @@ # msgid "" msgstr "" -"Project-Id-Version: Odoo Server 11.0\n" +"Project-Id-Version: Odoo Server 12.0\n" "Report-Msgid-Bugs-To: \n" "Last-Translator: <>\n" "Language-Team: \n" @@ -30,7 +30,7 @@ msgid "Expense Report" msgstr "" #. module: hr_expense_invoice -#: model:ir.model.fields,field_description:hr_expense_invoice.field_hr_expense_invoice_id -msgid "Invoice" +#: model:ir.model.fields,field_description:hr_expense_invoice.field_hr_expense__invoice_id +msgid "Vendor Bill" msgstr "" diff --git a/hr_expense_invoice/i18n/nl_NL.po b/hr_expense_invoice/i18n/nl_NL.po index 3c5188dd3..33b69366c 100644 --- a/hr_expense_invoice/i18n/nl_NL.po +++ b/hr_expense_invoice/i18n/nl_NL.po @@ -38,6 +38,6 @@ msgid "Expense Report" msgstr "Onkostennota" #. module: hr_expense_invoice -#: model:ir.model.fields,field_description:hr_expense_invoice.field_hr_expense_invoice_id -msgid "Invoice" +#: model:ir.model.fields,field_description:hr_expense_invoice.field_hr_expense__invoice_id +msgid "Vendor Bill" msgstr "" diff --git a/hr_expense_invoice/i18n/pt.po b/hr_expense_invoice/i18n/pt.po index 0bd60eba1..b63f19eab 100644 --- a/hr_expense_invoice/i18n/pt.po +++ b/hr_expense_invoice/i18n/pt.po @@ -38,6 +38,9 @@ msgid "Expense Report" msgstr "Relatório de Despesas" #. module: hr_expense_invoice -#: model:ir.model.fields,field_description:hr_expense_invoice.field_hr_expense_invoice_id -msgid "Invoice" -msgstr "Fatura" +#: model:ir.model.fields,field_description:hr_expense_invoice.field_hr_expense__invoice_id +msgid "Vendor Bill" +msgstr "" + +#~ msgid "Invoice" +#~ msgstr "Fatura" diff --git a/hr_expense_invoice/models/hr_expense.py b/hr_expense_invoice/models/hr_expense.py index ff2f806f6..a830fcd13 100644 --- a/hr_expense_invoice/models/hr_expense.py +++ b/hr_expense_invoice/models/hr_expense.py @@ -9,8 +9,8 @@ class HrExpense(models.Model): _inherit = 'hr.expense' invoice_id = fields.Many2one( - comodel_name="account.invoice", - string='Invoice', + comodel_name='account.invoice', + string='Vendor Bill', domain="[('type', '=', 'in_invoice'), ('state', '=', 'open')]", oldname='invoice', ) @@ -46,10 +46,16 @@ def write(self, vals): self._check_vals(vals) return super(HrExpense, self).write(vals) - def _prepare_move_line(self, line): - expense = super(HrExpense, self)._prepare_move_line(line) - if self.invoice_id and expense['debit']: - expense['partner_id'] = \ - self.invoice_id.partner_id.commercial_partner_id.id - expense['account_id'] = self.invoice_id.account_id.id - return expense + @api.multi + def _get_account_move_line_values(self): + move_line_values_by_expense = super()._get_account_move_line_values() + for expense_id, move_lines in move_line_values_by_expense.items(): + expense = self.browse(expense_id) + if not expense.invoice_id: + return move_line_values_by_expense + for move_line in move_lines: + if move_line['debit']: + move_line['partner_id'] = \ + expense.invoice_id.partner_id.commercial_partner_id.id + move_line['account_id'] = expense.invoice_id.account_id.id + return move_line_values_by_expense diff --git a/hr_expense_invoice/models/hr_expense_sheet.py b/hr_expense_invoice/models/hr_expense_sheet.py index 3dc09a83a..a0646d588 100644 --- a/hr_expense_invoice/models/hr_expense_sheet.py +++ b/hr_expense_invoice/models/hr_expense_sheet.py @@ -12,10 +12,10 @@ class HrExpenseSheet(models.Model): @api.multi def action_sheet_move_create(self): - precision = self.env['decimal.precision'].precision_get('Account') - expense_line_ids = self.mapped('expense_line_ids').filtered( - lambda r: r.invoice_id, - ) + DecimalPrecision = self.env['decimal.precision'] + precision = DecimalPrecision.precision_get('Product Price') + expense_line_ids = \ + self.mapped('expense_line_ids').filtered('invoice_id') res = super(HrExpenseSheet, self).action_sheet_move_create() move_lines = self.env['account.move'].search( [('ref', 'in', self.mapped('name'))], diff --git a/hr_expense_invoice/readme/CONTRIBUTORS.rst b/hr_expense_invoice/readme/CONTRIBUTORS.rst index 2b46ba347..036f2b53f 100644 --- a/hr_expense_invoice/readme/CONTRIBUTORS.rst +++ b/hr_expense_invoice/readme/CONTRIBUTORS.rst @@ -2,3 +2,5 @@ * Pedro M. Baeza * Vicent Cubells + +* Kitti Upariphutthiphong diff --git a/hr_expense_invoice/static/description/index.html b/hr_expense_invoice/static/description/index.html index f2e32b42a..ecad36c2f 100644 --- a/hr_expense_invoice/static/description/index.html +++ b/hr_expense_invoice/static/description/index.html @@ -367,7 +367,7 @@

Supplier invoices on HR expenses

!! This file is generated by oca-gen-addon-readme !! !! changes will be overwritten. !! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! --> -

Beta License: AGPL-3 OCA/hr Translate me on Weblate Try me on Runbot

+

Beta License: AGPL-3 OCA/hr Translate me on Weblate Try me on Runbot

This module should be used when a supplier invoice is paid by an employee. It allows to set a supplier invoice for each expense line, adding the corresponding journal items to transfer the debt to the employee.

@@ -406,7 +406,7 @@

Bug Tracker

Bugs are tracked on GitHub Issues. In case of trouble, please check there if your issue has already been reported. If you spotted it first, help us smashing it by providing a detailed and welcomed -feedback.

+feedback.

Do not contact contributors directly about support or help with technical issues.

@@ -425,6 +425,7 @@

Contributors

  • Vicent Cubells
  • +
  • Kitti Upariphutthiphong <kittiu@ecosoft.co.th>
  • @@ -434,7 +435,7 @@

    Maintainers

    OCA, or the Odoo Community Association, is a nonprofit organization whose mission is to support the collaborative development of Odoo features and promote its widespread use.

    -

    This module is part of the OCA/hr project on GitHub.

    +

    This module is part of the OCA/hr project on GitHub.

    You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.

    diff --git a/hr_expense_invoice/tests/test_hr_expense_invoice.py b/hr_expense_invoice/tests/test_hr_expense_invoice.py index e8378cead..be5deeb43 100644 --- a/hr_expense_invoice/tests/test_hr_expense_invoice.py +++ b/hr_expense_invoice/tests/test_hr_expense_invoice.py @@ -13,6 +13,9 @@ def setUpClass(cls): 'name': 'Test partner', 'supplier': True, }) + employee_home = cls.env['res.partner'].create({ + 'name': 'Employee Home Address', + }) receivable = cls.env.ref('account.data_account_type_receivable').id expenses = cls.env.ref('account.data_account_type_expenses').id invoice_account = cls.env['account.account'].search( @@ -23,6 +26,10 @@ def setUpClass(cls): 'name': 'Product test', 'type': 'service', }) + employee = cls.env['hr.employee'].create({ + 'name': 'Employee A', + 'address_home_id': employee_home.id, + }) cls.invoice = cls.env['account.invoice'].create({ 'partner_id': partner.id, 'account_id': invoice_account, @@ -35,16 +42,44 @@ def setUpClass(cls): 'account_id': invoice_line_account, })] }) + cls.invoice2 = cls.invoice.copy({ + 'invoice_line_ids': [(0, 0, { + 'product_id': product.id, + 'quantity': 1.0, + 'price_unit': 100.0, + 'name': 'product that cost 100', + 'account_id': invoice_line_account, + })] + }) cls.sheet = cls.env['hr.expense.sheet'].create({ 'name': 'Test expense sheet', + 'employee_id': employee.id, }) cls.expense = cls.env['hr.expense'].create({ 'name': 'Expense test', + 'employee_id': employee.id, 'product_id': product.id, - 'unit_amount': 0.0, + 'unit_amount': 50.0, }) + cls.expense2 = cls.expense.copy() - def test_hr_test_invoice(self): + def test_0_hr_test_no_invoice(self): + # There is not expense lines in sheet + self.assertEqual(len(self.sheet.expense_line_ids), 0) + # We add an expense + self.sheet.expense_line_ids = [(6, 0, [self.expense.id])] + self.assertEqual(len(self.sheet.expense_line_ids), 1) + self.assertAlmostEqual(self.expense.total_amount, 50.0) + # We approve sheet, no invoice + self.sheet.approve_expense_sheets() + self.assertEqual(self.sheet.state, 'approve') + self.assertFalse(self.sheet.account_move_id) + # We post journal entries + self.sheet.action_sheet_move_create() + self.assertEqual(self.sheet.state, 'post') + self.assertTrue(self.sheet.account_move_id) + + def test_1_hr_test_invoice(self): # There is not expense lines in sheet self.assertEqual(len(self.sheet.expense_line_ids), 0) # We add an expense @@ -66,3 +101,31 @@ def test_hr_test_invoice(self): self.assertTrue(self.sheet.account_move_id) # Invoice is now paid self.assertEqual(self.invoice.state, 'paid') + + def test_2_hr_test_multi_invoices(self): + # There is not expense lines in sheet + self.assertEqual(len(self.sheet.expense_line_ids), 0) + # We add 2 expenses + self.sheet.expense_line_ids = [(6, 0, [self.expense.id, + self.expense2.id])] + self.assertEqual(len(self.sheet.expense_line_ids), 2) + # We add invoices to expenses + self.invoice.action_invoice_open() + self.invoice2.action_invoice_open() + self.expense.invoice_id = self.invoice.id + self.expense2.invoice_id = self.invoice2.id + self.expense.onchange_invoice_id() + self.expense2.onchange_invoice_id() + self.assertAlmostEqual(self.expense.total_amount, 100.0) + self.assertAlmostEqual(self.expense2.total_amount, 100.0) + # We approve sheet + self.sheet.approve_expense_sheets() + self.assertEqual(self.sheet.state, 'approve') + self.assertFalse(self.sheet.account_move_id) + self.assertEqual(self.invoice.state, 'open') + # We post journal entries + self.sheet.action_sheet_move_create() + self.assertEqual(self.sheet.state, 'post') + self.assertTrue(self.sheet.account_move_id) + # Invoice is now paid + self.assertEqual(self.invoice.state, 'paid') diff --git a/hr_expense_invoice/views/hr_expense_views.xml b/hr_expense_invoice/views/hr_expense_views.xml index d87ae5bed..0e93c0e8b 100644 --- a/hr_expense_invoice/views/hr_expense_views.xml +++ b/hr_expense_invoice/views/hr_expense_views.xml @@ -1,10 +1,10 @@ - + hr.expense.form hr.expense - + From 5a5730e2e9f126612ec2263a477e8c2f83923344 Mon Sep 17 00:00:00 2001 From: Kitti U Date: Tue, 11 Jun 2019 15:41:08 +0700 Subject: [PATCH 09/69] [12.0][IMP] hr_expense_invoice Add expense info to invoice info or create/edit --- hr_expense_invoice/__manifest__.py | 2 +- hr_expense_invoice/views/hr_expense_views.xml | 10 +++++++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/hr_expense_invoice/__manifest__.py b/hr_expense_invoice/__manifest__.py index 48e5df6d4..476e87fcf 100644 --- a/hr_expense_invoice/__manifest__.py +++ b/hr_expense_invoice/__manifest__.py @@ -4,7 +4,7 @@ { 'name': 'Supplier invoices on HR expenses', - 'version': '12.0.1.0.0', + 'version': '12.0.1.1.0', 'category': 'Human Resources', 'author': 'Tecnativa, ' 'Odoo Community Association (OCA)', diff --git a/hr_expense_invoice/views/hr_expense_views.xml b/hr_expense_invoice/views/hr_expense_views.xml index 0e93c0e8b..807ff0080 100644 --- a/hr_expense_invoice/views/hr_expense_views.xml +++ b/hr_expense_invoice/views/hr_expense_views.xml @@ -7,7 +7,15 @@ - + {'readonly': [('invoice_id', '!=', False)]} From 76d2cb7853244df93239cd36e8c389d84d32fe11 Mon Sep 17 00:00:00 2001 From: Kitti U Date: Thu, 13 Jun 2019 15:55:53 +0700 Subject: [PATCH 10/69] [12.0][IMP] hr_expense_invoice From expense sheet, add action "Create Invoice" from multiple expenses Change the way reference invoice_id is checked. - No more onchange invoice_id that set values to expense - Instead, check amount on expense and invoice during post entry - Change the way to allow reconcile with > 2 account move lines --- hr_expense_invoice/__init__.py | 1 + hr_expense_invoice/__manifest__.py | 3 +- hr_expense_invoice/models/__init__.py | 2 + .../models/account_move_line.py | 15 ++ hr_expense_invoice/models/account_payment.py | 17 ++ hr_expense_invoice/models/hr_expense.py | 39 ++--- hr_expense_invoice/models/hr_expense_sheet.py | 99 ++++++++---- hr_expense_invoice/readme/DESCRIPTION.rst | 6 + hr_expense_invoice/readme/USAGE.rst | 11 ++ .../tests/test_hr_expense_invoice.py | 146 ++++++++++++++++-- hr_expense_invoice/views/hr_expense_views.xml | 49 ++++-- hr_expense_invoice/wizard/__init__.py | 2 + .../wizard/expense_create_invoice.py | 60 +++++++ .../wizard/expense_create_invoice.xml | 21 +++ .../hr_expense_sheet_register_payment.py | 12 ++ 15 files changed, 393 insertions(+), 90 deletions(-) create mode 100644 hr_expense_invoice/models/account_move_line.py create mode 100644 hr_expense_invoice/models/account_payment.py create mode 100644 hr_expense_invoice/wizard/__init__.py create mode 100644 hr_expense_invoice/wizard/expense_create_invoice.py create mode 100644 hr_expense_invoice/wizard/expense_create_invoice.xml create mode 100644 hr_expense_invoice/wizard/hr_expense_sheet_register_payment.py diff --git a/hr_expense_invoice/__init__.py b/hr_expense_invoice/__init__.py index 0650744f6..9b4296142 100644 --- a/hr_expense_invoice/__init__.py +++ b/hr_expense_invoice/__init__.py @@ -1 +1,2 @@ from . import models +from . import wizard diff --git a/hr_expense_invoice/__manifest__.py b/hr_expense_invoice/__manifest__.py index 476e87fcf..b9a2fe3db 100644 --- a/hr_expense_invoice/__manifest__.py +++ b/hr_expense_invoice/__manifest__.py @@ -4,7 +4,7 @@ { 'name': 'Supplier invoices on HR expenses', - 'version': '12.0.1.1.0', + 'version': '12.0.1.2.0', 'category': 'Human Resources', 'author': 'Tecnativa, ' 'Odoo Community Association (OCA)', @@ -15,6 +15,7 @@ ], 'data': [ 'views/hr_expense_views.xml', + 'wizard/expense_create_invoice.xml', ], 'installable': True, } diff --git a/hr_expense_invoice/models/__init__.py b/hr_expense_invoice/models/__init__.py index 945a814c7..95246bbbb 100644 --- a/hr_expense_invoice/models/__init__.py +++ b/hr_expense_invoice/models/__init__.py @@ -1,2 +1,4 @@ from . import hr_expense from . import hr_expense_sheet +from . import account_payment +from . import account_move_line diff --git a/hr_expense_invoice/models/account_move_line.py b/hr_expense_invoice/models/account_move_line.py new file mode 100644 index 000000000..32293cba1 --- /dev/null +++ b/hr_expense_invoice/models/account_move_line.py @@ -0,0 +1,15 @@ +# Copyright 2019 Kitti U. +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). +from odoo import api, models + + +class AccountMoveLine(models.Model): + _inherit = 'account.move.line' + + @api.multi + def reconcile(self, writeoff_acc_id=False, writeoff_journal_id=False): + if self._context.get('use_hr_expense_invoice'): + self = self.filtered(lambda l: not l.reconciled) + res = super().reconcile(writeoff_acc_id=writeoff_acc_id, + writeoff_journal_id=writeoff_journal_id) + return res diff --git a/hr_expense_invoice/models/account_payment.py b/hr_expense_invoice/models/account_payment.py new file mode 100644 index 000000000..9b509a4da --- /dev/null +++ b/hr_expense_invoice/models/account_payment.py @@ -0,0 +1,17 @@ +# Copyright 2019 Kitti U. +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). +from odoo import models, _ +from odoo.exceptions import ValidationError + + +class AccountPayment(models.Model): + _inherit = 'account.payment' + + def action_validate_invoice_payment(self): + # Do not allow register payment for invoices from expenses + expenses = self.env['hr.expense'].sudo().\ + search([('invoice_id', 'in', self.invoice_ids.ids)]) + if expenses: + raise ValidationError(_("Register payment on expense's " + "invoice is not allowed")) + return super(AccountPayment, self).action_validate_invoice_payment() diff --git a/hr_expense_invoice/models/hr_expense.py b/hr_expense_invoice/models/hr_expense.py index a830fcd13..fd157e9cb 100644 --- a/hr_expense_invoice/models/hr_expense.py +++ b/hr_expense_invoice/models/hr_expense.py @@ -2,7 +2,8 @@ # Copyright 2017 Vicent Cubells # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). -from odoo import api, fields, models +from odoo import api, fields, models, _ +from odoo.exceptions import UserError class HrExpense(models.Model): @@ -13,38 +14,16 @@ class HrExpense(models.Model): string='Vendor Bill', domain="[('type', '=', 'in_invoice'), ('state', '=', 'open')]", oldname='invoice', + copy=False, ) - @api.onchange('invoice_id') - def onchange_invoice_id(self): - self.date = self.invoice_id.date_invoice - self.name = self.invoice_id.number - self.reference = self.invoice_id.number or self.invoice_id.reference - self.analytic_account_id = False - self.unit_amount = self.invoice_id.residual - self.quantity = 1.0 - self.total_amount = self.unit_amount - self.description = self.invoice_id.reference - - def _check_vals(self, vals): - if vals.get('invoice_id'): - # Rewrite values because readonly fields are not stored - invoice = self.env['account.invoice'].browse(vals['invoice_id']) - vals['date'] = invoice.date_invoice - vals['analytic_account_id'] = False - vals['unit_amount'] = invoice.residual - vals['total_amount'] = invoice.residual - vals['quantity'] = 1.0 - - @api.model - def create(self, vals): - self._check_vals(vals) - return super(HrExpense, self).create(vals) - @api.multi - def write(self, vals): - self._check_vals(vals) - return super(HrExpense, self).write(vals) + @api.constrains('invoice_id') + def _check_invoice_id(self): + for expense in self: # Only non binding expense + if not expense.sheet_id and expense.invoice_id and \ + expense.invoice_id.state != 'open': + raise UserError(_("Vendor bill state must be Open")) @api.multi def _get_account_move_line_values(self): diff --git a/hr_expense_invoice/models/hr_expense_sheet.py b/hr_expense_invoice/models/hr_expense_sheet.py index a0646d588..e91258dfb 100644 --- a/hr_expense_invoice/models/hr_expense_sheet.py +++ b/hr_expense_invoice/models/hr_expense_sheet.py @@ -2,7 +2,7 @@ # Copyright 2017 Vicent Cubells # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). -from odoo import _, api, models +from odoo import models, fields, api, _ from odoo.exceptions import UserError from odoo.tools import float_compare @@ -10,36 +10,81 @@ class HrExpenseSheet(models.Model): _inherit = "hr.expense.sheet" + invoice_count = fields.Integer( + compute='_compute_invoice_count', + ) + invoice_fully_created = fields.Boolean( + compute='_compute_invoice_count', + ) + @api.multi def action_sheet_move_create(self): - DecimalPrecision = self.env['decimal.precision'] - precision = DecimalPrecision.precision_get('Product Price') expense_line_ids = \ self.mapped('expense_line_ids').filtered('invoice_id') + self._validate_expense_invoice(expense_line_ids) res = super(HrExpenseSheet, self).action_sheet_move_create() - move_lines = self.env['account.move'].search( - [('ref', 'in', self.mapped('name'))], - ).mapped('line_ids') - for line in expense_line_ids: - partner = line.invoice_id.partner_id.commercial_partner_id - c_move_lines = move_lines.filtered( - lambda x: - x.partner_id == partner and - x.debit == line.invoice_id.residual and - not x.reconciled - ) - if len(c_move_lines) > 1: - c_move_lines = c_move_lines[0] - residual = line.invoice_id.residual - c_move_lines |= line.invoice_id.move_id.line_ids.filtered( - lambda x: - x.account_id == line.invoice_id.account_id and - float_compare(x.credit, residual, precision) == 0) - if len(c_move_lines) != 2: - raise UserError( - _('Cannot reconcile supplier invoice payable with ' - 'generated line. Please check amounts and see ' - 'if the invoice is already added or paid. ' - 'Invoice: %s') % line.invoice_id.number) + for sheet in self: + move_lines = res[sheet.id].line_ids + expense_line_ids = self.expense_line_ids.filtered('invoice_id') + c_move_lines = self.env['account.move.line'] + for line in expense_line_ids: + partner = line.invoice_id.partner_id.commercial_partner_id + c_move_lines |= move_lines.filtered( + lambda x: + x.partner_id == partner and x.debit and not x.reconciled) + c_move_lines |= line.invoice_id.move_id.line_ids.filtered( + lambda x: + x.account_id == line.invoice_id.account_id + and x.credit and not x.reconciled) c_move_lines.reconcile() return res + + @api.multi + def _compute_invoice_count(self): + Invoice = self.env['account.invoice'] + can_read = Invoice.check_access_rights('read', raise_exception=False) + for sheet in self: + sheet.invoice_count = can_read and \ + len(sheet.expense_line_ids.mapped('invoice_id')) or 0 + sheet.invoice_fully_created = \ + not any(self.mapped('expense_line_ids'). + filtered(lambda l: not l.invoice_id)) + + @api.model + def _validate_expense_invoice(self, expense_lines): + DecimalPrecision = self.env['decimal.precision'] + precision = DecimalPrecision.precision_get('Product Price') + invoices = expense_lines.mapped('invoice_id') + if not invoices: + return + # All invoices must confirmed + if any(invoices.filtered(lambda i: i.state != 'open')): + raise UserError(_('Vendor bill state must be Open')) + expense_amount = sum(expense_lines.mapped('total_amount')) + invoice_amount = sum(invoices.mapped('residual')) + # Expense amount must equal invoice amount + if float_compare(expense_amount, invoice_amount, precision) != 0: + raise UserError( + _('Vendor bill amount mismatch!\nPlease make sure amount in ' + 'vendor bills equal to amount of its expense lines')) + + @api.multi + def action_view_invoices(self): + self.ensure_one() + action = { + 'name': _('Invoices'), + 'type': 'ir.actions.act_window', + 'res_model': 'account.invoice', + 'target': 'current', + } + invoice_ids = self.expense_line_ids.mapped('invoice_id').ids + view = self.env.ref('account.invoice_supplier_form') + if len(invoice_ids) == 1: + invoice = invoice_ids[0] + action['res_id'] = invoice + action['view_mode'] = 'form' + action['views'] = [(view.id, 'form')] + else: + action['view_mode'] = 'tree,form' + action['domain'] = [('id', 'in', invoice_ids)] + return action diff --git a/hr_expense_invoice/readme/DESCRIPTION.rst b/hr_expense_invoice/readme/DESCRIPTION.rst index 15395cc77..8fe63207f 100644 --- a/hr_expense_invoice/readme/DESCRIPTION.rst +++ b/hr_expense_invoice/readme/DESCRIPTION.rst @@ -1,3 +1,9 @@ This module should be used when a supplier invoice is paid by an employee. It allows to set a supplier invoice for each expense line, adding the corresponding journal items to transfer the debt to the employee. + +There are 2 ways to reference expense to invoice. + +1. On expense, directly select one invoice. +2. On expense report, use button "Create Vendor Bill" to create one invoice + for multiple expenses. diff --git a/hr_expense_invoice/readme/USAGE.rst b/hr_expense_invoice/readme/USAGE.rst index 894cbb1a4..f093387a1 100644 --- a/hr_expense_invoice/readme/USAGE.rst +++ b/hr_expense_invoice/readme/USAGE.rst @@ -1,4 +1,15 @@ +**Reference one invoice to an expense** + * Create an expense sheet. * Add an expense line to sheet with an invoice_id selected or create one new. * Process expense sheet. * On paying expense sheet, you are reconciling supplier invoice too. + +**Create one invoice to multiple expenses** + +* Create an expense sheet with one or multiple expense lines +* After approved, click button "Create Vendor Bill" +* Select multiple expense to create an invoice, and process it. +* New invoice will be create and link to the selected expense lines. +* Validate newly create invoice. +* On paying expense sheet, you are reconciling supplier invoice(s) too. diff --git a/hr_expense_invoice/tests/test_hr_expense_invoice.py b/hr_expense_invoice/tests/test_hr_expense_invoice.py index be5deeb43..50dde7cbd 100644 --- a/hr_expense_invoice/tests/test_hr_expense_invoice.py +++ b/hr_expense_invoice/tests/test_hr_expense_invoice.py @@ -2,6 +2,8 @@ # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). from odoo.tests import common +from odoo.tests.common import Form +from odoo.exceptions import UserError, ValidationError class TestHrExpenseInvoice(common.SavepointCase): @@ -9,7 +11,7 @@ class TestHrExpenseInvoice(common.SavepointCase): def setUpClass(cls): super(TestHrExpenseInvoice, cls).setUpClass() - partner = cls.env['res.partner'].create({ + cls.partner = cls.env['res.partner'].create({ 'name': 'Test partner', 'supplier': True, }) @@ -18,10 +20,12 @@ def setUpClass(cls): }) receivable = cls.env.ref('account.data_account_type_receivable').id expenses = cls.env.ref('account.data_account_type_expenses').id - invoice_account = cls.env['account.account'].search( + cls.invoice_account = cls.env['account.account'].search( [('user_type_id', '=', receivable)], limit=1).id - invoice_line_account = cls.env['account.account'].search( + cls.invoice_line_account = cls.env['account.account'].search( [('user_type_id', '=', expenses)], limit=1).id + cls.cash_journal = cls.env['account.journal'].search( + [('type', '=', 'cash')], limit=1) product = cls.env['product.product'].create({ 'name': 'Product test', 'type': 'service', @@ -31,15 +35,15 @@ def setUpClass(cls): 'address_home_id': employee_home.id, }) cls.invoice = cls.env['account.invoice'].create({ - 'partner_id': partner.id, - 'account_id': invoice_account, + 'partner_id': cls.partner.id, + 'account_id': cls.invoice_account, 'type': 'in_invoice', 'invoice_line_ids': [(0, 0, { 'product_id': product.id, 'quantity': 1.0, 'price_unit': 100.0, 'name': 'product that cost 100', - 'account_id': invoice_line_account, + 'account_id': cls.invoice_line_account, })] }) cls.invoice2 = cls.invoice.copy({ @@ -48,7 +52,7 @@ def setUpClass(cls): 'quantity': 1.0, 'price_unit': 100.0, 'name': 'product that cost 100', - 'account_id': invoice_line_account, + 'account_id': cls.invoice_line_account, })] }) cls.sheet = cls.env['hr.expense.sheet'].create({ @@ -62,6 +66,20 @@ def setUpClass(cls): 'unit_amount': 50.0, }) cls.expense2 = cls.expense.copy() + cls.expense3 = cls.expense.copy() + + def _register_payment(self, sheet): + ctx = {'active_model': 'hr.expense.sheet', + 'active_id': self.sheet.id, + 'active_ids': [self.sheet.id], + 'default_amount': self.sheet.total_amount, + 'partner_id': self.sheet.address_id.id, } + with Form(self.env['hr.expense.sheet.register.payment.wizard']. + with_context(ctx)) as f: + f.journal_id = self.cash_journal + wizard = f.save() + wizard.expense_post_payment() + self.assertEqual(self.sheet.state, 'done') def test_0_hr_test_no_invoice(self): # There is not expense lines in sheet @@ -78,18 +96,31 @@ def test_0_hr_test_no_invoice(self): self.sheet.action_sheet_move_create() self.assertEqual(self.sheet.state, 'post') self.assertTrue(self.sheet.account_move_id) + # We make payment on expense sheet + self._register_payment(self.sheet) def test_1_hr_test_invoice(self): - # There is not expense lines in sheet + # There is no expense lines in sheet self.assertEqual(len(self.sheet.expense_line_ids), 0) # We add an expense + self.expense.unit_amount = 100.0 self.sheet.expense_line_ids = [(6, 0, [self.expense.id])] self.assertEqual(len(self.sheet.expense_line_ids), 1) # We add invoice to expense - self.invoice.action_invoice_open() - self.expense.invoice_id = self.invoice.id - self.expense.onchange_invoice_id() - self.assertAlmostEqual(self.expense.total_amount, 100.0) + self.invoice.action_invoice_open() # residual = 100.0 + self.expense.invoice_id = self.invoice + # Test that invoice can't register payment by itself + ctx = {'active_ids': [self.invoice.id], + 'active_id': self.invoice.id, + 'active_model': 'account.invoice'} + PaymentWizard = self.env['account.payment'] + view_id = ('account.view_account_payment_invoice_form') + with Form(PaymentWizard.with_context(ctx), view=view_id) as f: + f.amount = 100.0 + f.journal_id = self.cash_journal + payment = f.save() + with self.assertRaises(ValidationError): + payment.action_validate_invoice_payment() # We approve sheet self.sheet.approve_expense_sheets() self.assertEqual(self.sheet.state, 'approve') @@ -101,11 +132,15 @@ def test_1_hr_test_invoice(self): self.assertTrue(self.sheet.account_move_id) # Invoice is now paid self.assertEqual(self.invoice.state, 'paid') + # We make payment on expense sheet + self._register_payment(self.sheet) def test_2_hr_test_multi_invoices(self): - # There is not expense lines in sheet + # There is no expense lines in sheet self.assertEqual(len(self.sheet.expense_line_ids), 0) # We add 2 expenses + self.expense.unit_amount = 100.0 + self.expense2.unit_amount = 100.0 self.sheet.expense_line_ids = [(6, 0, [self.expense.id, self.expense2.id])] self.assertEqual(len(self.sheet.expense_line_ids), 2) @@ -114,8 +149,6 @@ def test_2_hr_test_multi_invoices(self): self.invoice2.action_invoice_open() self.expense.invoice_id = self.invoice.id self.expense2.invoice_id = self.invoice2.id - self.expense.onchange_invoice_id() - self.expense2.onchange_invoice_id() self.assertAlmostEqual(self.expense.total_amount, 100.0) self.assertAlmostEqual(self.expense2.total_amount, 100.0) # We approve sheet @@ -129,3 +162,86 @@ def test_2_hr_test_multi_invoices(self): self.assertTrue(self.sheet.account_move_id) # Invoice is now paid self.assertEqual(self.invoice.state, 'paid') + # We make payment on expense sheet + self._register_payment(self.sheet) + + def test_3_hr_test_expense_create_invoice(self): + # There is no expense lines in sheet + self.assertEqual(len(self.sheet.expense_line_ids), 0) + # We add 3 expenses + self.sheet.expense_line_ids = [(6, 0, [self.expense.id, + self.expense2.id, + self.expense3.id, + ])] + self.assertEqual(len(self.sheet.expense_line_ids), 3) + # We create 1st invoice from expense 1, 2 + ctx = {'active_id': self.sheet.id, + 'active_ids': [self.sheet.id], + 'active_model': 'hr.expense.sheet'} + vals = {'expense_ids': [(6, 0, [self.expense.id, self.expense2.id])]} + Wizard = self.env['hr.expense.create.invoice'] + with self.assertRaises(UserError): + wizard = Wizard.with_context(ctx).create(vals) + self.sheet.approve_expense_sheets() + wizard = Wizard.with_context(ctx).create(vals) + invoice = wizard.create_invoice() + # A new invoice is created + self.assertEqual([invoice.id], + self.sheet.expense_line_ids.mapped('invoice_id').ids) + self.assertEqual(self.sheet.invoice_count, 1) + res = self.sheet.action_view_invoices() + # Click on View Invoice button link to the correct invoice + self.assertEqual(res['res_id'], invoice.id) + # We create 2nd invoice from expense 3 + ctx = {'active_id': self.sheet.id, + 'active_ids': [self.sheet.id], + 'active_model': 'hr.expense.sheet'} + vals = {'expense_ids': [(6, 0, [self.expense3.id])]} + Wizard = self.env['hr.expense.create.invoice'] + self.sheet.approve_expense_sheets() + wizard = Wizard.with_context(ctx).create(vals) + invoice2 = wizard.create_invoice() + # Now there are 2 invoices + self.assertItemsEqual( + [invoice.id, invoice2.id], + self.sheet.expense_line_ids.mapped('invoice_id').ids) + self.sheet.invalidate_cache() # Make sure invoice_count is recalc + self.assertEqual(self.sheet.invoice_count, 2) + # We can't post entry now, we must validate invoice first + with self.assertRaises(UserError): + self.sheet.action_sheet_move_create() + # Validate Invoice + invoice.partner_id = self.partner + invoice.account_id = self.invoice_account + invoice2.partner_id = self.partner + invoice2.account_id = self.invoice_account + invoice.action_invoice_open() + invoice2.action_invoice_open() + self.sheet.action_sheet_move_create() + self.assertEqual(self.sheet.state, 'post') + self.assertTrue(self.sheet.account_move_id) + # Invoice are now paid + self.assertEqual(invoice.state, 'paid') + self.assertEqual(invoice2.state, 'paid') + # We make payment on expense sheet + self._register_payment(self.sheet) + # Click on View Invoice button link to the correct invoice + res = self.sheet.action_view_invoices() + self.assertEqual(res['view_mode'], 'tree,form') + + def test_4_hr_expense_constraint(self): + # Only invoice with status open is allowed + with self.assertRaises(ValidationError): + self.expense.write({'invoice_id': self.invoice.id}) + # We add an expense, total_amount now = 50.0 + self.sheet.expense_line_ids = [(6, 0, [self.expense.id])] + # We add invoice to expense + self.invoice.action_invoice_open() # residual = 100.0 + self.expense.invoice_id = self.invoice + # Amount must equal, expense vs invoice + expense_line_ids = \ + self.sheet.mapped('expense_line_ids').filtered('invoice_id') + with self.assertRaises(UserError): + self.sheet._validate_expense_invoice(expense_line_ids) + self.expense.write({'unit_amount': 100.0}) # set to 100.0 + self.sheet._validate_expense_invoice(expense_line_ids) diff --git a/hr_expense_invoice/views/hr_expense_views.xml b/hr_expense_invoice/views/hr_expense_views.xml index 807ff0080..ee326d80c 100644 --- a/hr_expense_invoice/views/hr_expense_views.xml +++ b/hr_expense_invoice/views/hr_expense_views.xml @@ -17,24 +17,39 @@ 'quantity': quantity, 'date_invoice': date, 'account_id': account_id, 'invoice_line_tax_ids': tax_ids, }], }" /> - - {'readonly': [('invoice_id', '!=', False)]} - - - {'readonly': [('invoice_id', '!=', False)]} - - - {'readonly': [('invoice_id', '!=', False)]} - - - {'readonly': [('invoice_id', '!=', False)]} - - - {'readonly': [('invoice_id', '!=', False)]} - - - {'readonly': [('invoice_id', '!=', False)]} + + + + + Create Vendor Bill + hr.expense.create.invoice + form + form + new + + + + hr.expense.sheet.form.inherit.sale.expense + hr.expense.sheet + + + + + +
    + +
    diff --git a/hr_expense_invoice/wizard/__init__.py b/hr_expense_invoice/wizard/__init__.py new file mode 100644 index 000000000..54bb6a491 --- /dev/null +++ b/hr_expense_invoice/wizard/__init__.py @@ -0,0 +1,2 @@ +from . import expense_create_invoice +from . import hr_expense_sheet_register_payment diff --git a/hr_expense_invoice/wizard/expense_create_invoice.py b/hr_expense_invoice/wizard/expense_create_invoice.py new file mode 100644 index 000000000..deb785bd2 --- /dev/null +++ b/hr_expense_invoice/wizard/expense_create_invoice.py @@ -0,0 +1,60 @@ +# Copyright 2019 Kitti U. +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). +from odoo import models, fields, api, _ +from odoo.exceptions import UserError + + +class HRExpenseCreateInvoice(models.TransientModel): + _name = 'hr.expense.create.invoice' + _description = 'Create invoice from expense report' + + expense_ids = fields.Many2many( + comodel_name='hr.expense', + string='Expenses', + domain=lambda self: self._domain_expense_ids(), + required=True, + ) + + @api.model + def view_init(self, fields): + active_id = self._context.get('active_id') + sheet = self.env['hr.expense.sheet'].browse(active_id) + if sheet.state != 'approve': + raise UserError(_('This action is allowed only in Approved sate')) + return super().view_init(fields) + + @api.model + def _domain_expense_ids(self): + active_id = self._context.get('active_id') + sheet = self.env['hr.expense.sheet'].browse(active_id) + domain = [('id', 'in', sheet.expense_line_ids.ids), + ('invoice_id', '=', False)] + return domain + + @api.multi + def create_invoice(self): + """Use information from selected invoice to create invoice.""" + self.ensure_one() + expenses = self.expense_ids.filtered(lambda l: not l.invoice_id) + if not expenses: + raise UserError(_('No valid expenses to create invoice')) + expense = expenses[0] + invoice_lines = [ + (0, 0, {'product_id': x.product_id.id, + 'name': x.name, + 'price_unit': x.unit_amount, + 'quantity': x.quantity, + 'date_invoice': x.date, + 'account_id': x.account_id.id, + 'invoice_line_tax_ids': [(6, 0, x.tax_ids.ids)], }) + for x in expenses + ] + invoice_vals = { + 'type': 'in_invoice', + 'journal_type': 'purchase', + 'reference': expense.reference, + 'date_invoice': expense.date, + 'invoice_line_ids': invoice_lines, } + invoice = self.env['account.invoice'].create(invoice_vals) + self.expense_ids.write({'invoice_id': invoice.id}) + return invoice diff --git a/hr_expense_invoice/wizard/expense_create_invoice.xml b/hr_expense_invoice/wizard/expense_create_invoice.xml new file mode 100644 index 000000000..940b35cfa --- /dev/null +++ b/hr_expense_invoice/wizard/expense_create_invoice.xml @@ -0,0 +1,21 @@ + + + + + hr.expense.create.invoice.form + hr.expense.create.invoice + +
    + + + + +
    +
    + +
    +
    + +
    diff --git a/hr_expense_invoice/wizard/hr_expense_sheet_register_payment.py b/hr_expense_invoice/wizard/hr_expense_sheet_register_payment.py new file mode 100644 index 000000000..ec9cb09f0 --- /dev/null +++ b/hr_expense_invoice/wizard/hr_expense_sheet_register_payment.py @@ -0,0 +1,12 @@ +# Copyright 2019 Kitti U. +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). +from odoo import api, models + + +class HrExpenseSheetRegisterPaymentWizard(models.TransientModel): + _inherit = 'hr.expense.sheet.register.payment.wizard' + + @api.multi + def expense_post_payment(self): + self = self.with_context(use_hr_expense_invoice=True) + return super().expense_post_payment() From 27d244778d011c0c7081ea75244a0d0064504f08 Mon Sep 17 00:00:00 2001 From: Maria Sparenberg Date: Fri, 12 Jul 2019 12:32:35 +0000 Subject: [PATCH 11/69] Translated using Weblate (German) Currently translated at 100.0% (4 of 4 strings) Translation: hr-12.0/hr-12.0-hr_expense_invoice Translate-URL: https://translation.odoo-community.org/projects/hr-12-0/hr-12-0-hr_expense_invoice/de/ --- hr_expense_invoice/i18n/de.po | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/hr_expense_invoice/i18n/de.po b/hr_expense_invoice/i18n/de.po index 8360545df..5b114cf26 100644 --- a/hr_expense_invoice/i18n/de.po +++ b/hr_expense_invoice/i18n/de.po @@ -6,7 +6,7 @@ msgid "" msgstr "" "Project-Id-Version: Odoo Server 11.0\n" "Report-Msgid-Bugs-To: \n" -"PO-Revision-Date: 2018-12-18 13:07+0000\n" +"PO-Revision-Date: 2019-07-12 14:43+0000\n" "Last-Translator: Maria Sparenberg \n" "Language-Team: none\n" "Language: de\n" @@ -14,7 +14,7 @@ msgstr "" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: \n" "Plural-Forms: nplurals=2; plural=n != 1;\n" -"X-Generator: Weblate 3.3\n" +"X-Generator: Weblate 3.7.1\n" #. module: hr_expense_invoice #: code:addons/hr_expense_invoice/models/hr_expense_sheet.py:40 @@ -40,7 +40,7 @@ msgstr "Spesen-Bericht" #. module: hr_expense_invoice #: model:ir.model.fields,field_description:hr_expense_invoice.field_hr_expense__invoice_id msgid "Vendor Bill" -msgstr "" +msgstr "Lieferantenrechnung" #~ msgid "Invoice" #~ msgstr "Rechnung" From 7dafdc4866b6fa97005af1edd4779ce0dab797ef Mon Sep 17 00:00:00 2001 From: Jaime Arroyo Date: Tue, 23 Jul 2019 09:04:07 +0000 Subject: [PATCH 12/69] Translated using Weblate (Spanish) Currently translated at 100.0% (4 of 4 strings) Translation: hr-12.0/hr-12.0-hr_expense_invoice Translate-URL: https://translation.odoo-community.org/projects/hr-12-0/hr-12-0-hr_expense_invoice/es/ [UPD] README.rst [UPD] Update hr_expense_invoice.pot [UPD] README.rst hr_expense_invoice 12.0.1.3.0 Update translation files Updated by "Update PO files to match POT (msgmerge)" hook in Weblate. Translation: hr-12.0/hr-12.0-hr_expense_invoice Translate-URL: https://translation.odoo-community.org/projects/hr-12-0/hr-12-0-hr_expense_invoice/ --- hr_expense_invoice/README.rst | 17 ++ hr_expense_invoice/__manifest__.py | 2 +- hr_expense_invoice/i18n/cs_CZ.po | 157 ++++++++++++++-- hr_expense_invoice/i18n/de.po | 159 +++++++++++++++-- hr_expense_invoice/i18n/es.po | 168 ++++++++++++++++-- hr_expense_invoice/i18n/fr.po | 156 +++++++++++++++- hr_expense_invoice/i18n/hr.po | 155 +++++++++++++++- .../i18n/hr_expense_invoice.pot | 135 +++++++++++++- hr_expense_invoice/i18n/nl_NL.po | 140 ++++++++++++++- hr_expense_invoice/i18n/pt.po | 157 ++++++++++++++-- .../static/description/index.html | 18 +- 11 files changed, 1192 insertions(+), 72 deletions(-) diff --git a/hr_expense_invoice/README.rst b/hr_expense_invoice/README.rst index b6c57ccbc..d5052a777 100644 --- a/hr_expense_invoice/README.rst +++ b/hr_expense_invoice/README.rst @@ -29,6 +29,12 @@ This module should be used when a supplier invoice is paid by an employee. It allows to set a supplier invoice for each expense line, adding the corresponding journal items to transfer the debt to the employee. +There are 2 ways to reference expense to invoice. + +1. On expense, directly select one invoice. +2. On expense report, use button "Create Vendor Bill" to create one invoice + for multiple expenses. + **Table of contents** .. contents:: @@ -37,11 +43,22 @@ corresponding journal items to transfer the debt to the employee. Usage ===== +**Reference one invoice to an expense** + * Create an expense sheet. * Add an expense line to sheet with an invoice_id selected or create one new. * Process expense sheet. * On paying expense sheet, you are reconciling supplier invoice too. +**Create one invoice to multiple expenses** + +* Create an expense sheet with one or multiple expense lines +* After approved, click button "Create Vendor Bill" +* Select multiple expense to create an invoice, and process it. +* New invoice will be create and link to the selected expense lines. +* Validate newly create invoice. +* On paying expense sheet, you are reconciling supplier invoice(s) too. + Known issues / Roadmap ====================== diff --git a/hr_expense_invoice/__manifest__.py b/hr_expense_invoice/__manifest__.py index b9a2fe3db..7309d3d8d 100644 --- a/hr_expense_invoice/__manifest__.py +++ b/hr_expense_invoice/__manifest__.py @@ -4,7 +4,7 @@ { 'name': 'Supplier invoices on HR expenses', - 'version': '12.0.1.2.0', + 'version': '12.0.1.3.0', 'category': 'Human Resources', 'author': 'Tecnativa, ' 'Odoo Community Association (OCA)', diff --git a/hr_expense_invoice/i18n/cs_CZ.po b/hr_expense_invoice/i18n/cs_CZ.po index f48ab549a..457e17e2c 100644 --- a/hr_expense_invoice/i18n/cs_CZ.po +++ b/hr_expense_invoice/i18n/cs_CZ.po @@ -20,30 +20,167 @@ msgstr "" "Plural-Forms: nplurals=3; plural=(n==1) ? 0 : (n>=2 && n<=4) ? 1 : 2;\n" #. module: hr_expense_invoice -#: code:addons/hr_expense_invoice/models/hr_expense_sheet.py:40 -#, python-format -msgid "" -"Cannot reconcile supplier invoice payable with generated line. Please check " -"amounts and see if the invoice is already added or paid. Invoice: %s" +#: model_terms:ir.ui.view,arch_db:hr_expense_invoice.hr_expense_create_invoice_form +msgid "Cancel" +msgstr "" + +#. module: hr_expense_invoice +#: model_terms:ir.ui.view,arch_db:hr_expense_invoice.hr_expense_create_invoice_form +#, fuzzy +#| msgid "Invoice" +msgid "Create Invoice" +msgstr "Faktura" + +#. module: hr_expense_invoice +#: model:ir.actions.act_window,name:hr_expense_invoice.action_expense_create_invoice +#: model_terms:ir.ui.view,arch_db:hr_expense_invoice.hr_expense_sheet_form_view_inherit_sale_expense +msgid "Create Vendor Bill" +msgstr "" + +#. module: hr_expense_invoice +#: model_terms:ir.ui.view,arch_db:hr_expense_invoice.hr_expense_create_invoice_form +msgid "Create Vendor Bill from Expense" +msgstr "" + +#. module: hr_expense_invoice +#: model:ir.model,name:hr_expense_invoice.model_hr_expense_create_invoice +msgid "Create invoice from expense report" +msgstr "" + +#. module: hr_expense_invoice +#: model:ir.model.fields,field_description:hr_expense_invoice.field_hr_expense_create_invoice__create_uid +msgid "Created by" +msgstr "" + +#. module: hr_expense_invoice +#: model:ir.model.fields,field_description:hr_expense_invoice.field_hr_expense_create_invoice__create_date +msgid "Created on" +msgstr "" + +#. module: hr_expense_invoice +#: model:ir.model.fields,field_description:hr_expense_invoice.field_hr_expense_create_invoice__display_name +msgid "Display Name" msgstr "" -"Nelze sladit dodavatelskou fakturu se zaplacenou generovanou linkou. " -"Zkontrolujte částky a zjistěte, zda již faktura již byla přidána nebo " -"zaplacena. Faktura: %s" #. module: hr_expense_invoice #: model:ir.model,name:hr_expense_invoice.model_hr_expense msgid "Expense" msgstr "Výdaje" +#. module: hr_expense_invoice +#: model:ir.model,name:hr_expense_invoice.model_hr_expense_sheet_register_payment_wizard +msgid "Expense Register Payment Wizard" +msgstr "" + #. module: hr_expense_invoice #: model:ir.model,name:hr_expense_invoice.model_hr_expense_sheet msgid "Expense Report" msgstr "Zpráva o výdajích" +#. module: hr_expense_invoice +#: model:ir.model.fields,field_description:hr_expense_invoice.field_hr_expense_create_invoice__expense_ids +#, fuzzy +#| msgid "Expense" +msgid "Expenses" +msgstr "Výdaje" + +#. module: hr_expense_invoice +#: model:ir.model.fields,field_description:hr_expense_invoice.field_hr_expense_create_invoice__id +msgid "ID" +msgstr "" + +#. module: hr_expense_invoice +#: model:ir.model.fields,field_description:hr_expense_invoice.field_hr_expense_sheet__invoice_count +#, fuzzy +#| msgid "Invoice" +msgid "Invoice Count" +msgstr "Faktura" + +#. module: hr_expense_invoice +#: model:ir.model.fields,field_description:hr_expense_invoice.field_hr_expense_sheet__invoice_fully_created +msgid "Invoice Fully Created" +msgstr "" + +#. module: hr_expense_invoice +#: code:addons/hr_expense_invoice/models/hr_expense_sheet.py:75 +#: model_terms:ir.ui.view,arch_db:hr_expense_invoice.hr_expense_sheet_form_view_inherit_sale_expense +#, fuzzy, python-format +#| msgid "Invoice" +msgid "Invoices" +msgstr "Faktura" + +#. module: hr_expense_invoice +#: model:ir.model,name:hr_expense_invoice.model_account_move_line +msgid "Journal Item" +msgstr "" + +#. module: hr_expense_invoice +#: model:ir.model.fields,field_description:hr_expense_invoice.field_hr_expense_create_invoice____last_update +msgid "Last Modified on" +msgstr "" + +#. module: hr_expense_invoice +#: model:ir.model.fields,field_description:hr_expense_invoice.field_hr_expense_create_invoice__write_uid +msgid "Last Updated by" +msgstr "" + +#. module: hr_expense_invoice +#: model:ir.model.fields,field_description:hr_expense_invoice.field_hr_expense_create_invoice__write_date +msgid "Last Updated on" +msgstr "" + +#. module: hr_expense_invoice +#: code:addons/hr_expense_invoice/wizard/expense_create_invoice.py:40 +#, python-format +msgid "No valid expenses to create invoice" +msgstr "" + +#. module: hr_expense_invoice +#: model:ir.model,name:hr_expense_invoice.model_account_payment +msgid "Payments" +msgstr "" + +#. module: hr_expense_invoice +#: model_terms:ir.ui.view,arch_db:hr_expense_invoice.hr_expense_create_invoice_form +msgid "Please select expense line to create new vendor bill:" +msgstr "" + +#. module: hr_expense_invoice +#: code:addons/hr_expense_invoice/models/account_payment.py:15 +#, python-format +msgid "Register payment on expense's invoice is not allowed" +msgstr "" + +#. module: hr_expense_invoice +#: code:addons/hr_expense_invoice/wizard/expense_create_invoice.py:23 +#, python-format +msgid "This action is allowed only in Approved sate" +msgstr "" + #. module: hr_expense_invoice #: model:ir.model.fields,field_description:hr_expense_invoice.field_hr_expense__invoice_id msgid "Vendor Bill" msgstr "" -#~ msgid "Invoice" -#~ msgstr "Faktura" +#. module: hr_expense_invoice +#: code:addons/hr_expense_invoice/models/hr_expense_sheet.py:68 +#, python-format +msgid "" +"Vendor bill amount mismatch!\n" +"Please make sure amount in vendor bills equal to amount of its expense lines" +msgstr "" + +#. module: hr_expense_invoice +#: code:addons/hr_expense_invoice/models/hr_expense.py:26 +#: code:addons/hr_expense_invoice/models/hr_expense_sheet.py:62 +#, python-format +msgid "Vendor bill state must be Open" +msgstr "" + +#~ msgid "" +#~ "Cannot reconcile supplier invoice payable with generated line. Please " +#~ "check amounts and see if the invoice is already added or paid. Invoice: %s" +#~ msgstr "" +#~ "Nelze sladit dodavatelskou fakturu se zaplacenou generovanou linkou. " +#~ "Zkontrolujte částky a zjistěte, zda již faktura již byla přidána nebo " +#~ "zaplacena. Faktura: %s" diff --git a/hr_expense_invoice/i18n/de.po b/hr_expense_invoice/i18n/de.po index 5b114cf26..491705758 100644 --- a/hr_expense_invoice/i18n/de.po +++ b/hr_expense_invoice/i18n/de.po @@ -17,30 +17,169 @@ msgstr "" "X-Generator: Weblate 3.7.1\n" #. module: hr_expense_invoice -#: code:addons/hr_expense_invoice/models/hr_expense_sheet.py:40 -#, python-format -msgid "" -"Cannot reconcile supplier invoice payable with generated line. Please check " -"amounts and see if the invoice is already added or paid. Invoice: %s" +#: model_terms:ir.ui.view,arch_db:hr_expense_invoice.hr_expense_create_invoice_form +msgid "Cancel" +msgstr "" + +#. module: hr_expense_invoice +#: model_terms:ir.ui.view,arch_db:hr_expense_invoice.hr_expense_create_invoice_form +#, fuzzy +#| msgid "Invoice" +msgid "Create Invoice" +msgstr "Rechnung" + +#. module: hr_expense_invoice +#: model:ir.actions.act_window,name:hr_expense_invoice.action_expense_create_invoice +#: model_terms:ir.ui.view,arch_db:hr_expense_invoice.hr_expense_sheet_form_view_inherit_sale_expense +#, fuzzy +#| msgid "Vendor Bill" +msgid "Create Vendor Bill" +msgstr "Lieferantenrechnung" + +#. module: hr_expense_invoice +#: model_terms:ir.ui.view,arch_db:hr_expense_invoice.hr_expense_create_invoice_form +msgid "Create Vendor Bill from Expense" +msgstr "" + +#. module: hr_expense_invoice +#: model:ir.model,name:hr_expense_invoice.model_hr_expense_create_invoice +msgid "Create invoice from expense report" +msgstr "" + +#. module: hr_expense_invoice +#: model:ir.model.fields,field_description:hr_expense_invoice.field_hr_expense_create_invoice__create_uid +msgid "Created by" +msgstr "" + +#. module: hr_expense_invoice +#: model:ir.model.fields,field_description:hr_expense_invoice.field_hr_expense_create_invoice__create_date +msgid "Created on" +msgstr "" + +#. module: hr_expense_invoice +#: model:ir.model.fields,field_description:hr_expense_invoice.field_hr_expense_create_invoice__display_name +msgid "Display Name" msgstr "" -"Der zu zahlende Restbetrag der Rechnung kann nicht mit der erstellten Zeile " -"abgeglichen werden. Bitte prüfen Sie die Mengen und ob die Rechnung schon " -"hinzugefügt oder bezahlt wurde. Rechnung: %s" #. module: hr_expense_invoice #: model:ir.model,name:hr_expense_invoice.model_hr_expense msgid "Expense" msgstr "Spesen" +#. module: hr_expense_invoice +#: model:ir.model,name:hr_expense_invoice.model_hr_expense_sheet_register_payment_wizard +msgid "Expense Register Payment Wizard" +msgstr "" + #. module: hr_expense_invoice #: model:ir.model,name:hr_expense_invoice.model_hr_expense_sheet msgid "Expense Report" msgstr "Spesen-Bericht" +#. module: hr_expense_invoice +#: model:ir.model.fields,field_description:hr_expense_invoice.field_hr_expense_create_invoice__expense_ids +#, fuzzy +#| msgid "Expense" +msgid "Expenses" +msgstr "Spesen" + +#. module: hr_expense_invoice +#: model:ir.model.fields,field_description:hr_expense_invoice.field_hr_expense_create_invoice__id +msgid "ID" +msgstr "" + +#. module: hr_expense_invoice +#: model:ir.model.fields,field_description:hr_expense_invoice.field_hr_expense_sheet__invoice_count +#, fuzzy +#| msgid "Invoice" +msgid "Invoice Count" +msgstr "Rechnung" + +#. module: hr_expense_invoice +#: model:ir.model.fields,field_description:hr_expense_invoice.field_hr_expense_sheet__invoice_fully_created +msgid "Invoice Fully Created" +msgstr "" + +#. module: hr_expense_invoice +#: code:addons/hr_expense_invoice/models/hr_expense_sheet.py:75 +#: model_terms:ir.ui.view,arch_db:hr_expense_invoice.hr_expense_sheet_form_view_inherit_sale_expense +#, fuzzy, python-format +#| msgid "Invoice" +msgid "Invoices" +msgstr "Rechnung" + +#. module: hr_expense_invoice +#: model:ir.model,name:hr_expense_invoice.model_account_move_line +msgid "Journal Item" +msgstr "" + +#. module: hr_expense_invoice +#: model:ir.model.fields,field_description:hr_expense_invoice.field_hr_expense_create_invoice____last_update +msgid "Last Modified on" +msgstr "" + +#. module: hr_expense_invoice +#: model:ir.model.fields,field_description:hr_expense_invoice.field_hr_expense_create_invoice__write_uid +msgid "Last Updated by" +msgstr "" + +#. module: hr_expense_invoice +#: model:ir.model.fields,field_description:hr_expense_invoice.field_hr_expense_create_invoice__write_date +msgid "Last Updated on" +msgstr "" + +#. module: hr_expense_invoice +#: code:addons/hr_expense_invoice/wizard/expense_create_invoice.py:40 +#, python-format +msgid "No valid expenses to create invoice" +msgstr "" + +#. module: hr_expense_invoice +#: model:ir.model,name:hr_expense_invoice.model_account_payment +msgid "Payments" +msgstr "" + +#. module: hr_expense_invoice +#: model_terms:ir.ui.view,arch_db:hr_expense_invoice.hr_expense_create_invoice_form +msgid "Please select expense line to create new vendor bill:" +msgstr "" + +#. module: hr_expense_invoice +#: code:addons/hr_expense_invoice/models/account_payment.py:15 +#, python-format +msgid "Register payment on expense's invoice is not allowed" +msgstr "" + +#. module: hr_expense_invoice +#: code:addons/hr_expense_invoice/wizard/expense_create_invoice.py:23 +#, python-format +msgid "This action is allowed only in Approved sate" +msgstr "" + #. module: hr_expense_invoice #: model:ir.model.fields,field_description:hr_expense_invoice.field_hr_expense__invoice_id msgid "Vendor Bill" msgstr "Lieferantenrechnung" -#~ msgid "Invoice" -#~ msgstr "Rechnung" +#. module: hr_expense_invoice +#: code:addons/hr_expense_invoice/models/hr_expense_sheet.py:68 +#, python-format +msgid "" +"Vendor bill amount mismatch!\n" +"Please make sure amount in vendor bills equal to amount of its expense lines" +msgstr "" + +#. module: hr_expense_invoice +#: code:addons/hr_expense_invoice/models/hr_expense.py:26 +#: code:addons/hr_expense_invoice/models/hr_expense_sheet.py:62 +#, python-format +msgid "Vendor bill state must be Open" +msgstr "" + +#~ msgid "" +#~ "Cannot reconcile supplier invoice payable with generated line. Please " +#~ "check amounts and see if the invoice is already added or paid. Invoice: %s" +#~ msgstr "" +#~ "Der zu zahlende Restbetrag der Rechnung kann nicht mit der erstellten " +#~ "Zeile abgeglichen werden. Bitte prüfen Sie die Mengen und ob die Rechnung " +#~ "schon hinzugefügt oder bezahlt wurde. Rechnung: %s" diff --git a/hr_expense_invoice/i18n/es.po b/hr_expense_invoice/i18n/es.po index 2e98fadc7..5177d3c2c 100644 --- a/hr_expense_invoice/i18n/es.po +++ b/hr_expense_invoice/i18n/es.po @@ -7,40 +7,180 @@ msgstr "" "Project-Id-Version: Odoo Server 10.0\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2017-09-27 16:34+0000\n" -"PO-Revision-Date: 2017-09-27 16:34+0000\n" -"Last-Translator: <>\n" +"PO-Revision-Date: 2019-07-23 11:43+0000\n" +"Last-Translator: Jaime Arroyo \n" "Language-Team: \n" -"Language: \n" +"Language: es\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: \n" -"Plural-Forms: \n" +"Plural-Forms: nplurals=2; plural=n != 1;\n" +"X-Generator: Weblate 3.7.1\n" #. module: hr_expense_invoice -#: code:addons/hr_expense_invoice/models/hr_expense_sheet.py:40 -#, python-format -msgid "" -"Cannot reconcile supplier invoice payable with generated line. Please check " -"amounts and see if the invoice is already added or paid. Invoice: %s" +#: model_terms:ir.ui.view,arch_db:hr_expense_invoice.hr_expense_create_invoice_form +msgid "Cancel" +msgstr "" + +#. module: hr_expense_invoice +#: model_terms:ir.ui.view,arch_db:hr_expense_invoice.hr_expense_create_invoice_form +#, fuzzy +#| msgid "Invoice" +msgid "Create Invoice" +msgstr "Factura" + +#. module: hr_expense_invoice +#: model:ir.actions.act_window,name:hr_expense_invoice.action_expense_create_invoice +#: model_terms:ir.ui.view,arch_db:hr_expense_invoice.hr_expense_sheet_form_view_inherit_sale_expense +#, fuzzy +#| msgid "Vendor Bill" +msgid "Create Vendor Bill" +msgstr "Factura de Proveedor" + +#. module: hr_expense_invoice +#: model_terms:ir.ui.view,arch_db:hr_expense_invoice.hr_expense_create_invoice_form +msgid "Create Vendor Bill from Expense" +msgstr "" + +#. module: hr_expense_invoice +#: model:ir.model,name:hr_expense_invoice.model_hr_expense_create_invoice +msgid "Create invoice from expense report" +msgstr "" + +#. module: hr_expense_invoice +#: model:ir.model.fields,field_description:hr_expense_invoice.field_hr_expense_create_invoice__create_uid +msgid "Created by" +msgstr "" + +#. module: hr_expense_invoice +#: model:ir.model.fields,field_description:hr_expense_invoice.field_hr_expense_create_invoice__create_date +msgid "Created on" +msgstr "" + +#. module: hr_expense_invoice +#: model:ir.model.fields,field_description:hr_expense_invoice.field_hr_expense_create_invoice__display_name +msgid "Display Name" msgstr "" -"No se puede conciliar el saldo a pagar de la factura con la línea generada. " -"Compruebe por favor las cantidades y vea si la factura ya está añadida " -"previamente o pagada. Factura: %s" #. module: hr_expense_invoice #: model:ir.model,name:hr_expense_invoice.model_hr_expense msgid "Expense" msgstr "Gasto" +#. module: hr_expense_invoice +#: model:ir.model,name:hr_expense_invoice.model_hr_expense_sheet_register_payment_wizard +msgid "Expense Register Payment Wizard" +msgstr "" + #. module: hr_expense_invoice #: model:ir.model,name:hr_expense_invoice.model_hr_expense_sheet msgid "Expense Report" msgstr "Informe de gastos" +#. module: hr_expense_invoice +#: model:ir.model.fields,field_description:hr_expense_invoice.field_hr_expense_create_invoice__expense_ids +#, fuzzy +#| msgid "Expense" +msgid "Expenses" +msgstr "Gasto" + +#. module: hr_expense_invoice +#: model:ir.model.fields,field_description:hr_expense_invoice.field_hr_expense_create_invoice__id +msgid "ID" +msgstr "" + +#. module: hr_expense_invoice +#: model:ir.model.fields,field_description:hr_expense_invoice.field_hr_expense_sheet__invoice_count +#, fuzzy +#| msgid "Invoice" +msgid "Invoice Count" +msgstr "Factura" + +#. module: hr_expense_invoice +#: model:ir.model.fields,field_description:hr_expense_invoice.field_hr_expense_sheet__invoice_fully_created +msgid "Invoice Fully Created" +msgstr "" + +#. module: hr_expense_invoice +#: code:addons/hr_expense_invoice/models/hr_expense_sheet.py:75 +#: model_terms:ir.ui.view,arch_db:hr_expense_invoice.hr_expense_sheet_form_view_inherit_sale_expense +#, fuzzy, python-format +#| msgid "Invoice" +msgid "Invoices" +msgstr "Factura" + +#. module: hr_expense_invoice +#: model:ir.model,name:hr_expense_invoice.model_account_move_line +msgid "Journal Item" +msgstr "" + +#. module: hr_expense_invoice +#: model:ir.model.fields,field_description:hr_expense_invoice.field_hr_expense_create_invoice____last_update +msgid "Last Modified on" +msgstr "" + +#. module: hr_expense_invoice +#: model:ir.model.fields,field_description:hr_expense_invoice.field_hr_expense_create_invoice__write_uid +msgid "Last Updated by" +msgstr "" + +#. module: hr_expense_invoice +#: model:ir.model.fields,field_description:hr_expense_invoice.field_hr_expense_create_invoice__write_date +msgid "Last Updated on" +msgstr "" + +#. module: hr_expense_invoice +#: code:addons/hr_expense_invoice/wizard/expense_create_invoice.py:40 +#, python-format +msgid "No valid expenses to create invoice" +msgstr "" + +#. module: hr_expense_invoice +#: model:ir.model,name:hr_expense_invoice.model_account_payment +msgid "Payments" +msgstr "" + +#. module: hr_expense_invoice +#: model_terms:ir.ui.view,arch_db:hr_expense_invoice.hr_expense_create_invoice_form +msgid "Please select expense line to create new vendor bill:" +msgstr "" + +#. module: hr_expense_invoice +#: code:addons/hr_expense_invoice/models/account_payment.py:15 +#, python-format +msgid "Register payment on expense's invoice is not allowed" +msgstr "" + +#. module: hr_expense_invoice +#: code:addons/hr_expense_invoice/wizard/expense_create_invoice.py:23 +#, python-format +msgid "This action is allowed only in Approved sate" +msgstr "" + #. module: hr_expense_invoice #: model:ir.model.fields,field_description:hr_expense_invoice.field_hr_expense__invoice_id msgid "Vendor Bill" +msgstr "Factura de Proveedor" + +#. module: hr_expense_invoice +#: code:addons/hr_expense_invoice/models/hr_expense_sheet.py:68 +#, python-format +msgid "" +"Vendor bill amount mismatch!\n" +"Please make sure amount in vendor bills equal to amount of its expense lines" +msgstr "" + +#. module: hr_expense_invoice +#: code:addons/hr_expense_invoice/models/hr_expense.py:26 +#: code:addons/hr_expense_invoice/models/hr_expense_sheet.py:62 +#, python-format +msgid "Vendor bill state must be Open" msgstr "" -#~ msgid "Invoice" -#~ msgstr "Factura" +#~ msgid "" +#~ "Cannot reconcile supplier invoice payable with generated line. Please " +#~ "check amounts and see if the invoice is already added or paid. Invoice: %s" +#~ msgstr "" +#~ "No se puede conciliar el saldo a pagar de la factura con la línea " +#~ "generada. Compruebe por favor las cantidades y vea si la factura ya está " +#~ "añadida previamente o pagada. Factura: %s" diff --git a/hr_expense_invoice/i18n/fr.po b/hr_expense_invoice/i18n/fr.po index 7b6e9d02d..192df4522 100644 --- a/hr_expense_invoice/i18n/fr.po +++ b/hr_expense_invoice/i18n/fr.po @@ -20,29 +20,167 @@ msgstr "" "Plural-Forms: nplurals=2; plural=(n > 1);\n" #. module: hr_expense_invoice -#: code:addons/hr_expense_invoice/models/hr_expense_sheet.py:40 -#, python-format -msgid "" -"Cannot reconcile supplier invoice payable with generated line. Please check " -"amounts and see if the invoice is already added or paid. Invoice: %s" +#: model_terms:ir.ui.view,arch_db:hr_expense_invoice.hr_expense_create_invoice_form +msgid "Cancel" +msgstr "" + +#. module: hr_expense_invoice +#: model_terms:ir.ui.view,arch_db:hr_expense_invoice.hr_expense_create_invoice_form +#, fuzzy +#| msgid "Invoice" +msgid "Create Invoice" +msgstr "Facture" + +#. module: hr_expense_invoice +#: model:ir.actions.act_window,name:hr_expense_invoice.action_expense_create_invoice +#: model_terms:ir.ui.view,arch_db:hr_expense_invoice.hr_expense_sheet_form_view_inherit_sale_expense +msgid "Create Vendor Bill" +msgstr "" + +#. module: hr_expense_invoice +#: model_terms:ir.ui.view,arch_db:hr_expense_invoice.hr_expense_create_invoice_form +msgid "Create Vendor Bill from Expense" +msgstr "" + +#. module: hr_expense_invoice +#: model:ir.model,name:hr_expense_invoice.model_hr_expense_create_invoice +msgid "Create invoice from expense report" +msgstr "" + +#. module: hr_expense_invoice +#: model:ir.model.fields,field_description:hr_expense_invoice.field_hr_expense_create_invoice__create_uid +msgid "Created by" +msgstr "" + +#. module: hr_expense_invoice +#: model:ir.model.fields,field_description:hr_expense_invoice.field_hr_expense_create_invoice__create_date +msgid "Created on" +msgstr "" + +#. module: hr_expense_invoice +#: model:ir.model.fields,field_description:hr_expense_invoice.field_hr_expense_create_invoice__display_name +msgid "Display Name" msgstr "" -"Impossible de réconcilier la facture fournisseur avec la ligne générée. " -"Vérifiez le montant et si la facture est déjà ajoutée ou payée. Facture: %s" #. module: hr_expense_invoice #: model:ir.model,name:hr_expense_invoice.model_hr_expense msgid "Expense" msgstr "Note de frais" +#. module: hr_expense_invoice +#: model:ir.model,name:hr_expense_invoice.model_hr_expense_sheet_register_payment_wizard +msgid "Expense Register Payment Wizard" +msgstr "" + #. module: hr_expense_invoice #: model:ir.model,name:hr_expense_invoice.model_hr_expense_sheet msgid "Expense Report" msgstr "Rapport de dépenses" +#. module: hr_expense_invoice +#: model:ir.model.fields,field_description:hr_expense_invoice.field_hr_expense_create_invoice__expense_ids +#, fuzzy +#| msgid "Expense" +msgid "Expenses" +msgstr "Note de frais" + +#. module: hr_expense_invoice +#: model:ir.model.fields,field_description:hr_expense_invoice.field_hr_expense_create_invoice__id +msgid "ID" +msgstr "" + +#. module: hr_expense_invoice +#: model:ir.model.fields,field_description:hr_expense_invoice.field_hr_expense_sheet__invoice_count +#, fuzzy +#| msgid "Invoice" +msgid "Invoice Count" +msgstr "Facture" + +#. module: hr_expense_invoice +#: model:ir.model.fields,field_description:hr_expense_invoice.field_hr_expense_sheet__invoice_fully_created +msgid "Invoice Fully Created" +msgstr "" + +#. module: hr_expense_invoice +#: code:addons/hr_expense_invoice/models/hr_expense_sheet.py:75 +#: model_terms:ir.ui.view,arch_db:hr_expense_invoice.hr_expense_sheet_form_view_inherit_sale_expense +#, fuzzy, python-format +#| msgid "Invoice" +msgid "Invoices" +msgstr "Facture" + +#. module: hr_expense_invoice +#: model:ir.model,name:hr_expense_invoice.model_account_move_line +msgid "Journal Item" +msgstr "" + +#. module: hr_expense_invoice +#: model:ir.model.fields,field_description:hr_expense_invoice.field_hr_expense_create_invoice____last_update +msgid "Last Modified on" +msgstr "" + +#. module: hr_expense_invoice +#: model:ir.model.fields,field_description:hr_expense_invoice.field_hr_expense_create_invoice__write_uid +msgid "Last Updated by" +msgstr "" + +#. module: hr_expense_invoice +#: model:ir.model.fields,field_description:hr_expense_invoice.field_hr_expense_create_invoice__write_date +msgid "Last Updated on" +msgstr "" + +#. module: hr_expense_invoice +#: code:addons/hr_expense_invoice/wizard/expense_create_invoice.py:40 +#, python-format +msgid "No valid expenses to create invoice" +msgstr "" + +#. module: hr_expense_invoice +#: model:ir.model,name:hr_expense_invoice.model_account_payment +msgid "Payments" +msgstr "" + +#. module: hr_expense_invoice +#: model_terms:ir.ui.view,arch_db:hr_expense_invoice.hr_expense_create_invoice_form +msgid "Please select expense line to create new vendor bill:" +msgstr "" + +#. module: hr_expense_invoice +#: code:addons/hr_expense_invoice/models/account_payment.py:15 +#, python-format +msgid "Register payment on expense's invoice is not allowed" +msgstr "" + +#. module: hr_expense_invoice +#: code:addons/hr_expense_invoice/wizard/expense_create_invoice.py:23 +#, python-format +msgid "This action is allowed only in Approved sate" +msgstr "" + #. module: hr_expense_invoice #: model:ir.model.fields,field_description:hr_expense_invoice.field_hr_expense__invoice_id msgid "Vendor Bill" msgstr "" -#~ msgid "Invoice" -#~ msgstr "Facture" +#. module: hr_expense_invoice +#: code:addons/hr_expense_invoice/models/hr_expense_sheet.py:68 +#, python-format +msgid "" +"Vendor bill amount mismatch!\n" +"Please make sure amount in vendor bills equal to amount of its expense lines" +msgstr "" + +#. module: hr_expense_invoice +#: code:addons/hr_expense_invoice/models/hr_expense.py:26 +#: code:addons/hr_expense_invoice/models/hr_expense_sheet.py:62 +#, python-format +msgid "Vendor bill state must be Open" +msgstr "" + +#~ msgid "" +#~ "Cannot reconcile supplier invoice payable with generated line. Please " +#~ "check amounts and see if the invoice is already added or paid. Invoice: %s" +#~ msgstr "" +#~ "Impossible de réconcilier la facture fournisseur avec la ligne générée. " +#~ "Vérifiez le montant et si la facture est déjà ajoutée ou payée. Facture: " +#~ "%s" diff --git a/hr_expense_invoice/i18n/hr.po b/hr_expense_invoice/i18n/hr.po index 483539569..b6bdca336 100644 --- a/hr_expense_invoice/i18n/hr.po +++ b/hr_expense_invoice/i18n/hr.po @@ -20,29 +20,166 @@ msgstr "" "%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2;\n" #. module: hr_expense_invoice -#: code:addons/hr_expense_invoice/models/hr_expense_sheet.py:40 -#, python-format -msgid "" -"Cannot reconcile supplier invoice payable with generated line. Please check " -"amounts and see if the invoice is already added or paid. Invoice: %s" +#: model_terms:ir.ui.view,arch_db:hr_expense_invoice.hr_expense_create_invoice_form +msgid "Cancel" +msgstr "" + +#. module: hr_expense_invoice +#: model_terms:ir.ui.view,arch_db:hr_expense_invoice.hr_expense_create_invoice_form +#, fuzzy +#| msgid "Invoice" +msgid "Create Invoice" +msgstr "Račun" + +#. module: hr_expense_invoice +#: model:ir.actions.act_window,name:hr_expense_invoice.action_expense_create_invoice +#: model_terms:ir.ui.view,arch_db:hr_expense_invoice.hr_expense_sheet_form_view_inherit_sale_expense +msgid "Create Vendor Bill" +msgstr "" + +#. module: hr_expense_invoice +#: model_terms:ir.ui.view,arch_db:hr_expense_invoice.hr_expense_create_invoice_form +msgid "Create Vendor Bill from Expense" +msgstr "" + +#. module: hr_expense_invoice +#: model:ir.model,name:hr_expense_invoice.model_hr_expense_create_invoice +msgid "Create invoice from expense report" +msgstr "" + +#. module: hr_expense_invoice +#: model:ir.model.fields,field_description:hr_expense_invoice.field_hr_expense_create_invoice__create_uid +msgid "Created by" +msgstr "" + +#. module: hr_expense_invoice +#: model:ir.model.fields,field_description:hr_expense_invoice.field_hr_expense_create_invoice__create_date +msgid "Created on" +msgstr "" + +#. module: hr_expense_invoice +#: model:ir.model.fields,field_description:hr_expense_invoice.field_hr_expense_create_invoice__display_name +msgid "Display Name" msgstr "" -"Nije moguće zatvaranje računa dobavljača sa generiranom stavkom. Molimo " -"provjerite iznose i plaćanja: %s" #. module: hr_expense_invoice #: model:ir.model,name:hr_expense_invoice.model_hr_expense msgid "Expense" msgstr "Trošak" +#. module: hr_expense_invoice +#: model:ir.model,name:hr_expense_invoice.model_hr_expense_sheet_register_payment_wizard +msgid "Expense Register Payment Wizard" +msgstr "" + #. module: hr_expense_invoice #: model:ir.model,name:hr_expense_invoice.model_hr_expense_sheet msgid "Expense Report" msgstr "Izvještaj troškova" +#. module: hr_expense_invoice +#: model:ir.model.fields,field_description:hr_expense_invoice.field_hr_expense_create_invoice__expense_ids +#, fuzzy +#| msgid "Expense" +msgid "Expenses" +msgstr "Trošak" + +#. module: hr_expense_invoice +#: model:ir.model.fields,field_description:hr_expense_invoice.field_hr_expense_create_invoice__id +msgid "ID" +msgstr "" + +#. module: hr_expense_invoice +#: model:ir.model.fields,field_description:hr_expense_invoice.field_hr_expense_sheet__invoice_count +#, fuzzy +#| msgid "Invoice" +msgid "Invoice Count" +msgstr "Račun" + +#. module: hr_expense_invoice +#: model:ir.model.fields,field_description:hr_expense_invoice.field_hr_expense_sheet__invoice_fully_created +msgid "Invoice Fully Created" +msgstr "" + +#. module: hr_expense_invoice +#: code:addons/hr_expense_invoice/models/hr_expense_sheet.py:75 +#: model_terms:ir.ui.view,arch_db:hr_expense_invoice.hr_expense_sheet_form_view_inherit_sale_expense +#, fuzzy, python-format +#| msgid "Invoice" +msgid "Invoices" +msgstr "Račun" + +#. module: hr_expense_invoice +#: model:ir.model,name:hr_expense_invoice.model_account_move_line +msgid "Journal Item" +msgstr "" + +#. module: hr_expense_invoice +#: model:ir.model.fields,field_description:hr_expense_invoice.field_hr_expense_create_invoice____last_update +msgid "Last Modified on" +msgstr "" + +#. module: hr_expense_invoice +#: model:ir.model.fields,field_description:hr_expense_invoice.field_hr_expense_create_invoice__write_uid +msgid "Last Updated by" +msgstr "" + +#. module: hr_expense_invoice +#: model:ir.model.fields,field_description:hr_expense_invoice.field_hr_expense_create_invoice__write_date +msgid "Last Updated on" +msgstr "" + +#. module: hr_expense_invoice +#: code:addons/hr_expense_invoice/wizard/expense_create_invoice.py:40 +#, python-format +msgid "No valid expenses to create invoice" +msgstr "" + +#. module: hr_expense_invoice +#: model:ir.model,name:hr_expense_invoice.model_account_payment +msgid "Payments" +msgstr "" + +#. module: hr_expense_invoice +#: model_terms:ir.ui.view,arch_db:hr_expense_invoice.hr_expense_create_invoice_form +msgid "Please select expense line to create new vendor bill:" +msgstr "" + +#. module: hr_expense_invoice +#: code:addons/hr_expense_invoice/models/account_payment.py:15 +#, python-format +msgid "Register payment on expense's invoice is not allowed" +msgstr "" + +#. module: hr_expense_invoice +#: code:addons/hr_expense_invoice/wizard/expense_create_invoice.py:23 +#, python-format +msgid "This action is allowed only in Approved sate" +msgstr "" + #. module: hr_expense_invoice #: model:ir.model.fields,field_description:hr_expense_invoice.field_hr_expense__invoice_id msgid "Vendor Bill" msgstr "" -#~ msgid "Invoice" -#~ msgstr "Račun" +#. module: hr_expense_invoice +#: code:addons/hr_expense_invoice/models/hr_expense_sheet.py:68 +#, python-format +msgid "" +"Vendor bill amount mismatch!\n" +"Please make sure amount in vendor bills equal to amount of its expense lines" +msgstr "" + +#. module: hr_expense_invoice +#: code:addons/hr_expense_invoice/models/hr_expense.py:26 +#: code:addons/hr_expense_invoice/models/hr_expense_sheet.py:62 +#, python-format +msgid "Vendor bill state must be Open" +msgstr "" + +#~ msgid "" +#~ "Cannot reconcile supplier invoice payable with generated line. Please " +#~ "check amounts and see if the invoice is already added or paid. Invoice: %s" +#~ msgstr "" +#~ "Nije moguće zatvaranje računa dobavljača sa generiranom stavkom. Molimo " +#~ "provjerite iznose i plaćanja: %s" diff --git a/hr_expense_invoice/i18n/hr_expense_invoice.pot b/hr_expense_invoice/i18n/hr_expense_invoice.pot index 32bb6be5e..c5378afde 100644 --- a/hr_expense_invoice/i18n/hr_expense_invoice.pot +++ b/hr_expense_invoice/i18n/hr_expense_invoice.pot @@ -14,9 +14,44 @@ msgstr "" "Plural-Forms: \n" #. module: hr_expense_invoice -#: code:addons/hr_expense_invoice/models/hr_expense_sheet.py:40 -#, python-format -msgid "Cannot reconcile supplier invoice payable with generated line. Please check amounts and see if the invoice is already added or paid. Invoice: %s" +#: model_terms:ir.ui.view,arch_db:hr_expense_invoice.hr_expense_create_invoice_form +msgid "Cancel" +msgstr "" + +#. module: hr_expense_invoice +#: model_terms:ir.ui.view,arch_db:hr_expense_invoice.hr_expense_create_invoice_form +msgid "Create Invoice" +msgstr "" + +#. module: hr_expense_invoice +#: model:ir.actions.act_window,name:hr_expense_invoice.action_expense_create_invoice +#: model_terms:ir.ui.view,arch_db:hr_expense_invoice.hr_expense_sheet_form_view_inherit_sale_expense +msgid "Create Vendor Bill" +msgstr "" + +#. module: hr_expense_invoice +#: model_terms:ir.ui.view,arch_db:hr_expense_invoice.hr_expense_create_invoice_form +msgid "Create Vendor Bill from Expense" +msgstr "" + +#. module: hr_expense_invoice +#: model:ir.model,name:hr_expense_invoice.model_hr_expense_create_invoice +msgid "Create invoice from expense report" +msgstr "" + +#. module: hr_expense_invoice +#: model:ir.model.fields,field_description:hr_expense_invoice.field_hr_expense_create_invoice__create_uid +msgid "Created by" +msgstr "" + +#. module: hr_expense_invoice +#: model:ir.model.fields,field_description:hr_expense_invoice.field_hr_expense_create_invoice__create_date +msgid "Created on" +msgstr "" + +#. module: hr_expense_invoice +#: model:ir.model.fields,field_description:hr_expense_invoice.field_hr_expense_create_invoice__display_name +msgid "Display Name" msgstr "" #. module: hr_expense_invoice @@ -24,13 +59,107 @@ msgstr "" msgid "Expense" msgstr "" +#. module: hr_expense_invoice +#: model:ir.model,name:hr_expense_invoice.model_hr_expense_sheet_register_payment_wizard +msgid "Expense Register Payment Wizard" +msgstr "" + #. module: hr_expense_invoice #: model:ir.model,name:hr_expense_invoice.model_hr_expense_sheet msgid "Expense Report" msgstr "" +#. module: hr_expense_invoice +#: model:ir.model.fields,field_description:hr_expense_invoice.field_hr_expense_create_invoice__expense_ids +msgid "Expenses" +msgstr "" + +#. module: hr_expense_invoice +#: model:ir.model.fields,field_description:hr_expense_invoice.field_hr_expense_create_invoice__id +msgid "ID" +msgstr "" + +#. module: hr_expense_invoice +#: model:ir.model.fields,field_description:hr_expense_invoice.field_hr_expense_sheet__invoice_count +msgid "Invoice Count" +msgstr "" + +#. module: hr_expense_invoice +#: model:ir.model.fields,field_description:hr_expense_invoice.field_hr_expense_sheet__invoice_fully_created +msgid "Invoice Fully Created" +msgstr "" + +#. module: hr_expense_invoice +#: code:addons/hr_expense_invoice/models/hr_expense_sheet.py:75 +#: model_terms:ir.ui.view,arch_db:hr_expense_invoice.hr_expense_sheet_form_view_inherit_sale_expense +#, python-format +msgid "Invoices" +msgstr "" + +#. module: hr_expense_invoice +#: model:ir.model,name:hr_expense_invoice.model_account_move_line +msgid "Journal Item" +msgstr "" + +#. module: hr_expense_invoice +#: model:ir.model.fields,field_description:hr_expense_invoice.field_hr_expense_create_invoice____last_update +msgid "Last Modified on" +msgstr "" + +#. module: hr_expense_invoice +#: model:ir.model.fields,field_description:hr_expense_invoice.field_hr_expense_create_invoice__write_uid +msgid "Last Updated by" +msgstr "" + +#. module: hr_expense_invoice +#: model:ir.model.fields,field_description:hr_expense_invoice.field_hr_expense_create_invoice__write_date +msgid "Last Updated on" +msgstr "" + +#. module: hr_expense_invoice +#: code:addons/hr_expense_invoice/wizard/expense_create_invoice.py:40 +#, python-format +msgid "No valid expenses to create invoice" +msgstr "" + +#. module: hr_expense_invoice +#: model:ir.model,name:hr_expense_invoice.model_account_payment +msgid "Payments" +msgstr "" + +#. module: hr_expense_invoice +#: model_terms:ir.ui.view,arch_db:hr_expense_invoice.hr_expense_create_invoice_form +msgid "Please select expense line to create new vendor bill:" +msgstr "" + +#. module: hr_expense_invoice +#: code:addons/hr_expense_invoice/models/account_payment.py:15 +#, python-format +msgid "Register payment on expense's invoice is not allowed" +msgstr "" + +#. module: hr_expense_invoice +#: code:addons/hr_expense_invoice/wizard/expense_create_invoice.py:23 +#, python-format +msgid "This action is allowed only in Approved sate" +msgstr "" + #. module: hr_expense_invoice #: model:ir.model.fields,field_description:hr_expense_invoice.field_hr_expense__invoice_id msgid "Vendor Bill" msgstr "" +#. module: hr_expense_invoice +#: code:addons/hr_expense_invoice/models/hr_expense_sheet.py:68 +#, python-format +msgid "Vendor bill amount mismatch!\n" +"Please make sure amount in vendor bills equal to amount of its expense lines" +msgstr "" + +#. module: hr_expense_invoice +#: code:addons/hr_expense_invoice/models/hr_expense.py:26 +#: code:addons/hr_expense_invoice/models/hr_expense_sheet.py:62 +#, python-format +msgid "Vendor bill state must be Open" +msgstr "" + diff --git a/hr_expense_invoice/i18n/nl_NL.po b/hr_expense_invoice/i18n/nl_NL.po index 33b69366c..30516f69a 100644 --- a/hr_expense_invoice/i18n/nl_NL.po +++ b/hr_expense_invoice/i18n/nl_NL.po @@ -20,11 +20,44 @@ msgstr "" "Plural-Forms: nplurals=2; plural=(n != 1);\n" #. module: hr_expense_invoice -#: code:addons/hr_expense_invoice/models/hr_expense_sheet.py:40 -#, python-format -msgid "" -"Cannot reconcile supplier invoice payable with generated line. Please check " -"amounts and see if the invoice is already added or paid. Invoice: %s" +#: model_terms:ir.ui.view,arch_db:hr_expense_invoice.hr_expense_create_invoice_form +msgid "Cancel" +msgstr "" + +#. module: hr_expense_invoice +#: model_terms:ir.ui.view,arch_db:hr_expense_invoice.hr_expense_create_invoice_form +msgid "Create Invoice" +msgstr "" + +#. module: hr_expense_invoice +#: model:ir.actions.act_window,name:hr_expense_invoice.action_expense_create_invoice +#: model_terms:ir.ui.view,arch_db:hr_expense_invoice.hr_expense_sheet_form_view_inherit_sale_expense +msgid "Create Vendor Bill" +msgstr "" + +#. module: hr_expense_invoice +#: model_terms:ir.ui.view,arch_db:hr_expense_invoice.hr_expense_create_invoice_form +msgid "Create Vendor Bill from Expense" +msgstr "" + +#. module: hr_expense_invoice +#: model:ir.model,name:hr_expense_invoice.model_hr_expense_create_invoice +msgid "Create invoice from expense report" +msgstr "" + +#. module: hr_expense_invoice +#: model:ir.model.fields,field_description:hr_expense_invoice.field_hr_expense_create_invoice__create_uid +msgid "Created by" +msgstr "" + +#. module: hr_expense_invoice +#: model:ir.model.fields,field_description:hr_expense_invoice.field_hr_expense_create_invoice__create_date +msgid "Created on" +msgstr "" + +#. module: hr_expense_invoice +#: model:ir.model.fields,field_description:hr_expense_invoice.field_hr_expense_create_invoice__display_name +msgid "Display Name" msgstr "" #. module: hr_expense_invoice @@ -32,12 +65,109 @@ msgstr "" msgid "Expense" msgstr "" +#. module: hr_expense_invoice +#: model:ir.model,name:hr_expense_invoice.model_hr_expense_sheet_register_payment_wizard +msgid "Expense Register Payment Wizard" +msgstr "" + #. module: hr_expense_invoice #: model:ir.model,name:hr_expense_invoice.model_hr_expense_sheet msgid "Expense Report" msgstr "Onkostennota" +#. module: hr_expense_invoice +#: model:ir.model.fields,field_description:hr_expense_invoice.field_hr_expense_create_invoice__expense_ids +#, fuzzy +#| msgid "Expense Report" +msgid "Expenses" +msgstr "Onkostennota" + +#. module: hr_expense_invoice +#: model:ir.model.fields,field_description:hr_expense_invoice.field_hr_expense_create_invoice__id +msgid "ID" +msgstr "" + +#. module: hr_expense_invoice +#: model:ir.model.fields,field_description:hr_expense_invoice.field_hr_expense_sheet__invoice_count +msgid "Invoice Count" +msgstr "" + +#. module: hr_expense_invoice +#: model:ir.model.fields,field_description:hr_expense_invoice.field_hr_expense_sheet__invoice_fully_created +msgid "Invoice Fully Created" +msgstr "" + +#. module: hr_expense_invoice +#: code:addons/hr_expense_invoice/models/hr_expense_sheet.py:75 +#: model_terms:ir.ui.view,arch_db:hr_expense_invoice.hr_expense_sheet_form_view_inherit_sale_expense +#, python-format +msgid "Invoices" +msgstr "" + +#. module: hr_expense_invoice +#: model:ir.model,name:hr_expense_invoice.model_account_move_line +msgid "Journal Item" +msgstr "" + +#. module: hr_expense_invoice +#: model:ir.model.fields,field_description:hr_expense_invoice.field_hr_expense_create_invoice____last_update +msgid "Last Modified on" +msgstr "" + +#. module: hr_expense_invoice +#: model:ir.model.fields,field_description:hr_expense_invoice.field_hr_expense_create_invoice__write_uid +msgid "Last Updated by" +msgstr "" + +#. module: hr_expense_invoice +#: model:ir.model.fields,field_description:hr_expense_invoice.field_hr_expense_create_invoice__write_date +msgid "Last Updated on" +msgstr "" + +#. module: hr_expense_invoice +#: code:addons/hr_expense_invoice/wizard/expense_create_invoice.py:40 +#, python-format +msgid "No valid expenses to create invoice" +msgstr "" + +#. module: hr_expense_invoice +#: model:ir.model,name:hr_expense_invoice.model_account_payment +msgid "Payments" +msgstr "" + +#. module: hr_expense_invoice +#: model_terms:ir.ui.view,arch_db:hr_expense_invoice.hr_expense_create_invoice_form +msgid "Please select expense line to create new vendor bill:" +msgstr "" + +#. module: hr_expense_invoice +#: code:addons/hr_expense_invoice/models/account_payment.py:15 +#, python-format +msgid "Register payment on expense's invoice is not allowed" +msgstr "" + +#. module: hr_expense_invoice +#: code:addons/hr_expense_invoice/wizard/expense_create_invoice.py:23 +#, python-format +msgid "This action is allowed only in Approved sate" +msgstr "" + #. module: hr_expense_invoice #: model:ir.model.fields,field_description:hr_expense_invoice.field_hr_expense__invoice_id msgid "Vendor Bill" msgstr "" + +#. module: hr_expense_invoice +#: code:addons/hr_expense_invoice/models/hr_expense_sheet.py:68 +#, python-format +msgid "" +"Vendor bill amount mismatch!\n" +"Please make sure amount in vendor bills equal to amount of its expense lines" +msgstr "" + +#. module: hr_expense_invoice +#: code:addons/hr_expense_invoice/models/hr_expense.py:26 +#: code:addons/hr_expense_invoice/models/hr_expense_sheet.py:62 +#, python-format +msgid "Vendor bill state must be Open" +msgstr "" diff --git a/hr_expense_invoice/i18n/pt.po b/hr_expense_invoice/i18n/pt.po index b63f19eab..ee128ed60 100644 --- a/hr_expense_invoice/i18n/pt.po +++ b/hr_expense_invoice/i18n/pt.po @@ -17,30 +17,167 @@ msgstr "" "X-Generator: Weblate 3.1.1\n" #. module: hr_expense_invoice -#: code:addons/hr_expense_invoice/models/hr_expense_sheet.py:40 -#, python-format -msgid "" -"Cannot reconcile supplier invoice payable with generated line. Please check " -"amounts and see if the invoice is already added or paid. Invoice: %s" +#: model_terms:ir.ui.view,arch_db:hr_expense_invoice.hr_expense_create_invoice_form +msgid "Cancel" +msgstr "" + +#. module: hr_expense_invoice +#: model_terms:ir.ui.view,arch_db:hr_expense_invoice.hr_expense_create_invoice_form +#, fuzzy +#| msgid "Invoice" +msgid "Create Invoice" +msgstr "Fatura" + +#. module: hr_expense_invoice +#: model:ir.actions.act_window,name:hr_expense_invoice.action_expense_create_invoice +#: model_terms:ir.ui.view,arch_db:hr_expense_invoice.hr_expense_sheet_form_view_inherit_sale_expense +msgid "Create Vendor Bill" +msgstr "" + +#. module: hr_expense_invoice +#: model_terms:ir.ui.view,arch_db:hr_expense_invoice.hr_expense_create_invoice_form +msgid "Create Vendor Bill from Expense" +msgstr "" + +#. module: hr_expense_invoice +#: model:ir.model,name:hr_expense_invoice.model_hr_expense_create_invoice +msgid "Create invoice from expense report" +msgstr "" + +#. module: hr_expense_invoice +#: model:ir.model.fields,field_description:hr_expense_invoice.field_hr_expense_create_invoice__create_uid +msgid "Created by" +msgstr "" + +#. module: hr_expense_invoice +#: model:ir.model.fields,field_description:hr_expense_invoice.field_hr_expense_create_invoice__create_date +msgid "Created on" +msgstr "" + +#. module: hr_expense_invoice +#: model:ir.model.fields,field_description:hr_expense_invoice.field_hr_expense_create_invoice__display_name +msgid "Display Name" msgstr "" -"Não foi possível reconciliar a fatura a pagar ao fornecedor com a linha " -"gerada. Por favor, verifique os montantes e veja se a fatura já está " -"adicionada ou paga. Fatura: %s" #. module: hr_expense_invoice #: model:ir.model,name:hr_expense_invoice.model_hr_expense msgid "Expense" msgstr "Despesa" +#. module: hr_expense_invoice +#: model:ir.model,name:hr_expense_invoice.model_hr_expense_sheet_register_payment_wizard +msgid "Expense Register Payment Wizard" +msgstr "" + #. module: hr_expense_invoice #: model:ir.model,name:hr_expense_invoice.model_hr_expense_sheet msgid "Expense Report" msgstr "Relatório de Despesas" +#. module: hr_expense_invoice +#: model:ir.model.fields,field_description:hr_expense_invoice.field_hr_expense_create_invoice__expense_ids +#, fuzzy +#| msgid "Expense" +msgid "Expenses" +msgstr "Despesa" + +#. module: hr_expense_invoice +#: model:ir.model.fields,field_description:hr_expense_invoice.field_hr_expense_create_invoice__id +msgid "ID" +msgstr "" + +#. module: hr_expense_invoice +#: model:ir.model.fields,field_description:hr_expense_invoice.field_hr_expense_sheet__invoice_count +#, fuzzy +#| msgid "Invoice" +msgid "Invoice Count" +msgstr "Fatura" + +#. module: hr_expense_invoice +#: model:ir.model.fields,field_description:hr_expense_invoice.field_hr_expense_sheet__invoice_fully_created +msgid "Invoice Fully Created" +msgstr "" + +#. module: hr_expense_invoice +#: code:addons/hr_expense_invoice/models/hr_expense_sheet.py:75 +#: model_terms:ir.ui.view,arch_db:hr_expense_invoice.hr_expense_sheet_form_view_inherit_sale_expense +#, fuzzy, python-format +#| msgid "Invoice" +msgid "Invoices" +msgstr "Fatura" + +#. module: hr_expense_invoice +#: model:ir.model,name:hr_expense_invoice.model_account_move_line +msgid "Journal Item" +msgstr "" + +#. module: hr_expense_invoice +#: model:ir.model.fields,field_description:hr_expense_invoice.field_hr_expense_create_invoice____last_update +msgid "Last Modified on" +msgstr "" + +#. module: hr_expense_invoice +#: model:ir.model.fields,field_description:hr_expense_invoice.field_hr_expense_create_invoice__write_uid +msgid "Last Updated by" +msgstr "" + +#. module: hr_expense_invoice +#: model:ir.model.fields,field_description:hr_expense_invoice.field_hr_expense_create_invoice__write_date +msgid "Last Updated on" +msgstr "" + +#. module: hr_expense_invoice +#: code:addons/hr_expense_invoice/wizard/expense_create_invoice.py:40 +#, python-format +msgid "No valid expenses to create invoice" +msgstr "" + +#. module: hr_expense_invoice +#: model:ir.model,name:hr_expense_invoice.model_account_payment +msgid "Payments" +msgstr "" + +#. module: hr_expense_invoice +#: model_terms:ir.ui.view,arch_db:hr_expense_invoice.hr_expense_create_invoice_form +msgid "Please select expense line to create new vendor bill:" +msgstr "" + +#. module: hr_expense_invoice +#: code:addons/hr_expense_invoice/models/account_payment.py:15 +#, python-format +msgid "Register payment on expense's invoice is not allowed" +msgstr "" + +#. module: hr_expense_invoice +#: code:addons/hr_expense_invoice/wizard/expense_create_invoice.py:23 +#, python-format +msgid "This action is allowed only in Approved sate" +msgstr "" + #. module: hr_expense_invoice #: model:ir.model.fields,field_description:hr_expense_invoice.field_hr_expense__invoice_id msgid "Vendor Bill" msgstr "" -#~ msgid "Invoice" -#~ msgstr "Fatura" +#. module: hr_expense_invoice +#: code:addons/hr_expense_invoice/models/hr_expense_sheet.py:68 +#, python-format +msgid "" +"Vendor bill amount mismatch!\n" +"Please make sure amount in vendor bills equal to amount of its expense lines" +msgstr "" + +#. module: hr_expense_invoice +#: code:addons/hr_expense_invoice/models/hr_expense.py:26 +#: code:addons/hr_expense_invoice/models/hr_expense_sheet.py:62 +#, python-format +msgid "Vendor bill state must be Open" +msgstr "" + +#~ msgid "" +#~ "Cannot reconcile supplier invoice payable with generated line. Please " +#~ "check amounts and see if the invoice is already added or paid. Invoice: %s" +#~ msgstr "" +#~ "Não foi possível reconciliar a fatura a pagar ao fornecedor com a linha " +#~ "gerada. Por favor, verifique os montantes e veja se a fatura já está " +#~ "adicionada ou paga. Fatura: %s" diff --git a/hr_expense_invoice/static/description/index.html b/hr_expense_invoice/static/description/index.html index ecad36c2f..ec9fec4e9 100644 --- a/hr_expense_invoice/static/description/index.html +++ b/hr_expense_invoice/static/description/index.html @@ -3,7 +3,7 @@ - + Supplier invoices on HR expenses -
    -

    Supplier invoices on HR expenses

    +
    + + +Odoo Community Association + +
    +

    Supplier invoices on HR expenses

    -

    Beta License: AGPL-3 OCA/hr-expense Translate me on Weblate Try me on Runboat

    +

    Beta License: AGPL-3 OCA/hr-expense Translate me on Weblate Try me on Runboat

    This module should be used when a supplier invoice is paid by an employee. It allows to set a supplier invoice for each expense line, adding the corresponding journal items to transfer the debt to the @@ -395,7 +400,7 @@

    Supplier invoices on HR expenses

    -

    Usage

    +

    Usage

    Reference one invoice to an expense

    • Create an expense sheet.
    • @@ -415,7 +420,7 @@

      Usage

    -

    Known issues / Roadmap

    +

    Known issues / Roadmap

    • Multiple payment terms for a supplier invoice are not handled correctly.
    • @@ -423,7 +428,7 @@

      Known issues / Roadmap

    -

    Bug Tracker

    +

    Bug Tracker

    Bugs are tracked on GitHub Issues. In case of trouble, please check there if your issue has already been reported. If you spotted it first, help us to smash it by providing a detailed and welcomed @@ -431,15 +436,15 @@

    Bug Tracker

    Do not contact contributors directly about support or help with technical issues.

    -

    Credits

    +

    Credits

    -

    Authors

    +

    Authors

    • Tecnativa
    -

    Contributors

    +

    Contributors

    -

    Maintainers

    +

    Maintainers

    This module is maintained by the OCA.

    Odoo Community Association @@ -466,5 +471,6 @@

    Maintainers

    +
    From f5a05cf4a38cd8c04e702b03fe563261432b9fdc Mon Sep 17 00:00:00 2001 From: "Pedro M. Baeza" Date: Mon, 9 Jun 2025 10:10:23 +0200 Subject: [PATCH 57/69] [FIX] hr_expense_invoice: Use base amount Odoo is handling the amount always tax included, so we need to transfer to the invoice the proper base amount, not the price unit. --- hr_expense_invoice/models/hr_expense.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/hr_expense_invoice/models/hr_expense.py b/hr_expense_invoice/models/hr_expense.py index 218b56b00..3dde9b98e 100644 --- a/hr_expense_invoice/models/hr_expense.py +++ b/hr_expense_invoice/models/hr_expense.py @@ -40,8 +40,10 @@ def _prepare_invoice_values(self): { "product_id": self.product_id.id, "name": self.name, - "price_unit": self.price_unit or self.total_amount_currency, - "quantity": self.quantity, + # Odoo considers always the amount taxes included, we need to take + # the base amount and quantity = 1 + "price_unit": self.untaxed_amount_currency, + "quantity": 1, "account_id": self.account_id.id, "analytic_distribution": self.analytic_distribution, "tax_ids": [Command.set(self.tax_ids.ids)], From 6787c46c6d7f043891b3ce29b661da3c554570bb Mon Sep 17 00:00:00 2001 From: OCA-git-bot Date: Tue, 14 Oct 2025 06:19:29 +0000 Subject: [PATCH 58/69] [BOT] post-merge updates --- hr_expense_invoice/README.rst | 2 +- hr_expense_invoice/__manifest__.py | 2 +- hr_expense_invoice/static/description/index.html | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/hr_expense_invoice/README.rst b/hr_expense_invoice/README.rst index 6ca354026..75cc269b1 100644 --- a/hr_expense_invoice/README.rst +++ b/hr_expense_invoice/README.rst @@ -11,7 +11,7 @@ Supplier invoices on HR expenses !! This file is generated by oca-gen-addon-readme !! !! changes will be overwritten. !! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - !! source digest: sha256:9be307fb4a0c4758ae9048ba82f6189eeefe607e73255df7708356c8d7479eec + !! source digest: sha256:696acf3070f4ca25931da207a4b9733d827a1975e641994b2418df23b2207289 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! .. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png diff --git a/hr_expense_invoice/__manifest__.py b/hr_expense_invoice/__manifest__.py index 27f6dc326..95c23b86e 100644 --- a/hr_expense_invoice/__manifest__.py +++ b/hr_expense_invoice/__manifest__.py @@ -4,7 +4,7 @@ { "name": "Supplier invoices on HR expenses", - "version": "18.0.1.0.0", + "version": "18.0.1.0.1", "category": "Human Resources", "author": "Tecnativa, Odoo Community Association (OCA)", "license": "AGPL-3", diff --git a/hr_expense_invoice/static/description/index.html b/hr_expense_invoice/static/description/index.html index 5c53bb239..ffcaf7a0a 100644 --- a/hr_expense_invoice/static/description/index.html +++ b/hr_expense_invoice/static/description/index.html @@ -372,7 +372,7 @@

    Supplier invoices on HR expenses

    !! This file is generated by oca-gen-addon-readme !! !! changes will be overwritten. !! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -!! source digest: sha256:9be307fb4a0c4758ae9048ba82f6189eeefe607e73255df7708356c8d7479eec +!! source digest: sha256:696acf3070f4ca25931da207a4b9733d827a1975e641994b2418df23b2207289 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->

    Beta License: AGPL-3 OCA/hr-expense Translate me on Weblate Try me on Runboat

    This module should be used when a supplier invoice is paid by an From 28a9505b51a79c47010c5ba1b065d491fbb61783 Mon Sep 17 00:00:00 2001 From: christian-ramos-tecnativa Date: Mon, 17 Nov 2025 11:00:37 +0000 Subject: [PATCH 59/69] [FIX] hr_expense_invoice: Handle mixed lines --- hr_expense_invoice/models/hr_expense_sheet.py | 49 ++++++++----------- .../tests/test_hr_expense_invoice.py | 35 ++++++++++++- 2 files changed, 53 insertions(+), 31 deletions(-) diff --git a/hr_expense_invoice/models/hr_expense_sheet.py b/hr_expense_invoice/models/hr_expense_sheet.py index 22cced796..b615f0432 100644 --- a/hr_expense_invoice/models/hr_expense_sheet.py +++ b/hr_expense_invoice/models/hr_expense_sheet.py @@ -17,18 +17,9 @@ def get_expense_sheets_with_invoices(self, func): lambda sheet: func(expense.invoice_id for expense in sheet.expense_line_ids) ) - def _do_create_moves(self): - """Don't let super to create any move: - - Paid by company: there's already the invoice. - - Paid by employee: we create here a journal entry transferring the AP - balance from the invoice partner to the employee. - """ - expense_sheets_with_invoices = self.get_expense_sheets_with_invoices(all) - res = super( - HrExpenseSheet, self - expense_sheets_with_invoices - )._do_create_moves() + def _do_create_ap_moves(self): # Create AP transfer entry for expenses paid by employees - for expense in expense_sheets_with_invoices.expense_line_ids: + for expense in self.expense_line_ids.filtered("invoice_id"): if expense.payment_mode == "own_account": move_vals = expense._prepare_own_account_transfer_move_vals() move = self.env["account.move"].create(move_vals) @@ -42,21 +33,17 @@ def _do_create_moves(self): == partner ) (ap_lines + transfer_line).reconcile() - return res def action_sheet_move_post(self): - """Perform extra checks and set proper payment state according linked - invoices. - """ - expense_sheets_with_invoices = self.get_expense_sheets_with_invoices(all) - res = super( - HrExpenseSheet, self - expense_sheets_with_invoices - ).action_sheet_move_post() - - for expense in expense_sheets_with_invoices: + # Handle expense sheets with invoices + sheets_all_inovices = self.get_expense_sheets_with_invoices(all) + res = super(HrExpenseSheet, self - sheets_all_inovices).action_sheet_move_post() + # Use 'any' here because there may be mixed sheets + # and we have to create ap moves for those invoices + for expense in self.get_expense_sheets_with_invoices(any): expense._validate_expense_invoice() expense._check_can_create_move() - expense._do_create_moves() + expense._do_create_ap_moves() # The payment state is set in a fixed way in super, but it depends on the # payment state of the invoices when there are some of them linked expense.filtered( @@ -121,10 +108,11 @@ def _prepare_bills_vals(self): expenses_without_invoice = self.expense_line_ids.filtered( lambda r: not r.invoice_id ) - res["line_ids"] = [ - Command.create(expense._prepare_move_lines_vals()) - for expense in expenses_without_invoice - ] + if expenses_without_invoice: + res["line_ids"] = [ + Command.create(expense._prepare_move_lines_vals()) + for expense in expenses_without_invoice + ] return res @@ -227,8 +215,8 @@ def _check_can_create_move(self): res = super( HrExpenseSheet, self - expense_sheets_with_invoices )._check_can_create_move() - # We copy this method because the expenses are in 'approve' - # state instead of 'submit' + # We copy this method because the expenses are in 'approve' or 'posted' + # in case this is the second run, instead of 'submit' if any(not sheet.expense_line_ids for sheet in expense_sheets_with_invoices): raise UserError( self.env._( @@ -236,7 +224,10 @@ def _check_can_create_move(self): report without expenses." ) ) - if any(sheet.state != "approve" for sheet in expense_sheets_with_invoices): + if any( + sheet.state not in ["approve", "post"] + for sheet in expense_sheets_with_invoices + ): raise UserError( self.env._( "You can only generate an accounting entry for approved expense(s)." diff --git a/hr_expense_invoice/tests/test_hr_expense_invoice.py b/hr_expense_invoice/tests/test_hr_expense_invoice.py index fd13cf570..977dad44a 100644 --- a/hr_expense_invoice/tests/test_hr_expense_invoice.py +++ b/hr_expense_invoice/tests/test_hr_expense_invoice.py @@ -253,8 +253,39 @@ def test_5_hr_expense_invoice_no_duplicate_accounting_entries(self): f.invoice_id = self.invoice sheet.action_approve_expense_sheets() sheet.action_sheet_move_post() - self.assertEqual(len(sheet.account_move_ids.invoice_line_ids), 1) + self.assertEqual(len(sheet.account_move_ids[0].invoice_line_ids), 1) self.assertEqual( - sheet.account_move_ids.invoice_line_ids.price_total, + sheet.account_move_ids[0].invoice_line_ids.price_total, self.expense2.total_amount, ) + self.assertEqual( + sheet.account_move_ids[1].amount_total, + self.expense.total_amount, + ) + + def test_6_hr_expense_mixed_invoice_same_sheet(self): + # We add 3 expenses + self.expense.price_unit = 10 + self.expense2.price_unit = 20 + self.expense3.price_unit = 30 + expenses = self.expense + self.expense2 + self.expense3 + sheet = self._action_submit_expenses(expenses) + self.assertIn(self.expense, sheet.expense_line_ids) + self.assertIn(self.expense2, sheet.expense_line_ids) + self.assertIn(self.expense3, sheet.expense_line_ids) + # We add invoices to expenses 1 and 2 + self.invoice.action_post() + self.invoice2.action_post() + self.expense.invoice_id = self.invoice.id + self.expense2.invoice_id = self.invoice2.id + # We approve sheet + sheet.action_approve_expense_sheets() + self.assertEqual(sheet.state, "approve") + self.assertFalse(sheet.account_move_ids) + # We post journal entries + sheet.action_sheet_move_post() + self.assertEqual(sheet.state, "post") + self.assertEqual(self.invoice.payment_state, "paid") + self.assertEqual(self.invoice2.payment_state, "paid") + # 2 ap moves and 1 vendor bill + self.assertEqual(len(sheet.account_move_ids), 3) From b55538688513c29be912277c8c4c7e733f5b8741 Mon Sep 17 00:00:00 2001 From: OCA-git-bot Date: Mon, 17 Nov 2025 19:52:13 +0000 Subject: [PATCH 60/69] [BOT] post-merge updates --- hr_expense_invoice/README.rst | 2 +- hr_expense_invoice/__manifest__.py | 2 +- hr_expense_invoice/static/description/index.html | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/hr_expense_invoice/README.rst b/hr_expense_invoice/README.rst index 75cc269b1..bf0ab7f05 100644 --- a/hr_expense_invoice/README.rst +++ b/hr_expense_invoice/README.rst @@ -11,7 +11,7 @@ Supplier invoices on HR expenses !! This file is generated by oca-gen-addon-readme !! !! changes will be overwritten. !! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - !! source digest: sha256:696acf3070f4ca25931da207a4b9733d827a1975e641994b2418df23b2207289 + !! source digest: sha256:7e8117b1a98ba5b52b401bb69a1bca1aef01b7721082c76adc1f8954109bf825 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! .. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png diff --git a/hr_expense_invoice/__manifest__.py b/hr_expense_invoice/__manifest__.py index 95c23b86e..8666def38 100644 --- a/hr_expense_invoice/__manifest__.py +++ b/hr_expense_invoice/__manifest__.py @@ -4,7 +4,7 @@ { "name": "Supplier invoices on HR expenses", - "version": "18.0.1.0.1", + "version": "18.0.1.0.2", "category": "Human Resources", "author": "Tecnativa, Odoo Community Association (OCA)", "license": "AGPL-3", diff --git a/hr_expense_invoice/static/description/index.html b/hr_expense_invoice/static/description/index.html index ffcaf7a0a..5ee25621e 100644 --- a/hr_expense_invoice/static/description/index.html +++ b/hr_expense_invoice/static/description/index.html @@ -372,7 +372,7 @@

    Supplier invoices on HR expenses

    !! This file is generated by oca-gen-addon-readme !! !! changes will be overwritten. !! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -!! source digest: sha256:696acf3070f4ca25931da207a4b9733d827a1975e641994b2418df23b2207289 +!! source digest: sha256:7e8117b1a98ba5b52b401bb69a1bca1aef01b7721082c76adc1f8954109bf825 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->

    Beta License: AGPL-3 OCA/hr-expense Translate me on Weblate Try me on Runboat

    This module should be used when a supplier invoice is paid by an From f0a090f65d19350a60a56275dc803471ba7425d1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bet=C3=BCl=20=C3=96=C4=9Fmen?= Date: Thu, 20 Nov 2025 13:43:15 +0000 Subject: [PATCH 61/69] Added translation using Weblate (Turkish) --- hr_expense_invoice/i18n/tr.po | 177 ++++++++++++++++++++++++++++++++++ 1 file changed, 177 insertions(+) create mode 100644 hr_expense_invoice/i18n/tr.po diff --git a/hr_expense_invoice/i18n/tr.po b/hr_expense_invoice/i18n/tr.po new file mode 100644 index 000000000..b29cfb948 --- /dev/null +++ b/hr_expense_invoice/i18n/tr.po @@ -0,0 +1,177 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * hr_expense_invoice +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 18.0\n" +"Report-Msgid-Bugs-To: \n" +"Last-Translator: Automatically generated\n" +"Language-Team: none\n" +"Language: tr\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: nplurals=2; plural=n != 1;\n" + +#. module: hr_expense_invoice +#: model_terms:ir.ui.view,arch_db:hr_expense_invoice.view_move_form +msgid "" +"\n" +" Expense\n" +" " +msgstr "" + +#. module: hr_expense_invoice +#: model:ir.model.fields,field_description:hr_expense_invoice.field_hr_expense__amount_residual +msgid "Amount Due" +msgstr "" + +#. module: hr_expense_invoice +#: model:mail.message.subtype,name:hr_expense_invoice.mt_expense_approved_inherited +msgid "Approved" +msgstr "" + +#. module: hr_expense_invoice +#: model_terms:ir.ui.view,arch_db:hr_expense_invoice.hr_expense_sheet_form_view_inherit_sale_expense +msgid "Create Vendor Bill" +msgstr "" + +#. module: hr_expense_invoice +#: model:ir.model,name:hr_expense_invoice.model_hr_expense +msgid "Expense" +msgstr "" + +#. module: hr_expense_invoice +#: model:ir.model,name:hr_expense_invoice.model_hr_expense_sheet +msgid "Expense Report" +msgstr "" + +#. module: hr_expense_invoice +#: model:mail.message.subtype,description:hr_expense_invoice.mt_expense_approved_inherited +msgid "Expense report approved" +msgstr "" + +#. module: hr_expense_invoice +#: model:ir.model.fields,field_description:hr_expense_invoice.field_account_bank_statement_line__expense_ids +#: model:ir.model.fields,field_description:hr_expense_invoice.field_account_move__expense_ids +msgid "Expenses" +msgstr "" + +#. module: hr_expense_invoice +#: model:ir.model.fields,field_description:hr_expense_invoice.field_hr_expense_sheet__invoice_count +msgid "Invoice Count" +msgstr "" + +#. module: hr_expense_invoice +#. odoo-python +#: code:addons/hr_expense_invoice/models/hr_expense_sheet.py:0 +#: model_terms:ir.ui.view,arch_db:hr_expense_invoice.hr_expense_sheet_form_view_inherit_sale_expense +msgid "Invoices" +msgstr "" + +#. module: hr_expense_invoice +#: model:ir.model,name:hr_expense_invoice.model_account_move +msgid "Journal Entry" +msgstr "" + +#. module: hr_expense_invoice +#: model:ir.model,name:hr_expense_invoice.model_account_move_line +msgid "Journal Item" +msgstr "" + +#. module: hr_expense_invoice +#. odoo-python +#: code:addons/hr_expense_invoice/models/hr_expense_sheet.py:0 +msgid "" +"Please specify an expense journal in order to generate" +" accounting entries." +msgstr "" + +#. module: hr_expense_invoice +#. odoo-python +#: code:addons/hr_expense_invoice/models/hr_expense_sheet.py:0 +msgid "" +"Please specify if the expenses for this report were paid by" +" the company, or the employee" +msgstr "" + +#. module: hr_expense_invoice +#: model:ir.model.fields,help:hr_expense_invoice.field_account_bank_statement_line__source_invoice_expense_id +#: model:ir.model.fields,help:hr_expense_invoice.field_account_move__source_invoice_expense_id +msgid "" +"Reference to the expense with a linked invoice that generated thistransfer " +"journal entry" +msgstr "" + +#. module: hr_expense_invoice +#: model:ir.model.fields,field_description:hr_expense_invoice.field_hr_expense__sheet_id_state +msgid "Sheet state" +msgstr "" + +#. module: hr_expense_invoice +#. odoo-python +#: code:addons/hr_expense_invoice/models/hr_expense_sheet.py:0 +msgid "Show missing work email employees" +msgstr "" + +#. module: hr_expense_invoice +#: model:ir.model.fields,field_description:hr_expense_invoice.field_account_bank_statement_line__source_invoice_expense_id +#: model:ir.model.fields,field_description:hr_expense_invoice.field_account_move__source_invoice_expense_id +msgid "Source Invoice Expense" +msgstr "" + +#. module: hr_expense_invoice +#. odoo-python +#: code:addons/hr_expense_invoice/models/hr_expense_sheet.py:0 +msgid "" +"The work email of some employees is missing. Please add it on" +" the employee form" +msgstr "" + +#. module: hr_expense_invoice +#: model:ir.model.fields,field_description:hr_expense_invoice.field_hr_expense__transfer_move_ids +msgid "Transfer Move" +msgstr "" + +#. module: hr_expense_invoice +#: model:ir.model.fields,field_description:hr_expense_invoice.field_hr_expense__invoice_id +msgid "Vendor Bill" +msgstr "" + +#. module: hr_expense_invoice +#. odoo-python +#: code:addons/hr_expense_invoice/models/hr_expense_sheet.py:0 +msgid "" +"Vendor bill amount mismatch!\n" +"Please make sure amount in vendor bills equal to amount of its expense lines" +msgstr "" + +#. module: hr_expense_invoice +#. odoo-python +#: code:addons/hr_expense_invoice/models/hr_expense.py:0 +#: code:addons/hr_expense_invoice/models/hr_expense_sheet.py:0 +msgid "Vendor bill state must be Posted" +msgstr "" + +#. module: hr_expense_invoice +#. odoo-python +#: code:addons/hr_expense_invoice/models/hr_expense_sheet.py:0 +msgid "You can only generate an accounting entry for approved expense(s)." +msgstr "" + +#. module: hr_expense_invoice +#. odoo-python +#: code:addons/hr_expense_invoice/models/account_move.py:0 +msgid "" +"You can't change the total amount, as there's an expense linked to this " +"invoice." +msgstr "" + +#. module: hr_expense_invoice +#. odoo-python +#: code:addons/hr_expense_invoice/models/hr_expense_sheet.py:0 +msgid "" +"You cannot create accounting entries for an expense " +"report without expenses." +msgstr "" From 8b7b2b2ccfd48e1e2922a49f2ce54365e78ae33c Mon Sep 17 00:00:00 2001 From: dtec-landoo Date: Mon, 9 Mar 2026 16:06:37 +0100 Subject: [PATCH 62/69] [18.0][FIX] hr_expense_invoice: Allow mixed expense reports (with and without invoices) --- hr_expense_invoice/models/hr_expense_sheet.py | 102 ++++++++++++------ .../tests/test_hr_expense_invoice.py | 31 ++++++ 2 files changed, 103 insertions(+), 30 deletions(-) diff --git a/hr_expense_invoice/models/hr_expense_sheet.py b/hr_expense_invoice/models/hr_expense_sheet.py index b615f0432..4e5b0147d 100644 --- a/hr_expense_invoice/models/hr_expense_sheet.py +++ b/hr_expense_invoice/models/hr_expense_sheet.py @@ -19,37 +19,81 @@ def get_expense_sheets_with_invoices(self, func): def _do_create_ap_moves(self): # Create AP transfer entry for expenses paid by employees + all_generated_moves = self.env["account.move"] for expense in self.expense_line_ids.filtered("invoice_id"): if expense.payment_mode == "own_account": move_vals = expense._prepare_own_account_transfer_move_vals() move = self.env["account.move"].create(move_vals) - move.action_post() - # reconcile with the invoice - ap_lines = expense.invoice_id.line_ids.filtered( - lambda x: x.display_type == "payment_term" - ) - transfer_line = move.line_ids.filtered( - lambda x, partner=expense.invoice_id.partner_id: x.partner_id - == partner + all_generated_moves |= move + return all_generated_moves + + def _reconcile_ap_moves(self): + # Reconcile AP transfer entries with vendor bills once they are posted + for expense in self.expense_line_ids.filtered("invoice_id"): + if expense.payment_mode == "own_account": + move = self.account_move_ids.filtered( + lambda m, exp=expense: m.source_invoice_expense_id == exp ) - (ap_lines + transfer_line).reconcile() + if move and move.state == "posted": + ap_lines = expense.invoice_id.line_ids.filtered( + lambda x: x.display_type == "payment_term" + ) + transfer_line = move.line_ids.filtered( + lambda x, partner=expense.invoice_id.partner_id: x.partner_id + == partner + ) + if ap_lines and transfer_line: + (ap_lines + transfer_line).reconcile() + + def _do_create_moves(self): + removed_expenses_map = {} + sheets_to_skip_super = self.env["hr.expense.sheet"] + all_generated_moves = self.env["account.move"] + for sheet in self: + expenses_with_invoice = sheet.expense_line_ids.filtered("invoice_id") + if expenses_with_invoice: + if len(expenses_with_invoice) == len(sheet.expense_line_ids): + sheets_to_skip_super += sheet + else: + removed_expenses_map[sheet.id] = expenses_with_invoice + sheet.expense_line_ids -= expenses_with_invoice + sheets_for_super = self - sheets_to_skip_super + if sheets_for_super: + res = super(HrExpenseSheet, sheets_for_super)._do_create_moves() + all_generated_moves |= res + for sheet_id, expenses in removed_expenses_map.items(): + sheet = self.env["hr.expense.sheet"].browse(sheet_id) + sheet.expense_line_ids += expenses + ap_moves = self._do_create_ap_moves() + all_generated_moves |= ap_moves + return all_generated_moves def action_sheet_move_post(self): - # Handle expense sheets with invoices - sheets_all_inovices = self.get_expense_sheets_with_invoices(all) - res = super(HrExpenseSheet, self - sheets_all_inovices).action_sheet_move_post() - # Use 'any' here because there may be mixed sheets - # and we have to create ap moves for those invoices - for expense in self.get_expense_sheets_with_invoices(any): - expense._validate_expense_invoice() - expense._check_can_create_move() - expense._do_create_ap_moves() - # The payment state is set in a fixed way in super, but it depends on the - # payment state of the invoices when there are some of them linked - expense.filtered( - lambda x: x.expense_line_ids.invoice_id - and x.payment_mode == "company_account" + sheets_with_invoices = self.get_expense_sheets_with_invoices(any) + sheets_all_invoices = self.get_expense_sheets_with_invoices(all) + for sheet in sheets_with_invoices: + sheet._validate_expense_invoice() + res = super(HrExpenseSheet, self - sheets_all_invoices).action_sheet_move_post() + for sheet in sheets_all_invoices: + sheet._check_can_create_move() + moves = sheet._do_create_moves() + sheet.account_move_ids |= moves + moves.action_post() + sheet.filtered( + lambda x: x.payment_mode == "company_account" + )._compute_from_account_move_ids() + if sheet.state == "approve" and sheet.account_move_ids: + if sheet.payment_state in ["paid", "in_payment"]: + sheet.state = "done" + else: + sheet.state = "post" + sheets_mixed = sheets_with_invoices - sheets_all_invoices + if sheets_mixed: + sheets_mixed.filtered( + lambda x: x.payment_mode == "company_account" )._compute_from_account_move_ids() + for sheet in sheets_with_invoices: + sheet._reconcile_ap_moves() return res def set_to_paid(self): @@ -108,12 +152,10 @@ def _prepare_bills_vals(self): expenses_without_invoice = self.expense_line_ids.filtered( lambda r: not r.invoice_id ) - if expenses_without_invoice: - res["line_ids"] = [ - Command.create(expense._prepare_move_lines_vals()) - for expense in expenses_without_invoice - ] - + res["line_ids"] = [ + Command.create(expense._prepare_move_lines_vals()) + for expense in expenses_without_invoice + ] return res def _validate_expense_invoice(self): @@ -211,7 +253,7 @@ def _track_subtype(self, init_values): super()._track_subtype(init_values) def _check_can_create_move(self): - expense_sheets_with_invoices = self.get_expense_sheets_with_invoices(any) + expense_sheets_with_invoices = self.get_expense_sheets_with_invoices(all) res = super( HrExpenseSheet, self - expense_sheets_with_invoices )._check_can_create_move() diff --git a/hr_expense_invoice/tests/test_hr_expense_invoice.py b/hr_expense_invoice/tests/test_hr_expense_invoice.py index 977dad44a..3b7bb1ac8 100644 --- a/hr_expense_invoice/tests/test_hr_expense_invoice.py +++ b/hr_expense_invoice/tests/test_hr_expense_invoice.py @@ -289,3 +289,34 @@ def test_6_hr_expense_mixed_invoice_same_sheet(self): self.assertEqual(self.invoice2.payment_state, "paid") # 2 ap moves and 1 vendor bill self.assertEqual(len(sheet.account_move_ids), 3) + + def test_7_coverage_boosters(self): + """Test to cover edge cases for 100% Codecov coverage""" + sheet = self._action_submit_expenses(self.expense) + + # 1. Cobertura para _track_subtype 'else' (Imagen 3) + sheet.write({"state": "draft"}) + sheet._track_subtype({"state": "draft"}) + + # 2. Cobertura para los 'if' en _reconcile_ap_moves (Imagen 1) + self.invoice.action_post() + self.expense.write( + { + "invoice_id": self.invoice.id, + "payment_mode": "own_account", + } + ) + + # Condición False 1: No hay asientos generados (move = False) + sheet._reconcile_ap_moves() + + # Condición False 2: El asiento existe, pero NO está publicado + dummy_move = self.env["account.move"].create( + { + "move_type": "entry", + "source_invoice_expense_id": self.expense.id, + "journal_id": self.cash_journal.id, + } + ) + sheet.account_move_ids |= dummy_move + sheet._reconcile_ap_moves() From 72754bd5662863064421c8519e6933b9cd22b324 Mon Sep 17 00:00:00 2001 From: OCA-git-bot Date: Mon, 6 Apr 2026 13:00:19 +0000 Subject: [PATCH 63/69] [BOT] post-merge updates --- hr_expense_invoice/README.rst | 2 +- hr_expense_invoice/__manifest__.py | 2 +- hr_expense_invoice/static/description/index.html | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/hr_expense_invoice/README.rst b/hr_expense_invoice/README.rst index bf0ab7f05..f502ec3f1 100644 --- a/hr_expense_invoice/README.rst +++ b/hr_expense_invoice/README.rst @@ -11,7 +11,7 @@ Supplier invoices on HR expenses !! This file is generated by oca-gen-addon-readme !! !! changes will be overwritten. !! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - !! source digest: sha256:7e8117b1a98ba5b52b401bb69a1bca1aef01b7721082c76adc1f8954109bf825 + !! source digest: sha256:85b7c666fd5804c4bc60c81b824e7fd5b22a60e9b7be702b07a7fb2deea2edfe !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! .. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png diff --git a/hr_expense_invoice/__manifest__.py b/hr_expense_invoice/__manifest__.py index 8666def38..3f6b16a77 100644 --- a/hr_expense_invoice/__manifest__.py +++ b/hr_expense_invoice/__manifest__.py @@ -4,7 +4,7 @@ { "name": "Supplier invoices on HR expenses", - "version": "18.0.1.0.2", + "version": "18.0.1.0.3", "category": "Human Resources", "author": "Tecnativa, Odoo Community Association (OCA)", "license": "AGPL-3", diff --git a/hr_expense_invoice/static/description/index.html b/hr_expense_invoice/static/description/index.html index 5ee25621e..504127096 100644 --- a/hr_expense_invoice/static/description/index.html +++ b/hr_expense_invoice/static/description/index.html @@ -372,7 +372,7 @@

    Supplier invoices on HR expenses

    !! This file is generated by oca-gen-addon-readme !! !! changes will be overwritten. !! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -!! source digest: sha256:7e8117b1a98ba5b52b401bb69a1bca1aef01b7721082c76adc1f8954109bf825 +!! source digest: sha256:85b7c666fd5804c4bc60c81b824e7fd5b22a60e9b7be702b07a7fb2deea2edfe !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->

    Beta License: AGPL-3 OCA/hr-expense Translate me on Weblate Try me on Runboat

    This module should be used when a supplier invoice is paid by an From 666b7e3da8066fb1695d482fa6b72478c95c5631 Mon Sep 17 00:00:00 2001 From: Matjaz Mozetic Date: Tue, 2 Jun 2026 19:31:46 +0000 Subject: [PATCH 64/69] Added translation using Weblate (Slovenian) --- hr_expense_invoice/i18n/sl.po | 178 ++++++++++++++++++++++++++++++++++ 1 file changed, 178 insertions(+) create mode 100644 hr_expense_invoice/i18n/sl.po diff --git a/hr_expense_invoice/i18n/sl.po b/hr_expense_invoice/i18n/sl.po new file mode 100644 index 000000000..e126957fb --- /dev/null +++ b/hr_expense_invoice/i18n/sl.po @@ -0,0 +1,178 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * hr_expense_invoice +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 18.0\n" +"Report-Msgid-Bugs-To: \n" +"Last-Translator: Automatically generated\n" +"Language-Team: none\n" +"Language: sl\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: nplurals=4; plural=n%100==1 ? 0 : n%100==2 ? 1 : n%100==3 || " +"n%100==4 ? 2 : 3;\n" + +#. module: hr_expense_invoice +#: model_terms:ir.ui.view,arch_db:hr_expense_invoice.view_move_form +msgid "" +"\n" +" Expense\n" +" " +msgstr "" + +#. module: hr_expense_invoice +#: model:ir.model.fields,field_description:hr_expense_invoice.field_hr_expense__amount_residual +msgid "Amount Due" +msgstr "" + +#. module: hr_expense_invoice +#: model:mail.message.subtype,name:hr_expense_invoice.mt_expense_approved_inherited +msgid "Approved" +msgstr "" + +#. module: hr_expense_invoice +#: model_terms:ir.ui.view,arch_db:hr_expense_invoice.hr_expense_sheet_form_view_inherit_sale_expense +msgid "Create Vendor Bill" +msgstr "" + +#. module: hr_expense_invoice +#: model:ir.model,name:hr_expense_invoice.model_hr_expense +msgid "Expense" +msgstr "" + +#. module: hr_expense_invoice +#: model:ir.model,name:hr_expense_invoice.model_hr_expense_sheet +msgid "Expense Report" +msgstr "" + +#. module: hr_expense_invoice +#: model:mail.message.subtype,description:hr_expense_invoice.mt_expense_approved_inherited +msgid "Expense report approved" +msgstr "" + +#. module: hr_expense_invoice +#: model:ir.model.fields,field_description:hr_expense_invoice.field_account_bank_statement_line__expense_ids +#: model:ir.model.fields,field_description:hr_expense_invoice.field_account_move__expense_ids +msgid "Expenses" +msgstr "" + +#. module: hr_expense_invoice +#: model:ir.model.fields,field_description:hr_expense_invoice.field_hr_expense_sheet__invoice_count +msgid "Invoice Count" +msgstr "" + +#. module: hr_expense_invoice +#. odoo-python +#: code:addons/hr_expense_invoice/models/hr_expense_sheet.py:0 +#: model_terms:ir.ui.view,arch_db:hr_expense_invoice.hr_expense_sheet_form_view_inherit_sale_expense +msgid "Invoices" +msgstr "" + +#. module: hr_expense_invoice +#: model:ir.model,name:hr_expense_invoice.model_account_move +msgid "Journal Entry" +msgstr "" + +#. module: hr_expense_invoice +#: model:ir.model,name:hr_expense_invoice.model_account_move_line +msgid "Journal Item" +msgstr "" + +#. module: hr_expense_invoice +#. odoo-python +#: code:addons/hr_expense_invoice/models/hr_expense_sheet.py:0 +msgid "" +"Please specify an expense journal in order to generate" +" accounting entries." +msgstr "" + +#. module: hr_expense_invoice +#. odoo-python +#: code:addons/hr_expense_invoice/models/hr_expense_sheet.py:0 +msgid "" +"Please specify if the expenses for this report were paid by" +" the company, or the employee" +msgstr "" + +#. module: hr_expense_invoice +#: model:ir.model.fields,help:hr_expense_invoice.field_account_bank_statement_line__source_invoice_expense_id +#: model:ir.model.fields,help:hr_expense_invoice.field_account_move__source_invoice_expense_id +msgid "" +"Reference to the expense with a linked invoice that generated thistransfer " +"journal entry" +msgstr "" + +#. module: hr_expense_invoice +#: model:ir.model.fields,field_description:hr_expense_invoice.field_hr_expense__sheet_id_state +msgid "Sheet state" +msgstr "" + +#. module: hr_expense_invoice +#. odoo-python +#: code:addons/hr_expense_invoice/models/hr_expense_sheet.py:0 +msgid "Show missing work email employees" +msgstr "" + +#. module: hr_expense_invoice +#: model:ir.model.fields,field_description:hr_expense_invoice.field_account_bank_statement_line__source_invoice_expense_id +#: model:ir.model.fields,field_description:hr_expense_invoice.field_account_move__source_invoice_expense_id +msgid "Source Invoice Expense" +msgstr "" + +#. module: hr_expense_invoice +#. odoo-python +#: code:addons/hr_expense_invoice/models/hr_expense_sheet.py:0 +msgid "" +"The work email of some employees is missing. Please add it on" +" the employee form" +msgstr "" + +#. module: hr_expense_invoice +#: model:ir.model.fields,field_description:hr_expense_invoice.field_hr_expense__transfer_move_ids +msgid "Transfer Move" +msgstr "" + +#. module: hr_expense_invoice +#: model:ir.model.fields,field_description:hr_expense_invoice.field_hr_expense__invoice_id +msgid "Vendor Bill" +msgstr "" + +#. module: hr_expense_invoice +#. odoo-python +#: code:addons/hr_expense_invoice/models/hr_expense_sheet.py:0 +msgid "" +"Vendor bill amount mismatch!\n" +"Please make sure amount in vendor bills equal to amount of its expense lines" +msgstr "" + +#. module: hr_expense_invoice +#. odoo-python +#: code:addons/hr_expense_invoice/models/hr_expense.py:0 +#: code:addons/hr_expense_invoice/models/hr_expense_sheet.py:0 +msgid "Vendor bill state must be Posted" +msgstr "" + +#. module: hr_expense_invoice +#. odoo-python +#: code:addons/hr_expense_invoice/models/hr_expense_sheet.py:0 +msgid "You can only generate an accounting entry for approved expense(s)." +msgstr "" + +#. module: hr_expense_invoice +#. odoo-python +#: code:addons/hr_expense_invoice/models/account_move.py:0 +msgid "" +"You can't change the total amount, as there's an expense linked to this " +"invoice." +msgstr "" + +#. module: hr_expense_invoice +#. odoo-python +#: code:addons/hr_expense_invoice/models/hr_expense_sheet.py:0 +msgid "" +"You cannot create accounting entries for an expense " +"report without expenses." +msgstr "" From 92e5d4a3c1f7d66bd3644c873c4916b93090e8ef Mon Sep 17 00:00:00 2001 From: Matjaz Mozetic Date: Tue, 2 Jun 2026 19:39:43 +0000 Subject: [PATCH 65/69] Translated using Weblate (Slovenian) Currently translated at 88.4% (23 of 26 strings) Translation: hr-expense-18.0/hr-expense-18.0-hr_expense_invoice Translate-URL: https://translation.odoo-community.org/projects/hr-expense-18-0/hr-expense-18-0-hr_expense_invoice/sl/ --- hr_expense_invoice/i18n/sl.po | 48 ++++++++++++++++++++++------------- 1 file changed, 31 insertions(+), 17 deletions(-) diff --git a/hr_expense_invoice/i18n/sl.po b/hr_expense_invoice/i18n/sl.po index e126957fb..71eeb49c4 100644 --- a/hr_expense_invoice/i18n/sl.po +++ b/hr_expense_invoice/i18n/sl.po @@ -6,7 +6,8 @@ msgid "" msgstr "" "Project-Id-Version: Odoo Server 18.0\n" "Report-Msgid-Bugs-To: \n" -"Last-Translator: Automatically generated\n" +"PO-Revision-Date: 2026-06-02 19:39+0000\n" +"Last-Translator: Matjaz Mozetic \n" "Language-Team: none\n" "Language: sl\n" "MIME-Version: 1.0\n" @@ -14,6 +15,7 @@ msgstr "" "Content-Transfer-Encoding: \n" "Plural-Forms: nplurals=4; plural=n%100==1 ? 0 : n%100==2 ? 1 : n%100==3 || " "n%100==4 ? 2 : 3;\n" +"X-Generator: Weblate 5.15.2\n" #. module: hr_expense_invoice #: model_terms:ir.ui.view,arch_db:hr_expense_invoice.view_move_form @@ -31,55 +33,55 @@ msgstr "" #. module: hr_expense_invoice #: model:mail.message.subtype,name:hr_expense_invoice.mt_expense_approved_inherited msgid "Approved" -msgstr "" +msgstr "Odobreno" #. module: hr_expense_invoice #: model_terms:ir.ui.view,arch_db:hr_expense_invoice.hr_expense_sheet_form_view_inherit_sale_expense msgid "Create Vendor Bill" -msgstr "" +msgstr "Ustvari prejeti račun" #. module: hr_expense_invoice #: model:ir.model,name:hr_expense_invoice.model_hr_expense msgid "Expense" -msgstr "" +msgstr "Izdatek" #. module: hr_expense_invoice #: model:ir.model,name:hr_expense_invoice.model_hr_expense_sheet msgid "Expense Report" -msgstr "" +msgstr "Poročilo o stroških" #. module: hr_expense_invoice #: model:mail.message.subtype,description:hr_expense_invoice.mt_expense_approved_inherited msgid "Expense report approved" -msgstr "" +msgstr "Poročilo o stroških odobreno" #. module: hr_expense_invoice #: model:ir.model.fields,field_description:hr_expense_invoice.field_account_bank_statement_line__expense_ids #: model:ir.model.fields,field_description:hr_expense_invoice.field_account_move__expense_ids msgid "Expenses" -msgstr "" +msgstr "Stroški" #. module: hr_expense_invoice #: model:ir.model.fields,field_description:hr_expense_invoice.field_hr_expense_sheet__invoice_count msgid "Invoice Count" -msgstr "" +msgstr "Št. računov" #. module: hr_expense_invoice #. odoo-python #: code:addons/hr_expense_invoice/models/hr_expense_sheet.py:0 #: model_terms:ir.ui.view,arch_db:hr_expense_invoice.hr_expense_sheet_form_view_inherit_sale_expense msgid "Invoices" -msgstr "" +msgstr "Računi" #. module: hr_expense_invoice #: model:ir.model,name:hr_expense_invoice.model_account_move msgid "Journal Entry" -msgstr "" +msgstr "Temeljnica" #. module: hr_expense_invoice #: model:ir.model,name:hr_expense_invoice.model_account_move_line msgid "Journal Item" -msgstr "" +msgstr "Postavka" #. module: hr_expense_invoice #. odoo-python @@ -88,6 +90,7 @@ msgid "" "Please specify an expense journal in order to generate" " accounting entries." msgstr "" +"Prosimo, navedite dnevnik izdatkov za ustvarjanje računovodskih vknjižb." #. module: hr_expense_invoice #. odoo-python @@ -96,6 +99,7 @@ msgid "" "Please specify if the expenses for this report were paid by" " the company, or the employee" msgstr "" +"Prosimo, navedite, ali je stroške za to poročilo krilo podjetje ali zaposleni" #. module: hr_expense_invoice #: model:ir.model.fields,help:hr_expense_invoice.field_account_bank_statement_line__source_invoice_expense_id @@ -104,17 +108,19 @@ msgid "" "Reference to the expense with a linked invoice that generated thistransfer " "journal entry" msgstr "" +"Sklic na strošek s povezano fakturo, na podlagi katere je bil ustvarjen ta " +"knjigovodski zapis o prenosu" #. module: hr_expense_invoice #: model:ir.model.fields,field_description:hr_expense_invoice.field_hr_expense__sheet_id_state msgid "Sheet state" -msgstr "" +msgstr "Stanje preglednice" #. module: hr_expense_invoice #. odoo-python #: code:addons/hr_expense_invoice/models/hr_expense_sheet.py:0 msgid "Show missing work email employees" -msgstr "" +msgstr "Prikaži zaposlene, ki nimajo službenega e-poštnega naslova" #. module: hr_expense_invoice #: model:ir.model.fields,field_description:hr_expense_invoice.field_account_bank_statement_line__source_invoice_expense_id @@ -129,16 +135,18 @@ msgid "" "The work email of some employees is missing. Please add it on" " the employee form" msgstr "" +"Manjka službeni e-poštni naslov nekaterih zaposlenih. Prosimo, vnesite jih v " +"obrazec kadrov" #. module: hr_expense_invoice #: model:ir.model.fields,field_description:hr_expense_invoice.field_hr_expense__transfer_move_ids msgid "Transfer Move" -msgstr "" +msgstr "Vknjižba transferja" #. module: hr_expense_invoice #: model:ir.model.fields,field_description:hr_expense_invoice.field_hr_expense__invoice_id msgid "Vendor Bill" -msgstr "" +msgstr "Prejeti račun" #. module: hr_expense_invoice #. odoo-python @@ -147,19 +155,22 @@ msgid "" "Vendor bill amount mismatch!\n" "Please make sure amount in vendor bills equal to amount of its expense lines" msgstr "" +"Znesek na prejetem računu se ne ujema!\n" +"Preverite, ali se znesek na prejetih računih ujema z zneskom v posameznih " +"stroškovnih postavkah" #. module: hr_expense_invoice #. odoo-python #: code:addons/hr_expense_invoice/models/hr_expense.py:0 #: code:addons/hr_expense_invoice/models/hr_expense_sheet.py:0 msgid "Vendor bill state must be Posted" -msgstr "" +msgstr "Prejeti račun mora biti v stanju 'knjiženo'" #. module: hr_expense_invoice #. odoo-python #: code:addons/hr_expense_invoice/models/hr_expense_sheet.py:0 msgid "You can only generate an accounting entry for approved expense(s)." -msgstr "" +msgstr "Računovodski vnos lahko ustvarite le za odobrene stroške." #. module: hr_expense_invoice #. odoo-python @@ -168,6 +179,7 @@ msgid "" "You can't change the total amount, as there's an expense linked to this " "invoice." msgstr "" +"Skupnega zneska ni mogoče spremeniti, saj je s tem računom povezan izdatek." #. module: hr_expense_invoice #. odoo-python @@ -176,3 +188,5 @@ msgid "" "You cannot create accounting entries for an expense " "report without expenses." msgstr "" +"Za poročilo o stroških ni mogoče ustvariti računovodskih vnosov, če v njem " +"stroškov ni." From e97ac81666f9dcf6776c81e05e35ff769ed27398 Mon Sep 17 00:00:00 2001 From: Matjaz Mozetic Date: Tue, 2 Jun 2026 19:43:35 +0000 Subject: [PATCH 66/69] Translated using Weblate (Slovenian) Currently translated at 100.0% (26 of 26 strings) Translation: hr-expense-18.0/hr-expense-18.0-hr_expense_invoice Translate-URL: https://translation.odoo-community.org/projects/hr-expense-18-0/hr-expense-18-0-hr_expense_invoice/sl/ --- hr_expense_invoice/i18n/sl.po | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/hr_expense_invoice/i18n/sl.po b/hr_expense_invoice/i18n/sl.po index 71eeb49c4..cd4d94003 100644 --- a/hr_expense_invoice/i18n/sl.po +++ b/hr_expense_invoice/i18n/sl.po @@ -6,7 +6,7 @@ msgid "" msgstr "" "Project-Id-Version: Odoo Server 18.0\n" "Report-Msgid-Bugs-To: \n" -"PO-Revision-Date: 2026-06-02 19:39+0000\n" +"PO-Revision-Date: 2026-06-02 21:46+0000\n" "Last-Translator: Matjaz Mozetic \n" "Language-Team: none\n" "Language: sl\n" @@ -24,11 +24,14 @@ msgid "" " Expense\n" " " msgstr "" +"\n" +" Izdatek\n" +" " #. module: hr_expense_invoice #: model:ir.model.fields,field_description:hr_expense_invoice.field_hr_expense__amount_residual msgid "Amount Due" -msgstr "" +msgstr "Znesek za plačilo" #. module: hr_expense_invoice #: model:mail.message.subtype,name:hr_expense_invoice.mt_expense_approved_inherited @@ -108,13 +111,13 @@ msgid "" "Reference to the expense with a linked invoice that generated thistransfer " "journal entry" msgstr "" -"Sklic na strošek s povezano fakturo, na podlagi katere je bil ustvarjen ta " -"knjigovodski zapis o prenosu" +"Sklic na strošek s povezanim računom, na podlagi katerega je bila ustvarjena " +"ta prenosna temeljnica" #. module: hr_expense_invoice #: model:ir.model.fields,field_description:hr_expense_invoice.field_hr_expense__sheet_id_state msgid "Sheet state" -msgstr "Stanje preglednice" +msgstr "Stanje poročila" #. module: hr_expense_invoice #. odoo-python @@ -126,7 +129,7 @@ msgstr "Prikaži zaposlene, ki nimajo službenega e-poštnega naslova" #: model:ir.model.fields,field_description:hr_expense_invoice.field_account_bank_statement_line__source_invoice_expense_id #: model:ir.model.fields,field_description:hr_expense_invoice.field_account_move__source_invoice_expense_id msgid "Source Invoice Expense" -msgstr "" +msgstr "Izvorni strošek računa" #. module: hr_expense_invoice #. odoo-python @@ -135,13 +138,13 @@ msgid "" "The work email of some employees is missing. Please add it on" " the employee form" msgstr "" -"Manjka službeni e-poštni naslov nekaterih zaposlenih. Prosimo, vnesite jih v " -"obrazec kadrov" +"Manjka službeni e-poštni naslov nekaterih zaposlenih. Prosimo, dodajte ga na " +"obrazcu zaposlenega" #. module: hr_expense_invoice #: model:ir.model.fields,field_description:hr_expense_invoice.field_hr_expense__transfer_move_ids msgid "Transfer Move" -msgstr "Vknjižba transferja" +msgstr "Prenosna temeljnica" #. module: hr_expense_invoice #: model:ir.model.fields,field_description:hr_expense_invoice.field_hr_expense__invoice_id From 8618aca2ef292d5b9a6480304036b859d8fbe7a1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bet=C3=BCl=20=C3=96=C4=9Fmen?= Date: Wed, 3 Jun 2026 15:55:22 +0000 Subject: [PATCH 67/69] Translated using Weblate (Turkish) Currently translated at 65.3% (17 of 26 strings) Translation: hr-expense-18.0/hr-expense-18.0-hr_expense_invoice Translate-URL: https://translation.odoo-community.org/projects/hr-expense-18-0/hr-expense-18-0-hr_expense_invoice/tr/ --- hr_expense_invoice/i18n/tr.po | 39 +++++++++++++++++++++-------------- 1 file changed, 24 insertions(+), 15 deletions(-) diff --git a/hr_expense_invoice/i18n/tr.po b/hr_expense_invoice/i18n/tr.po index b29cfb948..5faf0ebac 100644 --- a/hr_expense_invoice/i18n/tr.po +++ b/hr_expense_invoice/i18n/tr.po @@ -6,13 +6,15 @@ msgid "" msgstr "" "Project-Id-Version: Odoo Server 18.0\n" "Report-Msgid-Bugs-To: \n" -"Last-Translator: Automatically generated\n" +"PO-Revision-Date: 2026-06-03 18:46+0000\n" +"Last-Translator: Betül Öğmen \n" "Language-Team: none\n" "Language: tr\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: \n" "Plural-Forms: nplurals=2; plural=n != 1;\n" +"X-Generator: Weblate 5.15.2\n" #. module: hr_expense_invoice #: model_terms:ir.ui.view,arch_db:hr_expense_invoice.view_move_form @@ -21,64 +23,67 @@ msgid "" " Expense\n" " " msgstr "" +"\n" +" Masraf\n" +" " #. module: hr_expense_invoice #: model:ir.model.fields,field_description:hr_expense_invoice.field_hr_expense__amount_residual msgid "Amount Due" -msgstr "" +msgstr "Ödenecek Tutar" #. module: hr_expense_invoice #: model:mail.message.subtype,name:hr_expense_invoice.mt_expense_approved_inherited msgid "Approved" -msgstr "" +msgstr "Onaylandı" #. module: hr_expense_invoice #: model_terms:ir.ui.view,arch_db:hr_expense_invoice.hr_expense_sheet_form_view_inherit_sale_expense msgid "Create Vendor Bill" -msgstr "" +msgstr "Tedarikçi Faturası Oluşturun" #. module: hr_expense_invoice #: model:ir.model,name:hr_expense_invoice.model_hr_expense msgid "Expense" -msgstr "" +msgstr "Masraf" #. module: hr_expense_invoice #: model:ir.model,name:hr_expense_invoice.model_hr_expense_sheet msgid "Expense Report" -msgstr "" +msgstr "Masraf Formu" #. module: hr_expense_invoice #: model:mail.message.subtype,description:hr_expense_invoice.mt_expense_approved_inherited msgid "Expense report approved" -msgstr "" +msgstr "Masraf formu onaylandı" #. module: hr_expense_invoice #: model:ir.model.fields,field_description:hr_expense_invoice.field_account_bank_statement_line__expense_ids #: model:ir.model.fields,field_description:hr_expense_invoice.field_account_move__expense_ids msgid "Expenses" -msgstr "" +msgstr "Masraflar" #. module: hr_expense_invoice #: model:ir.model.fields,field_description:hr_expense_invoice.field_hr_expense_sheet__invoice_count msgid "Invoice Count" -msgstr "" +msgstr "Fatura Sayısı" #. module: hr_expense_invoice #. odoo-python #: code:addons/hr_expense_invoice/models/hr_expense_sheet.py:0 #: model_terms:ir.ui.view,arch_db:hr_expense_invoice.hr_expense_sheet_form_view_inherit_sale_expense msgid "Invoices" -msgstr "" +msgstr "Faturalar" #. module: hr_expense_invoice #: model:ir.model,name:hr_expense_invoice.model_account_move msgid "Journal Entry" -msgstr "" +msgstr "Yevmiye Kaydı" #. module: hr_expense_invoice #: model:ir.model,name:hr_expense_invoice.model_account_move_line msgid "Journal Item" -msgstr "" +msgstr "Yevmiye Kalemi" #. module: hr_expense_invoice #. odoo-python @@ -86,7 +91,7 @@ msgstr "" msgid "" "Please specify an expense journal in order to generate" " accounting entries." -msgstr "" +msgstr "Muhasebe kayıtları oluşturmak için bir gider günlüğü belirtiniz." #. module: hr_expense_invoice #. odoo-python @@ -95,6 +100,8 @@ msgid "" "Please specify if the expenses for this report were paid by" " the company, or the employee" msgstr "" +"Bu raporun masraflarının şirket tarafından mı yoksa çalışan tarafından mı " +"ödendiğini belirtiniz" #. module: hr_expense_invoice #: model:ir.model.fields,help:hr_expense_invoice.field_account_bank_statement_line__source_invoice_expense_id @@ -103,17 +110,19 @@ msgid "" "Reference to the expense with a linked invoice that generated thistransfer " "journal entry" msgstr "" +"Bu transfer yevmiye kaydını oluşturan bağlantılı faturaya sahip gidere " +"referans" #. module: hr_expense_invoice #: model:ir.model.fields,field_description:hr_expense_invoice.field_hr_expense__sheet_id_state msgid "Sheet state" -msgstr "" +msgstr "Çizelge Durumu" #. module: hr_expense_invoice #. odoo-python #: code:addons/hr_expense_invoice/models/hr_expense_sheet.py:0 msgid "Show missing work email employees" -msgstr "" +msgstr "Eksik iş e-postası olan çalışanları göster" #. module: hr_expense_invoice #: model:ir.model.fields,field_description:hr_expense_invoice.field_account_bank_statement_line__source_invoice_expense_id From 9e1801567ad46c549a5a9e39a298cd0931ccefa1 Mon Sep 17 00:00:00 2001 From: Matjaz Mozetic Date: Mon, 8 Jun 2026 05:53:22 +0000 Subject: [PATCH 68/69] Translated using Weblate (Slovenian) Currently translated at 100.0% (26 of 26 strings) Translation: hr-expense-18.0/hr-expense-18.0-hr_expense_invoice Translate-URL: https://translation.odoo-community.org/projects/hr-expense-18-0/hr-expense-18-0-hr_expense_invoice/sl/ --- hr_expense_invoice/i18n/sl.po | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hr_expense_invoice/i18n/sl.po b/hr_expense_invoice/i18n/sl.po index cd4d94003..92c27dc06 100644 --- a/hr_expense_invoice/i18n/sl.po +++ b/hr_expense_invoice/i18n/sl.po @@ -6,7 +6,7 @@ msgid "" msgstr "" "Project-Id-Version: Odoo Server 18.0\n" "Report-Msgid-Bugs-To: \n" -"PO-Revision-Date: 2026-06-02 21:46+0000\n" +"PO-Revision-Date: 2026-06-08 08:46+0000\n" "Last-Translator: Matjaz Mozetic \n" "Language-Team: none\n" "Language: sl\n" @@ -117,7 +117,7 @@ msgstr "" #. module: hr_expense_invoice #: model:ir.model.fields,field_description:hr_expense_invoice.field_hr_expense__sheet_id_state msgid "Sheet state" -msgstr "Stanje poročila" +msgstr "Stanje preglednice" #. module: hr_expense_invoice #. odoo-python From 9009056b9241485c4de84f514fc44896ed4e85d6 Mon Sep 17 00:00:00 2001 From: Eduardo de Miguel Date: Wed, 24 Jun 2026 13:39:41 +0200 Subject: [PATCH 69/69] [MIG] hr_expense_invoice: Migration to 19.0 --- hr_expense_invoice/README.rst | 58 ++- hr_expense_invoice/__manifest__.py | 4 +- .../data/mail_message_subtype.xml | 9 - hr_expense_invoice/models/__init__.py | 1 - hr_expense_invoice/models/account_move.py | 62 +-- hr_expense_invoice/models/hr_expense.py | 258 +++++++++++- hr_expense_invoice/models/hr_expense_sheet.py | 308 -------------- hr_expense_invoice/readme/CONTRIBUTORS.md | 1 + hr_expense_invoice/readme/DESCRIPTION.md | 10 +- hr_expense_invoice/readme/ROADMAP.md | 6 +- hr_expense_invoice/readme/USAGE.md | 27 +- .../static/description/index.html | 59 ++- .../tests/test_hr_expense_invoice.py | 388 +++++++----------- .../views/account_move_views.xml | 25 -- hr_expense_invoice/views/hr_expense_views.xml | 97 +++-- 15 files changed, 545 insertions(+), 768 deletions(-) delete mode 100644 hr_expense_invoice/data/mail_message_subtype.xml delete mode 100644 hr_expense_invoice/models/hr_expense_sheet.py delete mode 100644 hr_expense_invoice/views/account_move_views.xml diff --git a/hr_expense_invoice/README.rst b/hr_expense_invoice/README.rst index f502ec3f1..bb9fbeabf 100644 --- a/hr_expense_invoice/README.rst +++ b/hr_expense_invoice/README.rst @@ -21,27 +21,22 @@ Supplier invoices on HR expenses :target: http://www.gnu.org/licenses/agpl-3.0-standalone.html :alt: License: AGPL-3 .. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fhr--expense-lightgray.png?logo=github - :target: https://github.com/OCA/hr-expense/tree/18.0/hr_expense_invoice + :target: https://github.com/OCA/hr-expense/tree/19.0/hr_expense_invoice :alt: OCA/hr-expense .. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png - :target: https://translation.odoo-community.org/projects/hr-expense-18-0/hr-expense-18-0-hr_expense_invoice + :target: https://translation.odoo-community.org/projects/hr-expense-19-0/hr-expense-19-0-hr_expense_invoice :alt: Translate me on Weblate .. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png - :target: https://runboat.odoo-community.org/builds?repo=OCA/hr-expense&target_branch=18.0 + :target: https://runboat.odoo-community.org/builds?repo=OCA/hr-expense&target_branch=19.0 :alt: Try me on Runboat |badge1| |badge2| |badge3| |badge4| |badge5| -This module should be used when a supplier invoice is paid by an -employee. It allows to set a supplier invoice for each expense line, -adding the corresponding journal items to transfer the debt to the -employee. +This module should be used when a vendor bill is paid by an employee. It +allows to register a vendor bill, adding the corresponding journal items +to transfer the debt to the employee. -There are 2 ways to reference expense to invoice. - -1. On expense, directly select one invoice. -2. On expense report, use button "Create Vendor Bill" to create one - invoice for multiple expenses. +You can set the vendor bill in the Expense or create a new one. **Table of contents** @@ -51,29 +46,31 @@ There are 2 ways to reference expense to invoice. Usage ===== -**Reference one invoice to an expense** +- Create an expense paid by an employee. +- Select a Vendor Bill or create a new one with "Create Vendor Bill" + button. +- Clic on Post Journal Entries button. +- At this point: -- Create an expense sheet. -- Add an expense line to sheet with an invoice_id selected or create one - new. -- Process expense sheet. -- On paying expense sheet, you are reconciling supplier invoice too. + - A new Transfer Entry has been created to transfer the debt from the + Vendor to the Employee. + - Vendor Bill has been reconciled with the Transfer Entry. -**Create one invoice to multiple expenses** +- Go to the Transfer move by clicking on the "Transfer Moves" button. +- Pay this Entry clicking on the Gears > Pay. +- You will see: -- Create an expense sheet with one or multiple expense lines -- After approved, click button "Create Vendor Bill" -- Select multiple expense to create an invoice, and process it. -- New invoice will be create and link to the selected expense lines. -- Validate newly create invoice. -- On paying expense sheet, you are reconciling supplier invoice(s) too. + - Vendor Bill has been reconciled with the Transfer Entry Vendor line. + - Transfer Entry Employee line has been paid. Known issues / Roadmap ====================== -- Multiple payment terms for a supplier invoice are not handled - correctly. -- Partial reconcile supplier invoices are also not correctly handled. +- Multiple payment terms for a vendor bills are not handled correctly. +- Partial reconcile vendor bill are also not correctly handled. +- Since Odoo 19 only supports isolated expenses and clear vendor + bill/receipt creation, invoice_id field on expense should be migrated + to account_move_id field and deeply refactor the module. Bug Tracker =========== @@ -81,7 +78,7 @@ Bug Tracker Bugs are tracked on `GitHub Issues `_. In case of trouble, please check there if your issue has already been reported. If you spotted it first, help us to smash it by providing a detailed and welcomed -`feedback `_. +`feedback `_. Do not contact contributors directly about support or help with technical issues. @@ -105,6 +102,7 @@ Contributors - Kitti Upariphutthiphong - Rattapong Chokmasermkul - Saran Lim. +- Eduardo de Miguel (``Moduon ``\ \_\_) Maintainers ----------- @@ -119,6 +117,6 @@ OCA, or the Odoo Community Association, is a nonprofit organization whose mission is to support the collaborative development of Odoo features and promote its widespread use. -This module is part of the `OCA/hr-expense `_ project on GitHub. +This module is part of the `OCA/hr-expense `_ project on GitHub. You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute. diff --git a/hr_expense_invoice/__manifest__.py b/hr_expense_invoice/__manifest__.py index 3f6b16a77..5add07f03 100644 --- a/hr_expense_invoice/__manifest__.py +++ b/hr_expense_invoice/__manifest__.py @@ -4,16 +4,14 @@ { "name": "Supplier invoices on HR expenses", - "version": "18.0.1.0.3", + "version": "19.0.1.0.0", "category": "Human Resources", "author": "Tecnativa, Odoo Community Association (OCA)", "license": "AGPL-3", "website": "https://github.com/OCA/hr-expense", "depends": ["hr_expense"], "data": [ - "views/account_move_views.xml", "views/hr_expense_views.xml", - "data/mail_message_subtype.xml", ], "installable": True, } diff --git a/hr_expense_invoice/data/mail_message_subtype.xml b/hr_expense_invoice/data/mail_message_subtype.xml deleted file mode 100644 index 15e25256f..000000000 --- a/hr_expense_invoice/data/mail_message_subtype.xml +++ /dev/null @@ -1,9 +0,0 @@ - - - - Approved - hr.expense.sheet - - Expense report approved - - diff --git a/hr_expense_invoice/models/__init__.py b/hr_expense_invoice/models/__init__.py index d869298ab..885d39b3f 100644 --- a/hr_expense_invoice/models/__init__.py +++ b/hr_expense_invoice/models/__init__.py @@ -1,5 +1,4 @@ # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). from . import hr_expense -from . import hr_expense_sheet from . import account_move diff --git a/hr_expense_invoice/models/account_move.py b/hr_expense_invoice/models/account_move.py index e2f5846b4..dfbbc9e8d 100644 --- a/hr_expense_invoice/models/account_move.py +++ b/hr_expense_invoice/models/account_move.py @@ -1,6 +1,7 @@ # Copyright 2019 Ecosoft # Copyright 2021 Tecnativa - Víctor Martínez # Copyright 2024 Tecnativa - Pedro M. Baeza +# Copyright 2026 Moduon - Eduardo de Miguel # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). from odoo import api, fields, models from odoo.exceptions import ValidationError @@ -10,7 +11,7 @@ class AccountMove(models.Model): _inherit = "account.move" - expense_ids = fields.One2many( + invoice_expense_ids = fields.One2many( comodel_name="hr.expense", inverse_name="invoice_id", string="Expenses" ) source_invoice_expense_id = fields.Many2one( @@ -23,8 +24,10 @@ class AccountMove(models.Model): def _check_expense_ids(self): DecimalPrecision = self.env["decimal.precision"] precision = DecimalPrecision.precision_get("Product Price") - for move in self.filtered("expense_ids"): - expense_amount = sum(move.expense_ids.mapped("total_amount_currency")) + for move in self.filtered("invoice_expense_ids"): + expense_amount = sum( + move.invoice_expense_ids.mapped("total_amount_currency") + ) if float_compare(expense_amount, move.amount_total, precision) != 0: raise ValidationError( self.env._( @@ -33,21 +36,40 @@ def _check_expense_ids(self): ) ) - def action_view_expense(self): + def action_force_register_payment(self): + if self.source_invoice_expense_id: + return self.line_ids.action_register_payment() + return super().action_force_register_payment() + + def _compute_nb_expenses(self): + res = super()._compute_nb_expenses() + for move in self.filtered("invoice_expense_ids"): + move.nb_expenses = len(move.invoice_expense_ids) + return res + + def action_open_expense(self): self.ensure_one() + if not self.invoice_expense_ids: + return super().action_open_expense() + linked_expenses = self.invoice_expense_ids + if len(linked_expenses) > 1: + return { + "name": self.env._("Expenses"), + "type": "ir.actions.act_window", + "view_mode": "list,form", + "views": [(False, "list"), (False, "form")], + "res_model": "hr.expense", + "domain": [("id", "in", linked_expenses.ids)], + } return { + "name": linked_expenses.name, "type": "ir.actions.act_window", "view_mode": "form", + "views": [(False, "form")], "res_model": "hr.expense", - "res_id": self.expense_ids[:1].id, + "res_id": linked_expenses.id, } - def action_force_register_payment(self): - if not self.source_invoice_expense_id: - return super().action_force_register_payment() - else: - return self.line_ids.action_register_payment() - class AccountMoveLine(models.Model): _inherit = "account.move.line" @@ -56,21 +78,3 @@ class AccountMoveLine(models.Model): def _check_payable_receivable(self): _self = self.filtered("expense_id") return super(AccountMoveLine, (self - _self))._check_payable_receivable() - - def reconcile(self): - """Mark expenses paid by employee having invoice when reconciling them.""" - expenses = self.move_id.source_invoice_expense_id - not_paid_expenses = expenses.filtered(lambda x: x.state != "done") - res = super().reconcile() - not_paid_expense_sheets = not_paid_expenses.sheet_id.filtered( - lambda x: x.state != "done" - ) - paid_expenses = not_paid_expenses.filtered( - lambda expense: expense.currency_id.is_zero(expense.amount_residual) - ) - paid_expenses.write({"state": "done"}) - paid_sheets = not_paid_expense_sheets.filtered( - lambda x: all(expense.state == "done" for expense in x.expense_line_ids) - ) - paid_sheets.set_to_paid() - return res diff --git a/hr_expense_invoice/models/hr_expense.py b/hr_expense_invoice/models/hr_expense.py index 3dde9b98e..4381d9191 100644 --- a/hr_expense_invoice/models/hr_expense.py +++ b/hr_expense_invoice/models/hr_expense.py @@ -2,16 +2,17 @@ # Copyright 2020 Tecnativa - David Vidal # Copyright 2021 Tecnativa - Víctor Martínez # Copyright 2015-2024 Tecnativa - Pedro M. Baeza +# Copyright 2026 Moduon - Eduardo de Miguel # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). from odoo import Command, api, fields, models -from odoo.exceptions import UserError +from odoo.exceptions import RedirectWarning, UserError +from odoo.tools.misc import clean_context class HrExpense(models.Model): _inherit = "hr.expense" - sheet_id_state = fields.Selection(related="sheet_id.state", string="Sheet state") invoice_id = fields.Many2one( comodel_name="account.move", string="Vendor Bill", @@ -19,7 +20,7 @@ class HrExpense(models.Model): ("move_type", "=", "in_invoice"), ("state", "=", "posted"), ("payment_state", "=", "not_paid"), - ("expense_ids", "=", False), + ("invoice_expense_ids", "=", False), ], copy=False, ) @@ -55,6 +56,7 @@ def _prepare_invoice_values(self): "move_type": "in_invoice", "invoice_date": self.date, "invoice_line_ids": invoice_lines, + "partner_id": self.vendor_id.id, } def _prepare_own_account_transfer_move_vals(self): @@ -81,7 +83,6 @@ def _prepare_own_account_transfer_move_vals(self): "date": self.date, "ref": self.name, "source_invoice_expense_id": self.id, - "expense_sheet_id": self.sheet_id.id, "line_ids": [ Command.create( { @@ -115,16 +116,51 @@ def action_expense_create_invoice(self): "price_unit": invoice.amount_total, } ) + if self.payment_mode == "company_account": + invoice.action_post() return True - @api.constrains("invoice_id") + def action_view_invoice(self): + self.ensure_one() + return { + "type": "ir.actions.act_window", + "res_model": "account.move", + "name": self.invoice_id.name, + "view_mode": "form", + "res_id": self.invoice_id.id, + "views": [(self.env.ref("account.view_move_form").id, "form")], + "target": "current", + } + + def action_view_transfer_moves(self): + self.ensure_one() + action_name = self.env._("Transfer of %s", self.name) + if len(self.transfer_move_ids) == 1: + return { + "type": "ir.actions.act_window", + "res_model": "account.move", + "name": action_name, + "view_mode": "form", + "res_id": self.transfer_move_ids.id, + "views": [(self.env.ref("account.view_move_form").id, "form")], + "target": "current", + } + # Multiple transfer moves + action = self.env["ir.actions.act_window"]._for_xml_id( + "account.action_move_journal_line" + ) + action["name"] = action_name + action["domain"] = [("id", "in", self.transfer_move_ids.ids)] + return action + + @api.constrains("invoice_id", "state", "payment_mode") def _check_invoice_id(self): for expense in self: # Only non binding expense - if ( - not expense.sheet_id - and expense.invoice_id - and expense.invoice_id.state != "posted" - ): + if expense.state not in ("posted", "in_payment", "paid"): + continue + if expense.payment_mode == "company_account": + continue + if expense.invoice_id and expense.invoice_id.state != "posted": raise UserError(self.env._("Vendor bill state must be Posted")) @api.onchange("invoice_id") @@ -186,3 +222,205 @@ def _compute_amount_residual(self): lambda x: x.account_type in ("asset_receivable", "liability_payable") ) rec.amount_residual = -sum(payment_term_lines.mapped(residual_field)) + + def _check_can_create_move(self): + res = super()._check_can_create_move() + expenses_with_invoices = self.filtered("invoice_id") + # Check expeneses with transfer moves + if exp_w_tranfers := expenses_with_invoices.filtered_domain( + [("transfer_move_ids", "!=", False)] + ): + raise UserError( + self.env._( + "You can't create an accounting entry for an expense " + "already linked to a transfer journal entry.\n" + "Please unselect %s and try again.", + ", ".join(exp_w_tranfers.mapped("name")), + ) + ) + # Check expeneses without posted invoices + if exp_wo_posted_invoices := expenses_with_invoices.filtered_domain( + [("invoice_id.state", "!=", "posted")] + ): + raise UserError( + self.env._( + "You can't create an accounting entry for an expense " + "linked to a vendor bill that is not posted.\n" + "Please post Vendor Bills of %s and try again.", + ", ".join(exp_wo_posted_invoices.mapped("name")), + ) + ) + # Check expeneses without employee work email + if emp_wo_email := expenses_with_invoices.employee_id.filtered_domain( + [ + ("work_email", "=", False), + ] + ): + action = self.env["ir.actions.actions"]._for_xml_id( + "hr.open_view_employee_list_my" + ) + action["domain"] = [("id", "in", emp_wo_email.ids)] + raise RedirectWarning( + self.env._( + "The work email of some employees is missing.\n" + "Please add it on the employee form." + ), + action, + self.env._("Show missing work email employees"), + ) + return res + + def _reconcile_transfer_moves(self): + # Reconcile transfer entries with vendor bills once they are posted + self.ensure_one() + if self.payment_mode != "own_account": + return + if not self.invoice_id or not self.transfer_move_ids: + raise UserError( + self.env._( + "You can't reconcile an expense linked to a " + "Vendor Bill or Transfer that doesn't exist (%s).", + self.name, + ) + ) + # All transfer moves should be posted + vendor_inv_lines = self.invoice_id.line_ids.filtered_domain( + [ + ("display_type", "=", "payment_term"), + ] + ) + vendor_transfer_lines = self.transfer_move_ids.line_ids.filtered_domain( + [ + ("partner_id", "=", self.invoice_id.partner_id.id), + ] + ) + if vendor_inv_lines and vendor_transfer_lines: + (vendor_inv_lines + vendor_transfer_lines).reconcile() + + def _action_expense_create_transfer_moves(self): + for expense in self: + transfer_move_vals = expense._prepare_own_account_transfer_move_vals() + transfer_move = self.env["account.move"].create(transfer_move_vals) + transfer_move.action_post() + expense._reconcile_transfer_moves() + + def action_post(self): + self._check_can_create_move() + expenses_with_invoices = self.filtered("invoice_id") + expenses_with_invoices._action_expense_create_transfer_moves() + if expenses_without_invoices := self - expenses_with_invoices: + return super(HrExpense, expenses_without_invoices).action_post() + return + + @api.depends("invoice_id.state", "transfer_move_ids.line_ids.reconciled") + def _compute_state(self): + expenses_with_invoices = self.filtered("invoice_id") + if expenses_without_invoices := self - expenses_with_invoices: + super(HrExpense, expenses_without_invoices)._compute_state() + + for expense in expenses_with_invoices: + bill = expense.invoice_id + transfers = expense.transfer_move_ids + employee_parnter = expense.employee_id.sudo().work_contact_id + # Shortcut to paid, as it's already paid, + # but we may not have the bank statement yet + if expense.payment_mode == "company_account": + expense.state = "paid" + # Check state of vendor bills + elif bill.state == "cancel": + # Nothing to do with the expense + expense.state = "paid" + elif bill.state == "draft" or not transfers: + # Bill created, and not posted yet + # No transfer moves, so need to be able to create + expense.state = "approved" + elif bill.payment_state == "not_paid": + # Transfers are created and bill is posted, but not reconciled + # They should reconcile manually with the transfer moves + expense.state = "posted" + elif bill.payment_state in ("partial", "in_payment", "paid", "reversed"): + # All vendor move lines are reconciled: in_payment + vendor_transfer_lines = transfers.line_ids.filtered_domain( + [ + ("partner_id", "=", bill.partner_id.id), + ] + ) + if all(vendor_transfer_lines.mapped("reconciled")): + expense.state = "in_payment" + # All employee move lines are reconciled: paid + employee_transfer_lines = transfers.line_ids.filtered_domain( + [ + ("partner_id", "=", employee_parnter.id), + ] + ) + if all(employee_transfer_lines.mapped("reconciled")): + expense.state = "paid" + else: + expense.state = expense.approval_state or "draft" + return + + def _check_can_reset_approval(self): + expenses_with_invoices = self.filtered("invoice_id") + res = super( + HrExpense, self - expenses_with_invoices + )._check_can_reset_approval() + if not all(self.mapped("can_reset")): + raise UserError( + self.env._( + "Only HR Officers, accountants, " + "or the concerned employee can reset to draft." + ) + ) + if any( + state not in {False, "draft"} + for state in expenses_with_invoices.invoice_id.mapped("state") + ): + raise UserError( + self.env._( + "You cannot reset to draft an " + "expense linked to a posted journal entry." + ) + ) + if any( + state not in {False, "draft"} + for state in expenses_with_invoices.transfer_move_ids.mapped("state") + ): + raise UserError( + self.env._( + "You cannot reset to draft an " + "expense linked to a posted transfer journal entry." + ) + ) + return res + + def action_reset(self): + self = self.with_context(**clean_context(self.env.context)) + # Invoices + invoices_sudo = self.sudo().invoice_id + draft_invoices_sudo = invoices_sudo.filtered(lambda m: m.state == "draft") + non_draft_invoices_sudo = invoices_sudo - draft_invoices_sudo + non_draft_invoices_sudo._reverse_moves( + default_values_list=[ + {"invoice_date": fields.Date.context_today(inv_sudo)} + for inv_sudo in non_draft_invoices_sudo + ], + cancel=True, + ) + draft_invoices_sudo.unlink() + # Trasfers + transfers_sudo = self.sudo().transfer_move_ids + draft_transfers_sudo = transfers_sudo.filtered(lambda m: m.state == "draft") + non_draft_transfers_sudo = transfers_sudo - draft_transfers_sudo + non_draft_transfers_sudo._reverse_moves( + default_values_list=[ + {"invoice_date": fields.Date.context_today(transfer_sudo)} + for transfer_sudo in non_draft_transfers_sudo + ], + cancel=True, + ) + draft_transfers_sudo.unlink() + return super().action_reset() + + def _do_reset_approval(self): + self.sudo().write({"invoice_id": False, "transfer_move_ids": []}) + return super()._do_reset_approval() diff --git a/hr_expense_invoice/models/hr_expense_sheet.py b/hr_expense_invoice/models/hr_expense_sheet.py deleted file mode 100644 index 4e5b0147d..000000000 --- a/hr_expense_invoice/models/hr_expense_sheet.py +++ /dev/null @@ -1,308 +0,0 @@ -# Copyright 2017 Tecnativa - Vicent Cubells -# Copyright 2015-2024 Tecnativa - Pedro M. Baeza -# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). - -from odoo import Command, api, fields, models -from odoo.exceptions import RedirectWarning, UserError -from odoo.tools import config, float_compare - - -class HrExpenseSheet(models.Model): - _inherit = "hr.expense.sheet" - - invoice_count = fields.Integer(compute="_compute_invoice_count") - - def get_expense_sheets_with_invoices(self, func): - return self.filtered( - lambda sheet: func(expense.invoice_id for expense in sheet.expense_line_ids) - ) - - def _do_create_ap_moves(self): - # Create AP transfer entry for expenses paid by employees - all_generated_moves = self.env["account.move"] - for expense in self.expense_line_ids.filtered("invoice_id"): - if expense.payment_mode == "own_account": - move_vals = expense._prepare_own_account_transfer_move_vals() - move = self.env["account.move"].create(move_vals) - all_generated_moves |= move - return all_generated_moves - - def _reconcile_ap_moves(self): - # Reconcile AP transfer entries with vendor bills once they are posted - for expense in self.expense_line_ids.filtered("invoice_id"): - if expense.payment_mode == "own_account": - move = self.account_move_ids.filtered( - lambda m, exp=expense: m.source_invoice_expense_id == exp - ) - if move and move.state == "posted": - ap_lines = expense.invoice_id.line_ids.filtered( - lambda x: x.display_type == "payment_term" - ) - transfer_line = move.line_ids.filtered( - lambda x, partner=expense.invoice_id.partner_id: x.partner_id - == partner - ) - if ap_lines and transfer_line: - (ap_lines + transfer_line).reconcile() - - def _do_create_moves(self): - removed_expenses_map = {} - sheets_to_skip_super = self.env["hr.expense.sheet"] - all_generated_moves = self.env["account.move"] - for sheet in self: - expenses_with_invoice = sheet.expense_line_ids.filtered("invoice_id") - if expenses_with_invoice: - if len(expenses_with_invoice) == len(sheet.expense_line_ids): - sheets_to_skip_super += sheet - else: - removed_expenses_map[sheet.id] = expenses_with_invoice - sheet.expense_line_ids -= expenses_with_invoice - sheets_for_super = self - sheets_to_skip_super - if sheets_for_super: - res = super(HrExpenseSheet, sheets_for_super)._do_create_moves() - all_generated_moves |= res - for sheet_id, expenses in removed_expenses_map.items(): - sheet = self.env["hr.expense.sheet"].browse(sheet_id) - sheet.expense_line_ids += expenses - ap_moves = self._do_create_ap_moves() - all_generated_moves |= ap_moves - return all_generated_moves - - def action_sheet_move_post(self): - sheets_with_invoices = self.get_expense_sheets_with_invoices(any) - sheets_all_invoices = self.get_expense_sheets_with_invoices(all) - for sheet in sheets_with_invoices: - sheet._validate_expense_invoice() - res = super(HrExpenseSheet, self - sheets_all_invoices).action_sheet_move_post() - for sheet in sheets_all_invoices: - sheet._check_can_create_move() - moves = sheet._do_create_moves() - sheet.account_move_ids |= moves - moves.action_post() - sheet.filtered( - lambda x: x.payment_mode == "company_account" - )._compute_from_account_move_ids() - if sheet.state == "approve" and sheet.account_move_ids: - if sheet.payment_state in ["paid", "in_payment"]: - sheet.state = "done" - else: - sheet.state = "post" - sheets_mixed = sheets_with_invoices - sheets_all_invoices - if sheets_mixed: - sheets_mixed.filtered( - lambda x: x.payment_mode == "company_account" - )._compute_from_account_move_ids() - for sheet in sheets_with_invoices: - sheet._reconcile_ap_moves() - return res - - def set_to_paid(self): - """Don't mark sheet as paid when reconciling invoices.""" - if self.env.context.get("use_hr_expense_invoice"): - return True - return super().set_to_paid() - - def _compute_invoice_count(self): - Invoice = self.env["account.move"] - can_read = Invoice.has_access("read") - for sheet in self: - sheet.invoice_count = ( - can_read and len(sheet.expense_line_ids.mapped("invoice_id")) or 0 - ) - - @api.depends( - "expense_line_ids.invoice_id.payment_state", - "expense_line_ids.amount_residual", - ) - def _compute_from_account_move_ids(self): - """Determine the payment status for lines with expense invoices linked""" - invoice_sheets = self.filtered(lambda x: x.expense_line_ids.invoice_id) - invoice_sheets.payment_state = "not_paid" - for sheet in invoice_sheets: - lines = sheet.expense_line_ids - lines_with_invoices = len(lines.filtered("invoice_id")) - if sheet.payment_mode == "company_account": - lines_with_paid_invoices = len( - lines.filtered(lambda x: x.invoice_id.payment_state == "paid") - ) - lines_with_partial_invoices = len( - lines.filtered(lambda x: x.invoice_id.payment_state == "partial") - ) - else: - lines_with_paid_invoices = len( - lines.filtered( - lambda x: x.transfer_move_ids and x.amount_residual == 0 - ) - ) - lines_with_partial_invoices = 0 # TODO: Consider partial reconciliation - if lines_with_invoices == lines_with_paid_invoices: - sheet.payment_state = "paid" - elif lines_with_paid_invoices or lines_with_partial_invoices: - sheet.payment_state = "partial" - return super( - HrExpenseSheet, self - invoice_sheets - )._compute_from_account_move_ids() - - def _prepare_bills_vals(self): - res = super()._prepare_bills_vals() - test_condition = not config["test_enable"] or self.env.context.get( - "test_hr_expense_invoice" - ) - if test_condition: - expenses_without_invoice = self.expense_line_ids.filtered( - lambda r: not r.invoice_id - ) - res["line_ids"] = [ - Command.create(expense._prepare_move_lines_vals()) - for expense in expenses_without_invoice - ] - return res - - def _validate_expense_invoice(self): - """Check several criteria that needs to be met for creating the move.""" - expense_lines = self.mapped("expense_line_ids").filtered("invoice_id") - DecimalPrecision = self.env["decimal.precision"] - precision = DecimalPrecision.precision_get("Product Price") - invoices = expense_lines.mapped("invoice_id") - if not invoices: - return - # All invoices must confirmed - if any(invoices.filtered(lambda i: i.state != "posted")): - raise UserError(self.env._("Vendor bill state must be Posted")) - expense_amount = sum(expense_lines.mapped("total_amount_currency")) - invoice_amount = sum(invoices.mapped("amount_total")) - # Expense amount must equal invoice amount - if float_compare(expense_amount, invoice_amount, precision) != 0: - raise UserError( - self.env._( - "Vendor bill amount mismatch!\nPlease make sure amount in " - "vendor bills equal to amount of its expense lines" - ) - ) - - def action_view_invoices(self): - self.ensure_one() - action = { - "name": self.env._("Invoices"), - "type": "ir.actions.act_window", - "res_model": "account.move", - "target": "current", - } - invoice_ids = self.expense_line_ids.mapped("invoice_id").ids - view = self.env.ref("account.view_move_form") - if len(invoice_ids) == 1: - invoice = invoice_ids[0] - action["res_id"] = invoice - action["view_mode"] = "form" - action["views"] = [(view.id, "form")] - else: - action["view_mode"] = "list,form" - action["domain"] = [("id", "in", invoice_ids)] - return action - - @api.depends() - def _compute_state(self): - """Set proper state according to linked invoices.""" - sheets_with_invoices = self.filtered( - lambda sheet: all( - expense.invoice_id and expense.invoice_id.state == "posted" - for expense in sheet.expense_line_ids - ) - and sheet.state == sheet.approval_state - ) - company_account_sheets = sheets_with_invoices.filtered( - lambda sheet: sheet.payment_mode == "company_account" - ) - company_account_sheets.state = "done" - sheets_with_paid_invoices = ( - sheets_with_invoices - company_account_sheets - ).filtered( - lambda sheet: all( - expense.invoice_id.payment_state != "not_paid" - for expense in sheet.expense_line_ids - ) - ) - sheets_with_paid_invoices.state = "post" - return super(HrExpenseSheet, self - sheets_with_invoices)._compute_state() - - def _do_approve(self): - expense_sheets_with_invoices = self.get_expense_sheets_with_invoices(all) - own_account_sheets = self.filtered( - lambda sheet: sheet.payment_mode == "own_account" - ) - sheets_to_bypass = expense_sheets_with_invoices + own_account_sheets - res = super(HrExpenseSheet, self - sheets_to_bypass)._do_approve() - for sheet in sheets_to_bypass.filtered( - lambda s: s.state in {"submit", "draft"} - ): - sheet.write( - { - "approval_state": "approve", - "user_id": sheet.user_id.id or self.env.user.id, - "approval_date": fields.Date.context_today(sheet), - } - ) - self.activity_update() - return res - - def _track_subtype(self, init_values): - self.ensure_one() - if self.state == "approve": - return self.env.ref("hr_expense_invoice.mt_expense_approved_inherited") - else: - super()._track_subtype(init_values) - - def _check_can_create_move(self): - expense_sheets_with_invoices = self.get_expense_sheets_with_invoices(all) - res = super( - HrExpenseSheet, self - expense_sheets_with_invoices - )._check_can_create_move() - # We copy this method because the expenses are in 'approve' or 'posted' - # in case this is the second run, instead of 'submit' - if any(not sheet.expense_line_ids for sheet in expense_sheets_with_invoices): - raise UserError( - self.env._( - "You cannot create accounting entries for an expense \ - report without expenses." - ) - ) - if any( - sheet.state not in ["approve", "post"] - for sheet in expense_sheets_with_invoices - ): - raise UserError( - self.env._( - "You can only generate an accounting entry for approved expense(s)." - ) - ) - if any(not sheet.journal_id for sheet in expense_sheets_with_invoices): - raise UserError( - self.env._( - "Please specify an expense journal in order to generate \ - accounting entries." - ) - ) - if False in expense_sheets_with_invoices.mapped("payment_mode"): - raise UserError( - self.env._( - "Please specify if the expenses for this report were paid by \ - the company, or the employee" - ) - ) - missing_email_employees = expense_sheets_with_invoices.filtered( - lambda sheet: not sheet.employee_id.work_email - ).employee_id - if missing_email_employees: - action = expense_sheets_with_invoices.env["ir.actions.actions"]._for_xml_id( - "hr.open_view_employee_list_my" - ) - action["domain"] = [("id", "in", missing_email_employees.ids)] - raise RedirectWarning( - self.env._( - "The work email of some employees is missing. Please add it on \ - the employee form" - ), - action, - self.env._("Show missing work email employees"), - ) - return res diff --git a/hr_expense_invoice/readme/CONTRIBUTORS.md b/hr_expense_invoice/readme/CONTRIBUTORS.md index a0ee5e903..c7cfc9a17 100644 --- a/hr_expense_invoice/readme/CONTRIBUTORS.md +++ b/hr_expense_invoice/readme/CONTRIBUTORS.md @@ -5,3 +5,4 @@ - Kitti Upariphutthiphong \<\> - Rattapong Chokmasermkul \<\> - Saran Lim. \<\> +- Eduardo de Miguel (`Moduon `__) diff --git a/hr_expense_invoice/readme/DESCRIPTION.md b/hr_expense_invoice/readme/DESCRIPTION.md index d638be87a..bb77ca60d 100644 --- a/hr_expense_invoice/readme/DESCRIPTION.md +++ b/hr_expense_invoice/readme/DESCRIPTION.md @@ -1,10 +1,6 @@ -This module should be used when a supplier invoice is paid by an -employee. It allows to set a supplier invoice for each expense line, +This module should be used when a vendor bill is paid by an +employee. It allows to register a vendor bill, adding the corresponding journal items to transfer the debt to the employee. -There are 2 ways to reference expense to invoice. - -1. On expense, directly select one invoice. -2. On expense report, use button "Create Vendor Bill" to create one - invoice for multiple expenses. +You can set the vendor bill in the Expense or create a new one. diff --git a/hr_expense_invoice/readme/ROADMAP.md b/hr_expense_invoice/readme/ROADMAP.md index ceef0a207..8576bd927 100644 --- a/hr_expense_invoice/readme/ROADMAP.md +++ b/hr_expense_invoice/readme/ROADMAP.md @@ -1,3 +1,3 @@ -- Multiple payment terms for a supplier invoice are not handled - correctly. -- Partial reconcile supplier invoices are also not correctly handled. +- Multiple payment terms for a vendor bills are not handled correctly. +- Partial reconcile vendor bill are also not correctly handled. +- Since Odoo 19 only supports isolated expenses and clear vendor bill/receipt creation, invoice_id field on expense should be migrated to account_move_id field and deeply refactor the module. diff --git a/hr_expense_invoice/readme/USAGE.md b/hr_expense_invoice/readme/USAGE.md index e2fba394e..a3879491e 100644 --- a/hr_expense_invoice/readme/USAGE.md +++ b/hr_expense_invoice/readme/USAGE.md @@ -1,16 +1,11 @@ -**Reference one invoice to an expense** - -- Create an expense sheet. -- Add an expense line to sheet with an invoice_id selected or create one - new. -- Process expense sheet. -- On paying expense sheet, you are reconciling supplier invoice too. - -**Create one invoice to multiple expenses** - -- Create an expense sheet with one or multiple expense lines -- After approved, click button "Create Vendor Bill" -- Select multiple expense to create an invoice, and process it. -- New invoice will be create and link to the selected expense lines. -- Validate newly create invoice. -- On paying expense sheet, you are reconciling supplier invoice(s) too. +- Create an expense paid by an employee. +- Select a Vendor Bill or create a new one with "Create Vendor Bill" button. +- Clic on Post Journal Entries button. +- At this point: + - A new Transfer Entry has been created to transfer the debt from the Vendor to the Employee. + - Vendor Bill has been reconciled with the Transfer Entry. +- Go to the Transfer move by clicking on the "Transfer Moves" button. +- Pay this Entry clicking on the Gears > Pay. +- You will see: + - Vendor Bill has been reconciled with the Transfer Entry Vendor line. + - Transfer Entry Employee line has been paid. diff --git a/hr_expense_invoice/static/description/index.html b/hr_expense_invoice/static/description/index.html index 504127096..05822c666 100644 --- a/hr_expense_invoice/static/description/index.html +++ b/hr_expense_invoice/static/description/index.html @@ -374,17 +374,11 @@

    Supplier invoices on HR expenses

    !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !! source digest: sha256:85b7c666fd5804c4bc60c81b824e7fd5b22a60e9b7be702b07a7fb2deea2edfe !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! --> -

    Beta License: AGPL-3 OCA/hr-expense Translate me on Weblate Try me on Runboat

    -

    This module should be used when a supplier invoice is paid by an -employee. It allows to set a supplier invoice for each expense line, -adding the corresponding journal items to transfer the debt to the -employee.

    -

    There are 2 ways to reference expense to invoice.

    -
      -
    1. On expense, directly select one invoice.
    2. -
    3. On expense report, use button “Create Vendor Bill” to create one -invoice for multiple expenses.
    4. -
    +

    Beta License: AGPL-3 OCA/hr-expense Translate me on Weblate Try me on Runboat

    +

    This module should be used when a vendor bill is paid by an employee. It +allows to register a vendor bill, adding the corresponding journal items +to transfer the debt to the employee.

    +

    You can set the vendor bill in the Expense or create a new one.

    Table of contents

      @@ -401,30 +395,34 @@

      Supplier invoices on HR expenses

    Usage

    -

    Reference one invoice to an expense

      -
    • Create an expense sheet.
    • -
    • Add an expense line to sheet with an invoice_id selected or create one -new.
    • -
    • Process expense sheet.
    • -
    • On paying expense sheet, you are reconciling supplier invoice too.
    • +
    • Create an expense paid by an employee.
    • +
    • Select a Vendor Bill or create a new one with “Create Vendor Bill” +button.
    • +
    • Clic on Post Journal Entries button.
    • +
    • At this point:
        +
      • A new Transfer Entry has been created to transfer the debt from the +Vendor to the Employee.
      • +
      • Vendor Bill has been reconciled with the Transfer Entry.
      -

      Create one invoice to multiple expenses

      -
        -
      • Create an expense sheet with one or multiple expense lines
      • -
      • After approved, click button “Create Vendor Bill”
      • -
      • Select multiple expense to create an invoice, and process it.
      • -
      • New invoice will be create and link to the selected expense lines.
      • -
      • Validate newly create invoice.
      • -
      • On paying expense sheet, you are reconciling supplier invoice(s) too.
      • + +
      • Go to the Transfer move by clicking on the “Transfer Moves” button.
      • +
      • Pay this Entry clicking on the Gears > Pay.
      • +
      • You will see:
          +
        • Vendor Bill has been reconciled with the Transfer Entry Vendor line.
        • +
        • Transfer Entry Employee line has been paid.
        • +
        +

    Known issues / Roadmap

      -
    • Multiple payment terms for a supplier invoice are not handled -correctly.
    • -
    • Partial reconcile supplier invoices are also not correctly handled.
    • +
    • Multiple payment terms for a vendor bills are not handled correctly.
    • +
    • Partial reconcile vendor bill are also not correctly handled.
    • +
    • Since Odoo 19 only supports isolated expenses and clear vendor +bill/receipt creation, invoice_id field on expense should be migrated +to account_move_id field and deeply refactor the module.
    @@ -432,7 +430,7 @@

    Bug Tracker

    Bugs are tracked on GitHub Issues. In case of trouble, please check there if your issue has already been reported. If you spotted it first, help us to smash it by providing a detailed and welcomed -feedback.

    +feedback.

    Do not contact contributors directly about support or help with technical issues.

    @@ -455,6 +453,7 @@

    Contributors

  • Kitti Upariphutthiphong <kittiu@ecosoft.co.th>
  • Rattapong Chokmasermkul <rattapongc@ecosoft.co.th>
  • Saran Lim. <saranl@ecosoft.co.th>
  • +
  • Eduardo de Miguel (Moduon <https://www.moduon.team/>__)
  • @@ -466,7 +465,7 @@

    Maintainers

    OCA, or the Odoo Community Association, is a nonprofit organization whose mission is to support the collaborative development of Odoo features and promote its widespread use.

    -

    This module is part of the OCA/hr-expense project on GitHub.

    +

    This module is part of the OCA/hr-expense project on GitHub.

    You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.

    diff --git a/hr_expense_invoice/tests/test_hr_expense_invoice.py b/hr_expense_invoice/tests/test_hr_expense_invoice.py index 3b7bb1ac8..652780795 100644 --- a/hr_expense_invoice/tests/test_hr_expense_invoice.py +++ b/hr_expense_invoice/tests/test_hr_expense_invoice.py @@ -2,10 +2,9 @@ # Copyright 2021 Tecnativa - Pedro M. Baeza # Copyright 2021-2023 Tecnativa - Víctor Martínez # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html). -import base64 from odoo import fields -from odoo.exceptions import UserError, ValidationError +from odoo.exceptions import UserError from odoo.tests import Form, tagged from odoo.addons.hr_expense.tests.common import TestExpenseCommon @@ -23,6 +22,7 @@ def setUpClass(cls): cls.company_data["company"].account_sale_tax_id = False cls.company_data["company"].account_purchase_tax_id = False cls.product_a.supplier_taxes_id = False + cls.product_c.supplier_taxes_id = False cls.invoice = cls.init_invoice( "in_invoice", products=[cls.product_a], @@ -33,290 +33,182 @@ def setUpClass(cls): "invoice_date": fields.Date.today(), } ) - cls.expense = cls.env["hr.expense"].create( + cls.expense = cls.create_expenses( { - "name": "Expense test", + "name": "Expense 1 Paid by Employee", "employee_id": cls.expense_employee.id, - "product_id": cls.product_a.id, + "product_id": cls.product_c.id, + "payment_mode": "own_account", + "total_amount_currency": 100.0, + "company_id": cls.company_data["company"].id, } ) - cls._create_attachment(cls, cls.expense._name, cls.expense.id) - cls.expense2 = cls.expense.copy() - cls._create_attachment(cls, cls.expense2._name, cls.expense2.id) - cls.expense3 = cls.expense.copy() - cls._create_attachment(cls, cls.expense3._name, cls.expense3.id) - - def _invoice_register_payment(self, invoice): - res = invoice.action_register_payment() - payment_form = Form(self.env[res["res_model"]].with_context(**res["context"])) - payment_form.journal_id = self.cash_journal - return payment_form.save() - - def _register_payment(self, sheet): - res = sheet.action_register_payment() - register_payment_form = Form( - self.env[res["res_model"]].with_context(**res["context"]) + cls.expense2 = cls.create_expenses( + { + "name": "Expense 2 Paid by Company", + "employee_id": cls.expense_employee.id, + "product_id": cls.product_c.id, + "payment_mode": "company_account", + "total_amount_currency": 100.0, + "company_id": cls.company_data["company"].id, + } ) - register_payment_form.journal_id = self.cash_journal - register = register_payment_form.save() - res2 = register.action_create_payments() - payment = self.env[res2["res_model"]].browse(res2["res_id"]) - self.assertEqual(len(payment), 1) - self.assertEqual(sheet.payment_state, "paid") + cls._create_attachment(cls, cls.expense) + cls._create_attachment(cls, cls.expense2) + + def _expense_register_payment(self, expense): + in_payment_state = expense.account_move_id._get_invoice_in_payment_state() + payment = self.get_new_payment(expense, expense.total_amount) + # liquidity_lines = payment._seek_for_lines()[0] + self.assertEqual(expense.state, in_payment_state) return payment - def _create_attachment(self, res_model, res_id): - return self.env["ir.attachment"].create( + def _transfer_move_register_payment(self, expense): + to_pay_lines = expense.transfer_move_ids.line_ids.filtered_domain( + [ + ("partner_id", "=", self.expense_employee.work_contact_id.id), + ] + ) + payment_register = ( + self.env["account.payment.register"] + .with_context( + active_model="account.move", active_ids=expense.transfer_move_ids.ids + ) + .create( + { + "amount": sum(to_pay_lines.mapped("credit")), + "journal_id": self.company_data["default_journal_bank"].id, + "payment_method_line_id": self.inbound_payment_method_line.id, + } + ) + ) + self.assertEqual( + payment_register.partner_bank_id.partner_id, + expense.employee_id.work_contact_id, + ) + return payment_register._create_payments() + + def _create_attachment(self, expense): + res_model, res_id = expense._name, expense.id + attachment = self.env["ir.attachment"].create( { "name": f"Test attachment {res_id} ({res_model})", "res_model": res_model, "res_id": res_id, - "datas": base64.b64encode(b"\xff data"), + "raw": b"R0lGODdhAQABAIAAAP///////ywAAAAAAQABAAACAkQBADs=", } ) + expense.message_main_attachment_id = attachment + return attachment def _action_submit_expenses(self, expenses): - expense_sheet = self.env["hr.expense.sheet"].create( - { - "name": "Test expense sheet", - "employee_id": expenses.employee_id.id, - "expense_line_ids": expenses, - } - ) - return expense_sheet + expenses.action_submit() + expenses._do_approve(check=False) + for expense in expenses: + self.assertEqual(expense.state, "approved") def test_0_hr_tests_misc(self): - self.assertEqual(self.expense.nb_attachment, 1) - self.assertEqual(self.expense2.nb_attachment, 1) - self.assertEqual(self.expense3.nb_attachment, 1) + expenses = self.expense + self.expense2 + self.assertRecordValues( + expenses.message_main_attachment_id, + [ + {"name": f"Test attachment {self.expense.id} (hr.expense)"}, + {"name": f"Test attachment {self.expense2.id} (hr.expense)"}, + ], + ) - def test_0_hr_test_no_invoice(self): + def test_1_hr_test_no_invoice(self): # We add an expense - sheet = self._action_submit_expenses(self.expense) - self.assertIn(self.expense, sheet.expense_line_ids) + self.assertAlmostEqual(self.expense.total_amount_currency, 100.0) + # Change product, check price changed + self.expense.product_id = self.product_a self.assertAlmostEqual( self.expense.total_amount_currency, self.product_a.standard_price ) - # We approve sheet, no invoice - sheet.action_submit_sheet() - sheet.action_approve_expense_sheets() - self.assertEqual(sheet.state, "approve") - self.assertFalse(sheet.account_move_ids) + # We approve expense, no invoice + self._action_submit_expenses(self.expense) + self.assertFalse(self.expense.invoice_id) # We post journal entries - sheet.action_sheet_move_post() - self.assertEqual(sheet.state, "post") - self.assertTrue(sheet.account_move_ids) - # We make payment on expense sheet - self._register_payment(sheet) - - def test_1_hr_test_invoice(self): + self.post_expenses_with_wizard(self.expense) + self.assertEqual(self.expense.account_move_id.state, "posted") + self.assertEqual(self.expense.account_move_id.payment_state, "not_paid") + self.assertEqual(self.expense.state, "posted") + # We make payment on invoice + self._expense_register_payment(self.expense) + + def test_2_hr_test_invoice(self): # We add an expense - self.expense.price_unit = 100 - sheet = self._action_submit_expenses(self.expense) - self.assertIn(self.expense, sheet.expense_line_ids) + self.expense.total_amount_currency = 50 + self._action_submit_expenses(self.expense) # We add invoice to expense self.invoice.action_post() # residual = 100 + self.assertEqual(self.invoice.amount_total, 100.0) with Form(self.expense) as f: f.invoice_id = self.invoice - # We approve sheet - sheet.action_approve_expense_sheets() - self.assertEqual(sheet.state, "approve") - self.assertFalse(sheet.account_move_ids) - self.assertEqual(self.invoice.state, "posted") - # Test state not posted - self.invoice.button_draft() + self.assertTrue(self.expense.invoice_id) + # Adding the invoice, changes the total amount + self.assertEqual(self.expense.total_amount, self.invoice.amount_total) + # Test error when invoice is not posted + self.expense.invoice_id.button_draft() with self.assertRaises(UserError): - sheet.action_sheet_move_post() - self.invoice.action_post() - # We post journal entries - sheet.action_sheet_move_post() - self.assertEqual(sheet.state, "post") - self.assertEqual(self.invoice.payment_state, "paid") - self.assertEqual(sheet.payment_state, "not_paid") - self.assertEqual(self.expense.amount_residual, 100) + self.expense.action_post() + self.expense.invoice_id.action_post() + # We post journal entries (transfer) + self.expense.action_post() + self.assertEqual(self.expense.state, "in_payment") + self.assertEqual(self.expense.invoice_id.payment_state, "paid") self.assertTrue(self.expense.transfer_move_ids) # Pay the transferred amount (through a hack using reversal) - payment = self._register_payment(sheet) - self.assertEqual(self.expense.amount_residual, 0) - self.assertEqual(sheet.payment_state, "paid") - self.assertEqual(sheet.state, "done") - # Unreconcile the payment + payment = self._transfer_move_register_payment(self.expense) + for transfer_line in self.expense.transfer_move_ids.line_ids: + self.assertTrue(transfer_line.reconciled) + self.assertEqual(self.expense.state, "paid") + # Delete the payment payment.action_draft() - self.assertEqual(self.expense.amount_residual, 100) - self.assertEqual(sheet.payment_state, "not_paid") + payment.unlink() + self.assertEqual(self.expense.state, "in_payment") - def test_1_hr_test_invoice_paid_by_company(self): + def test_3_hr_test_create_invoice(self): # We add an expense - self.expense.price_unit = 100 - self.expense.payment_mode = "company_account" - sheet = self._action_submit_expenses(self.expense) - self.assertIn(self.expense, sheet.expense_line_ids) - # We add invoice to expense - self.invoice.action_post() # residual = 100.0 - self.expense.invoice_id = self.invoice - # We approve sheet - sheet.action_approve_expense_sheets() - self.assertEqual(sheet.state, "approve") - self.assertFalse(sheet.account_move_ids) - self.assertEqual(self.invoice.state, "posted") - # We post journal entries - sheet.action_sheet_move_post() - self.assertEqual(sheet.state, "done") - self.assertEqual(self.invoice.payment_state, "not_paid") - # Click on View Invoice button link to the correct invoice - res = sheet.action_view_invoices() - self.assertEqual(res["view_mode"], "form") - - def test_2_hr_test_multi_invoices(self): - # We add 2 expenses - self.expense.price_unit = 100 - self.expense2.price_unit = 100 - expenses = self.expense + self.expense2 - sheet = self._action_submit_expenses(expenses) - self.assertIn(self.expense, sheet.expense_line_ids) - self.assertIn(self.expense2, sheet.expense_line_ids) - # We add invoices to expenses - self.invoice.action_post() - self.invoice2.action_post() - self.expense.invoice_id = self.invoice.id - self.expense2.invoice_id = self.invoice2.id - self.assertAlmostEqual(self.expense.total_amount_currency, 100) - self.assertAlmostEqual(self.expense2.total_amount_currency, 100) - # We approve sheet - sheet.action_approve_expense_sheets() - self.assertEqual(sheet.state, "approve") - self.assertFalse(sheet.account_move_ids) - self.assertEqual(self.invoice.state, "posted") - # We post journal entries - sheet.action_sheet_move_post() - self.assertEqual(sheet.state, "post") - self.assertEqual(self.invoice.payment_state, "paid") - self.assertEqual(self.invoice2.payment_state, "paid") - - def test_3_hr_test_expense_create_invoice(self): - # We add 2 expenses - expenses = self.expense + self.expense2 - sheet = self._action_submit_expenses(expenses) - self.assertIn(self.expense, sheet.expense_line_ids) - self.assertIn(self.expense2, sheet.expense_line_ids) + self._action_submit_expenses(self.expense) + self.assertFalse(self.expense.invoice_id) + # We create an invoice from the expense self.expense.action_expense_create_invoice() self.assertTrue(self.expense.invoice_id) - self.assertAlmostEqual(self.expense.invoice_id.message_attachment_count, 1) - self.assertEqual(sheet.invoice_count, 1) - sheet.invalidate_recordset() - self.expense2.action_expense_create_invoice() - self.assertTrue(self.expense2.invoice_id) - self.assertAlmostEqual(self.expense2.invoice_id.message_attachment_count, 1) - self.assertEqual(sheet.invoice_count, 2) - # Only change invoice not assigned to expense yet - with self.assertRaises(ValidationError): - self.expense.invoice_id.amount_total = 60 - # Force to change - invoice = self.expense2.invoice_id - self.expense2.invoice_id = False - invoice.amount_total = 50 - self.assertEqual( - self.expense2.total_amount_currency, self.product_a.standard_price + self.assertEqual(self.expense.invoice_id.state, "draft") + self.assertRecordValues( + self.expense.invoice_id.attachment_ids, + [ + {"name": f"Test attachment {self.expense.id} (hr.expense)"}, + ], ) - # Set invoice_id again to expense2 - self.expense2.invoice_id = invoice - # Validate invoices self.expense.invoice_id.partner_id = self.partner_a self.expense.invoice_id.action_post() - self.expense2.invoice_id.partner_id = self.partner_a - self.expense2.invoice_id.action_post() - # We approve sheet - sheet.action_approve_expense_sheets() - # We post journal entries - sheet.action_sheet_move_post() + self.assertEqual(self.expense.state, "approved") + self.expense.action_post() + self.assertEqual(self.expense.state, "in_payment") + self.assertEqual(self.expense.invoice_id.payment_state, "paid") + self.assertTrue(self.expense.transfer_move_ids) + # Pay the transferred amount + payment = self._transfer_move_register_payment(self.expense) + for transfer_line in self.expense.transfer_move_ids.line_ids: + self.assertTrue(transfer_line.reconciled) + self.assertEqual(self.expense.state, "paid") + # Delete the payment + payment.action_draft() + payment.unlink() + self.assertEqual(self.expense.state, "in_payment") - def test_4_hr_expense_constraint(self): - # Only invoice with status open is allowed - with self.assertRaises(UserError): - self.expense.write({"invoice_id": self.invoice.id}) - sheet = self._action_submit_expenses(self.expense) - self.expense.invoice_id = self.invoice - self.invoice.action_post() - self.expense.total_amount_currency = 80 - # Amount must equal, expense vs invoice + def test_4_hr_test_invoice_paid_by_company(self): + # We add an expense + self._action_submit_expenses(self.expense2) + # Vendor is required in order to create an invoice with self.assertRaises(UserError): - sheet._validate_expense_invoice() - self.expense.total_amount_currency = 100.0 - sheet._validate_expense_invoice() - - def test_5_hr_expense_invoice_no_duplicate_accounting_entries(self): - """Test that expenses linked to invoices don't create - duplicate accounting entries.""" - sheet = self._action_submit_expenses(self.expense + self.expense2) - self.invoice.action_post() - with Form(self.expense) as f: - f.invoice_id = self.invoice - sheet.action_approve_expense_sheets() - sheet.action_sheet_move_post() - self.assertEqual(len(sheet.account_move_ids[0].invoice_line_ids), 1) - self.assertEqual( - sheet.account_move_ids[0].invoice_line_ids.price_total, - self.expense2.total_amount, - ) - self.assertEqual( - sheet.account_move_ids[1].amount_total, - self.expense.total_amount, - ) - - def test_6_hr_expense_mixed_invoice_same_sheet(self): - # We add 3 expenses - self.expense.price_unit = 10 - self.expense2.price_unit = 20 - self.expense3.price_unit = 30 - expenses = self.expense + self.expense2 + self.expense3 - sheet = self._action_submit_expenses(expenses) - self.assertIn(self.expense, sheet.expense_line_ids) - self.assertIn(self.expense2, sheet.expense_line_ids) - self.assertIn(self.expense3, sheet.expense_line_ids) - # We add invoices to expenses 1 and 2 - self.invoice.action_post() - self.invoice2.action_post() - self.expense.invoice_id = self.invoice.id - self.expense2.invoice_id = self.invoice2.id - # We approve sheet - sheet.action_approve_expense_sheets() - self.assertEqual(sheet.state, "approve") - self.assertFalse(sheet.account_move_ids) - # We post journal entries - sheet.action_sheet_move_post() - self.assertEqual(sheet.state, "post") - self.assertEqual(self.invoice.payment_state, "paid") - self.assertEqual(self.invoice2.payment_state, "paid") - # 2 ap moves and 1 vendor bill - self.assertEqual(len(sheet.account_move_ids), 3) - - def test_7_coverage_boosters(self): - """Test to cover edge cases for 100% Codecov coverage""" - sheet = self._action_submit_expenses(self.expense) - - # 1. Cobertura para _track_subtype 'else' (Imagen 3) - sheet.write({"state": "draft"}) - sheet._track_subtype({"state": "draft"}) - - # 2. Cobertura para los 'if' en _reconcile_ap_moves (Imagen 1) - self.invoice.action_post() - self.expense.write( - { - "invoice_id": self.invoice.id, - "payment_mode": "own_account", - } - ) - - # Condición False 1: No hay asientos generados (move = False) - sheet._reconcile_ap_moves() - - # Condición False 2: El asiento existe, pero NO está publicado - dummy_move = self.env["account.move"].create( - { - "move_type": "entry", - "source_invoice_expense_id": self.expense.id, - "journal_id": self.cash_journal.id, - } - ) - sheet.account_move_ids |= dummy_move - sheet._reconcile_ap_moves() + self.expense2.action_expense_create_invoice() + # Set Vendor + self.expense2.vendor_id = self.partner_a + # We create an invoice from the expense + self.expense2.action_expense_create_invoice() + self.assertTrue(self.expense2.invoice_id) + # Invoice is created in posted state + self.assertEqual(self.expense2.invoice_id.state, "posted") diff --git a/hr_expense_invoice/views/account_move_views.xml b/hr_expense_invoice/views/account_move_views.xml deleted file mode 100644 index cb29e454c..000000000 --- a/hr_expense_invoice/views/account_move_views.xml +++ /dev/null @@ -1,25 +0,0 @@ - - - - account.move.form - Add expense smart-button - account.move - - -
    - - -
    -
    -
    -
    diff --git a/hr_expense_invoice/views/hr_expense_views.xml b/hr_expense_invoice/views/hr_expense_views.xml index 0731a44bd..6fc24faeb 100644 --- a/hr_expense_invoice/views/hr_expense_views.xml +++ b/hr_expense_invoice/views/hr_expense_views.xml @@ -61,69 +61,68 @@ - +
    + +
    -
    - - - hr.expense.sheet.form.inherit.sale.expense - hr.expense.sheet - - - - - - - - + - +