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

[14.0][ADD] module account_move_update_analytic #497

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
35 changes: 35 additions & 0 deletions account_move_update_analytic/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
**This file is going to be generated by oca-gen-addon-readme.**

*Manual changes will be overwritten.*

Please provide content in the ``readme`` directory:

* **DESCRIPTION.rst** (required)
* INSTALL.rst (optional)
* CONFIGURE.rst (optional)
* **USAGE.rst** (optional, highly recommended)
* DEVELOP.rst (optional)
* ROADMAP.rst (optional)
* HISTORY.rst (optional, recommended)
* **CONTRIBUTORS.rst** (optional, highly recommended)
* CREDITS.rst (optional)

Content of this README will also be drawn from the addon manifest,
from keys such as name, authors, maintainers, development_status,
and license.

A good, one sentence summary in the manifest is also highly recommended.


Automatic changelog generation
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

`HISTORY.rst` can be auto generated using `towncrier <https://pypi.org/project/towncrier>`_.

Just put towncrier compatible changelog fragments into `readme/newsfragments`
and the changelog file will be automatically generated and updated when a new fragment is added.

Please refer to `towncrier` documentation to know more.

NOTE: the changelog will be automatically generated when using `/ocabot merge $option`.
If you need to run it manually, refer to `OCA/maintainer-tools README <https://github.com/OCA/maintainer-tools>`_.
1 change: 1 addition & 0 deletions account_move_update_analytic/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from . import wizards
20 changes: 20 additions & 0 deletions account_move_update_analytic/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Copyright 2022 Le Filament
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).

{
"name": "Account move update analytic",
"version": "14.0.1.0.0",
"category": "Accounting & Finance",
"summary": "This module allows the user to update analytic on posted moves",
"author": "Le Filament, Odoo Community Association (OCA)",
"website": "https://github.com/OCA/account-analytic",
"license": "AGPL-3",
"depends": ["account"],
"data": [
"security/ir.model.access.csv",
"wizards/account_move_update_analytic_view.xml",
"views/account_move_view.xml",
"views/account_move_line_view.xml",
],
"installable": True,
}
123 changes: 123 additions & 0 deletions account_move_update_analytic/i18n/account_move_update_analytic.pot
Original file line number Diff line number Diff line change
@@ -0,0 +1,123 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * account_move_update_analytic
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 14.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2022-12-06 11:18+0000\n"
"PO-Revision-Date: 2022-12-06 11:18+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_move_update_analytic
#: model:ir.model,name:account_move_update_analytic.model_account_move_update_analytic_wizard
msgid "Account Move Update Analytic Account Wizard"
msgstr ""

#. module: account_move_update_analytic
#: model_terms:ir.ui.view,arch_db:account_move_update_analytic.view_account_move_update_analytic_account
msgid "Analytic Account"
msgstr ""

#. module: account_move_update_analytic
#: model_terms:ir.ui.view,arch_db:account_move_update_analytic.view_account_move_update_analytic_account
msgid "Analytic Tags"
msgstr ""

#. module: account_move_update_analytic
#: model_terms:ir.ui.view,arch_db:account_move_update_analytic.view_account_move_update_analytic_account
msgid "Cancel"
msgstr ""

#. module: account_move_update_analytic
#: model:ir.model.fields,field_description:account_move_update_analytic.field_account_move_update_analytic_wizard__company_id
msgid "Company"
msgstr ""

#. module: account_move_update_analytic
#: model:ir.model.fields,field_description:account_move_update_analytic.field_account_move_update_analytic_wizard__create_uid
msgid "Created by"
msgstr ""

#. module: account_move_update_analytic
#: model:ir.model.fields,field_description:account_move_update_analytic.field_account_move_update_analytic_wizard__create_date
msgid "Created on"
msgstr ""

#. module: account_move_update_analytic
#: model:ir.model.fields,field_description:account_move_update_analytic.field_account_move_update_analytic_wizard__current_analytic_account_id
msgid "Current Analytic Account"
msgstr ""

#. module: account_move_update_analytic
#: model:ir.model.fields,field_description:account_move_update_analytic.field_account_move_update_analytic_wizard__current_analytic_tag_ids
msgid "Current Analytic Tags"
msgstr ""

#. module: account_move_update_analytic
#: model:ir.model.fields,field_description:account_move_update_analytic.field_account_move_update_analytic_wizard__display_name
msgid "Display Name"
msgstr ""

#. module: account_move_update_analytic
#: model:ir.model.fields,field_description:account_move_update_analytic.field_account_move_update_analytic_wizard__id
msgid "ID"
msgstr ""

#. module: account_move_update_analytic
#: model:ir.model.fields,field_description:account_move_update_analytic.field_account_move_update_analytic_wizard__line_id
msgid "Invoice line"
msgstr ""

#. module: account_move_update_analytic
#: model:ir.model.fields,field_description:account_move_update_analytic.field_account_move_update_analytic_wizard____last_update
msgid "Last Modified on"
msgstr ""

