<feed xmlns='http://www.w3.org/2005/Atom'>
<title>Odoo/addons/account/tests, branch 14.0</title>
<subtitle>The current checkout of upstream Odoo</subtitle>
<link rel='alternate' type='text/html' href='http://erp.ceuconsult.com:9000/Odoo/'/>
<entry>
<title>[FIX] account: test taxes taking companies into account</title>
<updated>2021-05-20T11:51:11+00:00</updated>
<author>
<name>wan</name>
<email>wan@odoo.com</email>
</author>
<published>2021-05-20T11:51:11+00:00</published>
<link rel='alternate' type='text/html' href='http://erp.ceuconsult.com:9000/Odoo/commit/?id=f5651baa86d0537665d5b1bc2b8b51e1a803d141'/>
<id>f5651baa86d0537665d5b1bc2b8b51e1a803d141</id>
<content type='text'>
When multiple companies are created, and some taxes are used with the
same tages, the query is not precise enough.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
When multiple companies are created, and some taxes are used with the
same tages, the query is not precise enough.</pre>
</div>
</content>
</entry>
<entry>
<title>[FIX] account: fix reconcile rule percentage calculation</title>
<updated>2021-05-18T13:21:02+00:00</updated>
<author>
<name>jbw</name>
<email>jbw@odoo.com</email>
</author>
<published>2021-05-17T11:26:15+00:00</published>
<link rel='alternate' type='text/html' href='http://erp.ceuconsult.com:9000/Odoo/commit/?id=5800f20ccf63ef8482d1460f46c8c5fe30eac822'/>
<id>5800f20ccf63ef8482d1460f46c8c5fe30eac822</id>
<content type='text'>
In https://github.com/odoo/odoo/pull/52529/commits/078a3a0f760ff24d02070a343f28d2249a8b5ba7#diff-c217a13a40a3cc27dc516b899793abecfac8cab9a42fed407d4776bcbc9de9a8R812
the way the percentage is calculated is changed.
This implies that a reconciliation rule allowing a 90% matching amount will not allow to reconcile
a 90$ bank statement with a 100$ invoice (as it will calculate the % as 88.89%, not meeting the required 90 %)

After cited commit:
invoice 200, bank statement 180:
(|-180| - |20|) / |-180| * 100 = 88.89%
invoice 200, bank statement 220:
(|-220| - |-20|) / |-220| * 100 = 90.91%
credit note 200, bank statement -180:
(|180| - |-20|) / |180| * 100 = 88.89%
credit note 200, bank statement -220:
(|220| - |20|) / |220| * 100 = 90.91%

Now:
invoice 200, bank statement 180:
100 - |20| / |(-180 - 20)| * 100 = 90%
invoice 200, bank statement 220:
100 - |-20| / |(-220 - -20)| * 100 = 90%
credit note 200, bank statement -180:
100 - |-20| / |(180 - -20)| * 100 = 90%
credit note 200, bank statement -220:
100 - |20| / |(220 - 20)| * 100 = 90%

closes odoo/odoo#70948

Task: 2427089
Signed-off-by: William André (wan) &lt;wan@odoo.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
In https://github.com/odoo/odoo/pull/52529/commits/078a3a0f760ff24d02070a343f28d2249a8b5ba7#diff-c217a13a40a3cc27dc516b899793abecfac8cab9a42fed407d4776bcbc9de9a8R812
the way the percentage is calculated is changed.
This implies that a reconciliation rule allowing a 90% matching amount will not allow to reconcile
a 90$ bank statement with a 100$ invoice (as it will calculate the % as 88.89%, not meeting the required 90 %)

After cited commit:
invoice 200, bank statement 180:
(|-180| - |20|) / |-180| * 100 = 88.89%
invoice 200, bank statement 220:
(|-220| - |-20|) / |-220| * 100 = 90.91%
credit note 200, bank statement -180:
(|180| - |-20|) / |180| * 100 = 88.89%
credit note 200, bank statement -220:
(|220| - |20|) / |220| * 100 = 90.91%

Now:
invoice 200, bank statement 180:
100 - |20| / |(-180 - 20)| * 100 = 90%
invoice 200, bank statement 220:
100 - |-20| / |(-220 - -20)| * 100 = 90%
credit note 200, bank statement -180:
100 - |-20| / |(180 - -20)| * 100 = 90%
credit note 200, bank statement -220:
100 - |20| / |(220 - 20)| * 100 = 90%

