Skip to content

Commit

Permalink
[MIG] account_invoice_mode: Migration to 14.0
Browse files Browse the repository at this point in the history
  • Loading branch information
phuctranfxvn committed Jan 11, 2021
1 parent 2b10496 commit 932053f
Show file tree
Hide file tree
Showing 21 changed files with 1,676 additions and 19 deletions.
92 changes: 92 additions & 0 deletions account_invoice_base_invoicing_mode/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
===================================
Account Invoice Base Invoicing Mode
===================================

.. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! 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%2Faccount--invoicing-lightgray.png?logo=github
:target: https://github.com/OCA/account-invoicing/tree/14.0/account_invoice_base_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-14-0/account-invoicing-14-0-account_invoice_base_invoicing_mode
:alt: Translate me on Weblate
.. |badge5| image:: https://img.shields.io/badge/runbot-Try%20me-875A7B.png
:target: https://runbot.odoo-community.org/runbot/95/14.0
:alt: Try me on Runbot

|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 Accounting tab of the partner
with a default value (Odoo standard invoicing mode).
But it serves no purpose installed on its own.

The following modules use it to install specific invoicing mode :

* `account_invoice_mode_at_shipping`
* `account_invoice_mode_monthly`

**Table of contents**

.. contents::
:local:

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 smashing it by providing a detailed and welcomed
`feedback <https://github.com/OCA/account-invoicing/issues/new?body=module:%20account_invoice_base_invoicing_mode%0Aversion:%2014.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]>

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/14.0/account_invoice_base_invoicing_mode>`_ project on GitHub.

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
7 changes: 5 additions & 2 deletions account_invoice_base_invoicing_mode/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,15 @@
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
{
"name": "Account Invoice Base Invoicing Mode",
"version": "13.0.1.0.0",
"version": "14.0.1.0.0",
"summary": "Base module for handling multiple invoicing mode",
"author": "Camptocamp, Odoo Community Association (OCA)",
"website": "https://github.com/OCA/account-invoicing",
"license": "AGPL-3",
"category": "Accounting & Finance",
"depends": ["account", "queue_job", "sale"],
"data": ["views/res_partner.xml"],
"data": [
"data/queue_job_data.xml",
"views/res_partner.xml",
],
}
21 changes: 21 additions & 0 deletions account_invoice_base_invoicing_mode/data/queue_job_data.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<?xml version="1.0" encoding="utf-8" ?>
<odoo>
<data>
<!-- 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>
</data>
</odoo>
4 changes: 0 additions & 4 deletions account_invoice_base_invoicing_mode/models/account_invoice.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,9 @@

from odoo import models

from odoo.addons.queue_job.job import job, related_action


class AccountMove(models.Model):
_inherit = "account.move"

@job(default_channel="root.invoice_validation")
@related_action(action="related_action_open_invoice")
def _validate_invoice(self):
return self.sudo().action_post()
2 changes: 2 additions & 0 deletions account_invoice_base_invoicing_mode/readme/CONTRIBUTORS.rst
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
* `Camptocamp <https://www.camptocamp.com>`_:

* Thierry Ducrest <[email protected]>

* Phuc (Tran Thanh) <[email protected]>
3 changes: 3 additions & 0 deletions account_invoice_base_invoicing_mode/readme/CREDITS.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
The development of this module has been financially supported by:

* Camptocamp
Loading

0 comments on commit 932053f

Please sign in to comment.