#. module: account_move_update_analytic
#: model:ir.model.fields,field_description:account_move_update_analytic.field_account_move_update_analytic_wizard__write_uid
msgid "Last Updated by"
msgstr ""

#. module: account_move_update_analytic
#: model:ir.model.fields,field_description:account_move_update_analytic.field_account_move_update_analytic_wizard__write_date
msgid "Last Updated on"
msgstr ""

#. module: account_move_update_analytic
#: model:ir.model.fields,field_description:account_move_update_analytic.field_account_move_update_analytic_wizard__new_analytic_account_id
msgid "New Analytic Account"
msgstr ""

#. module: account_move_update_analytic
#: model:ir.model.fields,field_description:account_move_update_analytic.field_account_move_update_analytic_wizard__new_analytic_tag_ids
msgid "New Analytic Tags"
msgstr ""

#. module: account_move_update_analytic
#: model_terms:ir.ui.view,arch_db:account_move_update_analytic.account_move_form_view
#: model_terms:ir.ui.view,arch_db:account_move_update_analytic.account_move_line_tree_view
#: model_terms:ir.ui.view,arch_db:account_move_update_analytic.view_move_line_tree_grouped
msgid "Update Analytic"
msgstr ""

#. module: account_move_update_analytic
#: model_terms:ir.ui.view,arch_db:account_move_update_analytic.view_account_move_update_analytic_account
msgid "Update Analytic Accounts / Tags"
msgstr ""

#. module: account_move_update_analytic
#: model:ir.actions.act_window,name:account_move_update_analytic.action_view_account_move_update_analytic
msgid "Update Analytic for selected Account Moves"
msgstr ""

#. module: account_move_update_analytic
#: model_terms:ir.ui.view,arch_db:account_move_update_analytic.view_account_move_update_analytic_account
msgid "Update analytic lines"
msgstr ""
123 changes: 123 additions & 0 deletions account_move_update_analytic/i18n/fr.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,123 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * account_move_update_analytic
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 14.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2022-12-06 11:18+0000\n"
"PO-Revision-Date: 2022-12-06 11:18+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_move_update_analytic
#: model:ir.model,name:account_move_update_analytic.model_account_move_update_analytic_wizard
msgid "Account Move Update Analytic Account Wizard"
msgstr "Assistant Mise à jour analytique"

#. module: account_move_update_analytic
#: model_terms:ir.ui.view,arch_db:account_move_update_analytic.view_account_move_update_analytic_account
msgid "Analytic Account"
msgstr "Compte analytique"

#. module: account_move_update_analytic
#: model_terms:ir.ui.view,arch_db:account_move_update_analytic.view_account_move_update_analytic_account
msgid "Analytic Tags"
msgstr "Étiquettes analytiques"

#. module: account_move_update_analytic
#: model_terms:ir.ui.view,arch_db:account_move_update_analytic.view_account_move_update_analytic_account
msgid "Cancel"
msgstr "Annuler"

#. module: account_move_update_analytic
#: model:ir.model.fields,field_description:account_move_update_analytic.field_account_move_update_analytic_wizard__company_id
msgid "Company"
msgstr "Société"

#. module: account_move_update_analytic
#: model:ir.model.fields,field_description:account_move_update_analytic.field_account_move_update_analytic_wizard__create_uid
msgid "Created by"
msgstr "Créé par"

#. module: account_move_update_analytic
#: model:ir.model.fields,field_description:account_move_update_analytic.field_account_move_update_analytic_wizard__create_date
msgid "Created on"
msgstr "Créé le"

#. module: account_move_update_analytic
#: model:ir.model.fields,field_description:account_move_update_analytic.field_account_move_update_analytic_wizard__current_analytic_account_id
msgid "Current Analytic Account"
msgstr "Compte analytique actuel"

#. module: account_move_update_analytic
#: model:ir.model.fields,field_description:account_move_update_analytic.field_account_move_update_analytic_wizard__current_analytic_tag_ids
msgid "Current Analytic Tags"
msgstr "Étiquettes analytiques actuelles"

#. module: account_move_update_analytic
#: model:ir.model.fields,field_description:account_move_update_analytic.field_account_move_update_analytic_wizard__display_name
msgid "Display Name"
msgstr "Nom affiché"

#. module: account_move_update_analytic
#: model:ir.model.fields,field_description:account_move_update_analytic.field_account_move_update_analytic_wizard__id
msgid "ID"
msgstr ""

#. module: account_move_update_analytic
#: model:ir.model.fields,field_description:account_move_update_analytic.field_account_move_update_analytic_wizard__line_id
msgid "Invoice line"
msgstr "Ligne de facture"

#. module: account_move_update_analytic
#: model:ir.model.fields,field_description:account_move_update_analytic.field_account_move_update_analytic_wizard____last_update
msgid "Last Modified on"
msgstr "Dernière modification le"

