Skip to content

Commit

Permalink
[MIG] account_move_update_analytic: Migration to 17.0
Browse files Browse the repository at this point in the history
  • Loading branch information
mario committed Apr 26, 2024
1 parent 8ae3721 commit e80a7f3
Show file tree
Hide file tree
Showing 6 changed files with 30 additions and 39 deletions.
12 changes: 7 additions & 5 deletions account_move_update_analytic/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -39,13 +39,15 @@ items.
Usage
=====

1. In a posted move and from customer invoices and vendor bills, go to
1. First of all, make sure that your respective user has the specific
Analytic Accounting role.
2. In a posted move and from customer invoices and vendor bills, 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 account and tags are shown, you can select another
3. Current analytic account and tags are shown, you can select another
one then click on Confirm
3. Analytic lines will be dropped from current analytic account and
4. Analytic lines will be dropped from current analytic account and
recreated on new analytic distribution.

|image1|
Expand Down Expand Up @@ -78,8 +80,8 @@ Contributors
------------

- Rémi - Le Filament <remi-filament>
- Eduardo de Miguel (`Moduon <https://www.moduon.team/>`__)
- Rafael Blasco (`Moduon <https://www.moduon.team/>`__)
- Eduardo de Miguel ([Moduon](https://www.moduon.team/))
- Rafael Blasco ([Moduon](https://www.moduon.team/))

Maintainers
-----------
Expand Down
4 changes: 2 additions & 2 deletions account_move_update_analytic/readme/CONTRIBUTORS.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
- Rémi - Le Filament \<remi-filament\>
- Eduardo de Miguel ([Moduon](https://www.moduon.team/))
- Rafael Blasco ([Moduon](https://www.moduon.team/))
- Eduardo de Miguel (\[Moduon\](<https://www.moduon.team/>))
- Rafael Blasco (\[Moduon\](<https://www.moduon.team/>))
12 changes: 7 additions & 5 deletions account_move_update_analytic/readme/USAGE.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
1. In a posted move and from customer invoices and vendor bills, go to
1. First of all, make sure that your respective user has the specific
Analytic Accounting role.
2. In a posted move and from customer invoices and vendor bills, 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 account and tags are shown, you can select another
3. Current analytic account and tags are shown, you can select another
one then click on Confirm
3. Analytic lines will be dropped from current analytic account and
4. Analytic lines will be dropped from current analytic account and
recreated on new analytic distribution.

![](../static/description/update_from_invoice.png)
![image1](../static/description/update_from_invoice.png)

![](../static/description/update_from_journals.png)
![image2](../static/description/update_from_journals.png)
17 changes: 11 additions & 6 deletions account_move_update_analytic/static/description/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,11 @@

/*
:Author: David Goodger ([email protected])
:Id: $Id: html4css1.css 8954 2022-01-20 10:10:25Z milde $
:Id: $Id: html4css1.css 9511 2024-01-13 09:50:07Z milde $
:Copyright: This stylesheet has been placed in the public domain.

Default cascading style sheet for the HTML output of Docutils.
Despite the name, some widely supported CSS2 features are used.

See https://docutils.sourceforge.io/docs/howto/html-stylesheets.html for how to
customize this style sheet.
Expand Down Expand Up @@ -275,7 +276,7 @@
margin-left: 2em ;
margin-right: 2em }

pre.code .ln { color: grey; } /* line numbers */
pre.code .ln { color: gray; } /* line numbers */
pre.code, code { background-color: #eeeeee }
pre.code .comment, code .comment { color: #5C6576 }
pre.code .keyword, code .keyword { color: #3B0D06; font-weight: bold }
Expand All @@ -301,7 +302,7 @@
span.pre {
white-space: pre }

span.problematic {
span.problematic, pre.problematic {
color: red }

span.section-subtitle {
Expand Down Expand Up @@ -388,6 +389,8 @@ <h1 class="title">Account move update analytic</h1>
<div class="section" id="usage">
<h1><a class="toc-backref" href="#toc-entry-1">Usage</a></h1>
<ol class="arabic simple">
<li>First of all, make sure that your respective user has the specific
Analytic Accounting role.</li>
<li>In a posted move and from customer invoices and vendor bills, 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
Expand Down Expand Up @@ -421,14 +424,16 @@ <h2><a class="toc-backref" href="#toc-entry-4">Authors</a></h2>
<h2><a class="toc-backref" href="#toc-entry-5">Contributors</a></h2>
<ul class="simple">
<li>Rémi - Le Filament &lt;remi-filament&gt;</li>
<li>Eduardo de Miguel (<a class="reference external" href="https://www.moduon.team/">Moduon</a>)</li>
<li>Rafael Blasco (<a class="reference external" href="https://www.moduon.team/">Moduon</a>)</li>
<li>Eduardo de Miguel ([Moduon](<a class="reference external" href="https://www.moduon.team/">https://www.moduon.team/</a>))</li>
<li>Rafael Blasco ([Moduon](<a class="reference external" href="https://www.moduon.team/">https://www.moduon.team/</a>))</li>
</ul>
</div>
<div class="section" id="maintainers">
<h2><a class="toc-backref" href="#toc-entry-6">Maintainers</a></h2>
<p>This module is maintained by the OCA.</p>
<a class="reference external image-reference" href="https://odoo-community.org"><img alt="Odoo Community Association" src="https://odoo-community.org/logo.png" /></a>
<a class="reference external image-reference" href="https://odoo-community.org">
<img alt="Odoo Community Association" src="https://odoo-community.org/logo.png" />
</a>
<p>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.</p>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
name="account_move_update_analytic.action_view_account_move_update_analytic"
type="action"
groups="analytic.group_analytic_accounting"
attrs="{'invisible': [('parent_state', '!=', 'posted')]}"
invisible="parent_state != 'posted'"
icon="fa-tags"
title="Update analytic distribution"
aria-label="Update analytic distribution"
Expand Down
22 changes: 2 additions & 20 deletions account_move_update_analytic/views/account_move_view.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,30 +13,12 @@
expr="//field[@name='invoice_line_ids']/tree/field[@name='analytic_distribution']"
position="after"
>
<field name="parent_state" invisible="1" />
<field name="parent_state" column_invisible="1" />
<button
name="account_move_update_analytic.action_view_account_move_update_analytic"
type="action"
groups="analytic.group_analytic_accounting"
attrs="{'column_invisible': [('parent.state', '!=', 'posted')]}"
icon="fa-tags"
title="Update analytic distribution"
aria-label="Update analytic distribution"
/>
</xpath>
<xpath
expr="//field[@name='line_ids']/tree/field[@name='analytic_distribution']"
position="after"
>
<field name="parent_state" invisible="1" />
<button
name="account_move_update_analytic.action_view_account_move_update_analytic"
type="action"
groups="analytic.group_analytic_accounting"
attrs="{
'column_invisible': [('parent.state', '!=', 'posted')],
'invisible': [('display_type', 'in', ('line_section', 'line_note'))],
}"
column_invisible="parent.state != 'posted'"
icon="fa-tags"
title="Update analytic distribution"
aria-label="Update analytic distribution"
Expand Down

0 comments on commit e80a7f3

Please sign in to comment.