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

[12.0][MIG] account_invoice_line_default_account #1143

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
95 changes: 95 additions & 0 deletions account_invoice_line_default_account/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,95 @@
====================================
Account Invoice Line Default Account
====================================

.. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! 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/12.0/account_invoice_line_default_account
: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-12-0/account-invoicing-12-0-account_invoice_line_default_account
: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/12.0
:alt: Try me on Runbot

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

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.

**Table of contents**

.. contents::
:local:

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

- Remove the `write` from `account.invoice.line._onchange_account_id`
- Retrieve the real `default` attribute for field `account.invoice.line.account_id`

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_line_default_account%0Aversion:%2012.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
~~~~~~~

* Therp BV
* BCIM

Contributors
~~~~~~~~~~~~

* Ronald Portier, Therp
* Jacques-Etienne Baudoux <[email protected]> (BCIM sprl)
* `TAKOBI <https://takobi.online>`_:

* Simone Rubino <[email protected]>

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/12.0/account_invoice_line_default_account>`_ project on GitHub.

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
3 changes: 3 additions & 0 deletions account_invoice_line_default_account/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).

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>)
# Copyright 2022 Simone Rubino - TAKOBI
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
{
'name': 'Account Invoice Line Default Account',
'version': '12.0.1.0.0',
'depends': [
'account'
],
'author': 'Therp BV,BCIM,Odoo Community Association (OCA)',
'license': 'AGPL-3',
'category': 'Accounting',
'data': [
'views/res_partner.xml',
],
'installable': True,
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * account_invoice_line_default_account
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 12.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2022-04-26 09:03+0000\n"
"PO-Revision-Date: 2022-04-26 09:03+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
#: model:ir.model.fields,field_description:account_invoice_line_default_account.field_res_partner__auto_update_account_expense
#: model:ir.model.fields,field_description:account_invoice_line_default_account.field_res_users__auto_update_account_expense
msgid "Autosave Selection for Expense Account on Invoice Line"
msgstr ""

#. module: account_invoice_line_default_account
#: model:ir.model.fields,field_description:account_invoice_line_default_account.field_res_partner__auto_update_account_income
#: model:ir.model.fields,field_description:account_invoice_line_default_account.field_res_users__auto_update_account_income
msgid "Autosave Selection for Income Account on Invoice Line"
msgstr ""

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

#. module: account_invoice_line_default_account
#: model:ir.model.fields,field_description:account_invoice_line_default_account.field_res_partner__property_account_expense
#: model:ir.model.fields,field_description:account_invoice_line_default_account.field_res_users__property_account_expense
msgid "Default Expense Account"
msgstr ""

#. module: account_invoice_line_default_account
#: model:ir.model.fields,field_description:account_invoice_line_default_account.field_res_partner__property_account_income
#: model:ir.model.fields,field_description:account_invoice_line_default_account.field_res_users__property_account_income
msgid "Default Income Account"
msgstr ""

#. module: account_invoice_line_default_account
#: model:ir.model.fields,help:account_invoice_line_default_account.field_res_partner__property_account_expense
#: model:ir.model.fields,help:account_invoice_line_default_account.field_res_users__property_account_expense
msgid "Default counterpart account for purchases on invoice lines"
msgstr ""

#. module: account_invoice_line_default_account
#: model:ir.model.fields,help:account_invoice_line_default_account.field_res_partner__property_account_income
#: model:ir.model.fields,help:account_invoice_line_default_account.field_res_users__property_account_income
msgid "Default counterpart account for sales on invoice lines"
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
#: model:ir.model.fields,help:account_invoice_line_default_account.field_res_partner__auto_update_account_expense
#: model:ir.model.fields,help:account_invoice_line_default_account.field_res_users__auto_update_account_expense
msgid "When an account is selected on an invoice line, automatically assign it as default expense account"
msgstr ""

#. module: account_invoice_line_default_account
#: model:ir.model.fields,help:account_invoice_line_default_account.field_res_partner__auto_update_account_income
#: model:ir.model.fields,help:account_invoice_line_default_account.field_res_users__auto_update_account_income
msgid "When an account is selected on an invoice line, automatically assign it as default income account"
msgstr ""

#. module: account_invoice_line_default_account
#: model_terms:ir.ui.view,arch_db:account_invoice_line_default_account.view_partner_expense_property_form
msgid "autosave from invoice line"
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 ""

80 changes: 80 additions & 0 deletions account_invoice_line_default_account/i18n/it.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * account_invoice_line_default_account
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 12.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2022-04-26 08:55+0000\n"
"PO-Revision-Date: 2022-04-26 08:55+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
#: model:ir.model.fields,field_description:account_invoice_line_default_account.field_res_partner__auto_update_account_expense
#: model:ir.model.fields,field_description:account_invoice_line_default_account.field_res_users__auto_update_account_expense
msgid "Autosave Selection for Expense Account on Invoice Line"
msgstr "Salvare automaticamente la selezione per il conto di costo nelle righe fattura"

#. module: account_invoice_line_default_account
#: model:ir.model.fields,field_description:account_invoice_line_default_account.field_res_partner__auto_update_account_income
#: model:ir.model.fields,field_description:account_invoice_line_default_account.field_res_users__auto_update_account_income
msgid "Autosave Selection for Income Account on Invoice Line"
msgstr "Salvare automaticamente la selezione per il conto di ricavo nelle righe fattura"

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

#. module: account_invoice_line_default_account
#: model:ir.model.fields,field_description:account_invoice_line_default_account.field_res_partner__property_account_expense
#: model:ir.model.fields,field_description:account_invoice_line_default_account.field_res_users__property_account_expense
msgid "Default Expense Account"
msgstr "Conto di costo predefinito"

#. module: account_invoice_line_default_account
#: model:ir.model.fields,field_description:account_invoice_line_default_account.field_res_partner__property_account_income
#: model:ir.model.fields,field_description:account_invoice_line_default_account.field_res_users__property_account_income
msgid "Default Income Account"
msgstr "Conto di ricavo predefinito"

#. module: account_invoice_line_default_account
#: model:ir.model.fields,help:account_invoice_line_default_account.field_res_partner__property_account_expense
#: model:ir.model.fields,help:account_invoice_line_default_account.field_res_users__property_account_expense
msgid "Default counterpart account for purchases on invoice lines"
msgstr "Contropartita predefinita per gli acquisti sulle righe fattura"

#. module: account_invoice_line_default_account
#: model:ir.model.fields,help:account_invoice_line_default_account.field_res_partner__property_account_income
#: model:ir.model.fields,help:account_invoice_line_default_account.field_res_users__property_account_income
msgid "Default counterpart account for sales on invoice lines"
msgstr "Contropartita predefinita per le vendite sulle righe fattura"

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

#. module: account_invoice_line_default_account
#: model:ir.model.fields,help:account_invoice_line_default_account.field_res_partner__auto_update_account_expense
#: model:ir.model.fields,help:account_invoice_line_default_account.field_res_users__auto_update_account_expense
msgid "When an account is selected on an invoice line, automatically assign it as default expense account"
msgstr "Quando viene selezionato un conto sulla riga fattura, assegnarlo automaticamente come conto di costo predefinito"

#. module: account_invoice_line_default_account
#: model:ir.model.fields,help:account_invoice_line_default_account.field_res_partner__auto_update_account_income
#: model:ir.model.fields,help:account_invoice_line_default_account.field_res_users__auto_update_account_income
msgid "When an account is selected on an invoice line, automatically assign it as default income account"
msgstr "Quando viene selezionato un conto sulla riga fattura, assegnarlo automaticamente come conto di ricavo predefinito"

#. module: account_invoice_line_default_account
#: model_terms:ir.ui.view,arch_db:account_invoice_line_default_account.view_partner_expense_property_form
msgid "autosave from invoice line"
msgstr "Salvataggio automatico da riga fattura"

Loading