Commit Graph
1561 Commits
Author SHA1 Message Date
aliya 9616c9940d [FIX] account: fix delete invoice rights
From 16.0 any user can delete a customer invoice/vendor bill even if it creates a sequence gap.
This commit updates the rights and the warning message:
- The deletion confirmation message contains a warning about the sequence gap
- Only a Billing Administrator/Accountant can delete customer invoices/vendor bills creating the gap
- Also, if the fiduciary mode is on (`quick_edit_mode`) it should be possible to delete
  invoices/bills regardless of the user group

task-3284218

closes odoo/odoo#128556

X-original-commit: 2249f899049ef94b14b083c8db976662b868b026
Related: odoo/enterprise#44128
Signed-off-by: William André (wan) <wan@odoo.com>
Signed-off-by: Aliya Tastemirova (alta) <alta@odoo.com>
2023-07-15 13:05:51 +02:00
Dylan Kiss (dyki) 75c6917b4e [FIX] account,sale: split partner credit from sales and invoices
Since 7bd93cc64b, we add the amounts to
invoice from sales order to the credit limit warning. When looking at
the credit amount on a partner from an accounting perspective, it is
not correct though that sales orders to invoice are considered as well.

In this change we split the credit amount from invoices and from sales
orders to invoice. On the partner we only show the credit amount from
invoices. In other places we add both.

task-3375260

closes odoo/odoo#128158

X-original-commit: 94eae9b73995dbf2175ecee65548ace5a382f5f8
Signed-off-by: John Laterre (jol) <jol@odoo.com>
Signed-off-by: Dylan Kiss (dyki) <dyki@odoo.com>
2023-07-13 02:21:50 +02:00
Maitri Patel d7d1d832d9 [FIX] account: validate the correct order of the account report lines
Issue Description

When a user changes the sequence of the lines which have a parent_id field,
particularly when it changes the sequence and the parent field of the line is
after the line, then it will give an error in the opening of the reports.

Steps to Reproduce:

[This step is only used for this traceback. But the issue occurs in all the
account reports.]

1. Install the account_reports module.
2. Open accounting and go to configuration.
3. Then, click on accounting reports and select the profit and loss report.
4. Change the sequence of the lines.
5. Save the changes.
6. Click on the reporting menu and select the profit and loss report.
7. The traceback will generate.

Fix:

This commit resolves the above issue by throwing a validation exception
when the parent line is set after the line. And also throws a validation
exception when the user sets the parent line as itself.

Sentry ID: 3944989529

closes odoo/odoo#128209

X-original-commit: a8a147dab40af4732bbe072cfd9cff1d1ba80e36
Signed-off-by: Olivier Colson (oco) <oco@odoo.com>
2023-07-13 00:46:13 +02:00
Louis Wicket (wil) db96c237b1 [I18N] account: reexport sources & update Khmer translation
closes odoo/odoo#127596

X-original-commit: 7267f8eecd844f0dbf443579205d81c82efdd577
Signed-off-by: Louis Wicket (wil) <wil@odoo.com>
2023-07-07 09:42:16 +02:00
Saurabh Mishra 0a4404ebcf [FIX] account: prevent account_move_line singleton error
When '_seek_for_lines' returns multiple suspense_line for
transaction_amount calculation, then the user will face this
issue 'Expected singleton: account.move.line(516, 517)'.

Steps to reproduce:
- Create a new transaction in Journal (Bank) by Accounting Journal
> Bank Reconcilation > Add a Transaction.
-  While creating a transaction add a partner, amount (amount > 0),
Foreign Currency, Amount in currency and then save it.
- Go to Journal Entries by Accounting > Journal Entries
and then open your  recently created journal entry.
- Click on reset to draft and then in 'Journal Items'
add a line with some credit amount such that total credit and debit should be
equal. (Under Account it should be Bank Suspense Account).
- Now click on 'Bank Transaction' button in the form view.

By following above steps you will be able to reproduce the error.

Applying the changes will resolve the issue.

sentry-4217912848

closes odoo/odoo#126284

