Commit Graph
1432 Commits
Author SHA1 Message Date
Lucas Perais (lpe) 721260d2a7 [FIX] account: retrieve bank statement for process_reconciliation
Multicurrency is ON
Your company in USD

Make a bank journal in EUR
Create a statement and push reconcile

In the widget, create a line with a tax and hit reconcile

Before this commit, the amount_currency field of the tax move line was not filled

After this commit it is

OPW 1885014

closes odoo/odoo#27592
2018-10-10 14:56:56 +00:00
Christophe Simonis 6ce408c824 [MERGE] forward port branch saas-15 up to a0d832efdc 2018-09-26 12:41:31 +02:00
Toufik Benjaa f7d7eb06ab [FIX] account: avoid to rewrite product image when refunding invoice
- When refunding an invoice the field product_image is modified and
  tries to write on the product image field for no reason.
2018-09-26 12:15:09 +02:00
Christophe Simonis a0d832efdc [MERGE] forward port branch saas-14 up to 218eec5482 2018-09-26 12:09:18 +02:00
Christophe Simonis 218eec5482 [MERGE] forward port branch 10.0 up to 854eb97b2e 2018-09-26 11:28:33 +02:00
Christophe Simonis 854eb97b2e [MERGE] forward port branch 9.0 up to bc14f30ecc 2018-09-26 10:17:05 +02:00
Olivier Colson 6b96e5024a [IMP] account: forbid making a 'bank & cash' account reconcilable
Making a bank account reconcilable is a very common mistake, and leads to confusing and useless data (the move lines made on this account) to be displayed in the reconciliation widget. With this commit, we make sure the user cannot make this mistake anymore.
2018-09-25 17:31:55 +02:00
Christophe Simonis a27a24c5ed [MERGE] forward port branch saas-14 up to 7322b7ee56 2018-09-13 11:33:56 +02:00
Christophe Simonis 7322b7ee56 [MERGE] forward port branch 10.0 up to dd20539ffe 2018-09-13 11:32:43 +02:00
Christophe Simonis dd20539ffe [MERGE] forward port branch 9.0 up to cbdb7383e9 2018-09-13 11:07:53 +02:00
Richard Mathot cbdb7383e9 [REV] account: revert 8781286f1c
Causes a traceback "Expected singleton" when opening the Reconciliation
from the accounting dashboard
2018-09-13 11:00:15 +02:00
Christophe Simonis a651e8eed8 [MERGE] forward port branch saas-14 up to 72b2bab8c8 2018-09-13 10:58:54 +02:00
Mathieu Duckerts-Antoine 4cbc9b8d61 [FIX] account: translate default overdue_msg
opw-1880132

Closes #26852
2018-09-12 16:52:29 +02:00
Christophe Simonis 48aac01c13 [MERGE] forward port branch saas-14 up to 55ab1ac691 2018-09-11 18:54:08 +02:00
Christophe Simonis 55ab1ac691 [MERGE] forward port branch 10.0 up to cd66b0984e 2018-09-11 17:44:14 +02:00
Christophe Simonis 63afaf438b [MERGE] forward port branch 9.0 up to 415aa05806 2018-09-11 17:07:35 +02:00
Laurent Smet 415aa05806 [IMP] account: add error when setting a foreign currency on account
If currency set on account, all journal items part of this account must have either the same
currency or no currency.
2018-09-11 16:04:52 +02:00
Iván Todorovich 8781286f1c [FIX] account: multi-company bank statement reconciliation
In a multicompany environment, if the user is not logged-in in the same company as the statement's company (even though he might have access to it), the reconcile interface was filtering on the user's company instead of the bank statement lines's company.

Was PR #26782
2018-09-07 15:24:33 +02:00
Lucas Perais (lpe) c2b684654b [FIX] account: unreconcile payment from invoice with exchange difference
backport 1dbc655676

Company in USD
Invoice in EUR with rate A
Register a payment in EUR with rate B

Unreconcile them.

Before this commit, there was an error because we tried to reconcile the exchange items
with its reversal while the formers were already reconciled with the invoice

After this commit, there is no error

OPW 1864091
closes #26583
2018-08-27 10:26:39 +02:00
Christophe Simonis 4703d649dc [MERGE] forward port branch saas-14 up to aeb3391a2d 2018-08-24 14:07:40 +02:00
Christophe Simonis aeb3391a2d [MERGE] forward port branch 10.0 up to b50958c40f 2018-08-24 11:42:33 +02:00
Lucas Perais (lpe) b50958c40f [FIX] account: allow range amount search for reconciliation widget
In the reconciliation widget, search for an amount like 5361.61

