Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[18.0][MIG] : Migration partner_invoicing_mode to 18.0 #1833

Open
wants to merge 23 commits into
base: 18.0
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
5d05c35
[MIG] rename account_invoice_base_invoicing_mode
TDu Sep 23, 2022
8fb161d
[UPD] Update partner_invoicing_mode.pot
Apr 21, 2023
e5e36c6
[MIG] partner_invoicing_mode: Migration to 16.0
StefanRijnhart Nov 30, 2022
eada505
Added translation using Weblate (Spanish)
Ivorra78 Jul 29, 2023
69cdf80
Added translation using Weblate (Italian)
mymage Feb 22, 2024
aa03e98
[REF] partner_invoicing_mode/monthly: Better extension mechanism
rousseldenis Jul 27, 2023
161b244
[IMP] partner_invoicing_mode: Partition invoicings
rousseldenis Jul 27, 2023
ad5e612
[IMP] partner_invoicing_mode: Add a field for next invoice date
rousseldenis Aug 17, 2023
e831f77
[IMP] partner_invoicing_mode: Add the invoicing grouping on sale
rousseldenis Aug 22, 2023
0506490
[IMP] partner_invoicing_mode: Add some hooks
rousseldenis Dec 18, 2023
a7e97ee
[IMP] partner_invoicing_mode: Don't loop search on sale orders
rousseldenis Dec 20, 2023
a4d5537
[IMP] partner_invoicing_mode: Don't set next_invoice_date as commerci…
rousseldenis Dec 22, 2023
caba280
[IMP] partner_invoicing_mode: Update the invoice date just after crea…
rousseldenis Mar 29, 2024
e5c7c8d
[IMP] partner_invoicing_mode: Use core grouping function in sale module
rousseldenis Apr 3, 2024
66c748a
[IMP] partner_invoicing_mode: pre-commit auto fixes
NICO-SOLUTIONS Jul 30, 2024
e2515a3
[MIG] partner_invoicing_mode: Migration to 17.0
NICO-SOLUTIONS Jul 30, 2024
85b0085
[UPD] Update partner_invoicing_mode.pot
Sep 30, 2024
1509e6c
[BOT] post-merge updates
OCA-git-bot Sep 30, 2024
3714ad7
Update translation files
weblate Sep 30, 2024
19d57f9
Translated using Weblate (Italian)
mymage Oct 3, 2024
9d4c8d7
[IMP] partner_invoicing_mode: pre-commit auto fixes
chaule97 Nov 4, 2024
8684f46
[MIG] partner_invoicing_mode: Migration to 18.0
chaule97 Nov 5, 2024
a108a3f
[UPD] Update testcase
chaule97 Nov 8, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
135 changes: 135 additions & 0 deletions partner_invoicing_mode/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,135 @@
======================
Partner Invoicing Mode
======================

..
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:d7f174fdf9965f280543d0028ee17725bf9e0c277518a0ea6c646d3c27c3a86c
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

.. |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%2Faccount--invoicing-lightgray.png?logo=github
:target: https://github.com/OCA/account-invoicing/tree/18.0/partner_invoicing_mode
:alt: OCA/account-invoicing
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
:target: https://translation.odoo-community.org/projects/account-invoicing-18-0/account-invoicing-18-0-partner_invoicing_mode
: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/account-invoicing&target_branch=18.0
:alt: Try me on Runboat

|badge1| |badge2| |badge3| |badge4| |badge5|

This is a base module for implementing different invoicing mode for
customers. It adds a selection field invoicing_mode in the Invoicing tab
(if enterprise account_accountant is installed -> Accounting tab) of the
partner with a default value (Odoo standard invoicing mode).

It can be used on its own to generate automatically (e.g.: each day) the
invoices for standard invoicing mode.

In core, Odoo is grouping invoicing from a group of sale orders on:

- Company
- Partner
- Currency

This module uses grouping on those keys:

- Company
- Invoiced partner
- Currency
- Payment term (as this can be selected on sale order level)

The following modules use it to install specific invoicing mode :

- partner_invoicing_mode_at_shipping
- partner_invoicing_mode_monthly
- partner_invoicing_mode_weekly

**Table of contents**

.. contents::
:local:

Usage
=====

- To enable the invoices automatic generation, enable the developer
mode, go to Settings > Automation > Scheduled Actions
- Filter the archived actions and activate 'Generate Standard
Invoices'.
- Adapt the frequency you want to automatically generate invoices to
your needs.
- The field 'Next Invoice Date' on partner form indicates when the next
invoice generation will take place.
- To manually change the invoicing group (one invoice per order), go to
the Sale Order > Other Information > Invoicing and Payments and check
the 'One Invoice Per Order' box.