X-original-commit: 12a75a8521f8150c382645215c440d39af4b50aa
Signed-off-by: Laurent Smet (las) <las@odoo.com>
2023-06-25 23:37:07 +02:00
Habib (ayh) 4e09f0d86e [FIX] account: term is not translatable
The bills upload widget uses a custom attr "linkText". translate.py will only generate terms that are in the TRANSLATED_ATTRS constant, thereby not including these in the po template file.

To fix this, the attribute is changed to a recognised attr "title".
The JS widget will still recognize linkText, for databases that have not updated the module.

Task-3335585

closes odoo/odoo#125516

X-original-commit: 8569ceb101f6dfe5882c33c120b9ed6d76ccf5be
Related: odoo/enterprise#42755
Signed-off-by: Habib Ayob (ayh) <ayh@odoo.com>
Signed-off-by: Brice Bartoletti (bib) <bib@odoo.com>
2023-06-17 22:02:28 +02:00
Martin Trigaux 2afdda2576 [I18N] *: export saas-16.3 source terms
closes odoo/odoo#123046

X-original-commit: 137f5ca0cb703ee953cb01db525362f7a778e6bd
Related: odoo/enterprise#41703
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2023-06-01 11:43:51 +02:00
Yolann Sabaux db68392f77 [FIX] account: enforce contraint on required field for cash rounding
Steps to reproduce:
- install l10n_be (company B)
- stay on Company A and create a cash rounding
- Go to Company B and create an invoice
- In Other Infos > Cash Rouding Method, set it to the earlier created one
- Save

Issue:
You won't be able to save. But the message is too generic to know what is the cause of it
"Missing required account on accountable invoice line."

Cause:
The field `profit_account_id` is company_dependent. Therefore, the same cash rounding record will be accessible in both companies but in Company B the `profit_account_id` won't be set.
When Saving, we compute a cash difference (rounding) and try to create a new line for it. But since there is no account set, the sql constraint will be raised.

Solution:
The less dirty solution is to have an onchange that check that whenever we want to set a cash rounding method, it has all the required fields set

opw-3185950

closes odoo/odoo#123072

X-original-commit: e0df7cafefa3c2956105bd35c5bedc0c5bcdffaa
Signed-off-by: Josse Colpaert <jco@odoo.com>
Signed-off-by: Yolann Sabaux (yosa) <yosa@odoo.com>
2023-05-31 17:26:11 +02:00
Antoine Dupuis (andu) 3469537d51 [REF] account: Vendor Bills: Refactor the lock date message
At the moment, the lock date message is generated in
_compute_tax_lock_date_message. We delegate it to a separate function
in order to use this message elsewhere as well.

Note: this refactor introduces minor changes in behaviour:
- we remove the second part of the lock date message (that mentions
  other lock dates than the most blocking one), because it is too much
  information.

- we calculate the new accounting date from the existing accounting date
  rather than from the existing invoice date. This should not change
  anything in practice, since the new accounting date will be the last
  day of the period after the lock date.

task-2823170

X-original-commit: aeb6707dfc0f4aa093d7687bbb0e488558d2a99f
Part-of: odoo/odoo#122997
2023-05-31 10:32:13 +02:00
Louis Wicket (wil) 04189318cc [I18N] *: update master translations
Currently, only stable releases see their translations updated. This has
resulted in master accumulating outdated stuff for years, which can be
confusing for users testing master on runbot.

This one-shot commit resynchronizes master translations based on the
content from 16.0 and removes empty PO files (i.e. no longer containing
translations).

closes odoo/odoo#121629

Related: odoo/enterprise#41171
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2023-05-22 17:52:07 +02:00
Martin Trigaux 077bbd0b0b [I18N] *: export master source terms
closes odoo/odoo#121563

Related: odoo/enterprise#41140
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2023-05-17 10:34:00 +02:00
Antoine (ande) 548777ab4b [FIX] account: payment terms examples only in EN
To reproduce the issue:
1. Change the language to french
2. Go to Accounting > Payment terms
3. Select one payment term
4. Look at the example section
5. Examples are in English

Error: The examples should have been in French

The sentence was hardcoded and not translatable

OPW-3203268

