Skip to content

Commit

Permalink
[MIG] account_invoice_line_default_account: Migration to 8.0
Browse files Browse the repository at this point in the history
[ADD] account_invoice_line_default_account

[IMP] account_invoice_line_default_account: updated with new OCA guidelines

[FIX] pep8, README.rst

[FIX] view_load is deprecated

[FIX] fields.property definition have changed

[FIX] from . import + contributors

[FIX] account_invoice_line_default_account: Adding the partner in the context of invoice line of customer invoice. It's there in standard in supplier invoices but not in customer invoices and it's required by this module

[ADD]account_invoice_line_default_account: default income account on partner similar to default expense account

[ADD] translations fr/nl

[FIX] __openerp__ file

[IMP] look and feel

[FIX] pep8
  • Loading branch information
jbaudoux authored and SirTakobi committed Apr 22, 2022
1 parent 06607d5 commit 45e5305
Show file tree
Hide file tree
Showing 16 changed files with 429 additions and 160 deletions.
74 changes: 74 additions & 0 deletions account_invoice_line_default_account/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
.. image:: https://img.shields.io/badge/licence-AGPL--3-blue.svg
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
:alt: License: AGPL-3

====================================
Account Invoice Line default Account
====================================

When entering sales or purchase invoices directly, the user has to select an
account which will be used as a counterpart in the generated move lines. Each
supplier will mostly be linked to one account. For instance when ordering paper
from a supplier that deals in paper, the counterpart account will mostly be
something like 'office expenses'. The same principle has been applied for
customers. This module will add a default counterpart expense and income
account to a partner, comparable to the similiar field in product. When an
invoice is entered, withouth a product, the field from partner will be used as
default. Also when an account is entered on an invoice line (not automatically
selected for a product), the account will be automatically linked to the
partner as default expense or income account, unless explicitly disabled in the
partner record.

Usage
=====

To use this module, you need to:

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

.. repo_id is available in https://github.com/OCA/maintainer-tools/blob/master/tools/repos_with_ids.txt
.. branch is "8.0" for example
For further information, please visit:

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

Known issues / Roadmap
======================

* ...

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

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


Credits
=======

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