closes odoo/odoo#70948

Task: 2427089
Signed-off-by: William André (wan) &lt;wan@odoo.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[FIX] account: Fix corner cases of https://github.com/odoo/odoo/pull/70303</title>
<updated>2021-05-14T14:23:07+00:00</updated>
<author>
<name>Laurent Smet</name>
<email>las@odoo.com</email>
</author>
<published>2021-05-14T09:04:22+00:00</published>
<link rel='alternate' type='text/html' href='http://erp.ceuconsult.com:9000/Odoo/commit/?id=87f6a2fd3f86d13ebe320c058336d752362b8f44'/>
<id>87f6a2fd3f86d13ebe320c058336d752362b8f44</id>
<content type='text'>
Original issue:
Create a payment like follow:

Payment type: receive money
Partner type: customer
Destination account: whatever receivable
Amount: define an amount (i.e. 90.00)
On Save, open the draft jounral entry created.
Lower the liquidity or counterpart amount and add a writeoff
Go back to the payment, change the amount and save.
The journal entry writeoff will swap from debit to credit at every
change made to the amount. This occur also when changing currency on the
payment

opw-2475223

Otherwise, this fix is not covering all cases:
inbound with write-off in debit
inbound with write-off in credit
outbound with write-off in debit
outbound with write-off in credit

closes odoo/odoo#70807

Signed-off-by: Laurent Smet &lt;smetl@users.noreply.github.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Original issue:
Create a payment like follow:

Payment type: receive money
Partner type: customer
Destination account: whatever receivable
Amount: define an amount (i.e. 90.00)
On Save, open the draft jounral entry created.
Lower the liquidity or counterpart amount and add a writeoff
Go back to the payment, change the amount and save.
The journal entry writeoff will swap from debit to credit at every
change made to the amount. This occur also when changing currency on the
payment

opw-2475223

Otherwise, this fix is not covering all cases:
inbound with write-off in debit
inbound with write-off in credit
outbound with write-off in debit
outbound with write-off in credit

closes odoo/odoo#70807

Signed-off-by: Laurent Smet &lt;smetl@users.noreply.github.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[FIX] account: keep write off sign consistent</title>
<updated>2021-05-10T10:26:32+00:00</updated>
<author>
<name>Andrea Grazioso (agr-odoo)</name>
<email>agr@odoo.com</email>
</author>
<published>2021-05-04T09:04:14+00:00</published>
<link rel='alternate' type='text/html' href='http://erp.ceuconsult.com:9000/Odoo/commit/?id=7c0da92c486c2ab89fe424ce66904aa6a655fa09'/>
<id>7c0da92c486c2ab89fe424ce66904aa6a655fa09</id>
<content type='text'>
Create a payment like follow:
- Payment type: receive money
- Partner type: customer
- Destination account: whatever receivable
- Amount: define an amount (i.e. 90.00)
On Save, open the draft jounral entry created.
Lower the liquidity or counterpart amount and add a writeoff
Go back to the payment, change the amount and save.

The journal entry writeoff will swap from debit to credit at every
change made to the amount. This occur also when changing currency on the
payment

opw-2475223

closes odoo/odoo#70303

Signed-off-by: Laurent Smet &lt;smetl@users.noreply.github.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Create a payment like follow:
- Payment type: receive money
- Partner type: customer
- Destination account: whatever receivable
- Amount: define an amount (i.e. 90.00)
On Save, open the draft jounral entry created.
Lower the liquidity or counterpart amount and add a writeoff
Go back to the payment, change the amount and save.

The journal entry writeoff will swap from debit to credit at every
change made to the amount. This occur also when changing currency on the
payment

opw-2475223

closes odoo/odoo#70303

Signed-off-by: Laurent Smet &lt;smetl@users.noreply.github.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[FIX] account: reconciliation models: fix priorities when matching amls from payments</title>
<updated>2021-05-03T15:52:49+00:00</updated>
<author>
<name>oco-odoo</name>
<email>oco@odoo.com</email>
</author>
<published>2021-05-03T15:15:43+00:00</published>
<link rel='alternate' type='text/html' href='http://erp.ceuconsult.com:9000/Odoo/commit/?id=b5800c9d2088df2bb9c4fbe0fed91c7ef24299c5'/>
<id>b5800c9d2088df2bb9c4fbe0fed91c7ef24299c5</id>
<content type='text'>
Since the payment refactoring, the structured reference of a payment is stored in its ref field, not payment_reference like for invoices. This caused payments never to be matched with highest priorities, as payment_reference_flag was always false, and only communication_flag could match.