closes odoo/odoo#116883

X-original-commit: 7b244e71284d9bfb7186caa82f33f39902937b96
Signed-off-by: Brice Bartoletti (bib) <bib@odoo.com>
Signed-off-by: Demany Antoine (ande) <ande@odoo.com>
2023-03-29 11:46:58 +02:00
Martin Trigaux 1be5eae8ef [I18N] *: remove nl_BE files
They dates from < 2027 and are quite outdated. Favour the nl
translation instead.
n_BE is not on Transifex so it was not possible to correct bad
translations.

closes odoo/odoo#115845

X-original-commit: d04c8b7e484db8306d858c891a7a2b11885fdcd9
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2023-03-20 16:51:30 +01:00
Habib (ayh) eb33fdf9d8 [FIX] account: bank statement balance default
Using the bank recon widget (enterprise), it is possible to create bank statements from the list view.
The default start and end balances were not computed.
This PR fixes that (computes the balances) and has a few additional improvements:
- A warning is added to the statement form view to indicate the problem with the statement
- Statement validity can be computed before the statement is saved, to guide the user when manually creating statements
- balance_start, balance_end_real are now computed fields
- default_get method is simplified and moved
- the action "Create Statement" is removed in favour of multi-edit
- tests and translation templates

related enterprise PR contains the necessary view changes.

closes odoo/odoo#115174

X-original-commit: dfae9e204195abc1b776b9797043ceb38318de08
Related: odoo/enterprise#38131
Signed-off-by: Laurent Smet <las@odoo.com>
Signed-off-by: Ayob Habib (ayh) <ayh@odoo.com>
Signed-off-by: Christophe Simonis <chs@odoo.com>
2023-03-14 18:09:04 +01:00
Ricardo Gomes Rodrigues (rigr) da019b6280 [FIX] account: add account move's name into the fields used by the hash
Currently, it is possible to resequence account moves which are hashed.
This should not be the case. Therefore, we are adding the name of the
move into the list of hashed fields.

However, since we are changing the hashing algorithm by including a new
field in its computation, we must add a versioning system to make sure
we don't break the integrity (data inalterability) report.

In practice, this means that prior to this commit, all hashed moves used
the fields of v1, and moves after this commit will use v2 (which adds
the name into the list of hashed fields). Thus, whenever we generate
the integrity report, we will run the v1 algorithm, and if it a
potential corrupted move is found, we will switch to v2 and check again.
If it also fails, this means the hash is indeed corrupted.

task-id 3102481

closes odoo/odoo#114376

X-original-commit: cb76725b071d89a9f3e81861f19d073138741b58
Signed-off-by: William André (wan) <wan@odoo.com>
Signed-off-by: Ricardo Gomes Rodrigues (rigr) <rigr@odoo.com>
2023-03-05 16:30:57 +01:00
Florent de LabarreandJohn Laterre 50cf4a75ce [FIX] account: prevent wrong hash result
In case of the user have no access to all account.move, the hash result can be wrong.

Before this PR a user with limited access can print this report.

closes odoo/odoo#112970

X-original-commit: 8263b210ea980539941ce10f5c102c9056959b72
Signed-off-by: John Laterre (jol) <jol@odoo.com>
Co-authored-by: John Laterre (jol) <jol@odoo.com>
2023-02-17 14:09:54 +01:00
Guillaume (guva) 03594b0ec9 [FIX] account: import account
With this commit, when importing an account,
we post the opening move only when importing
opening balance field.

Steps to reproduce:

- import a coa template
-> an opening move has been created and posted
- import an account
-> Error: The entry MISC/XXXX/XX/XXXX (id XX) is already posted

Issue happened because we try to post the opening move
when entering in the account_account.load method.
With this commit wemodify and  post the opening move only
if we try to import this field.

opw-3105083

closes odoo/odoo#112739

X-original-commit: 27ef0b93770c4e358a8cf4082afcfeb2da96f6c6
Signed-off-by: Brice Bartoletti (bib) <bib@odoo.com>
Signed-off-by: Guillaume Vanleynseele (guva) <guva@odoo.com>
2023-02-15 09:11:37 +01:00
Abdelouahab (abla) 139f7726e7 [FIX] account: do not add banner on corrupted PDF
To reproduce
============
- create a vendor Bill
- add the PDF (from ticket attached files) in chatter
- go back to list view and select the bill -> print Original Bills
a traceback is raised

