| Age | Commit message (Collapse) | Author |
|
When using the "Send & Print" functionality, if the user adds an
attachment, the latter won't be linked to the record.
To reproduce the error:
1. Open a posted invoice
2. Send & Print
3. Attach a file > Select a file on your device
4. Send the email
Error: The invoice's PDF is added to record's attachments, but not the
other file (from step 3).
When the module selects the attachments that need to be linked to the
invoice, it only keeps the ones currently linked to `mail.compose.message`:
https://github.com/odoo/odoo/blob/6441ab71cb68648aa735057952bf757677a20ee3/addons/mail/models/mail_thread.py#L1719-L1725
This is correct when the user creates a message directly in the chatter.
However, when the mail is created thanks to `Send & Print` functionality,
the attachment is linked to `account.invoice.send`.
Another flow have a similar issue: from invoices list, select few ones,
Action > Send & Print: the generated PDF won't be attached to their
invoice. In such a situation, here is the source of the problem:
https://github.com/odoo/odoo/blob/05ad6c477f7da2a495e5baf5b4629323b9d11fa0/addons/mail/wizard/mail_compose_message.py#L363-L367
There isn't any information about the invoice, therefore it is not
possible to linked the attachment to it.
OPW-2438457
closes odoo/odoo#71425
X-original-commit: e87f599d4eb22250b628d650b9f59b54db8d043c
Signed-off-by: Adrien Widart <adwid@users.noreply.github.com>
|
|
|
|
Change “default_partner_id” from “commercial_partner_id” to “bank_partner_id”
for “partner_bank_id” field in from view. If not, on an invoice, a newly created
partner bank (via “Recipient Bank” field) would be created for the partner
instead of the current company.
closes odoo/odoo#71213
Task: 2524441
Signed-off-by: Quentin De Paoli (qdp) <qdp@openerp.com>
|
|
|
|
When multiple companies are created, and some taxes are used with the
same tages, the query is not precise enough.
|
|
The value taken into account in the SQL for the calculation were wrong:
- Not based on the state of the invoices (cancelled and draft
were taken into account)
- Had the tax included
opw-2464004
feedback-2478356
closes odoo/odoo#70586
X-original-commit: fafea72843e25e0fee091ca935df61edb9133f6f
Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
|
|
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) <wan@odoo.com>
|
|
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 <smetl@users.noreply.github.com>
|
|
Before this commit:
When there is too much records to post and it's take time more than 15 minutes then server was restarted.
So scheduler action will do the process with the same records again and again.
After this commit:
post record in batch of 1000
opw-2451446
closes odoo/odoo#69738
X-original-commit: b87612d6fc8d9ec27a8cf0803369c90df00c5f57
Signed-off-by: William André (wan) <wan@odoo.com>
Signed-off-by: rrt-odoo <rrt-odoo@users.noreply.github.com>
|
|
|
|
_adapt_parent_account_group and _adapt_parent_account_group
before this commit:
_adapt_parent_account_group or _adapt_parent_account_group call with multi-company record then raise singleton error
after this commit:
singleton error is fixed
closes odoo/odoo#69323
Signed-off-by: William André (wan) <wan@odoo.com>
|
|
The deletion of `account.payment` were slowed down
because of the missing index
```
QUERY PLAN
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Delete on account_payment (cost=20.37..44.45 rows=10 width=34) (actual time=0.449..0.450 rows=0 loops=1)
-> Nested Loop (cost=20.37..44.45 rows=10 width=34) (actual time=0.383..0.404 rows=10 loops=1)
-> HashAggregate (cost=19.95..20.05 rows=10 width=32) (actual time=0.378..0.380 rows=10 loops=1)
Group Key: "ANY_subquery".id
Batches: 1 Memory Usage: 24kB
-> Subquery Scan on "ANY_subquery" (cost=0.42..19.92 rows=10 width=32) (actual time=0.035..0.371 rows=10 loops=1)
-> Limit (cost=0.42..19.82 rows=10 width=4) (actual time=0.032..0.365 rows=10 loops=1)
-> Nested Loop (cost=0.42..186848.76 rows=96312 width=4) (actual time=0.031..0.364 rows=10 loops=1)
-> Seq Scan on account_payment_pre_backup pay_backup (cost=0.00..14763.48 rows=277317 width=4) (actual time=0.015..0.086 rows=53 loops=1)
Filter: ((state)::text <> ALL ('{draft,cancelled}'::text[]))
Rows Removed by Filter: 166
-> Index Scan using account_payment_pkey on account_payment pay (cost=0.42..0.62 rows=1 width=4) (actual time=0.005..0.005 rows=0 loops=53)
Index Cond: (id = pay_backup.id)
Filter: (move_id IS NULL)
Rows Removed by Filter: 1
-> Index Scan using account_payment_pkey on account_payment (cost=0.42..2.44 rows=1 width=10) (actual time=0.002..0.002 rows=1 loops=10)
Index Cond: (id = "ANY_subquery".id)
Planning Time: 0.294 ms
Trigger for constraint account_move_line_payment_id_fkey: time=1.236 calls=10
Trigger for constraint account_payment_sale_order_rel_account_payment_id_fkey: time=0.195 calls=10
Trigger for constraint credit_token_payment_id_fkey: time=1.308 calls=10
Trigger for constraint payment_transaction_payment_id_fkey: time=0.288 calls=10
Trigger for constraint account_invoice_payment_rel_payment_id_fkey1: time=0.191 calls=10
Trigger for constraint account_move_payment_id_fkey: time=6015.799 calls=10
Trigger for constraint account_payment_account_bank_statement__account_payment_id_fkey: time=0.444 calls=10
Execution Time: 6019.988 ms
```
upg-12139
closes odoo/odoo#70712
Signed-off-by: Denis Ledoux (dle) <dle@odoo.com>
|
|
https://github.com/odoo/odoo/commit/39fb6b2990e5d6fda0d5f12dbd64d26ef77b9d0c
It seems some ppl are sharing the same bank account accross multiple journals.
issues:
2527148
2527994
2527894
...
closes odoo/odoo#70676
Signed-off-by: oco-odoo <oco-odoo@users.noreply.github.com>
|
|
Create a draft payment with payment type and 0 amount.
Save.
The payment type will be overwritten
opw-2495461
closes odoo/odoo#70603
Signed-off-by: Quentin De Paoli (qdp) <qdp@openerp.com>
|
|
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 <smetl@users.noreply.github.com>
|
|
|
|
accounts
- Share outstanding accounts between multiple journals
- Create payment for each of them
- Go to dashboard
=> "Outstanding Payments/Receipts" amounts are wrong
closes odoo/odoo#70262
Ticket: 2517499
Signed-off-by: oco-odoo <oco-odoo@users.noreply.github.com>
|
|
What are the steps to reproduce your issue ?
1. Go to Account/Journal Items
2. Open a posted item
3. Change product
What is currently happening ?
The product is changed in the account move
What are you expecting to happen ?
The account move lines cannot be changed when the status is posted
How to fix the bug ?
Make the field read-only when the status is posted
opw-2517325
closes odoo/odoo#70514
X-original-commit: 0b0cd8fa2a7b3363d3f118ba183fbc00046ed04d
Signed-off-by: William André (wan) <wan@odoo.com>
Signed-off-by: Achraf <abz-odoo@users.noreply.github.com>
|
|
When the user creates a new account analytic line, he should not be able
to create a new journal item.
To reproduce the error:
(Use demo data)
1. In Settings, enable "Analytic Accounting"
2. Accounting > Configuration > Analytic Accounts > Administrative >
Cost/Revenue
3. Create a new one
4. Click on "Journal Item" list
Error: the list contains the "Create and Edit..." option. Such an action
should not be possible.
OPW-2481197
closes #69881
closes odoo/odoo#70380
X-original-commit: f3ef533ed18c996f7f87c9596135e450479a8c19
Signed-off-by: Quentin De Paoli (qdp) <qdp@openerp.com>
Signed-off-by: Adrien Widart <adwid@users.noreply.github.com>
|
|
payments
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:
> 500, with memo a1b2c3
> 500, with memo a1b2c3 (so, the same one)
> 500, with memo d1e2f3
- Open the reconciliation widget for your statement line
===> 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 <smetl@users.noreply.github.com>
|
|
- 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
=> 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 <oco-odoo@users.noreply.github.com>
Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
|
|
|
|
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 <smetl@users.noreply.github.com>
|
|
There are quite some tests related to the `sequence.mixin`.
Add some dosctring too.
|
|
using the same cash basis taxes on multiple lines
To reproduce the bug:
1) Create a cash basis tax for 42%
2) Make an invoice with two lines at 100$, each using this tax
3) Post and register full payment of the invoice
==> An exchange difference has been generated, doing +100 -100. One of its two line has tax_ids set, while the other does not. This makes the base amount shown in the generic tax report wrong: 100 instead of 200.
Actually, this exchange difference entry shouldn't have existed in the first place, as there is no rounding issue to compensate for here. It happens because the grouping keys computed for the two base lines are the same, and the second line overwrites the totals of the first one instead of adding them to its own.
closes odoo/odoo#70034
Related: odoo/enterprise#18019
Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
|
|
Steps to reproduce the bug:
Create an accounting entry AE with $ as default currency
Add a line L1 with 10 € and a tax of 15%
Bug:
The added tax line was 0.75€ instead of 1.5€
opw:2510338
closes odoo/odoo#69920
Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
Co-authored-by: smetl <las@odoo.com>
|
|
Have a Fiscal position FPOS which map tax A to tax B
Have products DEMO with tax A and DEMO2
Allow FPOS in POS, Open a session, activate FPOS, sell DEMO and DEMO2
Close POS
Go to Orders, select the last one, hit return, edit, delete DEMO2 line
Tax will be wrong.
This occcur because the fiscal position mapping fail an equivalence
check with a virtual record, so the tax is calculated as A and not B
opw-2485399
closes odoo/odoo#69936
Signed-off-by: oco-odoo <oco-odoo@users.noreply.github.com>
|
|
Task 2352493
When the user is asked to fill in the label on the invoice, the tooltip
tells him that the label can be auto-filled by configuring its products.
This leads the user to configure products. But then, as he doesn't fill
in the label, the tour is "broken".
closes odoo/odoo#62272
Signed-off-by: Quentin De Paoli (qdp) <qdp@openerp.com>
|
|
Steps to reproduce the bug:
- Let's consider two companies C1, C2 and a partner P in C2
- Let's consider an customner invoice I in C1 with P as customer
- Go to Accounting > Accounting > Partner Ledger and select I
- Click on Reconcie
Bug:
An access error was raised due to the ir.rule res.partner company
opw:2446242
closes odoo/odoo#69190
Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
|
|
|
|
- Create an invoice for a portal user
- Add a credit note for that invoice
- Connect with portal user
- On Invoices & Bills menu, the correct count is displayed (i.e. 2)
- Open Invoices & Bills page
The "All" filter only displays out_invoice and in_invoice, making impossible to view
the other types (out_refund, in_refund, out_receipt, in_receipt).
opw-2486471
closes odoo/odoo#69693
Signed-off-by: William André (wan) <wan@odoo.com>
|
|
Steps to reproduce the bug:
- Let's consider a journal J with inbound payment methods PM1 and PM2
- Create an inbound batch payment with Bank = J
- The default payment method will be PM2, change it to PM1
- Create a payment P in the batch content (payment_ids)
- Save
Bug:
A UserError was raised: The batch must have the same type as the payments it contains.
because when setting a partner on P the function _compute_payment_method_id defined in module account_check_printing
was triggered and the first available payment method was set.
opw:2495487
closes odoo/odoo#69252
Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
|
|
Before this commit, There would be Expected singleton error
on changing Credit/Debit for multile account in single call.
Now, We are proocess one record to set `_set_opening_debit_credit`
closes odoo/odoo#69435
X-original-commit: 72b5a17fc0e6f439d462647a7b55c9a26235a8df
Signed-off-by: William André (wan) <wan@odoo.com>
|
|
Steps to reproduce the bug:
- Go to Accounting>Journals and create new record
- In advanced settings tab, use 'Allowed Account Types' field to create a new one
Bug:
Form for account type does not have required internal_group
Introduced by https://github.com/odoo/odoo/commit/5aeec0c3dcd8aa20293167073f3f4f5cec323b74
opw:2497616
closes odoo/odoo#69169
Signed-off-by: William André (wan) <wan@odoo.com>
Signed-off-by: Simon Goffin (sig) <sig@openerp.com>
|
|
|
|
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) <wan@odoo.com>
|
|
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 <smetl@users.noreply.github.com>
|
|
price-included/price-excluded taxes
Before this commit, such configuration wasn't allowed.
However, in some countries, this is mandatory, when dealing with eco-tax for example:
Suppose t1, t2 being taxes where:
- t1 is include_base_amount, price_excluded, fixed tax of 10 (eco-tax)
- t2 is include_base_amount, price_included, percent of 21%
The computation on 1210 should be:
price_excluded: 1210 / 1.21 = 1000
price_included: (1000 + 10) * 1.21 = 1222.1
closes odoo/odoo#69184
Signed-off-by: oco-odoo <oco-odoo@users.noreply.github.com>
|
|
For customer invoices:
* do not set default date because if you prepare an invoice (and it gets
a default date), then validate it the next day, the date will be wrong
* set the date when posting if it wasn't set, because why not?
For vendor bills:
* do not set default date because you rarely encode a bill at the bill
date. Forcing the user to enter it reduces risks of user error
(duplicated vendor bill)
* do not set it when posting, same reason.
opw-2492862
Related #68368
Closes #68367
closes odoo/odoo#68689
Related: odoo/enterprise#17502
Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
|
|
1. Reconcile of a bank statement, checking the "To
check" box on the manual operation before validation
2. Go to accounting dashboard
The statement line will not be counted in the "to check" action.
This occur because the action only filter on reconciled moves
This reverts commit 6b0017ffda4dd737a7600e05a4f6d0fa50d90ce4.
opw-2475663
closes odoo/odoo#68548
Related: odoo/enterprise#17376
Signed-off-by: William André (wan) <wan@odoo.com>
|
|
Beforehand, if two users independently opened a draft
invoice on their respective sessions, then both of them
clicked on the "Post" button, then the invoice was
posted twice.
On a more general aspect, the view currently "prevents" users
from posting moves several times, but technically speaking,
nothing stops users from posting moves several times.
Now, after checking that the user indeed has the right to post
a move, the next check is about verifying that the move is
not already posted.
opw-2479201
closes odoo/odoo#68837
X-original-commit: 71b82693bb6d62c659483d533be8d25905f3492f
Related: odoo/enterprise#17511
Signed-off-by: oco-odoo <oco-odoo@users.noreply.github.com>
Signed-off-by: Julien CHEVREAU <Julien-CHEVREAU@users.noreply.github.com>
|
|
* If `where_clause` is empty, then there will be an error. This commit fixes that.
closes odoo/odoo#66978
Signed-off-by: William André (wan) <wan@odoo.com>
|
|
|
|
Currently, when exporting move lines via for example the partner ledger,
we are not displaying the currency in any way in the xlsx.
For some company, this can be limiting since they may want to do
post-treatment inside the file after export, which can require such
information.
This change will add the 'always_set_currency_id' field as optional
into the list view of the amls, allowing to keep the information about
the currency when exporting if needed.
task id #2381355
closes odoo/odoo#65350
X-original-commit: b314e6dc072fa7ea0ca326de2469e56e1baa2884
Signed-off-by: Quentin De Paoli (qdp) <qdp@openerp.com>
Signed-off-by: William André (wan) <wan@odoo.com>
|
|
Currently, the company_id of an account move is related to its journal.
This means that if you empty the journal field, the company_id is also
emptied.
This is then causing a traceback when adding a new line, for example.
This change will transform the related company_id in a computed field,
making sure to not lose the company_id if the journal_id is emptied.
task id #2392004
closes odoo/odoo#67238
X-original-commit: 296cf6cca4055fbd3c91189c2a45b90ab1dc420f
Signed-off-by: Quentin De Paoli (qdp) <qdp@openerp.com>
Signed-off-by: William André (wan) <wan@odoo.com>
|
|
The resequence wizard should consider that the sequence is shared for
invoices, journal entries and receipts; only refunds have a separate
sequence.
You could have journal entries in the purchase journal for expense
reports for instance. In that case, we want to be able to resequence all
of it at once.
closes odoo/odoo#68810
Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
|
|
When a tax is deleted,
remove the `account.tax.repartition.line` linked to it as well.
closes odoo/odoo#68824
X-original-commit: fc5d1c065023466fd937e079a21cc0fd92d0742b
Signed-off-by: oco-odoo <oco-odoo@users.noreply.github.com>
|
|
Beforehand, tax exigibility was not systematically recomputed upon
move creation.
Now, as soon as an account move line is created on a move, tax exigibility
is recomputed.
closes odoo/odoo#68818
X-original-commit: df14e157fc7a80a1675b9581e0105891b4228f40
Signed-off-by: oco-odoo <oco-odoo@users.noreply.github.com>
|
|
Steps to reproduce the bug:
1/ Create an opening balance Journal Entry with debit 100$ "121000 Account Receivable" and credit 100$ on another account
2/ Create an invoice for 150$
3/ Register a payment of 250$ for this invoice
4/ Reconcile the Journal Item of the payment (with "121000 Account Receivable" as account) with the opening balance => this line should be now fully reconcile
5/ Go to the payment and try to print the payment receipt
Bug:
The opening balance was shown as an invoice
opw:2448349
closes odoo/odoo#68478
Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
|
|
|