Skip to content

Commit

Permalink
Merge pull request #81 from charbeljc/migration_8_0
Browse files Browse the repository at this point in the history
[MIG] Migrate account_invoice_zero
  • Loading branch information
pedrobaeza committed Aug 12, 2015
2 parents 1e08a78 + 3bf13fe commit dac0107
Show file tree
Hide file tree
Showing 6 changed files with 58 additions and 37 deletions.
52 changes: 52 additions & 0 deletions account_invoice_zero_autopay/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
.. image:: https://img.shields.io/badge/licence-AGPL--3-blue.svg
:alt: License: AGPL-3


Account Invoice Zero Autopay
============================

Invoices with a amount of 0 are automatically set as paid.

When an invoice has an amount of 0, Odoo still generates a
receivable/payable move line with a 0 balance. The invoice stays as
open even if there is nothing to pay. The user has 2 ways to set the
invoice as paid: create a payment of 0 and reconcile the line with the
payment or reconcile the receivable/payable move line with itself.
This module takes the latter approach and will directly set the invoice
as paid once it is opened.

This module was named 'account_invoice_zero' before v8

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
`here <https://github.com/OCA/account-invoicing/issues/new?body=module:%20account_invoice_zero_autopay%0Aversion:%208.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.


Credits
=======

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

* Guewen Baconnier <guewen.baconnier@camptocamp.com>
* Pedro M. Baeza <pedro.baeza@gmail.com>
* Charbel Jacquin <charbel.jacquin@camptocamp.com>

Maintainer
----------

.. image:: https://odoo-community.org/logo.png
:alt: Odoo Community Association
:target: https://odoo-community.org

This module is maintained by the OCA.

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

To contribute to this module, please visit http://odoo-community.org.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -19,34 +19,19 @@
#
##############################################################################

{'name': 'Account Invoice Zero',
{'name': 'Account Invoice Zero Autopay',
'version': '1.0',
'author': "Camptocamp,Odoo Community Association (OCA)",
'maintainer': 'Camptocamp',
'license': 'AGPL-3',
'category': 'Accounting & Finance',
'depends': ['account',
],
'description': """
Account Invoice Zero
====================
Invoices with a amount of 0 are automatically set as paid.
When an invoice has an amount of 0, OpenERP still generates a
receivable/payable move line with a 0 balance. The invoice stays as
open even if there is nothing to pay. The user has 2 ways to set the
invoice as paid: create a payment of 0 and reconcile the line with the
payment or reconcile the receivable/payable move line with itself.
This module takes the latter approach and will directly set the invoice
as paid once it is opened.
""",
'website': 'http://www.camptocamp.com',
'data': [],
'test': ['test/account_invoice_zero_paid.yml',
'test/account_invoice_no_zero_open.yml',
],
'installable': False,
'installable': True,
'auto_install': False,
}
Original file line number Diff line number Diff line change
Expand Up @@ -21,17 +21,9 @@
!assert {model: account.invoice, id: account_invoice_state}:
- state == 'draft'
-
I called the "Confirm Draft Invoices" wizard
I change the state of invoice by clicking validate button
-
!record {model: account.invoice.confirm, id: account_invoice_confirm_0}:
{}
-
I clicked on Confirm Invoices Button
-
!python {model: account.invoice.confirm}: |
self.invoice_confirm(cr, uid, [ref("account_invoice_confirm_0")], {"lang": 'en_US',
"tz": False, "active_model": "account.invoice", "active_ids": [ref("account_invoice_state")],
"type": "out_invoice", "active_id": ref("account_invoice_state"), })
!workflow {model: account.invoice, action: invoice_open, ref: account_invoice_state}
-
I check that customer invoice state is "Open"
-
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,17 +26,9 @@
!assert {model: account.invoice, id: account_invoice_zero_paid}:
- state == 'draft'
-
I called the "Confirm Draft Invoices" wizard
I change the state of invoice by executing the "invoice_open" workflow
-
!record {model: account.invoice.confirm, id: account_invoice_confirm_0}:
{}
-
I clicked on Confirm Invoices Button
-
!python {model: account.invoice.confirm}: |
self.invoice_confirm(cr, uid, [ref("account_invoice_confirm_0")], {"lang": 'en_US',
"tz": False, "active_model": "account.invoice", "active_ids": [ref("account_invoice_zero_paid")],
"type": "out_invoice", "active_id": ref("account_invoice_zero_paid"), })
!workflow {model: account.invoice, action: invoice_open, ref: account_invoice_zero_paid}
-
I check that customer invoice state is "Paid"
-
Expand Down

0 comments on commit dac0107

Please sign in to comment.