Problem
=======
for some excptional PDF files (like the one attached in the ticket),
the library PyPDF2 that  we use to manage PDF files crashes.

Solution
========
a [fix](https://github.com/odoo/odoo/commit/e55196375aa124558b87ebd50012d5664295ca07) was backported from 16 and updated
so that we don't block the flow, we let a message on chatter that there was an error and we ignore adding the banner.

opw-3141143

closes odoo/odoo#112467

X-original-commit: d73a6261b9c7de41a1de6a2cd888c131ecee023b
Signed-off-by: John Laterre (jol) <jol@odoo.com>
Signed-off-by: abla001 <abla@odoo.com>
2023-02-11 19:20:58 +01:00
niyasraphy d6f3fcfee7 [FIX] account: translatable action name
before this commit, the action name was not translatable into user language and always displayed in english.

after this commit, the action name will be translatable and will be showing the value based on user language preference.

closes odoo/odoo#111991

X-original-commit: 6aa80ca670476494b10115f61805324811b73a58
Signed-off-by: John Laterre (jol) <jol@odoo.com>
2023-02-06 15:27:07 +01:00
Habib (ayh) 7618e2e657 [IMP] account: hide print statement button
odoo/enterprise#36355 adds the ability to generate PDF's and attach them to the statement. To give the user feedback of completion, the PDF is then downloaded. Since this is a duplication of features, the report is no longer bound to the print menu.
Task-3151040

closes odoo/odoo#111542

X-original-commit: 331aabe79b80b06f44bc2de1712742ec8f00f735
Related: odoo/enterprise#36559
Signed-off-by: Laurent Smet <las@odoo.com>
Signed-off-by: Ayob Habib (ayh) <ayh@odoo.com>
2023-02-01 14:37:55 +01:00
niyasraphy 32fb1e97e7 [FIX] {mrp_}account, purchase: translatable action name
before this commit, the action name was not getting translated to user language.

after this commit, the action name will get translated to user language.

closes odoo/odoo#110856

X-original-commit: 6758cde0358359d76642b0cbea4c208eac57dd92
Signed-off-by: Tiffany Chang <tic@odoo.com>
2023-01-24 21:11:06 +01:00
Martin Trigaux 776689b0f4 [I18N] *: export saas-16.1 source terms
closes odoo/odoo#110752

X-original-commit: 56b2b52287a8f2192d80ea417c7efac80a87c0a9
Related: odoo/enterprise#36173
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2023-01-24 10:20:30 +01:00
Yolann Sabaux 14b57cbf48 [FIX] account: total rounded
closes odoo/odoo#110479

X-original-commit: 9580bee139a588d8e34533aac6c1120477fd6dd3
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
Signed-off-by: Yolann Sabaux (yosa) <yosa@odoo.com>
2023-01-20 09:40:55 +01:00
John Laterre (jol) 3330215c4d [FIX] account: add uom category constraint
Steps to reproduce:
- Create an invoice with a product.
- Confirm it.
- Go to the product and select a UoM of another UoM category.

Issue:
Traceback

Cause:
https://github.com/odoo/odoo/blob/51ead4b2d52e0faec2065b475dac7f376328c425/addons/uom/models/uom_uom.py#L155-L159

Solution:
Add a constraint to prevent the user from changing the UoM category
of a product if it is used in a posted invoice.

At the same time, a similar constraint is added on `account.move.line`
to make sure the line's uom remains consistent with its product.

opw-3039419

closes odoo/odoo#110102

X-original-commit: aeb798d01aafee5fcaa8614f7e2b39a380d0b6ce
Related: odoo/enterprise#35887
Signed-off-by: William André (wan) <wan@odoo.com>
Signed-off-by: John Laterre (jol) <jol@odoo.com>
2023-01-17 12:58:56 +01:00
Claire Bretton (clbr) 068f3edff9 [FIX] account,l10n_lu: Adds a migration for the l10n_lu that will get the latest taxes
All taxes change in Luxembourg, we added a script that will create or update taxes so the clients don't have to
manually update everything or ask the support to do it for them. We don't modify custom taxes.

closes odoo/odoo#108699

Task: 3098941
Related: #104833
X-original-commit: c44a33d67065e20c4ded2a229d0663191c91a0a0
Signed-off-by: William André (wan) <wan@odoo.com>
Signed-off-by: Claire Bretton <clbr@odoo.com>
2022-12-27 11:17:44 +01:00
oco-odoo eaa882cb42 [FIX] account: correct cash basis rounding in multicurrency
// CASE 1: payment with different rate

1) Setup a company in USD, with EUR activated as well

