Commit Graph
807 Commits
Author SHA1 Message Date
Christophe Simonis e92ae40d71 [MERGE] forward port branch saas-15 up to b0992d082d 2017-04-14 13:32:15 +02:00
Christophe Simonis b0992d082d [MERGE] forward port branch saas-14 up to 8f30e707e5 2017-04-13 15:31:27 +02:00
Christophe Simonis 13ad16104a [MERGE] forward port branch 10.0 up to 00e169c05a 2017-04-13 13:22:27 +02:00
Christophe Simonis 9e159ef204 [MERGE] forward port branch saas-11 up to f830c7c3e3 2017-04-12 18:51:16 +02:00
qdp-odoo 3eb252ab0e [IMP] account, payment form view: add a button to open payment matching
button will only be visible if the move_line are not reconciled yet
This button will allow user to register a payment and then reconcile it with multiple invoices in the payment matching view.

Was PR #15157
2017-04-12 16:22:40 +02:00
Xavier Morel 76852a2fad [#8530] fix uses of `reduce` builtin
Demoted to library in Python 3, see if uses can be replaced by more
specific construct, just import functools.reduce otherwise.

Futurize fixers:
* lib2to3.fixes.fix_reduce
2017-04-12 13:48:42 +02:00
Christophe Simonis add62255be [MERGE] forward port branch 9.0 up to f10ef71f06 2017-04-12 13:06:41 +02:00
Christophe Matthieu 654f932b3c [FIX] account: rewrite of the reconciliation feature
With our new views, we broke almost all JS code, including the
reconciliation widget, which was (and still is) dependant on the field
widget.  With this commit, we rewrite and simplify the reconciliation
code.  We also add some tests, to help with the maintenance.

Work done by CHM
2017-04-11 19:44:38 +02:00
Xavier Morel 3f20662b3e [#8530] convert deprecated operators
* `<>` was removed and should be replaced by
  `!=` (lib2to3.fixes.fix_ne)
* `\`` was removed and should be replaced by either `repr()` or the
  `%r` format string modifier (lib2to3.fixes.fix_repr followed by
  hand-rolled edition to replace concatenation)
2017-04-11 16:29:51 +02:00
Goffin Simon 1dc361704e [FIX] account: Making a refund with modified taxes
Step to reproduce the bug:
1.Create a product with a customer tax(15%) for a price=100
2.Create a customer invoice with this product
3.Change the amount of the tax to 10(instead of 15)
4.Validate the invoice
5.Click on "Refund invoice"
6.Select the refund method "Modify: create refund, reconcile
and create a new draft invoice"

Bug the new draft invoice has 15 as amount of tax

Now all the taxes from the invoice when preparing the refund in function
_prepare_refund, in this it keeps all the modified taxes.

opw:726491
2017-04-11 14:15:39 +02:00
Laurent Smet a8994b4075 [IMP] account: use max_date instead of create_date for aged reports
Aged receivable/payable was using create_date of account_partial_reconcile to decide if a partner needs to be shown at a given date or not.
While it was not wrong, our decision to use the create_date was based on the fact that we wanted to be able to render the exact same report we had at a past date, so a the date of the reconciliation would be important... but since the unreconciliation was not forbidden it wasn't really the case.
Moreover, in some case where reconciliation is not at the same time the payment is recorded, this choice
 - was confusing people about results given by the aged receivable/payable report.
 - was confusing people about the 'Paid on...' line in the payment widget on the invoice, as they would see there a date unused by the system (although they would have liked too)

This was discussed in opw 31844. Was PR #16016
2017-04-11 11:09:01 +02:00
Alexis de Lattre 91470a37fe [FIX] account: traceback on mass reconciliation of payments and invoices
Fix Bug #14866. Was PR #16149. Courtesy of Alexis de Lattre (Akretion)
2017-04-11 08:51:06 +02:00
qdp-odoo f019479350 [FIX] account: suppress warning when account currency = company currency 2017-04-10 17:36:54 +02:00
Fabien Pinckaers 4585b14cd1 [MERGE] account: menus for credit note + avoid negative invoices 2017-04-08 19:06:21 +02:00
Fabien Pinckaers 55ea4b16f0 [IMP] account: better CSS/XML for settings 2017-04-08 17:57:14 +02:00
Fabien Pinckaers 525d094ef6 [IMP] account: misc UX improvements
Allow to configure the bank statement import mode from kanban
    When doing a manual journal entry, don't show the maturity date
    Removing Issued total, using credit instead (less code, more
    useful to have due amounts, instead of overdue)
    Creating a bank, set a name 'BofA Current' and an
    account number (that way, the account.account is based
    on name)
    Settings Wizard & menus: better sentences
    Statement CSV Import: installed by default (it
    does not add any menu)
    remove use_in_payment: complex field, only
    used for a default value
    Small code cleanup
[IMP] sale: moving order date to secondary tab (strange on a quotation)
2017-04-08 16:52:05 +02:00
Christophe Simonis aea68e4730 [MERGE] forward port branch 9.0 up to 51fe54dd8d 2017-04-07 17:34:51 +02:00
Yannick Tivisse a3778ceada [FIX] account,sale: Select correclty the delivery partner
To deduct the fiscal position, we should use the shipping partner.

The field `partner_shipping_id` is defined in the sale module.

Thus, we should choose this partner if the module sale is installed and if this field is set, or fallback to the original partner instead
2017-04-07 16:17:49 +02:00
Yannick Tivisse 1452a9903c [FIX] account: Use the invoice shipping address to select the fiscal position
Tribute to Ray Carnes

PURPOSE
=======

Since the fields shipping_partner_id has been added on the invoice model, the onchange triggered by the partner_id hasn't been modified.

SPECIFICATION
=============

The shipping_partner_id will be picked by default to select the fiscal position. If there's no shipping partner, it will check if a 'shipping' partner is a child on the partner_id.
2017-04-07 14:33:02 +02:00
Martin Trigaux 58918fb826 [FIX] account: bad forward port
Field remaining from 9.0 when cherry picking #16236 to #16282
2017-04-06 15:57:03 +02:00
Thomas Binsfeld f79e2fd318 [IMP] account: add prepare methods for exchange diff move lines
Such prepare methods are useful in situations where we want to propagate some
analytic dimension to exchange difference move.

Closes #16282
2017-04-06 15:17:17 +02:00
Thomas Binsfeld 01add1fe15 [FIX] account: browse only one record
Part of #16282
2017-04-06 15:11:31 +02:00
qdp-odoo df755ef6d4 [FIX] account: reverse move now also reconcile together liquidity amls.
This is needed in order to clear the 'unreconciled payments' in the bank statement reconciliation report when you wrongly encoded a bank statement and reversed it.
This patch goes along with the modification of the bank reconciliation report in enterprise to exclude such 'reconciled' lines.
2017-04-05 17:31:19 +02:00
Lucas Perais (lpe) fc0d2e2c83 [FIX] account: Dashboard used to open provider bills instead of customer invoice
Correcting patch on PR16042 by Alexis delatre
OPW 726679
Closes #16210
2017-04-04 09:48:54 +02:00
Nicolas Martinelli 7bbbc6f12d [FIX] account: decimal precision
Missing decimal precisions.

opw-726110
2017-03-30 10:32:07 +02:00
Martin Trigaux 2382520c34 [IMP] odoofication 2017-03-30 08:59:13 +02:00
qdp-odoo 26938da071 [FIX] account: fix statement_line_id on bank statement processing.
Since ee2c76a431, a new field 'statement_line_id' has been added on account.move.line object and the field 'statement_id' became a related... but this statement_line_id on the bank account aml was, by mistake, not set. That created aml that were wrongly appearing in blue in the reconciliation widget.

If this error occured in a DB, the following SQL query can fix it:
$ UPDATE account_move_line l SET statement_line_id = s.id FROM account_bank_statement_line s
   WHERE l.statement_line_id IS NULL
   AND l.statement_id = s.statement_id
   AND l.name = s.name
   AND coalesce(s.partner_id, 0) = coalesce(l.partner_id, 0);
2017-03-29 13:55:14 +02:00
Christophe Simonis fb2504b24c [MERGE] forward port branch saas-15 up to aebd043662 2017-03-28 18:38:49 +02:00
Christophe Simonis 2df5faa551 [MERGE] forward port branch saas-14 up to 2f68e9e93a 2017-03-28 18:05:31 +02:00
Christophe Simonis 2f68e9e93a [MERGE] forward port branch 10.0 up to 72fa3e8bda 2017-03-28 17:27:19 +02:00
Christophe Simonis 27496730d8 [MERGE] forward port branch saas-11 up to c2569b9df1 2017-03-28 14:51:14 +02:00
Christophe Simonis c2569b9df1 [MERGE] forward port branch 9.0 up to 30dda3faee 2017-03-28 13:21:24 +02:00
qdp-odoo 925440b7a0 [FIX] account: restrict fiscalyear closing if there are still unposted entries 2017-03-28 10:49:32 +02:00
Alexis de Lattre 35175a31ee [FIX] Open bank statement tree view from journal dashboard 2017-03-27 15:38:06 +02:00
qdp-odoo 5a7db15aff [FIX] account: usability of entry sequences.
This revert commits 51882ea70c and d94c449547 that were introduced to solve OPW-693955.

The usability before those fixes was good, but the bug was appearing when we first create the journal without the boolean 'dedicated refund sequence' set, then we try to modify that va$

This time, the fix consist to create automatically the sequence on the write of the boolean if it's not existing yet, in the same fashion than on the create().
2017-03-27 12:10:08 +02:00
Christophe Simonis 70b770d62e [MERGE] forward port branch 9.0 up to 8376f538b5 2017-03-24 17:57:29 +01:00
Laurent Smet 5d2ba54be5 [TYPO] account: rename "refund" to "credit note"
see opw: 32014
2017-03-22 10:20:23 +01:00
Laurent Smet a91e9f43ac [FIX] account: raise warning when inv amount falls bellow 0
A warning was raised when an invoice line had a negative amount that may cause some
trouble when dealing with discount (negative amount). Now, the warning is raised
when the amount total of the invoice falls bellow 0.
2017-03-22 10:12:59 +01:00
Laurent Smet dd6ade733e [ADD] account: add warning when adding a line with a negative total amount 2017-03-21 13:18:38 +01:00
Laurent Smet c8ab32348a [ADD] account: prevent users to validate invoices/bills/refunds with negative total amount 2017-03-21 12:29:18 +01:00
Cedric Snauwaert 89581abf14 [FIX] account: field commercial_partner_id should be compute_related=True
OPW: 716163
This is needed to fix the following problem: adding a partner to res_partner.child_ids will mark all element of child_ids as 'todo'
and trigger a write on res_parner.commercial_partner_id for all element of the child_ids and then on the related field
account_invoice.commercial_partner_id. This can cause problem if partner in child_ids belong to different company and have invoices. This will throw a
read access error when doing the _write method of account_invoice. Adding the compute_related=True to account_invoice.commercial_partner_id
ensure that the _write on that field is done in sudo.
2017-03-21 09:45:13 +01:00
Guewen Baconnier 55e6764747 [IMP] account: extract check of duplicate supplier reference
Having more than one supplier invoice with the same reference is sometimes
possible. For instance, in Switzerland, the use of BVR/ESR numbers as a type of
reference permits this. Generally, this number is unique and used only for one
invoice. However, some suppliers do use the same BVR reference for several
invoices (e.g. recurring invoices).

This commit allows to disable this check if required, which is only possible
if it is extracted from 'invoice_validate'.

Closes #15891
2017-03-20 10:28:29 +01:00
Goffin Simon fa02b79837 [FIX] account: get_move_lines_for_reconciliation for expenses
Steps to reproduce:

-Create a new journal called VISA of type=bank
-Allow the reconciliation on debit and credit account
-Create two expenses (700$ each one)paid by company with the VISA journal
-Submit to manager, validate and post the entries
-Create a bank statement of -1400$ on Bank journal
-Click on reconcile button

Bug: the two account move lines linked to the expenses are not available
to be reconciled with the statement.

In 9.0, it was possible but due to this commit: 9188d01934
the two aml were not available because

this two aml had a payment_id, no statement_id and were with an account_id different of the bank journal
(not in reconciliation_aml_accounts) because they had been paid with VISA journal. So they were rejected
with the domain_reconciliation due to the account_id on VISA journal and they were rejected with the
domain_matching due to the payment_id not False and statement_id False.

In 9.0, they were accepted with the domain_matching so the same behavior has been done in saas-11.

opw:709861
2017-03-20 09:32:54 +01:00
Christophe Simonis c8f01e3b62 [MERGE] forward port branch saas-14 up to b2fa9f2ad1 2017-03-17 18:03:00 +01:00
Yannick Tivisse 6027e9370d [FIX] account, base_setup, sale, crm: do not create ir.values for unknown fields 2017-03-15 10:49:53 +01:00
Nicolas Martinelli 65814e26cf [FIX] account: cancel reconciliation traceback
Since commit ee2c76a431, `journal_entry_ids` is an `account.move.line`,
not an `account.move` anymore.

opw-724421
2017-03-14 10:56:44 +01:00
Christophe Simonis 65a5ced979 [MERGE] forward port branch saas-14 up to 777a87cde8 2017-03-13 17:37:20 +01:00
Christophe Simonis 777a87cde8 [MERGE] forward port branch 10.0 up to 2ef43281c2 2017-03-13 16:22:57 +01:00
Christophe Simonis 2ef43281c2 [MERGE] forward port branch saas-11 up to 2e972578b9 2017-03-13 15:53:55 +01:00
Christophe Simonis 2e972578b9 [MERGE] forward port branch 9.0 up to 73d6f9023a 2017-03-13 14:49:12 +01:00