* Ronald Portier, Therp
* Jacques-Etienne Baudoux <[email protected]> (BCIM sprl)

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.
11 changes: 1 addition & 10 deletions account_invoice_line_default_account/__init__.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,3 @@
# -*- coding: UTF-8 -*-
'''
Created on 30 jan. 2013

@author: Ronald Portier, Therp
[email protected]
http://www.therp.nl
Ported to 7.0 on Sept. 17, 2013 by Jacques-Etienne Baudoux, BCIM (www.bcim.be)
'''
from . import model
from . import models
19 changes: 19 additions & 0 deletions account_invoice_line_default_account/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# -*- coding: utf-8 -*-
# Copyright 2012 Therp BV (<http://therp.nl>)
# Copyright 2013-2018 BCIM SPRL (<http://www.bcim.be>)
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
{
'name': 'Account Invoice Line Default Account',
'version': '10.0.1.0.0',
'depends': [
'account'
],
'author': 'Therp BV,BCIM,Odoo Community Association (OCA)',
'contributors': ['Jacques-Etienne Baudoux <[email protected]>'],
'category': 'Accounting',
'data': [
'views/res_partner.xml',
'views/account_invoice.xml',
],
'installable': True,
}
24 changes: 7 additions & 17 deletions account_invoice_line_default_account/__openerp__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
#
# OpenERP, Open Source Management Solution
# This module copyright (C) 2012 Therp BV (<http://therp.nl>).
# This module copyright (C) 2013-2015 BCIM SPRL (<http://www.bcim.be>).
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
Expand All @@ -20,29 +21,18 @@
##############################################################################
{
'name': 'Account Invoice Line Default Account',
'version': '7.0.r001',
'version': '1.0',
'depends': [
'base',
'account'
],
'author': 'Therp BV',
'author': 'Therp BV,BCIM,Odoo Community Association (OCA)',
'contributors': ['Jacques-Etienne Baudoux <[email protected]>'],
'category': 'Accounting',
'description': '''When entering purchase invoices directly, the user has
to select an account which will be used as a counterpart in the generated
move lines. However, each supplier will mostly be linked to one account. For
instance when ordering paper from a supplier that deals in paper, the
counterpart account will mostly be something like 'office expenses'.
This module will add a default counterpart account to a partner (supplier
only), comparable to the similiar field in product. When a supplier invoice
is entered, withouth a product, the field from partner will be used as default.
Also when an expense account is entered on an invoice line (not automatically
selectd for a product), the expense account will be automatically linked to
the partner - unless explicitly disabled in the partner record.
''',
'data': [
'view/res_partner_view.xml'
'views/res_partner.xml',
'views/account_invoice.xml',
],
'demo_xml': [],
'demo': [],
'test': [],
'installable': True,
'active': False,
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
# Translation of OpenERP Server.
# This file contains the translation of the following modules:
# * account_invoice_line_default_account
#
msgid ""
msgstr ""
"Project-Id-Version: OpenERP Server 7.saas~1\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2013-09-18 16:01+0000\n"
"PO-Revision-Date: 2013-09-18 16:01+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_invoice_line_default_account
#: field:res.partner,property_account_expense:0
msgid "Default Expense Account"
msgstr ""

#. module: account_invoice_line_default_account
#: help:res.partner,property_account_expense:0
msgid "Default counterpart account for purchases on invoice lines"
msgstr ""

#. module: account_invoice_line_default_account
#: help:res.partner,auto_update_account_expense:0
msgid "When an account is selected on an invoice line, automatically assign it as default expense account"
msgstr ""

#. module: account_invoice_line_default_account
#: code:addons/account_invoice_line_default_account/model/account_invoice_line.py:27
#: code:addons/account_invoice_line_default_account/model/account_invoice_line.py:47
#, python-format
msgid "No object created for partner %d"
msgstr ""

#. module: account_invoice_line_default_account
#: model:ir.model,name:account_invoice_line_default_account.model_account_invoice_line
msgid "Invoice Line"
msgstr ""

#. module: account_invoice_line_default_account
#: view:res.partner:0
msgid "autosave from invoice line"
msgstr ""

#. module: account_invoice_line_default_account
#: field:res.partner,auto_update_account_expense:0
msgid "Autosave Selection on Invoice Line"
msgstr ""

#. module: account_invoice_line_default_account
#: model:ir.model,name:account_invoice_line_default_account.model_res_partner
msgid "Partner"
msgstr ""

59 changes: 59 additions & 0 deletions account_invoice_line_default_account/i18n/fr.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
# Translation of OpenERP Server.
# This file contains the translation of the following modules:
# * account_invoice_line_default_account
#
msgid ""
msgstr ""
"Project-Id-Version: OpenERP Server 7.saas~1\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2013-09-18 16:01+0000\n"
"PO-Revision-Date: 2013-09-18 16:01+0000\n"
"Last-Translator: Jacques-Etienne Baudoux <[email protected]>\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_invoice_line_default_account
#: field:res.partner,property_account_expense:0
msgid "Default Expense Account"
msgstr "Compte de charge par défaut"

#. module: account_invoice_line_default_account
#: help:res.partner,property_account_expense:0
msgid "Default counterpart account for purchases on invoice lines"
msgstr "Compte de contrepartie par défaut pour les lignes de factures d'achat"

#. module: account_invoice_line_default_account
#: help:res.partner,auto_update_account_expense:0
msgid "When an account is selected on an invoice line, automatically assign it as default expense account"
msgstr "Lorsqu'un compte est sélectionné sur une ligne de facture, l'assigner automatiquement comme compte de charge par défaut"

#. module: account_invoice_line_default_account
#: code:addons/account_invoice_line_default_account/model/account_invoice_line.py:27
#: code:addons/account_invoice_line_default_account/model/account_invoice_line.py:47
#, python-format
msgid "No object created for partner %d"
msgstr ""

#. module: account_invoice_line_default_account
#: model:ir.model,name:account_invoice_line_default_account.model_account_invoice_line
msgid "Invoice Line"
msgstr ""

#. module: account_invoice_line_default_account
#: view:res.partner:0
msgid "autosave from invoice line"
msgstr "sauvegarde automatique"

#. module: account_invoice_line_default_account
#: field:res.partner,auto_update_account_expense:0
msgid "Autosave Selection on Invoice Line"
msgstr ""

#. module: account_invoice_line_default_account
#: model:ir.model,name:account_invoice_line_default_account.model_res_partner
msgid "Partner"
msgstr ""

59 changes: 59 additions & 0 deletions account_invoice_line_default_account/i18n/nl.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
# Translation of OpenERP Server.
# This file contains the translation of the following modules:
# * account_invoice_line_default_account
#
msgid ""
msgstr ""
"Project-Id-Version: OpenERP Server 7.saas~1\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2013-09-18 16:01+0000\n"
"PO-Revision-Date: 2013-09-18 16:01+0000\n"
"Last-Translator: Jacques-Etienne Baudoux <[email protected]>\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_invoice_line_default_account
#: field:res.partner,property_account_expense:0
msgid "Default Expense Account"
msgstr "Standaard kostenrekening"

#. module: account_invoice_line_default_account
#: help:res.partner,property_account_expense:0
msgid "Default counterpart account for purchases on invoice lines"
msgstr "Standaard tegenrekening voor inkoop factuur lijnen"

#. module: account_invoice_line_default_account
#: help:res.partner,auto_update_account_expense:0
msgid "When an account is selected on an invoice line, automatically assign it as default expense account"
msgstr "Wanneer een rekening op een factuur lijn is geselecteerd, automatisch toewijzen als standaard kostenrekening"

#. module: account_invoice_line_default_account
#: code:addons/account_invoice_line_default_account/model/account_invoice_line.py:27
#: code:addons/account_invoice_line_default_account/model/account_invoice_line.py:47
#, python-format
msgid "No object created for partner %d"
msgstr ""

#. module: account_invoice_line_default_account
#: model:ir.model,name:account_invoice_line_default_account.model_account_invoice_line
msgid "Invoice Line"
msgstr ""

#. module: account_invoice_line_default_account
#: view:res.partner:0
msgid "autosave from invoice line"
msgstr "automatisch bewaren"

#. module: account_invoice_line_default_account
#: field:res.partner,auto_update_account_expense:0
msgid "Autosave Selection on Invoice Line"
msgstr ""

#. module: account_invoice_line_default_account
#: model:ir.model,name:account_invoice_line_default_account.model_res_partner
msgid "Partner"
msgstr ""

11 changes: 0 additions & 11 deletions account_invoice_line_default_account/model/__init__.py

This file was deleted.

Loading

0 comments on commit 45e5305

Please sign in to comment.