2) Set a rate of 1 EUR = 2 USD for date A, and 1 EUR = 3 USD for date B

3) Setup a Cash basis tax of 1/3, with a non-reconcilable cash basis transition account

4) At date A, create an invoice with just one line with base amount=99.99 EUR ; and using the tax setup in point 3).

5) Register a full payment for this invoice at date B

===> The exchange move created by the full reconciliation consists of cash basis rounding lines for the CABA base received, transition account and tax account. 99.99 USD for the base, and 33.33 USD for the tax. Those are introduced to bring back the total amount in domestic currency to the domestic amounts computed for the invoice at date A.

Impacting the tax account and base received account is totally wrong. When doing cash basis, we want to use the rate of the payment in the amounts that get reported, as it corresponds to the money that actually came in. So, none of the lines impacting those accounts should be there.

Only the line impacting the cash basis transition account is useful, to bring its value back to 0. But it actually corresponds to an exchange difference, and we need to balance it with an exchange gain/loss account. This account can already be set as reconcilable, and if so, will be auto-reconciled. We now choose to only rely on that behavior. The account will not be brought to 0 in domestic currency if it's not reoncilable. If it is, it will create a regular exchange difference entry to handle this case properly.

// CASE 2: multiple payments in foreign currency, at different rates

1) Setup a company in USD, with EUR activated as well

2) Set a rate of 1 EUR = 3 USD for date A, and 1 EUR = 2 USD for date B and 5 EUR = 1 USD for date C

3) Setup a Cash basis tax of 1/3, with a non-reconcilable cash basis transition account

4) At date A, create an invoice with just one line with base amount=99.99 EUR ; and using the tax setup in point 3).

5) Pay 66.66 EUR at date B

6) Make a second payment of 66.66 EUR at date C

