diff --git a/README.md b/README.md index be0f0b830e9..2c720e8edeb 100644 --- a/README.md +++ b/README.md @@ -24,6 +24,7 @@ addon | version | maintainers | summary [purchase_all_shipments](purchase_all_shipments/) | 18.0.1.0.0 | | Purchase All Shipments [purchase_cancel_reason](purchase_cancel_reason/) | 18.0.1.0.0 | | Purchase Cancel Reason [purchase_commercial_partner](purchase_commercial_partner/) | 18.0.1.0.0 | [![alexis-via](https://github.com/alexis-via.png?size=30px)](https://github.com/alexis-via) | Add stored related field 'Commercial Supplier' on POs +[purchase_deposit](purchase_deposit/) | 18.0.1.0.0 | | Option to create deposit from purchase order [purchase_last_price_info](purchase_last_price_info/) | 18.0.1.0.0 | [![LoisRForgeFlow](https://github.com/LoisRForgeFlow.png?size=30px)](https://github.com/LoisRForgeFlow) | Purchase Product Last Price Info [purchase_order_archive](purchase_order_archive/) | 18.0.1.0.0 | | Archive Purchase Orders [purchase_order_line_menu](purchase_order_line_menu/) | 18.0.1.0.0 | | Adds Purchase Order Lines Menu diff --git a/purchase_deposit/README.rst b/purchase_deposit/README.rst new file mode 100644 index 00000000000..f704fbe5564 --- /dev/null +++ b/purchase_deposit/README.rst @@ -0,0 +1,101 @@ +================ +Purchase Deposit +================ + +.. + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + !! This file is generated by oca-gen-addon-readme !! + !! changes will be overwritten. !! + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + !! source digest: sha256:c5cfa6ba5279681ee9c1ed57ead42fe860b04997ae268fcb3b485f14d8aa5800 + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + +.. |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%2Fpurchase--workflow-lightgray.png?logo=github + :target: https://github.com/OCA/purchase-workflow/tree/18.0/purchase_deposit + :alt: OCA/purchase-workflow +.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png + :target: https://translation.odoo-community.org/projects/purchase-workflow-18-0/purchase-workflow-18-0-purchase_deposit + :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/purchase-workflow&target_branch=18.0 + :alt: Try me on Runboat + +|badge1| |badge2| |badge3| |badge4| |badge5| + +This module allow purchase order to register deposit similar to that in +sales order + +**Table of contents** + +.. contents:: + :local: + +Usage +===== + +When purchase order is confirmed, a new button "Register Deposit" will +appear. Normally, deposit will be used to create the 1st bill (as +deposit). + +1. On confirmed purchase order, click Register Deposit button, wizard + will open +2. 2 type of deposit bill can be create 1) Down Payment (percentage) 2) + Deposit Payment (fixed amount) +3. Fill in the value and click Create bill or just create deposit. + +As deposit is created, when user click button "Create Bill" again in +purchase order, the Vendor Bill will be created with deposit amount +deducted. + +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 `_. + +Do not contact contributors directly about support or help with technical issues. + +Credits +======= + +Authors +------- + +* Elico Corp +* Ecosoft + +Contributors +------------ + +- Dominique K. +- Kitti Upariphutthiphong +- Rattapong Chokmasermkul +- Joan Mateu +- `Quartile `__: + + - Aung Ko Ko Lin + +Maintainers +----------- + +This module is maintained by the OCA. + +.. image:: https://odoo-community.org/logo.png + :alt: Odoo Community Association + :target: https://odoo-community.org + +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/purchase-workflow `_ project on GitHub. + +You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute. diff --git a/purchase_deposit/__init__.py b/purchase_deposit/__init__.py new file mode 100644 index 00000000000..13fee6cc1cd --- /dev/null +++ b/purchase_deposit/__init__.py @@ -0,0 +1,6 @@ +# Copyright 2019 Elico Corp, Dominique K. +# Copyright 2019 Ecosoft Co., Ltd., Kitti U. +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html). + +from . import models +from . import wizard diff --git a/purchase_deposit/__manifest__.py b/purchase_deposit/__manifest__.py new file mode 100644 index 00000000000..035bad3c554 --- /dev/null +++ b/purchase_deposit/__manifest__.py @@ -0,0 +1,22 @@ +# Copyright 2019 Elico Corp, Dominique K. +# Copyright 2019 Ecosoft Co., Ltd., Kitti U. +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html). + +{ + "name": "Purchase Deposit", + "version": "18.0.1.0.0", + "summary": "Option to create deposit from purchase order", + "author": "Elico Corp, Ecosoft, Odoo Community Association (OCA)", + "website": "https://github.com/OCA/purchase-workflow", + "category": "Purchase Management", + "license": "AGPL-3", + "depends": ["purchase"], + "data": [ + "security/ir.model.access.csv", + "wizard/purchase_make_invoice_advance_views.xml", + "views/res_config_settings_views.xml", + "views/purchase_view.xml", + ], + "installable": True, + "auto_install": False, +} diff --git a/purchase_deposit/i18n/arp.po b/purchase_deposit/i18n/arp.po new file mode 100644 index 00000000000..7d7cf84b1a0 --- /dev/null +++ b/purchase_deposit/i18n/arp.po @@ -0,0 +1,253 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * purchase_deposit +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 15.0\n" +"Report-Msgid-Bugs-To: \n" +"Last-Translator: Automatically generated\n" +"Language-Team: none\n" +"Language: arp\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: purchase_deposit +#: model_terms:ir.ui.view,arch_db:purchase_deposit.view_purchase_advance_payment_inv +msgid "" +"%" +msgstr "" + +#. module: purchase_deposit +#: model:ir.model.fields,help:purchase_deposit.field_purchase_advance_payment_inv__deposit_account_id +msgid "Account used for deposits" +msgstr "" + +#. module: purchase_deposit +#. odoo-python +#: code:addons/purchase_deposit/wizard/purchase_make_invoice_advance.py:0 +msgid "Advance: %s" +msgstr "" + +#. module: purchase_deposit +#: model_terms:ir.ui.view,arch_db:purchase_deposit.view_purchase_advance_payment_inv +msgid "Cancel" +msgstr "" + +#. module: purchase_deposit +#: model:ir.model,name:purchase_deposit.model_res_company +msgid "Companies" +msgstr "" + +#. module: purchase_deposit +#: model:ir.model,name:purchase_deposit.model_res_config_settings +msgid "Config Settings" +msgstr "" + +#. module: purchase_deposit +#: model_terms:ir.ui.view,arch_db:purchase_deposit.view_purchase_advance_payment_inv +msgid "Create Bill" +msgstr "" + +#. module: purchase_deposit +#: model_terms:ir.ui.view,arch_db:purchase_deposit.view_purchase_advance_payment_inv +msgid "Create and View bills" +msgstr "" + +#. module: purchase_deposit +#: model:ir.model.fields,field_description:purchase_deposit.field_purchase_advance_payment_inv__create_uid +msgid "Created by" +msgstr "" + +#. module: purchase_deposit +#: model:ir.model.fields,field_description:purchase_deposit.field_purchase_advance_payment_inv__create_date +msgid "Created on" +msgstr "" + +#. module: purchase_deposit +#: model:ir.model.fields,help:purchase_deposit.field_res_company__purchase_deposit_product_id +#: model:ir.model.fields,help:purchase_deposit.field_res_config_settings__purchase_deposit_product_id +msgid "Default product used for payment advances." +msgstr "" + +#. module: purchase_deposit +#. odoo-python +#: code:addons/purchase_deposit/wizard/purchase_make_invoice_advance.py:0 +msgid "Deposit Payment" +msgstr "" + +#. module: purchase_deposit +#: model:ir.model.fields,field_description:purchase_deposit.field_purchase_advance_payment_inv__amount +msgid "Deposit Payment Amount" +msgstr "" + +#. module: purchase_deposit +#: model:ir.model.fields,field_description:purchase_deposit.field_purchase_advance_payment_inv__purchase_deposit_product_id +msgid "Deposit Payment Product" +msgstr "" + +#. module: purchase_deposit +#: model_terms:ir.ui.view,arch_db:purchase_deposit.res_config_settings_view_form_purchase +msgid "Deposit Payments" +msgstr "" + +#. module: purchase_deposit +#: model:ir.model.fields.selection,name:purchase_deposit.selection__purchase_advance_payment_inv__advance_payment_method__fixed +msgid "Deposit payment (fixed amount)" +msgstr "" + +#. module: purchase_deposit +#: model:ir.model.fields.selection,name:purchase_deposit.selection__purchase_advance_payment_inv__advance_payment_method__percentage +msgid "Deposit payment (percentage)" +msgstr "" + +#. module: purchase_deposit +#: model:ir.model.fields,help:purchase_deposit.field_purchase_order_line__is_deposit +msgid "" +"Deposit payments are made when creating bills from a purchase order. They " +"are not copied when duplicating a purchase order." +msgstr "" + +#. module: purchase_deposit +#: model:ir.model.fields,field_description:purchase_deposit.field_purchase_advance_payment_inv__display_name +msgid "Display Name" +msgstr "" + +#. module: purchase_deposit +#: model:ir.model.fields,field_description:purchase_deposit.field_purchase_advance_payment_inv__deposit_account_id +msgid "Expense Account" +msgstr "" + +#. module: purchase_deposit +#: model:ir.model.fields,field_description:purchase_deposit.field_purchase_advance_payment_inv__id +msgid "ID" +msgstr "" + +#. module: purchase_deposit +#: model:ir.actions.act_window,name:purchase_deposit.action_view_purchase_advance_payment_inv +msgid "Invoice Order" +msgstr "" + +#. module: purchase_deposit +#: model_terms:ir.ui.view,arch_db:purchase_deposit.view_purchase_advance_payment_inv +msgid "Invoice Purchases Order" +msgstr "" + +#. module: purchase_deposit +#: model_terms:ir.ui.view,arch_db:purchase_deposit.view_purchase_advance_payment_inv +msgid "" +"Invoices will be created in draft so that you can review them before " +"validation." +msgstr "" + +#. module: purchase_deposit +#: model:ir.model.fields,field_description:purchase_deposit.field_purchase_order_line__is_deposit +msgid "Is a deposit payment" +msgstr "" + +#. module: purchase_deposit +#: model:ir.model,name:purchase_deposit.model_account_move +msgid "Journal Entry" +msgstr "" + +#. module: purchase_deposit +#: model:ir.model.fields,field_description:purchase_deposit.field_purchase_advance_payment_inv__write_uid +msgid "Last Updated by" +msgstr "" + +#. module: purchase_deposit +#: model:ir.model.fields,field_description:purchase_deposit.field_purchase_advance_payment_inv__write_date +msgid "Last Updated on" +msgstr "" + +#. module: purchase_deposit +#: model_terms:ir.ui.view,arch_db:purchase_deposit.res_config_settings_view_form_purchase +msgid "Product used for deposit payments" +msgstr "" + +#. module: purchase_deposit +#: model:ir.model,name:purchase_deposit.model_purchase_advance_payment_inv +msgid "Purchase Advance Payment Invoice" +msgstr "" + +#. module: purchase_deposit +#: model:ir.model.fields,field_description:purchase_deposit.field_res_company__purchase_deposit_product_id +#: model:ir.model.fields,field_description:purchase_deposit.field_res_config_settings__purchase_deposit_product_id +msgid "Purchase Deposit Product" +msgstr "" + +#. module: purchase_deposit +#: model:ir.model,name:purchase_deposit.model_purchase_order +msgid "Purchase Order" +msgstr "" + +#. module: purchase_deposit +#: model:ir.model,name:purchase_deposit.model_purchase_order_line +msgid "Purchase Order Line" +msgstr "" + +#. module: purchase_deposit +#: model_terms:ir.ui.view,arch_db:purchase_deposit.view_purchase_order_form_inherit +msgid "Register Deposit" +msgstr "" + +#. module: purchase_deposit +#: model:ir.model.fields,help:purchase_deposit.field_purchase_advance_payment_inv__deposit_taxes_id +msgid "Taxes used for deposits" +msgstr "" + +#. module: purchase_deposit +#: model:ir.model.fields,help:purchase_deposit.field_purchase_advance_payment_inv__amount +msgid "The amount to be invoiced in advance, taxes excluded." +msgstr "" + +#. module: purchase_deposit +#. odoo-python +#: code:addons/purchase_deposit/wizard/purchase_make_invoice_advance.py:0 +msgid "The percentage of the deposit must be not over 100" +msgstr "" + +#. module: purchase_deposit +#. odoo-python +#: code:addons/purchase_deposit/wizard/purchase_make_invoice_advance.py:0 +msgid "" +"The product used to invoice a down payment should be of type \"Service\". " +"Please use another product or update this product." +msgstr "" + +#. module: purchase_deposit +#. odoo-python +#: code:addons/purchase_deposit/wizard/purchase_make_invoice_advance.py:0 +msgid "" +"The product used to invoice a down payment should have an invoice policy set " +"to \"Ordered quantities\". Please update your deposit product to be able to " +"create a deposit invoice." +msgstr "" + +#. module: purchase_deposit +#. odoo-python +#: code:addons/purchase_deposit/wizard/purchase_make_invoice_advance.py:0 +msgid "The value of the deposit must be positive." +msgstr "" + +#. module: purchase_deposit +#. odoo-python +#: code:addons/purchase_deposit/wizard/purchase_make_invoice_advance.py:0 +msgid "" +"There is no purchase account defined for this product: %s.\n" +"You may have to install a chart of account from Accounting app, settings " +"menu." +msgstr "" + +#. module: purchase_deposit +#: model:ir.model.fields,field_description:purchase_deposit.field_purchase_advance_payment_inv__deposit_taxes_id +msgid "Vendor Taxes" +msgstr "" + +#. module: purchase_deposit +#: model:ir.model.fields,field_description:purchase_deposit.field_purchase_advance_payment_inv__advance_payment_method +msgid "What do you want to invoice?" +msgstr "" diff --git a/purchase_deposit/i18n/es.po b/purchase_deposit/i18n/es.po new file mode 100644 index 00000000000..c7e6b0b6405 --- /dev/null +++ b/purchase_deposit/i18n/es.po @@ -0,0 +1,297 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * purchase_deposit +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 15.0\n" +"Report-Msgid-Bugs-To: \n" +"PO-Revision-Date: 2024-04-18 08:37+0000\n" +"Last-Translator: Ivorra78 \n" +"Language-Team: none\n" +"Language: es\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 4.17\n" + +#. module: purchase_deposit +#: model_terms:ir.ui.view,arch_db:purchase_deposit.view_purchase_advance_payment_inv +msgid "" +"%" +msgstr "" + +#. module: purchase_deposit +#: model:ir.model.fields,help:purchase_deposit.field_purchase_advance_payment_inv__deposit_account_id +msgid "Account used for deposits" +msgstr "Cuenta contable para el anticipo" + +#. module: purchase_deposit +#. odoo-python +#: code:addons/purchase_deposit/wizard/purchase_make_invoice_advance.py:0 +msgid "Advance: %s" +msgstr "Anticipo:%s" + +#. module: purchase_deposit +#: model_terms:ir.ui.view,arch_db:purchase_deposit.view_purchase_advance_payment_inv +msgid "Cancel" +msgstr "Cancelar" + +#. module: purchase_deposit +#: model:ir.model,name:purchase_deposit.model_res_company +msgid "Companies" +msgstr "Compañías" + +#. module: purchase_deposit +#: model:ir.model,name:purchase_deposit.model_res_config_settings +msgid "Config Settings" +msgstr "Ajustes de configuración" + +#. module: purchase_deposit +#: model_terms:ir.ui.view,arch_db:purchase_deposit.view_purchase_advance_payment_inv +msgid "Create Bill" +msgstr "Crear factura" + +#. module: purchase_deposit +#: model_terms:ir.ui.view,arch_db:purchase_deposit.view_purchase_advance_payment_inv +msgid "Create and View bills" +msgstr "Crear y ver facturas" + +#. module: purchase_deposit +#: model:ir.model.fields,field_description:purchase_deposit.field_purchase_advance_payment_inv__create_uid +msgid "Created by" +msgstr "Creado por" + +#. module: purchase_deposit +#: model:ir.model.fields,field_description:purchase_deposit.field_purchase_advance_payment_inv__create_date +msgid "Created on" +msgstr "Creado en" + +#. module: purchase_deposit +#: model:ir.model.fields,help:purchase_deposit.field_res_company__purchase_deposit_product_id +#: model:ir.model.fields,help:purchase_deposit.field_res_config_settings__purchase_deposit_product_id +msgid "Default product used for payment advances." +msgstr "Producto usado para pagos adelantados." + +#. module: purchase_deposit +#. odoo-python +#: code:addons/purchase_deposit/wizard/purchase_make_invoice_advance.py:0 +msgid "Deposit Payment" +msgstr "Anticipo" + +#. module: purchase_deposit +#: model:ir.model.fields,field_description:purchase_deposit.field_purchase_advance_payment_inv__amount +msgid "Deposit Payment Amount" +msgstr "Cantidad del anticipo" + +#. module: purchase_deposit +#: model:ir.model.fields,field_description:purchase_deposit.field_purchase_advance_payment_inv__purchase_deposit_product_id +msgid "Deposit Payment Product" +msgstr "Producto de anticipo" + +#. module: purchase_deposit +#: model_terms:ir.ui.view,arch_db:purchase_deposit.res_config_settings_view_form_purchase +msgid "Deposit Payments" +msgstr "Anticipo" + +#. module: purchase_deposit +#: model:ir.model.fields.selection,name:purchase_deposit.selection__purchase_advance_payment_inv__advance_payment_method__fixed +msgid "Deposit payment (fixed amount)" +msgstr "Anticipo (cantidad fija)" + +#. module: purchase_deposit +#: model:ir.model.fields.selection,name:purchase_deposit.selection__purchase_advance_payment_inv__advance_payment_method__percentage +msgid "Deposit payment (percentage)" +msgstr "Anticipo (porcentaje)" + +#. module: purchase_deposit +#: model:ir.model.fields,help:purchase_deposit.field_purchase_order_line__is_deposit +msgid "" +"Deposit payments are made when creating bills from a purchase order. They " +"are not copied when duplicating a purchase order." +msgstr "" +"Los pagos a cuenta se realizan al crear facturas a partir de un pedido. No " +"se copian al duplicar una orden de compra." + +#. module: purchase_deposit +#: model:ir.model.fields,field_description:purchase_deposit.field_purchase_advance_payment_inv__display_name +msgid "Display Name" +msgstr "Nombre mostrado" + +#. module: purchase_deposit +#: model:ir.model.fields,field_description:purchase_deposit.field_purchase_advance_payment_inv__deposit_account_id +msgid "Expense Account" +msgstr "Cuenta de coste" + +#. module: purchase_deposit +#: model:ir.model.fields,field_description:purchase_deposit.field_purchase_advance_payment_inv__id +msgid "ID" +msgstr "Identificación" + +#. module: purchase_deposit +#: model:ir.actions.act_window,name:purchase_deposit.action_view_purchase_advance_payment_inv +msgid "Invoice Order" +msgstr "Factura" + +#. module: purchase_deposit +#: model_terms:ir.ui.view,arch_db:purchase_deposit.view_purchase_advance_payment_inv +msgid "Invoice Purchases Order" +msgstr "Factura de compra" + +#. module: purchase_deposit +#: model_terms:ir.ui.view,arch_db:purchase_deposit.view_purchase_advance_payment_inv +msgid "" +"Invoices will be created in draft so that you can review them before " +"validation." +msgstr "" +"Las facturas se crearán en borrador para que puedas revisarlas antes de su " +"validación." + +#. module: purchase_deposit +#: model:ir.model.fields,field_description:purchase_deposit.field_purchase_order_line__is_deposit +msgid "Is a deposit payment" +msgstr "Es un anticipo" + +#. module: purchase_deposit +#: model:ir.model,name:purchase_deposit.model_account_move +msgid "Journal Entry" +msgstr "Asiento Contable" + +#. module: purchase_deposit +#: model:ir.model.fields,field_description:purchase_deposit.field_purchase_advance_payment_inv__write_uid +msgid "Last Updated by" +msgstr "Última actualización por" + +#. module: purchase_deposit +#: model:ir.model.fields,field_description:purchase_deposit.field_purchase_advance_payment_inv__write_date +msgid "Last Updated on" +msgstr "Última actualización el" + +#. module: purchase_deposit +#: model_terms:ir.ui.view,arch_db:purchase_deposit.res_config_settings_view_form_purchase +msgid "Product used for deposit payments" +msgstr "Producto usado para los anticipos" + +#. module: purchase_deposit +#: model:ir.model,name:purchase_deposit.model_purchase_advance_payment_inv +msgid "Purchase Advance Payment Invoice" +msgstr "Factura de anticipo" + +#. module: purchase_deposit +#: model:ir.model.fields,field_description:purchase_deposit.field_res_company__purchase_deposit_product_id +#: model:ir.model.fields,field_description:purchase_deposit.field_res_config_settings__purchase_deposit_product_id +msgid "Purchase Deposit Product" +msgstr "Producto anticipo" + +#. module: purchase_deposit +#: model:ir.model,name:purchase_deposit.model_purchase_order +msgid "Purchase Order" +msgstr "Pedido de compra" + +#. module: purchase_deposit +#: model:ir.model,name:purchase_deposit.model_purchase_order_line +msgid "Purchase Order Line" +msgstr "Línea de pedido de compra" + +#. module: purchase_deposit +#: model_terms:ir.ui.view,arch_db:purchase_deposit.view_purchase_order_form_inherit +msgid "Register Deposit" +msgstr "Crear anticipo" + +#. module: purchase_deposit +#: model:ir.model.fields,help:purchase_deposit.field_purchase_advance_payment_inv__deposit_taxes_id +msgid "Taxes used for deposits" +msgstr "Impuestos para los anticipos" + +#. module: purchase_deposit +#: model:ir.model.fields,help:purchase_deposit.field_purchase_advance_payment_inv__amount +msgid "The amount to be invoiced in advance, taxes excluded." +msgstr "Importe a facturar por adelantado, sin impuestos." + +#. module: purchase_deposit +#. odoo-python +#: code:addons/purchase_deposit/wizard/purchase_make_invoice_advance.py:0 +msgid "The percentage of the deposit must be not over 100" +msgstr "El porcentaje del anticipo no puede ser superior al 100" + +#. module: purchase_deposit +#. odoo-python +#: code:addons/purchase_deposit/wizard/purchase_make_invoice_advance.py:0 +msgid "" +"The product used to invoice a down payment should be of type \"Service\". " +"Please use another product or update this product." +msgstr "" +"El producto utilizado para facturar un anticipo debe de ser del tipo " +"\"Servicio\". Utilice otro producto o actualice este." + +#. module: purchase_deposit +#. odoo-python +#: code:addons/purchase_deposit/wizard/purchase_make_invoice_advance.py:0 +msgid "" +"The product used to invoice a down payment should have an invoice policy set " +"to \"Ordered quantities\". Please update your deposit product to be able to " +"create a deposit invoice." +msgstr "" +"El producto para facturar anticipos debería de tener la política de " +"facturación \"Sobre cantidades pedidas\". Actualice el producto anticipo o " +"si lo prefieres crea uno nuevo." + +#. module: purchase_deposit +#. odoo-python +#: code:addons/purchase_deposit/wizard/purchase_make_invoice_advance.py:0 +msgid "The value of the deposit must be positive." +msgstr "El importe del anticipo debe de ser positivo." + +#. module: purchase_deposit +#. odoo-python +#: code:addons/purchase_deposit/wizard/purchase_make_invoice_advance.py:0 +msgid "" +"There is no purchase account defined for this product: %s.\n" +"You may have to install a chart of account from Accounting app, settings " +"menu." +msgstr "" +"No hay una cuenta contable definida para este producto:%s.\n" +"Es posible que tengas que instalar un plan contable desde la aplicación " +"Contabilidad, en el menú de configuración." + +#. module: purchase_deposit +#: model:ir.model.fields,field_description:purchase_deposit.field_purchase_advance_payment_inv__deposit_taxes_id +msgid "Vendor Taxes" +msgstr "Impuestos de proveedor" + +#. module: purchase_deposit +#: model:ir.model.fields,field_description:purchase_deposit.field_purchase_advance_payment_inv__advance_payment_method +msgid "What do you want to invoice?" +msgstr "¿Que quieres facturar?" + +#~ msgid "Procurement purchase grouping settings" +#~ msgstr "Configuración de la agrupación de compra abastecida" + +#~ msgid "" +#~ "%" +#~ msgstr "" +#~ "%" + +#~ msgid "Last Modified on" +#~ msgstr "Última modificación el" + +#~ msgid "" +#~ "Deposit payments are made when creating bills from a purhcase order. They " +#~ "are not copied when duplicating a purchase order." +#~ msgstr "" +#~ "Los anticipos se realizan al crear una factura a partir de un pedido de " +#~ "compra. No se copian al duplicar una orden de compra." + +#~ msgid "Create deposit" +#~ msgstr "Crear anticipo" + +#~ msgid "Down payment (percentage)" +#~ msgstr "Anticipo (porcentaje)" + +#, python-format +#~ msgid "This action is allowed only in Purchase Order sate" +#~ msgstr "Esta acción solo es posible en el estado Pedido de compra" diff --git a/purchase_deposit/i18n/fr.po b/purchase_deposit/i18n/fr.po new file mode 100644 index 00000000000..7cbe5a69a0c --- /dev/null +++ b/purchase_deposit/i18n/fr.po @@ -0,0 +1,305 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * purchase_deposit +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 14.0\n" +"Report-Msgid-Bugs-To: \n" +"PO-Revision-Date: 2023-11-03 01:55+0000\n" +"Last-Translator: Alexis de Lattre \n" +"Language-Team: none\n" +"Language: fr\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 4.17\n" + +#. module: purchase_deposit +#: model_terms:ir.ui.view,arch_db:purchase_deposit.view_purchase_advance_payment_inv +msgid "" +"%" +msgstr "" + +#. module: purchase_deposit +#: model:ir.model.fields,help:purchase_deposit.field_purchase_advance_payment_inv__deposit_account_id +msgid "Account used for deposits" +msgstr "Compte utilisé pour les acomptes" + +#. module: purchase_deposit +#. odoo-python +#: code:addons/purchase_deposit/wizard/purchase_make_invoice_advance.py:0 +msgid "Advance: %s" +msgstr "Acompte : %s" + +#. module: purchase_deposit +#: model_terms:ir.ui.view,arch_db:purchase_deposit.view_purchase_advance_payment_inv +msgid "Cancel" +msgstr "Annuler" + +#. module: purchase_deposit +#: model:ir.model,name:purchase_deposit.model_res_company +msgid "Companies" +msgstr "Sociétés" + +#. module: purchase_deposit +#: model:ir.model,name:purchase_deposit.model_res_config_settings +msgid "Config Settings" +msgstr "Configuration" + +#. module: purchase_deposit +#: model_terms:ir.ui.view,arch_db:purchase_deposit.view_purchase_advance_payment_inv +msgid "Create Bill" +msgstr "Créer une facture" + +#. module: purchase_deposit +#: model_terms:ir.ui.view,arch_db:purchase_deposit.view_purchase_advance_payment_inv +msgid "Create and View bills" +msgstr "Créer et afficher les factures" + +#. module: purchase_deposit +#: model:ir.model.fields,field_description:purchase_deposit.field_purchase_advance_payment_inv__create_uid +msgid "Created by" +msgstr "Créé par" + +#. module: purchase_deposit +#: model:ir.model.fields,field_description:purchase_deposit.field_purchase_advance_payment_inv__create_date +msgid "Created on" +msgstr "Créé le" + +#. module: purchase_deposit +#: model:ir.model.fields,help:purchase_deposit.field_res_company__purchase_deposit_product_id +#: model:ir.model.fields,help:purchase_deposit.field_res_config_settings__purchase_deposit_product_id +msgid "Default product used for payment advances." +msgstr "Article par défaut pour les acomptes." + +#. module: purchase_deposit +#. odoo-python +#: code:addons/purchase_deposit/wizard/purchase_make_invoice_advance.py:0 +msgid "Deposit Payment" +msgstr "Acompte" + +#. module: purchase_deposit +#: model:ir.model.fields,field_description:purchase_deposit.field_purchase_advance_payment_inv__amount +msgid "Deposit Payment Amount" +msgstr "Montant de l'acompte" + +#. module: purchase_deposit +#: model:ir.model.fields,field_description:purchase_deposit.field_purchase_advance_payment_inv__purchase_deposit_product_id +msgid "Deposit Payment Product" +msgstr "Article pour l'acompte" + +#. module: purchase_deposit +#: model_terms:ir.ui.view,arch_db:purchase_deposit.res_config_settings_view_form_purchase +msgid "Deposit Payments" +msgstr "Acomptes" + +#. module: purchase_deposit +#: model:ir.model.fields.selection,name:purchase_deposit.selection__purchase_advance_payment_inv__advance_payment_method__fixed +msgid "Deposit payment (fixed amount)" +msgstr "Acompte (montant fixe)" + +#. module: purchase_deposit +#: model:ir.model.fields.selection,name:purchase_deposit.selection__purchase_advance_payment_inv__advance_payment_method__percentage +msgid "Deposit payment (percentage)" +msgstr "Acompte (pourcentage)" + +#. module: purchase_deposit +#: model:ir.model.fields,help:purchase_deposit.field_purchase_order_line__is_deposit +msgid "" +"Deposit payments are made when creating bills from a purchase order. They " +"are not copied when duplicating a purchase order." +msgstr "" + +#. module: purchase_deposit +#: model:ir.model.fields,field_description:purchase_deposit.field_purchase_advance_payment_inv__display_name +msgid "Display Name" +msgstr "Nom affiché" + +#. module: purchase_deposit +#: model:ir.model.fields,field_description:purchase_deposit.field_purchase_advance_payment_inv__deposit_account_id +msgid "Expense Account" +msgstr "Compte de charge" + +#. module: purchase_deposit +#: model:ir.model.fields,field_description:purchase_deposit.field_purchase_advance_payment_inv__id +msgid "ID" +msgstr "ID" + +#. module: purchase_deposit +#: model:ir.actions.act_window,name:purchase_deposit.action_view_purchase_advance_payment_inv +msgid "Invoice Order" +msgstr "Facturer la commande" + +#. module: purchase_deposit +#: model_terms:ir.ui.view,arch_db:purchase_deposit.view_purchase_advance_payment_inv +msgid "Invoice Purchases Order" +msgstr "Facturer la commande fournisseur" + +#. module: purchase_deposit +#: model_terms:ir.ui.view,arch_db:purchase_deposit.view_purchase_advance_payment_inv +msgid "" +"Invoices will be created in draft so that you can review them before " +"validation." +msgstr "" +"Les factures seront crées à l'état brouillon pour que vous puissiez les " +"consulter avant de les valider." + +#. module: purchase_deposit +#: model:ir.model.fields,field_description:purchase_deposit.field_purchase_order_line__is_deposit +msgid "Is a deposit payment" +msgstr "Est un acompte" + +#. module: purchase_deposit +#: model:ir.model,name:purchase_deposit.model_account_move +msgid "Journal Entry" +msgstr "Pièce comptable" + +#. module: purchase_deposit +#: model:ir.model.fields,field_description:purchase_deposit.field_purchase_advance_payment_inv__write_uid +msgid "Last Updated by" +msgstr "Dernière mise à jour par" + +#. module: purchase_deposit +#: model:ir.model.fields,field_description:purchase_deposit.field_purchase_advance_payment_inv__write_date +msgid "Last Updated on" +msgstr "Dernière mise à jour le" + +#. module: purchase_deposit +#: model_terms:ir.ui.view,arch_db:purchase_deposit.res_config_settings_view_form_purchase +msgid "Product used for deposit payments" +msgstr "Article utilisé pour les acomptes" + +#. module: purchase_deposit +#: model:ir.model,name:purchase_deposit.model_purchase_advance_payment_inv +msgid "Purchase Advance Payment Invoice" +msgstr "Facture d'achat pour l'acompte" + +#. module: purchase_deposit +#: model:ir.model.fields,field_description:purchase_deposit.field_res_company__purchase_deposit_product_id +#: model:ir.model.fields,field_description:purchase_deposit.field_res_config_settings__purchase_deposit_product_id +msgid "Purchase Deposit Product" +msgstr "Article d'acompte à l'achat" + +#. module: purchase_deposit +#: model:ir.model,name:purchase_deposit.model_purchase_order +msgid "Purchase Order" +msgstr "Commande fournisseur" + +#. module: purchase_deposit +#: model:ir.model,name:purchase_deposit.model_purchase_order_line +msgid "Purchase Order Line" +msgstr "Ligne de commande fournisseur" + +#. module: purchase_deposit +#: model_terms:ir.ui.view,arch_db:purchase_deposit.view_purchase_order_form_inherit +msgid "Register Deposit" +msgstr "Enregistrer un acompte" + +#. module: purchase_deposit +#: model:ir.model.fields,help:purchase_deposit.field_purchase_advance_payment_inv__deposit_taxes_id +msgid "Taxes used for deposits" +msgstr "Taxes utilisées pour les acomptes" + +#. module: purchase_deposit +#: model:ir.model.fields,help:purchase_deposit.field_purchase_advance_payment_inv__amount +msgid "The amount to be invoiced in advance, taxes excluded." +msgstr "Le montant HT pour la facture d'acompte." + +#. module: purchase_deposit +#. odoo-python +#: code:addons/purchase_deposit/wizard/purchase_make_invoice_advance.py:0 +msgid "The percentage of the deposit must be not over 100" +msgstr "Le pourcentage d'acompte ne doit pas dépasser 100%" + +#. module: purchase_deposit +#. odoo-python +#: code:addons/purchase_deposit/wizard/purchase_make_invoice_advance.py:0 +msgid "" +"The product used to invoice a down payment should be of type \"Service\". " +"Please use another product or update this product." +msgstr "" +"L'article utilisé pour l'acompte doit être de type \"Service\". Veuillez " +"utiliser un autre article ou modifier l'article existant." + +#. module: purchase_deposit +#. odoo-python +#: code:addons/purchase_deposit/wizard/purchase_make_invoice_advance.py:0 +msgid "" +"The product used to invoice a down payment should have an invoice policy set " +"to \"Ordered quantities\". Please update your deposit product to be able to " +"create a deposit invoice." +msgstr "" +"L'article utilisé pour l'acompte doit avoir une politique de contrôle à " +"l'achat \"Sur base des quantités commandés\". Veuillez utiliser un autre " +"article ou modifier l'article existant." + +#. module: purchase_deposit +#. odoo-python +#: code:addons/purchase_deposit/wizard/purchase_make_invoice_advance.py:0 +msgid "The value of the deposit must be positive." +msgstr "La valeur de l'acompte doit être positive." + +#. module: purchase_deposit +#. odoo-python +#: code:addons/purchase_deposit/wizard/purchase_make_invoice_advance.py:0 +msgid "" +"There is no purchase account defined for this product: %s.\n" +"You may have to install a chart of account from Accounting app, settings " +"menu." +msgstr "" +"Il n'y a pas de compte de charge pour l'article '%s'.\n" +"Vous devriez peut-être installer un plan comptable depuis le menu de " +"configuration de l'application Facturation." + +#. module: purchase_deposit +#: model:ir.model.fields,field_description:purchase_deposit.field_purchase_advance_payment_inv__deposit_taxes_id +msgid "Vendor Taxes" +msgstr "Taxes fournisseur" + +#. module: purchase_deposit +#: model:ir.model.fields,field_description:purchase_deposit.field_purchase_advance_payment_inv__advance_payment_method +msgid "What do you want to invoice?" +msgstr "Que voulez-vous facturer ?" + +#~ msgid "" +#~ "%" +#~ msgstr "" +#~ "%" + +#~ msgid "Last Modified on" +#~ msgstr "Dernière modification le" + +#~ msgid "" +#~ "Deposit payments are made when creating bills from a purhcase order. They " +#~ "are not copied when duplicating a purchase order." +#~ msgstr "" +#~ "Les acomptes sont générés lors de la création de factures à partir d'une " +#~ "commande fournisseur. Ils ne sont pas copiés lors de la duplication d'une " +#~ "commande fournisseur." + +#~ msgid "Down payment (percentage)" +#~ msgstr "Acompte (pourcentage)" + +#, python-format +#~ msgid "This action is allowed only in Purchase Order sate" +#~ msgstr "" +#~ "Cette action n'est permise que pour les documents à l'état \"Bon de " +#~ "commande\"" + +#~ msgid "Create Invoices" +#~ msgstr "Créer les factures" + +#~ msgid "Create and View Invoices" +#~ msgstr "Créer et afficher les factures" + +#~ msgid "" +#~ "Deposit payments are made when creating invoices from a purhcase order. " +#~ "They are not copied when duplicating a purchase order." +#~ msgstr "" +#~ "Les acomptes sont faits lorsqu'on crée des factures d'un bon de commande. " +#~ "Ils ne sont pas copiés lors de la duplication d'un bon de commande." diff --git a/purchase_deposit/i18n/it.po b/purchase_deposit/i18n/it.po new file mode 100644 index 00000000000..312fc35789f --- /dev/null +++ b/purchase_deposit/i18n/it.po @@ -0,0 +1,282 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * purchase_deposit +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 16.0\n" +"Report-Msgid-Bugs-To: \n" +"PO-Revision-Date: 2024-07-23 09:58+0000\n" +"Last-Translator: mymage \n" +"Language-Team: none\n" +"Language: it\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.6.2\n" + +#. module: purchase_deposit +#: model_terms:ir.ui.view,arch_db:purchase_deposit.view_purchase_advance_payment_inv +msgid "" +"%" +msgstr "" +"%" + +#. module: purchase_deposit +#: model:ir.model.fields,help:purchase_deposit.field_purchase_advance_payment_inv__deposit_account_id +msgid "Account used for deposits" +msgstr "Conto usato per le cauzioni" + +#. module: purchase_deposit +#. odoo-python +#: code:addons/purchase_deposit/wizard/purchase_make_invoice_advance.py:0 +msgid "Advance: %s" +msgstr "Anticipo: %s" + +#. module: purchase_deposit +#: model_terms:ir.ui.view,arch_db:purchase_deposit.view_purchase_advance_payment_inv +msgid "Cancel" +msgstr "Annulla" + +#. module: purchase_deposit +#: model:ir.model,name:purchase_deposit.model_res_company +msgid "Companies" +msgstr "Aziende" + +#. module: purchase_deposit +#: model:ir.model,name:purchase_deposit.model_res_config_settings +msgid "Config Settings" +msgstr "Impostazioni configurazione" + +#. module: purchase_deposit +#: model_terms:ir.ui.view,arch_db:purchase_deposit.view_purchase_advance_payment_inv +msgid "Create Bill" +msgstr "Crea conto" + +#. module: purchase_deposit +#: model_terms:ir.ui.view,arch_db:purchase_deposit.view_purchase_advance_payment_inv +msgid "Create and View bills" +msgstr "Crea e visualizza conti" + +#. module: purchase_deposit +#: model:ir.model.fields,field_description:purchase_deposit.field_purchase_advance_payment_inv__create_uid +msgid "Created by" +msgstr "Creato da" + +#. module: purchase_deposit +#: model:ir.model.fields,field_description:purchase_deposit.field_purchase_advance_payment_inv__create_date +msgid "Created on" +msgstr "Creato il" + +#. module: purchase_deposit +#: model:ir.model.fields,help:purchase_deposit.field_res_company__purchase_deposit_product_id +#: model:ir.model.fields,help:purchase_deposit.field_res_config_settings__purchase_deposit_product_id +msgid "Default product used for payment advances." +msgstr "Prodotto predefinito utilizzato per anticipi pagamenti." + +#. module: purchase_deposit +#. odoo-python +#: code:addons/purchase_deposit/wizard/purchase_make_invoice_advance.py:0 +msgid "Deposit Payment" +msgstr "Pagamento cauzione" + +#. module: purchase_deposit +#: model:ir.model.fields,field_description:purchase_deposit.field_purchase_advance_payment_inv__amount +msgid "Deposit Payment Amount" +msgstr "Valore pagamento cauzione" + +#. module: purchase_deposit +#: model:ir.model.fields,field_description:purchase_deposit.field_purchase_advance_payment_inv__purchase_deposit_product_id +msgid "Deposit Payment Product" +msgstr "Prodotto pagamento cauzione" + +#. module: purchase_deposit +#: model_terms:ir.ui.view,arch_db:purchase_deposit.res_config_settings_view_form_purchase +msgid "Deposit Payments" +msgstr "Pagamenti cauzione" + +#. module: purchase_deposit +#: model:ir.model.fields.selection,name:purchase_deposit.selection__purchase_advance_payment_inv__advance_payment_method__fixed +msgid "Deposit payment (fixed amount)" +msgstr "Pagamento cauzione (valore fisso)" + +#. module: purchase_deposit +#: model:ir.model.fields.selection,name:purchase_deposit.selection__purchase_advance_payment_inv__advance_payment_method__percentage +msgid "Deposit payment (percentage)" +msgstr "Pagamento cauzione (percentuale)" + +#. module: purchase_deposit +#: model:ir.model.fields,help:purchase_deposit.field_purchase_order_line__is_deposit +msgid "" +"Deposit payments are made when creating bills from a purchase order. They " +"are not copied when duplicating a purchase order." +msgstr "" +"I pagamenti cauzione sono fatti quando si creano i conti da un ordine di " +"vendita. Non vengono copiati quando si duplica un ordine di acquisto." + +#. module: purchase_deposit +#: model:ir.model.fields,field_description:purchase_deposit.field_purchase_advance_payment_inv__display_name +msgid "Display Name" +msgstr "Nome visualizzato" + +#. module: purchase_deposit +#: model:ir.model.fields,field_description:purchase_deposit.field_purchase_advance_payment_inv__deposit_account_id +msgid "Expense Account" +msgstr "Conto spese" + +#. module: purchase_deposit +#: model:ir.model.fields,field_description:purchase_deposit.field_purchase_advance_payment_inv__id +msgid "ID" +msgstr "ID" + +#. module: purchase_deposit +#: model:ir.actions.act_window,name:purchase_deposit.action_view_purchase_advance_payment_inv +msgid "Invoice Order" +msgstr "Ordine fattura" + +#. module: purchase_deposit +#: model_terms:ir.ui.view,arch_db:purchase_deposit.view_purchase_advance_payment_inv +msgid "Invoice Purchases Order" +msgstr "Fattura ordine acquisti" + +#. module: purchase_deposit +#: model_terms:ir.ui.view,arch_db:purchase_deposit.view_purchase_advance_payment_inv +msgid "" +"Invoices will be created in draft so that you can review them before " +"validation." +msgstr "" +"Le fatture verranno create in bozza così potranno essere revisionate prima " +"della validazione." + +#. module: purchase_deposit +#: model:ir.model.fields,field_description:purchase_deposit.field_purchase_order_line__is_deposit +msgid "Is a deposit payment" +msgstr "È un pagamento cauzione" + +#. module: purchase_deposit +#: model:ir.model,name:purchase_deposit.model_account_move +msgid "Journal Entry" +msgstr "Registrazione contabile" + +#. module: purchase_deposit +#: model:ir.model.fields,field_description:purchase_deposit.field_purchase_advance_payment_inv__write_uid +msgid "Last Updated by" +msgstr "Ultimo aggiornamento di" + +#. module: purchase_deposit +#: model:ir.model.fields,field_description:purchase_deposit.field_purchase_advance_payment_inv__write_date +msgid "Last Updated on" +msgstr "Ultimo aggiornamento il" + +#. module: purchase_deposit +#: model_terms:ir.ui.view,arch_db:purchase_deposit.res_config_settings_view_form_purchase +msgid "Product used for deposit payments" +msgstr "Prodotto utilizzato per i pagamenti cauzione" + +#. module: purchase_deposit +#: model:ir.model,name:purchase_deposit.model_purchase_advance_payment_inv +msgid "Purchase Advance Payment Invoice" +msgstr "Fattura di acquisto con pagamento anticipato" + +#. module: purchase_deposit +#: model:ir.model.fields,field_description:purchase_deposit.field_res_company__purchase_deposit_product_id +#: model:ir.model.fields,field_description:purchase_deposit.field_res_config_settings__purchase_deposit_product_id +msgid "Purchase Deposit Product" +msgstr "Prodotto cauzione acquisto" + +#. module: purchase_deposit +#: model:ir.model,name:purchase_deposit.model_purchase_order +msgid "Purchase Order" +msgstr "Ordine di acquisto" + +#. module: purchase_deposit +#: model:ir.model,name:purchase_deposit.model_purchase_order_line +msgid "Purchase Order Line" +msgstr "Riga ordine di acquisto" + +#. module: purchase_deposit +#: model_terms:ir.ui.view,arch_db:purchase_deposit.view_purchase_order_form_inherit +msgid "Register Deposit" +msgstr "Registra cauzione" + +#. module: purchase_deposit +#: model:ir.model.fields,help:purchase_deposit.field_purchase_advance_payment_inv__deposit_taxes_id +msgid "Taxes used for deposits" +msgstr "Imposte utilizzate per le cauzioni" + +#. module: purchase_deposit +#: model:ir.model.fields,help:purchase_deposit.field_purchase_advance_payment_inv__amount +msgid "The amount to be invoiced in advance, taxes excluded." +msgstr "Valore da fatturare in anticipo, imposte escluse." + +#. module: purchase_deposit +#. odoo-python +#: code:addons/purchase_deposit/wizard/purchase_make_invoice_advance.py:0 +msgid "The percentage of the deposit must be not over 100" +msgstr "La percentuale della cauzione non può essere più di 100" + +#. module: purchase_deposit +#. odoo-python +#: code:addons/purchase_deposit/wizard/purchase_make_invoice_advance.py:0 +msgid "" +"The product used to invoice a down payment should be of type \"Service\". " +"Please use another product or update this product." +msgstr "" +"Il prodottoutilizzato per fatturare un acconto deve essere di tipo " +"\"Servizio\". Utilizzare un altro prodotto o modificare questo." + +#. module: purchase_deposit +#. odoo-python +#: code:addons/purchase_deposit/wizard/purchase_make_invoice_advance.py:0 +msgid "" +"The product used to invoice a down payment should have an invoice policy set " +"to \"Ordered quantities\". Please update your deposit product to be able to " +"create a deposit invoice." +msgstr "" +"Il prodotto utilizzato per fatturare un acconto deve avere una politica di " +"fatturazione impostata a \"Quantità ordinate\". Modificare il prodotto " +"cauzione per consentire la creazione di una fattura cauzione." + +#. module: purchase_deposit +#. odoo-python +#: code:addons/purchase_deposit/wizard/purchase_make_invoice_advance.py:0 +msgid "The value of the deposit must be positive." +msgstr "Il valore della cauzione deve essere positivo." + +#. module: purchase_deposit +#. odoo-python +#: code:addons/purchase_deposit/wizard/purchase_make_invoice_advance.py:0 +msgid "" +"There is no purchase account defined for this product: %s.\n" +"You may have to install a chart of account from Accounting app, settings " +"menu." +msgstr "" +"Non c'è un conto acquisto definito per questo prodotto: %s\n" +"Bisogna installare il piano dei conti dall'app Contabilità, menu " +"impostazioni." + +#. module: purchase_deposit +#: model:ir.model.fields,field_description:purchase_deposit.field_purchase_advance_payment_inv__deposit_taxes_id +msgid "Vendor Taxes" +msgstr "Imposte venditore" + +#. module: purchase_deposit +#: model:ir.model.fields,field_description:purchase_deposit.field_purchase_advance_payment_inv__advance_payment_method +msgid "What do you want to invoice?" +msgstr "Cosa si vuole fatturare?" + +#~ msgid "Procurement purchase grouping settings" +#~ msgstr "Impostazioni raggruppamento approvvigionamento acquisti" + +#~ msgid "" +#~ "%" +#~ msgstr "" +#~ "%" + +#~ msgid "Last Modified on" +#~ msgstr "Ultima modifica il" diff --git a/purchase_deposit/i18n/purchase_deposit.pot b/purchase_deposit/i18n/purchase_deposit.pot new file mode 100644 index 00000000000..dad08ee15dd --- /dev/null +++ b/purchase_deposit/i18n/purchase_deposit.pot @@ -0,0 +1,251 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * purchase_deposit +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 18.0\n" +"Report-Msgid-Bugs-To: \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: purchase_deposit +#: model_terms:ir.ui.view,arch_db:purchase_deposit.view_purchase_advance_payment_inv +msgid "" +"%" +msgstr "" + +#. module: purchase_deposit +#: model:ir.model.fields,help:purchase_deposit.field_purchase_advance_payment_inv__deposit_account_id +msgid "Account used for deposits" +msgstr "" + +#. module: purchase_deposit +#. odoo-python +#: code:addons/purchase_deposit/wizard/purchase_make_invoice_advance.py:0 +msgid "Advance: %s" +msgstr "" + +#. module: purchase_deposit +#: model_terms:ir.ui.view,arch_db:purchase_deposit.view_purchase_advance_payment_inv +msgid "Cancel" +msgstr "" + +#. module: purchase_deposit +#: model:ir.model,name:purchase_deposit.model_res_company +msgid "Companies" +msgstr "" + +#. module: purchase_deposit +#: model:ir.model,name:purchase_deposit.model_res_config_settings +msgid "Config Settings" +msgstr "" + +#. module: purchase_deposit +#: model_terms:ir.ui.view,arch_db:purchase_deposit.view_purchase_advance_payment_inv +msgid "Create Bill" +msgstr "" + +#. module: purchase_deposit +#: model_terms:ir.ui.view,arch_db:purchase_deposit.view_purchase_advance_payment_inv +msgid "Create and View bills" +msgstr "" + +#. module: purchase_deposit +#: model:ir.model.fields,field_description:purchase_deposit.field_purchase_advance_payment_inv__create_uid +msgid "Created by" +msgstr "" + +#. module: purchase_deposit +#: model:ir.model.fields,field_description:purchase_deposit.field_purchase_advance_payment_inv__create_date +msgid "Created on" +msgstr "" + +#. module: purchase_deposit +#: model:ir.model.fields,help:purchase_deposit.field_res_company__purchase_deposit_product_id +#: model:ir.model.fields,help:purchase_deposit.field_res_config_settings__purchase_deposit_product_id +msgid "Default product used for payment advances." +msgstr "" + +#. module: purchase_deposit +#. odoo-python +#: code:addons/purchase_deposit/wizard/purchase_make_invoice_advance.py:0 +msgid "Deposit Payment" +msgstr "" + +#. module: purchase_deposit +#: model:ir.model.fields,field_description:purchase_deposit.field_purchase_advance_payment_inv__amount +msgid "Deposit Payment Amount" +msgstr "" + +#. module: purchase_deposit +#: model:ir.model.fields,field_description:purchase_deposit.field_purchase_advance_payment_inv__purchase_deposit_product_id +msgid "Deposit Payment Product" +msgstr "" + +#. module: purchase_deposit +#: model_terms:ir.ui.view,arch_db:purchase_deposit.res_config_settings_view_form_purchase +msgid "Deposit Payments" +msgstr "" + +#. module: purchase_deposit +#: model:ir.model.fields.selection,name:purchase_deposit.selection__purchase_advance_payment_inv__advance_payment_method__fixed +msgid "Deposit payment (fixed amount)" +msgstr "" + +#. module: purchase_deposit +#: model:ir.model.fields.selection,name:purchase_deposit.selection__purchase_advance_payment_inv__advance_payment_method__percentage +msgid "Deposit payment (percentage)" +msgstr "" + +#. module: purchase_deposit +#: model:ir.model.fields,help:purchase_deposit.field_purchase_order_line__is_deposit +msgid "" +"Deposit payments are made when creating bills from a purchase order. They " +"are not copied when duplicating a purchase order." +msgstr "" + +#. module: purchase_deposit +#: model:ir.model.fields,field_description:purchase_deposit.field_purchase_advance_payment_inv__display_name +msgid "Display Name" +msgstr "" + +#. module: purchase_deposit +#: model:ir.model.fields,field_description:purchase_deposit.field_purchase_advance_payment_inv__deposit_account_id +msgid "Expense Account" +msgstr "" + +#. module: purchase_deposit +#: model:ir.model.fields,field_description:purchase_deposit.field_purchase_advance_payment_inv__id +msgid "ID" +msgstr "" + +#. module: purchase_deposit +#: model:ir.actions.act_window,name:purchase_deposit.action_view_purchase_advance_payment_inv +msgid "Invoice Order" +msgstr "" + +#. module: purchase_deposit +#: model_terms:ir.ui.view,arch_db:purchase_deposit.view_purchase_advance_payment_inv +msgid "Invoice Purchases Order" +msgstr "" + +#. module: purchase_deposit +#: model_terms:ir.ui.view,arch_db:purchase_deposit.view_purchase_advance_payment_inv +msgid "" +"Invoices will be created in draft so that you can review them before " +"validation." +msgstr "" + +#. module: purchase_deposit +#: model:ir.model.fields,field_description:purchase_deposit.field_purchase_order_line__is_deposit +msgid "Is a deposit payment" +msgstr "" + +#. module: purchase_deposit +#: model:ir.model,name:purchase_deposit.model_account_move +msgid "Journal Entry" +msgstr "" + +#. module: purchase_deposit +#: model:ir.model.fields,field_description:purchase_deposit.field_purchase_advance_payment_inv__write_uid +msgid "Last Updated by" +msgstr "" + +#. module: purchase_deposit +#: model:ir.model.fields,field_description:purchase_deposit.field_purchase_advance_payment_inv__write_date +msgid "Last Updated on" +msgstr "" + +#. module: purchase_deposit +#: model_terms:ir.ui.view,arch_db:purchase_deposit.res_config_settings_view_form_purchase +msgid "Product used for deposit payments" +msgstr "" + +#. module: purchase_deposit +#: model:ir.model,name:purchase_deposit.model_purchase_advance_payment_inv +msgid "Purchase Advance Payment Invoice" +msgstr "" + +#. module: purchase_deposit +#: model:ir.model.fields,field_description:purchase_deposit.field_res_company__purchase_deposit_product_id +#: model:ir.model.fields,field_description:purchase_deposit.field_res_config_settings__purchase_deposit_product_id +msgid "Purchase Deposit Product" +msgstr "" + +#. module: purchase_deposit +#: model:ir.model,name:purchase_deposit.model_purchase_order +msgid "Purchase Order" +msgstr "" + +#. module: purchase_deposit +#: model:ir.model,name:purchase_deposit.model_purchase_order_line +msgid "Purchase Order Line" +msgstr "" + +#. module: purchase_deposit +#: model_terms:ir.ui.view,arch_db:purchase_deposit.view_purchase_order_form_inherit +msgid "Register Deposit" +msgstr "" + +#. module: purchase_deposit +#: model:ir.model.fields,help:purchase_deposit.field_purchase_advance_payment_inv__deposit_taxes_id +msgid "Taxes used for deposits" +msgstr "" + +#. module: purchase_deposit +#: model:ir.model.fields,help:purchase_deposit.field_purchase_advance_payment_inv__amount +msgid "The amount to be invoiced in advance, taxes excluded." +msgstr "" + +#. module: purchase_deposit +#. odoo-python +#: code:addons/purchase_deposit/wizard/purchase_make_invoice_advance.py:0 +msgid "The percentage of the deposit must be not over 100" +msgstr "" + +#. module: purchase_deposit +#. odoo-python +#: code:addons/purchase_deposit/wizard/purchase_make_invoice_advance.py:0 +msgid "" +"The product used to invoice a down payment should be of type \"Service\". " +"Please use another product or update this product." +msgstr "" + +#. module: purchase_deposit +#. odoo-python +#: code:addons/purchase_deposit/wizard/purchase_make_invoice_advance.py:0 +msgid "" +"The product used to invoice a down payment should have an invoice policy set" +" to \"Ordered quantities\". Please update your deposit product to be able to" +" create a deposit invoice." +msgstr "" + +#. module: purchase_deposit +#. odoo-python +#: code:addons/purchase_deposit/wizard/purchase_make_invoice_advance.py:0 +msgid "The value of the deposit must be positive." +msgstr "" + +#. module: purchase_deposit +#. odoo-python +#: code:addons/purchase_deposit/wizard/purchase_make_invoice_advance.py:0 +msgid "" +"There is no purchase account defined for this product: %s.\n" +"You may have to install a chart of account from Accounting app, settings menu." +msgstr "" + +#. module: purchase_deposit +#: model:ir.model.fields,field_description:purchase_deposit.field_purchase_advance_payment_inv__deposit_taxes_id +msgid "Vendor Taxes" +msgstr "" + +#. module: purchase_deposit +#: model:ir.model.fields,field_description:purchase_deposit.field_purchase_advance_payment_inv__advance_payment_method +msgid "What do you want to invoice?" +msgstr "" diff --git a/purchase_deposit/models/__init__.py b/purchase_deposit/models/__init__.py new file mode 100644 index 00000000000..4b77ad1b0e6 --- /dev/null +++ b/purchase_deposit/models/__init__.py @@ -0,0 +1,8 @@ +# Copyright 2019 Elico Corp, Dominique K. +# Copyright 2019 Ecosoft Co., Ltd., Kitti U. +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html). + +from . import account_move +from . import res_company +from . import res_config_settings +from . import purchase diff --git a/purchase_deposit/models/account_move.py b/purchase_deposit/models/account_move.py new file mode 100644 index 00000000000..6a39ac39b41 --- /dev/null +++ b/purchase_deposit/models/account_move.py @@ -0,0 +1,17 @@ +# Copyright 2023 Quartile Limited (https://www.quartile.co) +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html). + +from odoo import models + + +class AccountMove(models.Model): + _inherit = "account.move" + + def action_post(self): + res = super().action_post() + for line in self.line_ids: + if not line.purchase_line_id.is_deposit: + continue + line.purchase_line_id.taxes_id = line.tax_ids + line.purchase_line_id.price_unit = line.price_unit + return res diff --git a/purchase_deposit/models/purchase.py b/purchase_deposit/models/purchase.py new file mode 100644 index 00000000000..85976b1d9f1 --- /dev/null +++ b/purchase_deposit/models/purchase.py @@ -0,0 +1,35 @@ +# Copyright 2019 Elico Corp, Dominique K. +# Copyright 2019 Ecosoft Co., Ltd., Kitti U. +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html). + +from odoo import fields, models + + +class PurchaseOrder(models.Model): + _inherit = "purchase.order" + + def copy_data(self, default=None): + if default is None: + default = {} + default["order_line"] = [ + (0, 0, line.copy_data()[0]) + for line in self.order_line + if not line.is_deposit + ] + return super().copy_data(default) + + +class PurchaseOrderLine(models.Model): + _inherit = "purchase.order.line" + + is_deposit = fields.Boolean( + string="Is a deposit payment", + help="Deposit payments are made when creating bills from a purchase" + " order. They are not copied when duplicating a purchase order.", + ) + + def _prepare_account_move_line(self, move=False): + res = super()._prepare_account_move_line(move=move) + if self.is_deposit: + res["quantity"] = -1 * self.qty_invoiced + return res diff --git a/purchase_deposit/models/res_company.py b/purchase_deposit/models/res_company.py new file mode 100644 index 00000000000..e1c004a3b4d --- /dev/null +++ b/purchase_deposit/models/res_company.py @@ -0,0 +1,15 @@ +# Copyright 2023 Quartile Limited +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). + +from odoo import fields, models + + +class ResCompany(models.Model): + _inherit = "res.company" + + purchase_deposit_product_id = fields.Many2one( + comodel_name="product.product", + string="Purchase Deposit Product", + domain=[("type", "=", "service")], + help="Default product used for payment advances.", + ) diff --git a/purchase_deposit/models/res_config_settings.py b/purchase_deposit/models/res_config_settings.py new file mode 100644 index 00000000000..9ac312ec905 --- /dev/null +++ b/purchase_deposit/models/res_config_settings.py @@ -0,0 +1,15 @@ +# Copyright 2019 Elico Corp, Dominique K. +# Copyright 2019 Ecosoft Co., Ltd., Kitti U. +# Copyright 2023 Quartile Limited +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html). + +from odoo import fields, models + + +class ResConfigSettings(models.TransientModel): + _inherit = "res.config.settings" + + purchase_deposit_product_id = fields.Many2one( + related="company_id.purchase_deposit_product_id", + readonly=False, + ) diff --git a/purchase_deposit/pyproject.toml b/purchase_deposit/pyproject.toml new file mode 100644 index 00000000000..4231d0cccb3 --- /dev/null +++ b/purchase_deposit/pyproject.toml @@ -0,0 +1,3 @@ +[build-system] +requires = ["whool"] +build-backend = "whool.buildapi" diff --git a/purchase_deposit/readme/CONFIGURATION.rst b/purchase_deposit/readme/CONFIGURATION.rst new file mode 100644 index 00000000000..362da6adc98 --- /dev/null +++ b/purchase_deposit/readme/CONFIGURATION.rst @@ -0,0 +1,7 @@ +After install this module, you need to select the product "Purchase Deposit" in +configuration window to be used as default product when create deposit bill. + +Go to Purchase > Configuration > Settings, then select product "Purchase Deposit" + +Note: If this is not done, by using "Register Deposit" for the first time will +also create product "Purchase Deposit" for you automatically. diff --git a/purchase_deposit/readme/CONTRIBUTORS.md b/purchase_deposit/readme/CONTRIBUTORS.md new file mode 100644 index 00000000000..281706e7123 --- /dev/null +++ b/purchase_deposit/readme/CONTRIBUTORS.md @@ -0,0 +1,6 @@ +- Dominique K. \<\> +- Kitti Upariphutthiphong \<\> +- Rattapong Chokmasermkul \<\> +- Joan Mateu \<\> +- [Quartile](https://www.quartile.co): + - Aung Ko Ko Lin diff --git a/purchase_deposit/readme/DESCRIPTION.md b/purchase_deposit/readme/DESCRIPTION.md new file mode 100644 index 00000000000..2b0d0ddb867 --- /dev/null +++ b/purchase_deposit/readme/DESCRIPTION.md @@ -0,0 +1,2 @@ +This module allow purchase order to register deposit similar to that in +sales order diff --git a/purchase_deposit/readme/USAGE.md b/purchase_deposit/readme/USAGE.md new file mode 100644 index 00000000000..df91ad35e1f --- /dev/null +++ b/purchase_deposit/readme/USAGE.md @@ -0,0 +1,13 @@ +When purchase order is confirmed, a new button "Register Deposit" will +appear. Normally, deposit will be used to create the 1st bill (as +deposit). + +1. On confirmed purchase order, click Register Deposit button, wizard + will open +2. 2 type of deposit bill can be create 1) Down Payment (percentage) 2) + Deposit Payment (fixed amount) +3. Fill in the value and click Create bill or just create deposit. + +As deposit is created, when user click button "Create Bill" again in +purchase order, the Vendor Bill will be created with deposit amount +deducted. diff --git a/purchase_deposit/security/ir.model.access.csv b/purchase_deposit/security/ir.model.access.csv new file mode 100644 index 00000000000..1bba833496a --- /dev/null +++ b/purchase_deposit/security/ir.model.access.csv @@ -0,0 +1,2 @@ +id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink +access_purchase_advance_payment_inv,access_purchase_advance_payment_inv,model_purchase_advance_payment_inv,base.group_user,1,1,1,1 diff --git a/purchase_deposit/static/description/icon.png b/purchase_deposit/static/description/icon.png new file mode 100644 index 00000000000..3a0328b516c Binary files /dev/null and b/purchase_deposit/static/description/icon.png differ diff --git a/purchase_deposit/static/description/index.html b/purchase_deposit/static/description/index.html new file mode 100644 index 00000000000..2ef1029e0a5 --- /dev/null +++ b/purchase_deposit/static/description/index.html @@ -0,0 +1,449 @@ + + + + + +Purchase Deposit + + + +
+

Purchase Deposit

+ + +

Beta License: AGPL-3 OCA/purchase-workflow Translate me on Weblate Try me on Runboat

+

This module allow purchase order to register deposit similar to that in +sales order

+

Table of contents

+ +
+

Usage

+

When purchase order is confirmed, a new button “Register Deposit” will +appear. Normally, deposit will be used to create the 1st bill (as +deposit).

+
    +
  1. On confirmed purchase order, click Register Deposit button, wizard +will open
  2. +
  3. 2 type of deposit bill can be create 1) Down Payment (percentage) 2) +Deposit Payment (fixed amount)
  4. +
  5. Fill in the value and click Create bill or just create deposit.
  6. +