Bug Tracker
===========

Bugs are tracked on `GitHub Issues <https://github.com/OCA/account-invoicing/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 <https://github.com/OCA/account-invoicing/issues/new?body=module:%20partner_invoicing_mode%0Aversion:%2018.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.

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

Credits
=======

Authors
-------

* Camptocamp

Contributors
------------

- `Camptocamp <https://www.camptocamp.com>`__:

- Thierry Ducrest <[email protected]>

- Phuc (Tran Thanh) <[email protected]>

- `ACSONE SA/NV <https://acsone.eu>`__:

- Denis Roussel <[email protected]>

- Nils Coenen <[email protected]>

- Chau Le <[email protected]>

Other credits
-------------

The development of this module has been financially supported by:

- Camptocamp

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/account-invoicing <https://github.com/OCA/account-invoicing/tree/18.0/partner_invoicing_mode>`_ project on GitHub.

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
1 change: 1 addition & 0 deletions partner_invoicing_mode/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from . import models
19 changes: 19 additions & 0 deletions partner_invoicing_mode/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# Copyright 2020 Camptocamp
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
{
"name": "Partner Invoicing Mode",
"version": "18.0.1.0.0",
"summary": "Base module for handling multiple partner invoicing mode",
"author": "Camptocamp, Odoo Community Association (OCA)",
"website": "https://github.com/OCA/account-invoicing",
"license": "AGPL-3",
"category": "Accounting & Finance",
"depends": ["account", "base_partition", "queue_job", "sale"],
"data": [
"data/queue_job_data.xml",
"data/ir_cron.xml",
"views/res_partner.xml",
"views/res_config_settings.xml",
"views/sale_order.xml",
],
}
16 changes: 16 additions & 0 deletions partner_invoicing_mode/data/ir_cron.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<?xml version="1.0" encoding="UTF-8" ?>
<odoo noupdate="1">
<record id="ir_cron_generate_standard_invoice" model="ir.cron">
<field name="name">Generate Standard Invoices</field>
<field name="active" eval="False" />
<field name="user_id" ref="base.user_root" />
<field name="interval_number">1</field>
<field name="interval_type">days</field>
<field name="model_id" ref="model_sale_order" />
<field name="code">model.cron_generate_standard_invoices()</field>
<field
name="nextcall"
eval="(DateTime.now().replace(hour=1,minute=0).strftime('%Y-%m-%d %H:%M:%S'))"
/>
</record>
</odoo>
19 changes: 19 additions & 0 deletions partner_invoicing_mode/data/queue_job_data.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<?xml version="1.0" encoding="utf-8" ?>
<odoo>
<!-- Queue Job Channel -->
<record id="invoice_validation" model="queue.job.channel">
<field name="name">invoice_validation</field>
<field name="parent_id" ref="queue_job.channel_root" />
</record>

<!-- Queue Job Function -->
<record id="job_function_validate_invoice" model="queue.job.function">
<field name="model_id" ref="account.model_account_move" />
<field name="method">_validate_invoice</field>
<field name="channel_id" ref="invoice_validation" />
<field
name="related_action"
eval='{"func_name": "related_action_open_invoice"}'
/>
</record>
</odoo>
126 changes: 126 additions & 0 deletions partner_invoicing_mode/i18n/es.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,126 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * partner_invoicing_mode
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 16.0\n"
"Report-Msgid-Bugs-To: \n"
"PO-Revision-Date: 2024-05-06 12:38+0000\n"
"Last-Translator: Anna Martínez <[email protected]>\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: partner_invoicing_mode
#: model:ir.model,name:partner_invoicing_mode.model_res_company
msgid "Companies"
msgstr "Compañías"

#. module: partner_invoicing_mode
#: model:ir.model,name:partner_invoicing_mode.model_res_config_settings
msgid "Config Settings"
msgstr "Configuración de Ajustes"

#. module: partner_invoicing_mode
#: model:ir.model,name:partner_invoicing_mode.model_res_partner
msgid "Contact"
msgstr "Contacto"

#. module: partner_invoicing_mode
#: model:ir.model.fields,help:partner_invoicing_mode.field_res_partner__one_invoice_per_order
#: model:ir.model.fields,help:partner_invoicing_mode.field_res_users__one_invoice_per_order
msgid "Do not group sale order into one invoice."
msgstr "No agrupar los pedidos de venta en una factura."