===> The problem in this case is that the tax and base amounts in foreign currency (33.33 and 99.99 EUR) will need to be divided by 2 (because we're making 2 payments, hence 2 cash basis entries), and the currency rounding will round these values to 50.0 for the base (instead of 49.995) and 16.67 (instead of 16,665) for the tax. Summing the cash basis moves will hence give a total base of 100, and tax of 33,34, which is wrong.

To handle this, a cash basis rounding of 0.01 EUR needs to be done in the exchange difference entry. The corresponding amount in domestic currency must be computed using the rate of the most recent payment, so it will be 0.05 USD here.

Before this commit, this case behaved as the first one, and brought back the reported amount to the rate of the invoice. Moreover, since it never adjusted the amount in foreign currency, the transition account could not be fully reconciled.

// FIX

To handle both those cases, we now split the behavior of the CABA adjustment:

- For rounding errors: we now check the foreign currency amount, and adjust it if necessary, reusing the rate of the most recent payment. If there is no foreign currency, the adjustement is still done for domestic currency, of course.

- Exchange rate difference of the transition account is not handled there anymore: to do this, the transition account must be reconcilable. In case of rounding error to compensate for, the adjustment line added in the exchange difference entry will be reconciled with the one on the CABA entries and on the invoice, to reach full reconciliation.

In case a transition account is not reconcilable, we only create rounding adjustments, no exchange difference.

closes odoo/odoo#107334

X-original-commit: 01cb7e960f912c4758d30c04653b599937785799
Signed-off-by: Laurent Smet <las@odoo.com>
Signed-off-by: Olivier Colson (oco) <oco@odoo.com>
2022-12-07 18:29:15 +01:00
Nicolas (vin) 44e5cf501b [FIX] account: Disallow to post move using deprecated account.
A move in draft created with an account that is later deprecated can
still be posted, while it shouldn't be allowed.
Thus, we add a new error blocking this wrong behaviour.

Task id #3087763

closes odoo/odoo#107354

X-original-commit: d8c2ad469299349e5184bc8986183cb205beb16a
Signed-off-by: Florian Gilbert (flg) <flg@odoo.com>
Signed-off-by: Nicolas Viseur (vin) <vin@odoo.com>
2022-12-07 07:02:47 +01:00
niyasraphy 9a976a8c9a [FIX] various: uniquify the the !
Just change double the by single. This fixes various typos in error and
code comments.

closes odoo/odoo#107266

X-original-commit: 09dfedfc19c2bc34c2bb394dcc4bc609c5ac0107
Related: odoo/enterprise#34681
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2022-12-06 10:52:50 +01:00
aliya 2dfcfca8fd [FIX] account: fix account creation bugs
- When importing account move lines, accounts are created with `name_create`. If the `account_id` column only contains the code, like "12345", the `split_code_name`
would only return a value for the name and leave the code empty. This is because the first group in the regex expects a space in the end, so "12345 " would work correctly.
The code is a required field, hence the import fails.
Removing \s from the first group fixes the issue and the code is saved correctly.
- There should be a UserError raised in `name_create` instead of the ValueError. The message should be clearer as well.
- It should not be possible to quick create an account from product category views.

task-3056847

closes odoo/odoo#105815

X-original-commit: 24758778172595388c19fd0a83d93d35f2260261
Signed-off-by: Olivier Colson (oco) <oco@odoo.com>
Signed-off-by: Aliya Tastemirova (alta) <alta@odoo.com>
2022-11-16 10:28:48 +01:00
niyasraphy 1709cba800 [FIX] sale,purchase,stock,account: partner form warning alignment
closes odoo/odoo#105511

X-original-commit: 6aa86c92c7ee7d46c54250960c2b34753e13b8be
Signed-off-by: William André (wan) <wan@odoo.com>
2022-11-10 00:27:59 +01:00
Dylan Kiss (dyki) c6eea1abe0 [FIX] account: rename analytic filter
closes odoo/odoo#104311

X-original-commit: 65977e432a7421fd46a15f12d1688ea7c92ee783
Related: odoo/enterprise#33324
Signed-off-by: Nicolas Viseur (vin) <vin@odoo.com>
2022-10-27 15:41:32 +02:00
maximilien(malb) 5f00654491 [FIX] account: reconcile model display improvement
Most of the dropdown of the account reconcile model view were weirdly displayed, the case was too small for the text, by removing the class oe_inline most of the dropdown were fixed, and for the other just a slight modification on the width did the job.

Also on the left column the two first line were not aligned with the rest, same for the right column on the first line, now it's fixed but I had to put the invisible in the field

Other thing, the counterpart entries were too much on the left of the page due to a useless group, it's now removed

Also change some display name and added the translation

closes odoo/odoo#103682

Task-id: 3000402
X-original-commit: 487cc0959991d804a48f44b914540786a85f180f
Signed-off-by: Laurent Smet <las@odoo.com>
Signed-off-by: Maximilien La Barre (malb) <malb@odoo.com>
2022-10-21 14:06:16 +02:00
oco-odoo 9ad7f2727b [IMP] account_reports: better helpers for report fields
closes odoo/odoo#102886

X-original-commit: 91e1c588cb4616af3f457191b787ca8e617f6d17
Signed-off-by: Josse Colpaert <jco@odoo.com>
Signed-off-by: Olivier Colson (oco) <oco@odoo.com>
2022-10-11 11:07:42 +02:00
Shawcker 6b9b41cd3f [FIX] account: fix duplicate/delete actions for account reports
Currently, there is no check when deleting an account report that has variants. Deleting such a report leads to variants not being accessible anymore.
When duplicating an account report, the columns are not duplicated and it can be tedious to duplicate them by hand.
There is also a bug when copying lines that have parent lines (no report_id set)

This commit fixes these issues by:
- raising a UserError when trying to delete reports with variants
- duplicating columns when duplicating a report
- correctly setting the report_id for all duplicated lines

Part of the big task fixing bugs in accounting
Task id=2996493

closes odoo/odoo#102846

X-original-commit: a84c7c6f210434dfcbf5c6a316f20981d06a3925
Related: odoo/enterprise#32607
Signed-off-by: Olivier Colson (oco) <oco@odoo.com>
Signed-off-by: Popeler Antoine (anpp) <anpp@odoo.com>
2022-10-10 15:09:39 +02:00
Nicolas (vin) 1561747629 [FIX] account: avoid receivable accounts on bank journals
You cannot set a receivable or payable account as a bank account of
a bank journal directly, but it is very possible to just set an
account of another type, then change the type of this account to
receivable.
This new constrains will make sure that you cannot change the type of
an account.account set as bank account on a bank journal to any of those
two types.

closes odoo/odoo#102790

X-original-commit: f9500ca4c898cd86681cc2e48ec2c66cf5670917
Related: odoo/enterprise#32579
Signed-off-by: Florian Gilbert (flg) <flg@odoo.com>
Signed-off-by: Nicolas Viseur <vin@odoo.com>
2022-10-09 19:49:53 +02:00
Martin Trigaux fde3f4d4b9 [I18N] *: export 16.0 source terms
closes odoo/odoo#102163

X-original-commit: 011d7aac5aacedb3ab373f247471ba69d67f50f3
Related: odoo/enterprise#32288
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2022-10-06 14:56:52 +02:00
Pierre Verkestandwan 2762c3c387 [FIX] account: account move report date label
Change 'Invoice date' label on report according move_type

closes odoo/odoo#102005

X-original-commit: c8991f2760c1ac81ec2a64553744cef9321f2531
Signed-off-by: William André (wan) <wan@odoo.com>
Co-authored-by: wan <wan@odoo.com>
2022-10-04 14:57:02 +02:00
Martin Trigaux eba7ed6e9c [I18N] *: translate fr_BE based on fr
Automatically translate "avoir" into "note de crédit"

closes odoo/odoo#102002

X-original-commit: 69b141d8ec613e101b8a7050da057bfe5a74af50
Related: odoo/enterprise#32220
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2022-10-04 07:28:57 +02:00
Julien Alardot (jual) eaee797afd [FIX] account: Clarify lock date message
The current message may make you believe the date on
the invoice will be changed when it's the accounting date
This aims to clarify that the move.invoice_date will stay
the same when it's the move.date that will be changed

closes odoo/odoo#101820

X-original-commit: 5f5dbbcc66f4ded1388949386faf90e0d406a4b2
Signed-off-by: Julien Alardot (jual) <jual@odoo.com>
Signed-off-by: William André (wan) <wan@odoo.com>
2022-10-01 13:58:41 +02:00
Martin Trigaux e856beb782 [I18N] *: export 16.0 source terms
closes odoo/odoo#101659

Related: odoo/enterprise#32040
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2022-09-30 09:31:52 +02:00
Thomas Lefebvre (thle) 9cb4cbc270 [FIX] account: currency issue in payement receipt print
Steps to reproduce:
	- install the "account" module (Invoicing app);
	- create an invoice;
	- make partial payments in other currencies,
	- print the payment receipt.

Issues:
	The amount and the currency do not match.
	In addition, it is difficult to see the conversion between the payment currency and the invoice currency.

Causes:
	The currency symbol of the line corresponds to the payment currency.
	The amount of the line corresponds to the amount converted into the base currency of the invoice.

Solutions:
	Add one column named "Amount In Currency" and add the amount in the currency of the payment.
	In the column "Amount", correct the symbol of the currency.

opw-2973067

closes odoo/odoo#101489

X-original-commit: b05d95a046fb7cfd438adce3d5f1e8b2f84953bf
Signed-off-by: Grazioso Andrea (agr) <agr@odoo.com>
Signed-off-by: Lefebvre Thomas (thle) <thle@odoo.com>
2022-09-29 08:05:45 +02:00
Nicolas (vin) ee6c6c1b9e [IMP] account: bank statement misc improvements.
In order to better display the functionalities, we will change how
the demo data for bank statement are created. There will now be one
bank statement and multiple bank transactions not linked to a statement.
Also rewords one error to be clearer.

closes odoo/odoo#101466

X-original-commit: 5e14b28905fc00bad2c2ccd40328c676d049917d
Signed-off-by: William André (wan) <wan@odoo.com>
Signed-off-by: Nicolas Viseur <vin@odoo.com>
2022-09-29 08:05:42 +02:00
Martin Trigaux 5150d003fd [I18N] *: export 16.0 source terms
closes odoo/odoo#101053

X-original-commit: 7d4c9d9736cc2ff0ee91dc17ea0f952c9a3dc65a
Related: odoo/enterprise#31752
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2022-09-24 15:00:56 +02:00
Martin Trigaux 1a8772769e [I18N] *: export 16.0 source terms
closes odoo/odoo#100573

Related: odoo/enterprise#31507
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2022-09-20 13:48:49 +02:00
Martin Trigaux b821961236 [I18N] *: sync fr_BE translation terms
Only for terms containing Credit Note and expenses

closes odoo/odoo#97840

X-original-commit: 1754b094a66476a0bdb29fe60dc5583c03336c3f
Related: odoo/enterprise#30262
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2022-08-10 03:11:53 +02:00
Yolann Sabaux 24e89a3fbe [FIX] account: prevent deletion partner
Steps to reproduce:
- Create a partner-individual, assign to a company
- Create an invoice and set the new partner as the customer
- Go to the partner view
- Delete it

Issue:
- It is possible to delete it

Cause:
The constraint in "account.move.line" uses the "commercial_partner_id" as the partner

Solution:
- Prevent the unlink if the partner is used in 'account.move' -> To delete in Master
- add "ondelete='restrict' for partner and commercial_parner in 'account.move'

opw-2858789

closes odoo/odoo#94591

X-original-commit: 7d37f5ef7ecd87aea666d96dc8200a74c8dc0b31
Signed-off-by: William André (wan) <wan@odoo.com>
2022-06-24 19:34:28 +02:00
Martin Trigaux 5acb6db891 [I18N] *: export saas-15.4 source terms
closes odoo/odoo#93246

X-original-commit: 5ff6d185f70650c26c28a6aef7dd37c859ab58d2
Related: odoo/enterprise#28218
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2022-06-10 07:27:26 +02:00
Miquel Raïch 01f683f41a [FIX] account: delete account_analytic_default translation
Correct forward port of https://github.com/odoo/odoo/commit/d80dfd30ffb6524024999f88e069a400884e605b

closes odoo/odoo#92302

X-original-commit: d9ff39fda4ee870cdd50497781330997386b9f70
Signed-off-by: William André (wan) <wan@odoo.com>
2022-05-26 09:54:42 +02:00
Martin Trigaux 158b537c28 [I18N] *: export saas-15.2 source terms
closes odoo/odoo#89225

X-original-commit: 5925a83d87fa4702f4c0f22346304dc2da47c728
Related: odoo/enterprise#26435
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2022-04-23 08:33:43 +02:00
william 9b9ed45c5a [FIX] account: accrual and lock dates
Do not allow users to create accrual entries for locked periods.
This would either create an entry for another date, since the date is
changed automatically by `_get_accounting_date` when posting.
Reproduce:
* Set a lock date
* Do an automatic entry for either changing the account or the period
  before that lock date

Or it would traceback because the date would be changed automatically
and no matching would be possible when changing the period.
* Set a lock date
* Create an automatic entry to change the period of an entry before the
  tax lock date

closes odoo/odoo#87391

X-original-commit: f830b008781c2f6f5644395688654e64edd5c836
Signed-off-by: Quentin De Paoli <qdp@odoo.com>
Signed-off-by: William André (wan) <wan@odoo.com>
2022-03-29 20:21:22 +02:00