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

[WIP][ADD] Add account cash discount base module #208

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
74 changes: 74 additions & 0 deletions account_cash_discount_base/README.rst
@@ -0,0 +1,74 @@
.. image:: https://img.shields.io/badge/licence-AGPL--3-blue.svg
:alt: License: AGPL-3

==========================
Account Cash Discount Base
==========================

This module was written to allow you to define cash discount on your customer
or supplier invoice. On customer invoice, you can add a discount delay and
a discount percent. At invoice's validation, the discount due date is genereted

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

s/genereted/generated

from the delay. The amount with discount deducted is computed at the same time
as taxes. This module also adds cash discount informations on customer invoice
report.

On supplier invoices, you can set the discount percent or directly defined the
total amount with discount deducted. For the discount due date, you can fill it
directly or set a delay. In this case, discount due date is still computed at
invoice's validation.

In all cases, the discount is a percentage of the untaxed amount.



Installation
============

To install this module, you need to:

* Click on install button

Usage
=====

To use this module you can defined all of informations written in the
description on customer and supplier invoices.

.. image:: https://odoo-community.org/website/image/ir.attachment/5784_f2813bd/datas
:alt: Try me on Runbot
:target: https://runbot.odoo-community.org/runbot/173/8.0

For further information, please visit:

* https://www.odoo.com/forum/help-1

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

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

Credits
=======

Contributors:
-------------

* Christelle De Coninck (ACSONE) <christelle.deconinck@acsone.eu>
* Stéphane Bidoul (ACSONE) <stephane.bidoul@acsone.eu>
* Adrien Peiffer (ACSONE) <adrien.peiffer@acsone.eu>

Maintainer:
-----------

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

This module is maintained by the OCA.

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

To contribute to this module, please visit http://odoo-community.org.
23 changes: 23 additions & 0 deletions account_cash_discount_base/__init__.py
@@ -0,0 +1,23 @@
# -*- coding: utf-8 -*-
#
##############################################################################
#
# Authors: Adrien Peiffer
# Copyright (c) 2014 Acsone SA/NV (http://www.acsone.eu)
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
##############################################################################

from . import models

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can use simple headers

38 changes: 38 additions & 0 deletions account_cash_discount_base/__openerp__.py
@@ -0,0 +1,38 @@
# -*- coding: utf-8 -*-
#
##############################################################################
#
# Authors: Adrien Peiffer
# Copyright (c) 2014 Acsone SA/NV (http://www.acsone.eu)
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
##############################################################################

{
"name": "Account Cash Discount Base",
"version": "8.0.1.0.0",
"author": 'ACSONE SA/NV,'
'Odoo Community Association (OCA)',
"website": "http://www.acsone.eu",
"licence": "AGPL-3",
"category": "Accounting",
"depends": [
"account",
],
"data": [
'views/account_invoice_view.xml',
'reports/report_invoice.xml',
],
}
94 changes: 94 additions & 0 deletions account_cash_discount_base/i18n/fr.po
@@ -0,0 +1,94 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * account_cash_discount_base
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 8.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2015-05-20 11:23+0000\n"
"PO-Revision-Date: 2015-05-20 11:23+0000\n"
"Last-Translator: <>\n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: \n"

#. module: account_cash_discount_base
#: view:website:account.report_invoice_document
msgid "% discount for payment before"
msgstr "% d'escompte pour un paiement avant le"

#. module: account_cash_discount_base
#: view:account.invoice:account_cash_discount_base.invoice_form_inherit
#: view:account.invoice:account_cash_discount_base.invoice_supplier_form_inherit
msgid "(update)"
msgstr "(mise à jour)"

#. module: account_cash_discount_base
#: field:account.invoice,discount:0
msgid "Amount Discount"
msgstr "Montant de l'escompte"

#. module: account_cash_discount_base
#: field:account.invoice,discount_amount:0
msgid "Amount Discount deducted"
msgstr "Montant total escompte déduit"

#. module: account_cash_discount_base
#: field:payment.order.create,cash_discount_date:0
msgid "Cash Discount Due Date"
msgstr "Date d'échéance de l'escompte"

#. module: account_cash_discount_base
#: view:account.invoice:account_cash_discount_base.invoice_form_inherit
#: view:account.invoice:account_cash_discount_base.invoice_supplier_form_inherit
msgid "Cash discount"
msgstr "Escompte"

#. module: account_cash_discount_base
#: field:payment.line,discount_amount:0
msgid "Discount Amount"
msgstr "Escompte"

#. module: account_cash_discount_base
#: field:account.invoice,discount_due_date:0
msgid "Discount Due Date"
msgstr "Date d'échéance de l'escompte"