To reproduce:

- Have a reconcile model with match_total_amount=False.
- Create a statement line with communication a1b2c3 for 1000
- Create 3 payments:
&gt; 500, with memo a1b2c3
&gt; 500, with memo a1b2c3 (so, the same one)
&gt; 500, with memo d1e2f3
- Open the reconciliation widget for your statement line

===&gt; The 3 payments are matched, while only the two first ones should have been, as they were exact matches for the communication, and should hence have received higher priority.

closes odoo/odoo#70277

Signed-off-by: Laurent Smet &lt;smetl@users.noreply.github.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Since the payment refactoring, the structured reference of a payment is stored in its ref field, not payment_reference like for invoices. This caused payments never to be matched with highest priorities, as payment_reference_flag was always false, and only communication_flag could match.

To reproduce:

- Have a reconcile model with match_total_amount=False.
- Create a statement line with communication a1b2c3 for 1000
- Create 3 payments:
&gt; 500, with memo a1b2c3
&gt; 500, with memo a1b2c3 (so, the same one)
&gt; 500, with memo d1e2f3
- Open the reconciliation widget for your statement line

===&gt; The 3 payments are matched, while only the two first ones should have been, as they were exact matches for the communication, and should hence have received higher priority.

closes odoo/odoo#70277

Signed-off-by: Laurent Smet &lt;smetl@users.noreply.github.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[FIX] account: Fix price_unit rounding issue with fpos/price included tax</title>
<updated>2021-05-03T12:24:41+00:00</updated>
<author>
<name>Laurent Smet</name>
<email>las@odoo.com</email>
</author>
<published>2021-04-20T08:30:50+00:00</published>
<link rel='alternate' type='text/html' href='http://erp.ceuconsult.com:9000/Odoo/commit/?id=3470a3c94e06d92afcd8a8129f80e4dfea14efe4'/>
<id>3470a3c94e06d92afcd8a8129f80e4dfea14efe4</id>
<content type='text'>
- Create an invoice with an empty fiscal position
- Create a line with a product having 100.0 as sale price and 21.0% price-included tax
=&gt; price_unit equals 99.99

This is because 100 / 1.21 ~= 82.64 but 82.64 * 1.21 ~= 99.99 != 100.0.
The bug only appears when managing a fiscal position because the code is trying to adapt the product price_unit to the newly computed taxes.

closes odoo/odoo#69836

X-original-commit: e2247a860d3d4931d641928a6313bef4649e0edf
Signed-off-by: oco-odoo &lt;oco-odoo@users.noreply.github.com&gt;
Signed-off-by: Laurent Smet &lt;smetl@users.noreply.github.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
- Create an invoice with an empty fiscal position
- Create a line with a product having 100.0 as sale price and 21.0% price-included tax
=&gt; price_unit equals 99.99

This is because 100 / 1.21 ~= 82.64 but 82.64 * 1.21 ~= 99.99 != 100.0.
The bug only appears when managing a fiscal position because the code is trying to adapt the product price_unit to the newly computed taxes.

closes odoo/odoo#69836

X-original-commit: e2247a860d3d4931d641928a6313bef4649e0edf
Signed-off-by: oco-odoo &lt;oco-odoo@users.noreply.github.com&gt;
Signed-off-by: Laurent Smet &lt;smetl@users.noreply.github.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[FIX] account: same sequence in different journal clash</title>
<updated>2021-04-29T09:34:10+00:00</updated>
<author>
<name>wan</name>
<email>wan@odoo.com</email>
</author>
<published>2021-04-29T09:34:10+00:00</published>
<link rel='alternate' type='text/html' href='http://erp.ceuconsult.com:9000/Odoo/commit/?id=4522ce11eb518e3b681824047255c0f8e34790c0'/>
<id>4522ce11eb518e3b681824047255c0f8e34790c0</id>
<content type='text'>
When the same sequence is used in different journals (i.e. BNK1 in two
different companies), a clash might happen in the grouping optimization
of the `_compute_name`

closes odoo/odoo#70085

Signed-off-by: Laurent Smet &lt;smetl@users.noreply.github.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
When the same sequence is used in different journals (i.e. BNK1 in two
different companies), a clash might happen in the grouping optimization
of the `_compute_name`