#. module: account_move_update_analytic
#: model:ir.model.fields,field_description:account_move_update_analytic.field_account_move_update_analytic_wizard__write_uid
msgid "Last Updated by"
msgstr "Dernière mise à jour par"

#. module: account_move_update_analytic
#: model:ir.model.fields,field_description:account_move_update_analytic.field_account_move_update_analytic_wizard__write_date
msgid "Last Updated on"
msgstr "Dernière mise à jour le"

#. module: account_move_update_analytic
#: model:ir.model.fields,field_description:account_move_update_analytic.field_account_move_update_analytic_wizard__new_analytic_account_id
msgid "New Analytic Account"
msgstr "Nouveau compte analytique"

#. module: account_move_update_analytic
#: model:ir.model.fields,field_description:account_move_update_analytic.field_account_move_update_analytic_wizard__new_analytic_tag_ids
msgid "New Analytic Tags"
msgstr "Nouvelles étiquettes analytiques"

#. module: account_move_update_analytic
#: model_terms:ir.ui.view,arch_db:account_move_update_analytic.account_move_form_view
#: model_terms:ir.ui.view,arch_db:account_move_update_analytic.account_move_line_tree_view
#: model_terms:ir.ui.view,arch_db:account_move_update_analytic.view_move_line_tree_grouped
msgid "Update Analytic"
msgstr "Mettre à jour Analytique"

#. module: account_move_update_analytic
#: model_terms:ir.ui.view,arch_db:account_move_update_analytic.view_account_move_update_analytic_account
msgid "Update Analytic Accounts / Tags"
msgstr "Mettre à jour les comptes/étiquettes analytiques"

#. module: account_move_update_analytic
#: model:ir.actions.act_window,name:account_move_update_analytic.action_view_account_move_update_analytic
msgid "Update Analytic for selected Account Moves"
msgstr "Mettre à jour analytique pour les pièces sélectionnées"

#. module: account_move_update_analytic
#: model_terms:ir.ui.view,arch_db:account_move_update_analytic.view_account_move_update_analytic_account
msgid "Update analytic lines"
msgstr "Mettre à jour les lignes analytiques"
1 change: 1 addition & 0 deletions account_move_update_analytic/readme/CONTRIBUTORS.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* Rémi - Le Filament <remi-filament>
1 change: 1 addition & 0 deletions account_move_update_analytic/readme/DESCRIPTION.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
This module allows users to update analytic account and tags on account_move lines
3 changes: 3 additions & 0 deletions account_move_update_analytic/readme/USAGE.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
1. In a posted move, go to the move line you want to update, and click on 'Update analytic' to open the wizard. (You also have the button directly on account move lines)
2. Current analytic is shown, you can select another one then click on Confirm
3. Analytic lines will be dropped from current analytic account and recreated on new analytic account/tags.
3 changes: 3 additions & 0 deletions account_move_update_analytic/security/ir.model.access.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink
access_account_move_update_analytic_wizard,access_account_move_update_analytic_wizard,model_account_move_update_analytic_wizard,analytic.group_analytic_accounting,1,1,1,1
access_account_move_update_analytic_tags_wizard,access_account_move_update_analytic_wizard,model_account_move_update_analytic_wizard,analytic.group_analytic_tags,1,1,1,1
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
40 changes: 40 additions & 0 deletions account_move_update_analytic/views/account_move_line_view.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
<?xml version="1.0" encoding="utf-8" ?>
<!-- Copyright 2022 Le Filament
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). -->
<odoo>

<record model="ir.ui.view" id="account_move_line_tree_view">
<field name="name">account.move.line.tree</field>
<field name="model">account.move.line</field>
<field name="inherit_id" ref="account.view_move_line_tree" />
<field name="arch" type="xml">
<field name="analytic_tag_ids" position="after">
<button
name="account_move_update_analytic.action_view_account_move_update_analytic"
string="Update Analytic"
type="action"
groups="analytic.group_analytic_accounting,analytic.group_analytic_tags"
attrs="{'invisible': [('parent_state', '!=', 'posted')]}"
/>
</field>
</field>
</record>

<record model="ir.ui.view" id="view_move_line_tree_grouped">
<field name="name">account.move.line.tree.grouped</field>
<field name="model">account.move.line</field>
<field name="inherit_id" ref="account.view_move_line_tree_grouped" />
<field name="arch" type="xml">
<field name="analytic_tag_ids" position="after">
<button
name="account_move_update_analytic.action_view_account_move_update_analytic"
string="Update Analytic"
type="action"
groups="analytic.group_analytic_accounting,analytic.group_analytic_tags"
attrs="{'invisible': [('parent_state', '!=', 'posted'),]}"
remi-filament marked this conversation as resolved.
Show resolved Hide resolved
/>
</field>
</field>
</record>

remi-filament marked this conversation as resolved.
Show resolved Hide resolved
</odoo>
Loading