#. module: account_cash_discount_base
#: model:ir.model,name:account_cash_discount_base.model_account_invoice
msgid "Invoice"
msgstr "Facture"

#. module: account_cash_discount_base
#: model:ir.model,name:account_cash_discount_base.model_payment_line
msgid "Payment Line"
msgstr "Ligne de paiement"

#. module: account_cash_discount_base
#: view:account.invoice:account_cash_discount_base.invoice_form_inherit
#: view:account.invoice:account_cash_discount_base.invoice_supplier_form_inherit
msgid "Payments"
msgstr "Règlements"

#. module: account_cash_discount_base
#: view:account.invoice:account_cash_discount_base.invoice_form_inherit
#: view:account.invoice:account_cash_discount_base.invoice_supplier_form_inherit
msgid "Recompute taxes and total"
msgstr "Recalculer les taxes et le total"

#. module: account_cash_discount_base
#: view:website:account.report_invoice_document
msgid "Total With a"
msgstr "Total avec"

#. module: account_cash_discount_base
#: code:addons/account_cash_discount_base/models/account_invoice.py:91
#, python-format
msgid "Warning !\n"
" You have to define a discount due date"
msgstr "Attention !\n"
" Vous devez définir une date d'échéance de l'escompte"

94 changes: 94 additions & 0 deletions account_cash_discount_base/i18n/fr_BE.po
@@ -0,0 +1,94 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * account_cash_discount_base
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 8.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2015-05-20 11:23+0000\n"
"PO-Revision-Date: 2015-05-20 11:23+0000\n"
"Last-Translator: <>\n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: \n"

#. module: account_cash_discount_base
#: view:website:account.report_invoice_document
msgid "% discount for payment before"
msgstr "% d'escompte pour un paiement avant le"

#. module: account_cash_discount_base
#: view:account.invoice:account_cash_discount_base.invoice_form_inherit
#: view:account.invoice:account_cash_discount_base.invoice_supplier_form_inherit
msgid "(update)"
msgstr "(mise à jour)"

#. module: account_cash_discount_base
#: field:account.invoice,discount:0
msgid "Amount Discount"
msgstr "Montant de l'escompte"

#. module: account_cash_discount_base
#: field:account.invoice,discount_amount:0
msgid "Amount Discount deducted"
msgstr "Montant total escompte déduit"

#. module: account_cash_discount_base
#: field:payment.order.create,cash_discount_date:0
msgid "Cash Discount Due Date"
msgstr "Date d'échéance de l'escompte"

#. module: account_cash_discount_base
#: view:account.invoice:account_cash_discount_base.invoice_form_inherit
#: view:account.invoice:account_cash_discount_base.invoice_supplier_form_inherit
msgid "Cash discount"
msgstr "Escompte"

#. module: account_cash_discount_base
#: field:payment.line,discount_amount:0
msgid "Discount Amount"
msgstr "Escompte"

#. module: account_cash_discount_base
#: field:account.invoice,discount_due_date:0
msgid "Discount Due Date"
msgstr "Date d'échéance de l'escompte"

#. module: account_cash_discount_base
#: model:ir.model,name:account_cash_discount_base.model_account_invoice
msgid "Invoice"
msgstr "Facture"

#. module: account_cash_discount_base
#: model:ir.model,name:account_cash_discount_base.model_payment_line
msgid "Payment Line"
msgstr "Ligne de paiement"

#. module: account_cash_discount_base
#: view:account.invoice:account_cash_discount_base.invoice_form_inherit
#: view:account.invoice:account_cash_discount_base.invoice_supplier_form_inherit
msgid "Payments"
msgstr "Règlements"

#. module: account_cash_discount_base
#: view:account.invoice:account_cash_discount_base.invoice_form_inherit
#: view:account.invoice:account_cash_discount_base.invoice_supplier_form_inherit
msgid "Recompute taxes and total"
msgstr "Recalculer les taxes et le total"

#. module: account_cash_discount_base
#: view:website:account.report_invoice_document
msgid "Total With a"
msgstr "Total avec"

#. module: account_cash_discount_base
#: code:addons/account_cash_discount_base/models/account_invoice.py:91
#, python-format
msgid "Warning !\n"
" You have to define a discount due date"
msgstr "Attention !\n"
" Vous devez définir une date d'échéance de l'escompte"

23 changes: 23 additions & 0 deletions account_cash_discount_base/models/__init__.py
@@ -0,0 +1,23 @@
# -*- coding: utf-8 -*-
#
##############################################################################
#
# Authors: Adrien Peiffer
# Copyright (c) 2014 Acsone SA/NV (http://www.acsone.eu)
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
##############################################################################

from . import account_invoice

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can use simple headers