closes odoo/odoo#70085

Signed-off-by: Laurent Smet &lt;smetl@users.noreply.github.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[REF] account: move sequence tests in a separate file</title>
<updated>2021-04-29T09:31:11+00:00</updated>
<author>
<name>wan</name>
<email>wan@odoo.com</email>
</author>
<published>2021-04-29T08:48:27+00:00</published>
<link rel='alternate' type='text/html' href='http://erp.ceuconsult.com:9000/Odoo/commit/?id=00ab2ddc9fa631dd0253196bdd3095cab0c662cc'/>
<id>00ab2ddc9fa631dd0253196bdd3095cab0c662cc</id>
<content type='text'>
There are quite some tests related to the `sequence.mixin`.
Add some dosctring too.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
There are quite some tests related to the `sequence.mixin`.
Add some dosctring too.</pre>
</div>
</content>
</entry>
<entry>
<title>[FIX] account: Traceback on multiple auto-validation candidates</title>
<updated>2021-04-15T12:20:36+00:00</updated>
<author>
<name>Raf Geens</name>
<email>raf@odoo.com</email>
</author>
<published>2021-04-15T11:26:25+00:00</published>
<link rel='alternate' type='text/html' href='http://erp.ceuconsult.com:9000/Odoo/commit/?id=e9538d9cee092e034b85187a2eae857349f42ce7'/>
<id>e9538d9cee092e034b85187a2eae857349f42ce7</id>
<content type='text'>
When an auto-validating reconciliation model is defined for matching
bank statement lines to invoices, it was possible to get a traceback
when the bank statement lines were in a certain order and matched in a
certain way.

In particular, if the first bank statement line is priority 3
(communication_flag True) and the amount is an exact match with the
invoice, it will be instantly reconciled. If there's a second line
that's a priority 5 match, it crashed because _filter_candidates didn't
take into account that candidates_by_priority could be empty if the
candidates were already reconciled.

Instead we just return an empty list of candidates and priorities when
this happens.

closes odoo/odoo#69309

Ticket: 2507189
Signed-off-by: William André (wan) &lt;wan@odoo.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
When an auto-validating reconciliation model is defined for matching
bank statement lines to invoices, it was possible to get a traceback
when the bank statement lines were in a certain order and matched in a
certain way.

In particular, if the first bank statement line is priority 3
(communication_flag True) and the amount is an exact match with the
invoice, it will be instantly reconciled. If there's a second line
that's a priority 5 match, it crashed because _filter_candidates didn't
take into account that candidates_by_priority could be empty if the
candidates were already reconciled.

Instead we just return an empty list of candidates and priorities when
this happens.

closes odoo/odoo#69309

Ticket: 2507189
Signed-off-by: William André (wan) &lt;wan@odoo.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[IMP] account: check non reconcilable accounts for configured journals</title>
<updated>2021-04-15T10:21:22+00:00</updated>
<author>
<name>Julien CHEVREAU (JCU)</name>
<email>jcu@odoo.com</email>
</author>
<published>2021-04-13T16:52:38+00:00</published>
<link rel='alternate' type='text/html' href='http://erp.ceuconsult.com:9000/Odoo/commit/?id=87c207f3a408abb93d9b8378ef4aa1744935d86d'/>
<id>87c207f3a408abb93d9b8378ef4aa1744935d86d</id>
<content type='text'>
Beforehand, users could configure an account as non reconcilable
even when it was configured as a payment credit or debit account
in a journal. This prevented journal items to be reconciled

Now, when a user tries to set an account as non reconcilable,
we check if there is no journal with a payment credit or debit account
set to this particular account. If there is at least one journal,
then we display an error message stating the journals names and ids
that the user would have to modify before changing the account
configuration.

closes odoo/odoo#69205

Signed-off-by: Laurent Smet &lt;smetl@users.noreply.github.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Beforehand, users could configure an account as non reconcilable
even when it was configured as a payment credit or debit account
in a journal. This prevented journal items to be reconciled

Now, when a user tries to set an account as non reconcilable,
we check if there is no journal with a payment credit or debit account
set to this particular account. If there is at least one journal,
then we display an error message stating the journals names and ids
that the user would have to modify before changing the account
configuration.

closes odoo/odoo#69205

Signed-off-by: Laurent Smet &lt;smetl@users.noreply.github.com&gt;
</pre>
</div>
</content>
</entry>
</feed>