#. module: partner_invoicing_mode
#: model:ir.actions.server,name:partner_invoicing_mode.ir_cron_generate_standard_invoice_ir_actions_server
msgid "Generate Standard Invoices"
msgstr "Generar facturas estándar"

#. module: partner_invoicing_mode
#: model:ir.model.fields,field_description:partner_invoicing_mode.field_res_partner__invoicing_mode
#: model:ir.model.fields,field_description:partner_invoicing_mode.field_res_users__invoicing_mode
#: model:ir.model.fields,field_description:partner_invoicing_mode.field_sale_order__invoicing_mode
#: model_terms:ir.ui.view,arch_db:partner_invoicing_mode.res_config_settings_view_form
#: model_terms:ir.ui.view,arch_db:partner_invoicing_mode.view_partner_property_form
msgid "Invoicing Mode"
msgstr "Modo de facturación"

#. module: partner_invoicing_mode
#: model:ir.model,name:partner_invoicing_mode.model_account_move
msgid "Journal Entry"
msgstr "Entrada diaria"

#. module: partner_invoicing_mode
#: model_terms:ir.ui.view,arch_db:partner_invoicing_mode.res_config_settings_view_form
msgid "Last executed on"
msgstr "Última ejecución el"

#. module: partner_invoicing_mode
#: model:ir.model.fields,field_description:partner_invoicing_mode.field_res_company__invoicing_mode_standard_last_execution
#: model:ir.model.fields,field_description:partner_invoicing_mode.field_res_config_settings__invoicing_mode_standard_last_execution
msgid "Last execution (standard)"
msgstr "Última ejecución (estándar)"

#. module: partner_invoicing_mode
#: model:ir.model.fields,help:partner_invoicing_mode.field_res_company__invoicing_mode_standard_last_execution
#: model:ir.model.fields,help:partner_invoicing_mode.field_res_config_settings__invoicing_mode_standard_last_execution
msgid "Last execution of standard invoicing."
msgstr "Última ejecución de facturación estándar."

#. module: partner_invoicing_mode
#: model:ir.model.fields,field_description:partner_invoicing_mode.field_res_partner__next_invoice_date
#: model:ir.model.fields,field_description:partner_invoicing_mode.field_res_users__next_invoice_date
msgid "Next Invoice Date"
msgstr "Siguiente fecha de facturación"

#. module: partner_invoicing_mode
#: model:ir.model.fields,field_description:partner_invoicing_mode.field_res_partner__one_invoice_per_order
#: model:ir.model.fields,field_description:partner_invoicing_mode.field_res_users__one_invoice_per_order
#: model:ir.model.fields,field_description:partner_invoicing_mode.field_sale_order__one_invoice_per_order
msgid "One Invoice Per Order"
msgstr "Una factura por pedido"

#. module: partner_invoicing_mode
#: model:ir.model,name:partner_invoicing_mode.model_queue_job
msgid "Queue Job"
msgstr "Cola de trabajo"

#. module: partner_invoicing_mode
#: model:ir.model,name:partner_invoicing_mode.model_sale_order
msgid "Sales Order"
msgstr "Órdenes de venta"

#. module: partner_invoicing_mode
#: model:ir.model.fields.selection,name:partner_invoicing_mode.selection__res_partner__invoicing_mode__standard
msgid "Standard"
msgstr "Estándar"

#. module: partner_invoicing_mode
#: model_terms:ir.ui.view,arch_db:partner_invoicing_mode.res_config_settings_view_form
msgid "Standard Invoicing Options"
msgstr ""

#. module: partner_invoicing_mode
#: model:ir.model.fields,help:partner_invoicing_mode.field_res_partner__next_invoice_date
#: model:ir.model.fields,help:partner_invoicing_mode.field_res_users__next_invoice_date
msgid "This is the date at which the next invoice will be generated."
msgstr "Esta es la fecha en la que se generará la próxima factura."

#. module: partner_invoicing_mode
#: model:ir.model.fields,help:partner_invoicing_mode.field_sale_order__one_invoice_per_order
msgid ""
"You can check or uncheck this if you want the periodic invoicing grouping "
"this sale order with other ones or not."
msgstr ""
"Puede marcar o desmarcar esta opción si desea que la facturación periódica "
"agrupe esta orden de venta con otras o no."

#~ msgid "<span class=\"o_form_label\">Standard Invoicing Options</span>"
#~ msgstr ""
#~ "<span class=\"o_form_label\">Opciones de facturación estandar</span>"
Loading
Loading