+

As deposit is created, when user click button “Create Bill” again in +purchase order, the Vendor Bill will be created with deposit amount +deducted.

+
+
+

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.

+

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

+
+
+

Credits

+
+

Authors

+
    +
  • Elico Corp
  • +
  • Ecosoft
  • +
+
+
+

Contributors

+ +
+
+

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/purchase-workflow project on GitHub.

+

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

+
+
+
+ + diff --git a/purchase_deposit/tests/__init__.py b/purchase_deposit/tests/__init__.py new file mode 100644 index 00000000000..cb1c2f04722 --- /dev/null +++ b/purchase_deposit/tests/__init__.py @@ -0,0 +1,5 @@ +# Copyright 2019 Elico Corp, Dominique K. +# Copyright 2019 Ecosoft Co., Ltd., Kitti U. +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html). + +from . import test_purchase_deposit diff --git a/purchase_deposit/tests/test_purchase_deposit.py b/purchase_deposit/tests/test_purchase_deposit.py new file mode 100644 index 00000000000..9c57e086313 --- /dev/null +++ b/purchase_deposit/tests/test_purchase_deposit.py @@ -0,0 +1,201 @@ +# Copyright 2019 Elico Corp, Dominique K. +# Copyright 2019 Ecosoft Co., Ltd., Kitti U. +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html). + +from odoo import fields +from odoo.exceptions import UserError +from odoo.tests import Form, TransactionCase + + +class TestPurchaseDeposit(TransactionCase): + @classmethod + def setUpClass(cls): + super().setUpClass() + cls.product_model = cls.env["product.product"] + cls.account_model = cls.env["account.account"] + cls.invoice_model = cls.env["account.move"] + + # Create Deposit Account + cls.account_deposit = cls.account_model.create( + { + "name": "Purchase Deposit", + "code": "11620", + "account_type": "asset_current", + } + ) + # Create products: + p1 = cls.product1 = cls.product_model.create( + { + "name": "Test Product 1", + "type": "service", + "default_code": "PROD1", + "purchase_method": "purchase", + } + ) + + cls.po = cls.env["purchase.order"].create( + { + "partner_id": cls.env.ref("base.res_partner_3").id, + "order_line": [ + ( + 0, + 0, + { + "product_id": p1.id, + "product_uom": p1.uom_id.id, + "name": p1.name, + "price_unit": 100.0, + "date_planned": fields.Datetime.now(), + "product_qty": 42.0, + }, + ) + ], + } + ) + + cls.tax = cls.env["account.tax"].create( + { + "name": "Tax 20", + "type_tax_use": "purchase", + "amount": 20, + } + ) + + def create_advance_payment_form(self): + ctx = { + "active_id": self.po.id, + "active_ids": [self.po.id], + "active_model": "purchase.order", + "create_bills": True, + } + CreateDeposit = self.env["purchase.advance.payment.inv"] + self.po.button_confirm() + self.assertEqual(self.po.state, "purchase") + advance_form = Form(CreateDeposit.with_context(**ctx)) + return advance_form + + def test_create_deposit_invoice(self): + self.assertEqual(len(self.po.order_line), 1) + # We create invoice from expense + f = self.create_advance_payment_form() + f.advance_payment_method = "percentage" + wizard = f.save() + wizard.amount = 10.0 # 10% + wizard.deposit_account_id = self.account_deposit + wizard.create_invoices() + # New Purchase Deposit is created automatically + deposit = self.env.company.purchase_deposit_product_id + self.assertEqual(deposit.name, "Purchase Deposit") + # 1 Deposit Invoice is created + self.assertRecordValues( + self.po.invoice_ids.invoice_line_ids, + [ + { + "product_id": deposit.id, + "price_unit": 420.0, + "name": "Deposit Payment", + } + ], + ) + # On Purchase Order, there will be new deposit line create + self.assertRecordValues( + self.po.order_line, + [ + { + "product_id": self.product1.id, + "price_unit": 100.0, + "is_deposit": False, + }, + {"product_id": deposit.id, "price_unit": 420.0, "is_deposit": True}, + ], + ) + # On Purchase Order, create normal billing + res = self.po.with_context(create_bill=True).action_create_invoice() + invoice = self.invoice_model.browse(res["res_id"]) + self.assertRecordValues( + invoice.invoice_line_ids, + [ + {"product_id": self.product1.id, "price_unit": 100.0, "quantity": 42}, + {"product_id": deposit.id, "price_unit": 420.0, "quantity": -1}, + ], + ) + + def test_create_deposit_invoice_exception_1(self): + """This test focus on exception cases, when create deposit invoice, + 1. This action is allowed only in Purchase Order sate + 2. The value of the deposit must be positive + 3. For type percentage, The percentage of the deposit must <= 100 + """ + self.assertEqual(len(self.po.order_line), 1) + # We create invoice from expense + # 1. The value of the deposit must be positive + f = self.create_advance_payment_form() + f.advance_payment_method = "fixed" + f.amount = 0.0 + f.deposit_account_id = self.account_deposit + wizard = f.save() + with self.assertRaises(UserError): + wizard.create_invoices() + # 2. For type percentage, The percentage of the deposit must <= 100 + wizard.advance_payment_method = "percentage" + wizard.amount = 101.0 + with self.assertRaises(UserError): + wizard.create_invoices() + wizard.amount = 10 + + def test_create_deposit_invoice_exception_2(self): + """This test focus on exception cases, when create deposit invoice, + 4. Purchase Deposit Product's purchase_method != purchase + """ + self.assertEqual(len(self.po.order_line), 1) + # We create invoice from expense + f = self.create_advance_payment_form() + f.advance_payment_method = "percentage" + f.amount = 101.0 + f.deposit_account_id = self.account_deposit + wizard = f.save() + # 4. Purchase Deposit Product's purchase_method != purchase + deposit = self.env.company.purchase_deposit_product_id + deposit.purchase_method = "receive" + wizard.purchase_deposit_product_id = deposit + with self.assertRaises(UserError): + wizard.create_invoices() + + def test_create_deposit_invoice_exception_3(self): + """This test focus on exception cases, when create deposit invoice, + 5. Purchase Deposit Product's type != service + """ + self.assertEqual(len(self.po.order_line), 1) + # We create invoice from expense + f = self.create_advance_payment_form() + f.advance_payment_method = "percentage" + f.amount = 101.0 + f.deposit_account_id = self.account_deposit + wizard = f.save() + deposit = self.env.company.purchase_deposit_product_id + # 5. Purchase Deposit Product's type != service + deposit.type = "consu" + with self.assertRaises(UserError): + wizard.create_invoices() + + def test_deposit_invoice_update_price_and_taxes(self): + f = self.create_advance_payment_form() + f.advance_payment_method = "percentage" + wizard = f.save() + wizard.amount = 10.0 + wizard.deposit_account_id = self.account_deposit + wizard.create_invoices() + # New Purchase Deposit is created automatically + deposit = self.env.company.purchase_deposit_product_id + self.assertEqual(deposit.name, "Purchase Deposit") + self.po.invoice_ids.invoice_date = fields.Date.today() + self.po.invoice_ids.invoice_line_ids.write( + { + "price_unit": 500.0, + "tax_ids": [(6, 0, [self.tax.id])], + } + ) + self.po.invoice_ids.action_post() + deposit_line = self.po.order_line.filtered(lambda p: p.is_deposit) + self.assertEqual(deposit_line.price_unit, 500.0) + self.assertEqual(deposit_line.taxes_id.id, self.tax.id) diff --git a/purchase_deposit/views/purchase_view.xml b/purchase_deposit/views/purchase_view.xml new file mode 100644 index 00000000000..bcdd3306813 --- /dev/null +++ b/purchase_deposit/views/purchase_view.xml @@ -0,0 +1,18 @@ + + + + view.purchase.order.inherit + purchase.order + + + +