-
-
Notifications
You must be signed in to change notification settings - Fork 688
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[MIG] account_invoice_line_default_account: Migration to 12.0
This module is not compatible with account_invoice_line_sequence because them both add to the context of invoice lines in invoice form view
- Loading branch information
Showing
15 changed files
with
779 additions
and
58 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,30 @@ | ||
.. 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 | ||
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 | ||
|
@@ -19,41 +38,58 @@ 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 | ||
===== | ||
**Table of contents** | ||
|
||
.. 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/10.0 | ||
.. 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/{project_repo}/issues>`_. | ||
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. | ||
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]> | ||
|
||
Maintainer | ||
---------- | ||
Maintainers | ||
~~~~~~~~~~~ | ||
|
||
This module is maintained by the OCA. | ||
|
||
.. 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. | ||
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. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
# -*- coding: utf-8 -*- | ||
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). | ||
|
||
from . import models |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +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': '10.0.1.0.0', | ||
'version': '12.0.1.0.0', | ||
'depends': [ | ||
'account' | ||
], | ||
'excludes': [ | ||
'account_invoice_line_sequence', | ||
], | ||
'author': 'Therp BV,BCIM,Odoo Community Association (OCA)', | ||
'license': 'AGPL-3', | ||
'contributors': ['Jacques-Etienne Baudoux <[email protected]>'], | ||
'category': 'Accounting', | ||
'data': [ | ||
'views/res_partner.xml', | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,100 @@ | ||
# 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-21 14:29+0000\n" | ||
"PO-Revision-Date: 2022-04-21 14:29+0000\n" | ||
"Last-Translator: Simone Rubino <[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 | ||
#: model:ir.model.fields,field_description:account_invoice_line_default_account.field_account_invoice_line__account_id | ||
msgid "Account" | ||
msgstr "Conto" | ||
|
||
#. module: account_invoice_line_default_account | ||
#: model:ir.model,name:account_invoice_line_default_account.model_account_account_type | ||
msgid "Account Type" | ||
msgstr "Tipo conto" | ||
|
||
#. 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 il conto di costo selezionato nella riga 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 il conto di ricavo selezionato nella riga 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 "Conto di contropartita predefinito sulle righe fattura per gli acquisti" | ||
|
||
#. 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 "Conto di contropartita predefinito sulle righe fattura per le vendite" | ||
|
||
#. 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 | ||
#: code:addons/account_invoice_line_default_account/models/account_invoice_line.py:17 | ||
#, python-format | ||
msgid "No valid id for context partner_id %d" | ||
msgstr "ID %d non valido per partner_id nel contesto" | ||
|
||
#. module: account_invoice_line_default_account | ||
#: model:ir.model.fields,help:account_invoice_line_default_account.field_account_invoice_line__account_id | ||
msgid "The income or expense account related to the selected product." | ||
msgstr "Il conto ricavi o costi relativo al prodotto selezionato." | ||
|
||
#. 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 un conto viene selezionato in una riga fattura, viene salvato automaticamente come conto di costo" | ||
|
||
#. 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 un conto viene selezionato in una riga fattura, viene salvato automaticamente come conto di ricavo" | ||
|
||
#. 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 "Salva automaticamente dalla riga fattura" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
# -*- coding: utf-8 -*- | ||
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). | ||
|
||
from . import res_partner | ||
from . import account_invoice_line |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
* Ronald Portier, Therp | ||
* Jacques-Etienne Baudoux <[email protected]> (BCIM sprl) | ||
* `TAKOBI <https://takobi.online>`_: | ||
|
||
* Simone Rubino <[email protected]> |
12 changes: 12 additions & 0 deletions
12
account_invoice_line_default_account/readme/DESCRIPTION.rst
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
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. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
- Remove the `write` from `account.invoice.line._onchange_account_id` | ||
- Retrieve the real `default` attribute for field `account.invoice.line.account_id` |
Oops, something went wrong.