Before this commit, if the targetted line that you want to see was represented as 5361.61000001
you did not see it in the results of the search

After this commit, you do!

OPW 1872543
closes #26523
2018-08-24 09:43:51 +02:00
Goffin Simon a9670cfce5 [FIX] account: Reconcile a statement with move line from partner
Steps to reproduce the bug:

- Create a journal "Temporary" with default account
(don't care about the names) with Fixed asset type and reconcile = True
- Create a vendor bill
- Create a payment from this vendor bill in the temporary journal
- Create a bank statement and with a line where you specify the vendor
- Try to reconcile the temporary account with the bank account

Bug:

Impossible because the temporary account item was not displayed

opw:1884376
2018-09-17 09:53:25 +02:00
Christophe Simonis 5cb9f8e9d5 [MERGE] forward port branch saas-15 up to a27a24c5ed 2018-09-13 12:11:17 +02:00
Nicolas Martinelli ad584540d4 [FIX] account: tax account
Use the cash basis account for cash basis taxes.

Follow-up of 1b47575372

opw-1858492
2018-09-13 11:43:12 +02:00
Wolfgang Taferner 8e15dc87a4 [IMP] account: extract_payment_vals + explicit communication hand-over 2018-09-12 15:12:42 +02:00
Christophe Simonis 49a7295ce9 [MERGE] forward port branch saas-15 up to 48aac01c13 2018-09-11 19:06:22 +02:00
Nicolas Martinelli 1b47575372 [FIX] account: cash basis in statement
- Set up a 10 % tax with a 'Tax Due' as 'Based on Payment'
- Create a bank statement of 110, Reconcile
- Create a new AML for the reconciliation using the mentioned tax for an
  amount of 100
- Validate

The tax amount does not appear in the Generic Tax Report.

This is a specific case where the reconciliation process creates the
payment itself. Therefore, the tax amount should appear in the report.

To do so, we explicitly send the `tax_exigible` value on the AML, and
propagate it to the tax line.

opw-1858492
2018-09-11 10:30:45 +02:00
Nicolas Martinelli 765a3bf23f [FIX] account: unreconcile cash basis
- Set up a tax as 'Based on Payment'
- Create an invoice at date D with this tax
- Pay the invoice at date D+1
- Unreconcile

A reversal entry is made at the current date, while it should be at the
payment date D+1.

We make sure to use the payment date only if the payment period has not
been locked.

Fixes #25738
opw-1870467
2018-09-06 14:45:40 +02:00
Christophe Simonis 33981790de [MERGE] forward port branch saas-15 up to 4703d649dc 2018-08-24 18:03:00 +02:00
Olivier Colson 12fbbacc6d [IMP] account: reconciliation widget: format dates depending on user's language preferences. 2018-08-23 14:53:25 +02:00
Nicolas Martinelli 90cdc91638 [FIX] account: fiscal year last day
Do not replace the day value without notifying the user.

In undetermined circumstances, a fiscal year last day and month can be
replaced by the default December 31st value. Since all settings are
re-written for any setting changed, this is likely to happen in the back
of the user.

Moreover, the `_verify_fiscalyear_last_day` is not correct since it
doesn't accept February 29th, while `compute_fiscalyear_dates` handles
it.

opw-1867978
opw-1873260
2018-08-14 13:32:41 +02:00
Lucas Perais (lpe) abd2b2e2ca [FIX] account: reconcile through widget associate payment/invoice
Create an invoice, validate it

Create a payment from athe account.payment model (not the register payment wizard)

click on the smart button payment matching, and match the invoice with the payment
Reconcile

Before this commit, the invoice was not part of the invoice_ids field of the payment,
So, when printing the payment receipt or check, there was nothing on there

After this commit, we associate the invoice with the payment, and the receipt prints
what is expected

OPW 1871575

closes #26245
2018-08-10 09:35:26 +02:00
Lucas Perais (lpe) f2b2d87236 [FIX] account: default name for analytic line from aml
Create an account_move, with at least one move line having an analytic account on it
AND no label

Save and Post

Before this commit, the post failed because an analytic.line should have a label (required)

After this commit, we fill in a default name for the analytic line, composed of the data of the line,
if available, or '/'

OPW 1863418
closes #26013
2018-08-08 10:54:18 +02:00
Christophe Simonis c4ee29345a [MERGE] forward port branch saas-14 up to 9ee882564f 2018-07-23 14:57:03 +02:00
Lucas Perais (lpe) 1409421b26 [FIX] account: payment cashbasis' move posted once
Make an invoice with a line having a cashbasis tax
Make a payment at a future date compared to the invoice's date

Before this commit, the cashbasis move attempted to post many times
which could lead to errors when posting is forbidden
(in the case of the french localization)

After this commit, the cashbasis move is posted only once

OPW 1865179
closes #25832
2018-07-19 09:19:47 +02:00
Christophe Simonis 650bc6419c [MERGE] forward port branch saas-14 up to eb56e6dcb3 2018-07-12 14:07:36 +02:00
Christophe Simonis 1926b40212 [MERGE] forward port branch 10.0 up to 718a5b76b8 2018-07-12 11:29:22 +02:00
Christophe Simonis 718a5b76b8 [MERGE] forward port branch 9.0 up to 189e0088e0 2018-07-12 11:28:29 +02:00
Stéphane Bidoul (ACSONE) 189e0088e0 [FIX] account: preserve deactivated taxes on move lines
Similar to cd3f52ba10 that was made for invoices.

Was PR #25655. Courtesy of Stéphane Bidoul (ACSONE)
2018-07-11 16:56:59 +02:00
Christophe Simonis c22e479246 [MERGE] forward port branch saas-14 up to 5d8076c842 2018-07-10 12:22:55 +02:00
Christophe Simonis 5d8076c842 [MERGE] forward port branch 10.0 up to 5e682451cb 2018-07-10 11:30:59 +02:00
Lucas Perais (lpe) 5fc392e34a [FIX] account: revert reconciled payment with exchange difference entry
Company is in USD
Do an invoice in EUR with a specific rate (and post it)
Do a payment on this invoice with another rate (and post it)

revert the payment's move

Before this commit, the move_lines of the original/reverted move pair were not reconciled
to one another
This could cause problems in some reports (aged reports for example)

After this commit, the lines in the original/revert move pair are reconciled
provided that they *can* be reconciled
Which is either belonging to a reconciliable account, or to an account of type liquidity

OPW 1861273
closes #25592
2018-07-09 10:07:36 +02:00
Lucas Perais (lpe) 42e74aae51 [FIX] account: revert reconciled payment with exchange difference entry
This is essentially a backport of 7544c22de9
and
4f40c9da7b

Company is in USD
Do an invoice in EUR with a specific rate (and post it)
Do a payment on this invoice with another rate (and post it)

revert the payment's move

Before this commit, the move_lines of the original/reverted move pair were not reconciled
to one another
This could cause problems in some reports (aged reports for example)

After this commit, the lines in the original/revert move pair are reconciled
provided that they *can* be reconciled
Which is either belonging to a reconciliable account, or to an account of type liquidity

OPW 1861273
closes #25600
2018-07-09 10:05:18 +02:00
Christophe Simonis 152d42041e [MERGE] forward port branch saas-14 up to e4663523b9 2018-06-20 18:48:06 +02:00
Christophe Simonis e4663523b9 [MERGE] forward port branch 10.0 up to 081259ef25 2018-06-20 17:44:58 +02:00
Olivier Colson b81b9f9ca1 [FIX] account: use today's date as due date for invoices if there is no payment term and no due date was given manually
The code was actually alreadt made in this spirit, there was just as wrong call to the date_invoice field of the model instead of the local variable with the same name, which contained the right value.
2018-06-20 12:32:33 +02:00
Goffin Simon ec7109c919 [FIX] account: Wrong payment amount in multi-currency
Steps to reproduce:

- activate the EUR currency

- set a currency rate 1 USD = 1.2 EUR

- create a Bank journal in EUR with a EUR account

- create a Vendor Bill in EUR for 1200 EUR in total

- go in the Vendor Bill list view (Accounting > Purchase > Vendor Bills)

- select the created Vendor Bill

- click "Register Payment" in the action menu

- select the EUR Bank journal you created

Bug:

The payment amount is 1000 EUR instead of 1200 EUR.

opw:1870351
2018-08-02 16:27:34 +02:00
Olivier Colson 1686ef8c04 Revert "[FIX] account: set 'multi' field to False for payments generated when choosing to register payment for multiple invoices with distinct partners"
This reverts commit 11a0dd58a7. It was made in wrong version.
2018-08-01 09:42:07 +02:00
Olivier Colson 11a0dd58a7 [FIX] account: set 'multi' field to False for payments generated when choosing to register payment for multiple invoices with distinct partners
This field is used by the multiple payment wizard; the payments it generates are always individual and should never have multi=True. Before this commit, they did, because of the values given in context when calling the payment wizard.
2018-07-31 17:16:47 +02:00