Commit Graph
100 Commits
Author SHA1 Message Date
qdp-odoo 6c46b997a3 [FIX] account: missing dependancy on constraint
It was possible to create inconstancies in accounting entries by forcing to sum apples and pears.

Steps to reproduce
1. create a journal entry using at least one account with a secondary currency set
2. balance and save that move
3. change the secondary currency on the line and force it to a different value than the one on the account
4. save. You'd expect an error pop up but the constraint doesn't trigger and you're allowed to save/post

opw-3340697

closes odoo/odoo#126336

X-original-commit: e6581f39ec5d550db924aa7a86dd12f511f87958
Signed-off-by: William André (wan) <wan@odoo.com>
2023-06-26 21:10:12 +02:00
qdp-odoo a4baafa761 [IMP] account: prevent the deletion of tag when set on tax/account
Because if a tag is still linked to a tax or an account, then it's probably also still referenced in a report line, and it makes no sense allowing to delete such a tag.

closes odoo/odoo#125843

X-original-commit: 3b71689954a941b12d8eda1d08c3ad58aca320d8
Signed-off-by: Quentin De Paoli <qdp@odoo.com>
Signed-off-by: William André (wan) <wan@odoo.com>
2023-06-21 01:24:28 +02:00
qdp-odoo 999c9cdd79 [FIX] purchase: don't track_qty_received on PO when doing accrued expense entry
Failing use case: While having purchase_stock installed, create and confirm a request for quotation, received some products but no bill for it. Now select the PO is the list, click on 'Action > Accrued Expense Entry'. Make sure the wizard will effectively create an accrued expense entry (it should be the case if you have some product received and not billed).
Upon confirmation of the wizard, the system will recompute the received quantity on the original PO, logging notes that pollutes, confuses and spams its followers.

The reason is that we use a new record to compute the difference between the received and billed quantities at a given date in the past, and even if track_qty_received is called on a newid, it will find back the original PO where doing line.order_id.

The solution is to check in the context if we're in such use case before logging, because we know that calling the accrued expense entry wizard aims not to change the received quantity in any wase

closes odoo/odoo#122720

X-original-commit: b31f1ad789e92c84f85654b67e6730e413f0e06b
Signed-off-by: Florian Gilbert (flg) <flg@odoo.com>
2023-05-30 08:41:03 +02:00
qdp-odoo be4e1d1400 [IMP] account: do not trust bank accounts at their creation
This comes as a followup of https://github.com/odoo/odoo/pull/120423 where we restrict unallowed users to toggle the field allow_out_payment when writing on res.partner.bank. Similarly, we'll now do the same check at the creation of bank accounts

closes odoo/odoo#120694

Signed-off-by: Brice Bartoletti (bib) <bib@odoo.com>
2023-05-09 18:26:59 +02:00
qdp-odooandLucasLefevre 9221ad5e53 [FIX] spreadsheet_account: don't include unposted entries by default
All figures coming from the accounting dashboard should be, by default, excluding the unposted entries since this is the default filter when opening the reports.

opw - 3268676

closes odoo/odoo#120424

X-original-commit: fd20e65fbfeadcc477ea7179900741dd6e98cf16
Signed-off-by: Lucas Lefèvre (lul) <lul@odoo.com>
Co-authored-by: LucasLefevre <lul@odoo.com>
2023-05-03 15:04:53 +02:00
qdp-odoo d563481306 [FIX] purchase: vendor bill autocomplete check for duplicated lines
Failing use case:
Create a vendor bill and use the auto-complete field to select a purchase order multiple times.
The purchase order gets added to the vendor bill multiple times, this doesn't happen in V15 and was never intended.

The reason is simply that the code was checking on self.line_ids which get only populated after the record is saved and its invoice_line_ids are synchronized. Before that, only the field invoice_line_ids is filled witht new_ids.

opw - 3196149

closes odoo/odoo#119758

X-original-commit: 29d5862d447dd369432b345e43d5875d3b2a4474
Signed-off-by: William André (wan) <wan@odoo.com>
2023-04-27 00:52:17 +02:00
qdp-odoo 997a6d3e27 [FW][FIX] account: sequence mismatch handling
Removed annoying error raised onchange of the date/name if they don't match anymore. This was done during the update, which was dumb since it was popping in case you wanted to change both the date and the name. It now only relies on the constraint that is verified upon posting the invoice. Onchange warning is kept only for the format change.

Ensure the date constraint is always verified no matter if the invoice was already posted before, or if we're in quick edit mode: the date's info located in the name must always match the accounting date. This is ensured when posted.

task-2976499

closes odoo/odoo#108116

Forward-port-of: odoo/odoo#107867
Signed-off-by: William André (wan) <wan@odoo.com>
2022-12-15 21:18:59 +01:00
qdp-odoo 7a6137347d [FIX] tests/common.py: fix context propagation in o2m onchanges in Form()
Previously, the context passed in onchanges calls after a o2m modification in the form view were the one of the parent object, whereas it should have been the context defined on the o2m field itself

closes odoo/odoo#103081

X-original-commit: 31ee570d17db2f5e3e2ff6877a7634ab9be12492
Signed-off-by: Quentin De Paoli <qdp@odoo.com>
Signed-off-by: William André (wan) <wan@odoo.com>
2022-10-11 17:59:43 +02:00
qdp-odoo 4420ad3935 [FIX] account: partner inconsistencies on invoices
How to reproduce:
Have 2 different tabs open on the same draft invoice
Tab 1: add a new invoice line
Tab 2: change the partner
Tab 1: save
Tab 2: save

Before the fix:
The new invoice line from tab 1 has the partner from before the change,
but the other lines have been updated to the new partner.

Expected:
All invoice lines have the same partner as the invoice itself

This use case can be reproduced like this manually, but it can happen
easily even on one tab because the OCR acts like the second tab if users
start to edit the invoice before it is scanned.

Note that in a perfect world, a warning would be raised to prevent any
loss/mischief due to concurrent editions of the same record but that's
beyond the scope of a bugfix made on a stable version.

opw-2777390
opw-2762347
opw-2741859

closes odoo/odoo#91705

X-original-commit: 2c5450af8d6f5934e6ab2095c3307b432fa3036a
Signed-off-by: William André (wan) <wan@odoo.com>
2022-05-19 12:28:16 +02:00
qdp-odoo 65dec306b9 [FIX] account: usability fix when no partner and journal set
when an account.payment object had no partner and no journal, the computation of is_internal_transfer was wrongly computed as True... and the information banner was displayed accordingly

closes odoo/odoo#77122

Signed-off-by: Quentin De Paoli (qdp) <qdp@openerp.com>
2021-09-24 15:49:58 +00:00
qdp-odoo bb61168f7e [FIX] account: prevent crash in account.payment
when removing the bank in an account.payment, the method _get_available_payment_method_lines() was called on an empty recordset which wasn't supported.

Part-of: odoo/odoo#77122
2021-09-24 15:49:57 +00:00
qdp-odoo 97026f803d [IMP] account: accrued SO/PO tracability imp
* order lines are now not grouped anymore by account. That allows a more detailed label on the accrual entry line, as it's now directly related to a single order line
* we now create a single accrual entry counterpart, instead of one per order previously. That reduces the 'noise' in the accrual entry, at the cost of not having the sum per ordre anymore easilly but it doesn't seem to be important to audit that account

closes odoo/odoo#76037

Signed-off-by: Quentin De Paoli (qdp) <qdp@openerp.com>
2021-09-09 13:17:28 +00:00
qdp-odoo 7b60ffaec4 [FIX] account: accrued SO/PO process
* the cache_invalidate() was invalidating the changes made in the wizard as well, make it impossible to set any value other than the default one, even though the preview entry was updated accordingly. That also prevented to simply validate the wizard as the accrual account was required but reset anytime we changed its value.
* the preview_data field was incorrectly set as Binary while the widget only supports Text

Part-of: odoo/odoo#76037
2021-09-09 13:17:27 +00:00
qdp-odoo 2dcbe92d78 [IMP] sale_stock, sale_timesheet, purchase_stock: accrual wizard now propose an amount taking care of the accrual date
This allows to solve the following use case:
* we are in March
* a SO created during January shows currently a delivered quantity (timesheet on service or delivered goods on storable products): timesheets/pickings were done in February
* creating the accrued entry for January 31 should display accordingly an amount of 0 by default since everything was done in February
Invoices invoice_dates are also taken into account:
* day 0 : delivered 10
* day 2 : 5 invoiced
* accrued entries for 10 if accrual date = day 1, accrued entries for 5 if accrual date = day 3,

followup of task 2255642

closes odoo/odoo#75886

Signed-off-by: Quentin De Paoli (qdp) <qdp@openerp.com>
2021-09-02 15:36:50 +00:00
qdp-odoo 03866fd2ce [FIX] account: nothing wrong unarchiving a journal with draft entries
Linked issue #75112. Patching commit https://github.com/odoo/odoo/commit/54b09df46fe0acf551e10070cbf6e669d340438d

closes odoo/odoo#75643

X-original-commit: 8021eab9cb86d8666764243e8ac7c843660042b1
Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
2021-08-27 18:46:10 +00:00
qdp-odoo bb1f14e728 [IMP] hr_expense: add "payment_status" field + change error msg
- Add "payment_status" field to be more explicit.
- Turn error message "Expenses must have an expense journal specified to
  generate accounting entries." into "Specify expense journal in tab
  Other Info to generate accounting entries."

closes odoo/odoo#65528

Task: 2424870
Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
2021-03-03 09:39:46 +00:00
qdp-odoo 8f5e137df7 [FIX] account: cash basis entry rate in multi-currencies
Flow:
- Make an invoice in foreign currency with a given rate
- Register a payment for that invoice, in company currency, worth the invoice amount_residual but with a different rate
=> The cash basis entry was wrongly taking a rate of 1 to make the conversion between the amount in foreign currency and the company currency (see new test)
=> Additionally, the amounts to report on the tax report should always be equal to the ones from the original invoice when it's fully paid. Some tests were wrong in that regard.

In order to fix the issue, the way the cash basis is handling the percentage and the way used to fix all rounding issues at the generation of the exchange difference entry is different:
=> The condition triggering the exchange difference items for the cash basis entry is now handling correctly the case when the payment is made using another currency but the amount in company currency is fully paying the invoice.
=> The complexe method '_fix_cash_basis_full_balance_coverage' defined in order to manage rounding issues on the tax report when the invoice becomes fully paid is no longer necessary since the balance of each account (base + tax account) is automatically fixed by the extra journal items added to the exchange difference.
Indeed, after the generation of the exchange difference journal entry:
- the balance of tax transfer account is now reset to zero.
- the balance of the tax account is exactly the balance of the tax transfer account defined on the invoice.
- the journal items containing the tax base amount is exactly equals to the balance of the invoice lines.

closes odoo/odoo#65939

X-original-commit: 6db073e8f1865991b79b5b31b4a4a77158aa0d15
Signed-off-by: Quentin De Paoli (qdp) <qdp@openerp.com>
Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
2021-02-11 10:31:09 +00:00
qdp-odoo 92a7f8c13f [IMP] base, tests: use freezegun lib to mock dates and datetimes
closes odoo/odoo#54227

Related: odoo/enterprise#11742
Signed-off-by: Olivier Dony (odo) <odo@openerp.com>
2020-07-10 08:20:13 +00:00
qdp-odoo 476028c14a [IMP] account, usability: added group_id in the account tree view
as per requested on #52948

closes odoo/odoo#53941

Signed-off-by: Quentin De Paoli (qdp) <qdp@openerp.com>
2020-07-02 07:00:04 +00:00
qdp-odoo 847889b497 [FIX] analytic, account: multi company fixes
added _check_company_auto and check_company attributes on relevant objects

Was task 2206523

closes odoo/odoo#46586

Related: odoo/enterprise#8986
Related: odoo/upgrade#993
Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
2020-03-26 13:22:58 +00:00
qdp-odoo 4f602d31b4 [FIX] l10n_be: CoA fix (accounts 446000 => 460000 and 461000)
- Remove the deprecated 446000 Acomptes reçus account
 - Create a new account 461000 Acomptes reçus (Current Liabilities)
 - Create a new acompte 460000 Acomptes à recevoir (Current Liabilities)

Was task 2205560.

closes odoo/odoo#46714

X-original-commit: 8d6c5c9a2b576b67692ac1d6970d7711f9695c79
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2020-03-03 10:42:29 +00:00
qdp-odoo e6d2b8e782 [FIX] account: allow invoices with a 0 total to be saved.
fixes #44687

closes odoo/odoo#45648

X-original-commit: 17fdda67e17ace6dc088aa33bddfd85aeac546bd
Signed-off-by: Quentin De Paoli (qdp) <qdp@openerp.com>
2020-02-18 14:39:04 +00:00
qdp-odoo a2489f7c59 [REV] account: reverse entry when account move line contains 0 in credit or debit
This reverts commit db691dbebf because the appropriate solution was to filter lines with 0 debit and credit during the reverse_move before the reconciliation (which apparently has already been done by another patch).

This patch, however, was causing the followup report to show lines on a receivable account with a partner and 0 balance with 0 way to remove them.

X-original-commit: 6a5271b7f4109a4f2a20378698fbe479d73ed9cb
2020-02-18 14:39:03 +00:00
qdp-odoo 4ddac940c8 [FIX] account: access rights for billing user on reconcile model
The recent refactoring made at 30cf7bc798 introduces a new object for the different writeoff lines that could be created from a reconciliation model. Unfortunately, Billing users were forgotten during that refactoring which made them unable to read/use the reconciliation models anymore.

This patch grants them the Read and Create permission on the new account.reconcile.model.line object, as they already have to the reconciliation model.

closes odoo/odoo#42009

Signed-off-by: Christophe Monniez (moc) <moc@odoo.com>
2019-12-17 12:20:08 +00:00
qdp-odoo 7037cf6ce8 [IMP] account: usability in account form view
closes odoo/odoo#41186

Related: odoo/enterprise#6989
Signed-off-by: Quentin De Paoli (qdp) <qdp@openerp.com>
2019-12-02 13:16:51 +00:00
qdp-odoo fd5264c5a5 [REV] account: reverts tags of the Indirect Method Cash Flow
This reverts commit 4f524dbad6 that was merged with PR #36206.

Those tags are unused, were added in account module by mistake (could maybe be acceptable in a l10n_xx module) and were rejected in master (at PR #35522) because of https://github.com/odoo/enterprise/pull/5052#issuecomment-540456794...

closes odoo/odoo#40575

X-original-commit: ed981b02fe2cd000c53f1f995b31c3860e0781c3
Signed-off-by: Quentin De Paoli (qdp) <qdp@openerp.com>
2019-11-20 15:47:36 +00:00
qdp-odoo 25dc27874e [FIX] account: type of entries created by reversals
Only invoices/bills should create their equivalent credit notes when reversed (with tax tags coming from the related repartition lines), other kinds of journal entries should be reversed as misc entries, to negate them entirely in the accounting

closes odoo/odoo#38547

X-original-commit: cdb3ccf811d69dbd18f196614f380349a1335c9f
Signed-off-by: Quentin De Paoli (qdp) <qdp@openerp.com>
2019-10-11 21:49:11 +00:00
qdp-odoo b33f98d81f [FIX] account, usability: field label renaming
closes odoo/odoo#38485

X-original-commit: 806456f7c7780a544958791e4ca47fbf8c2fa2fd
Signed-off-by: Quentin De Paoli (qdp) <qdp@openerp.com>
2019-10-11 09:58:13 +00:00
qdp-odoo 3c034e04d4 [FIX] account: fix CoA installation with only billing rights
When the only app installed is 'invoicing', people were getting an error while trying to generate the account.reconcile.model from its template. Could have done it in sudo(), truth is: account.reconcile.model object is not security critical

closes odoo/odoo#37622

Signed-off-by: Quentin De Paoli (qdp) <qdp@openerp.com>
2019-09-30 15:03:01 +00:00
qdp-odoo 5abad05e8b [FIX] account: tax audit field sign
Customer invoices and supplier refunds lines involved with taxes will be credit lines, hence their balance must be inversed when shown in the tax audit field.
The method is_inbound() encloses exactly those documents, whereas is_outbound() stands for customer refunds and supplier bills.

closes odoo/odoo#37092

Signed-off-by: Quentin De Paoli (qdp) <qdp@openerp.com>
2019-09-20 07:11:46 +00:00
qdp-odoo d604deccee [IMP] account: speedup of the aged partner balance
Removed a browse on partners made in a loop, for a substantial gain of time and DB queries.

Observed gain for a real data DB with 500 partners to print in the aged report:
time (ms)                  # queries
Before patch               4583                       1623
After patch                2932                        553
Gain                       1651 (36%)                 1070 (66%)

closes odoo/odoo#36488

Signed-off-by: Quentin De Paoli (qdp) <qdp@openerp.com>
2019-09-05 14:08:55 +00:00
qdp-odoo b70803dc04 [IMP] account: usability of journal items tree view
shortened the full_reconcile_id column by re-labelling it 'Matching #'. Asked in 2049120

closes odoo/odoo#36445

Signed-off-by: Quentin De Paoli (qdp) <qdp@openerp.com>
2019-09-05 07:48:44 +00:00
qdp-odoo f75fc4ed63 [FIX] account: journal items tree view not editable
Task 2008956

closes odoo/odoo#36205

Signed-off-by: Quentin De Paoli (qdp) <qdp@openerp.com>
2019-09-04 09:00:03 +00:00
qdp-odoo 1b91747d05 [FIX] account: fixed view_mode on specialized journal items tree view
removed form,kanban from view_mode on specialized journal items tree views

Task 2008956
2019-09-04 09:00:03 +00:00
qdp-odoo 1eb931f84b [IMP] account: better display name for journal entries
Task 2008956
2019-09-04 09:00:03 +00:00
qdp-odoo 90334b7db0 [FIX] account: aged partner balance with private partners
When hr is installed, with 'private' type, you should be member of
hr/officer group to read them, or you'll face an access right error.

closes odoo/odoo#34587

Signed-off-by: Quentin De Paoli (qdp) <qdp@openerp.com>
2019-07-04 12:30:44 +00:00
qdp-odoo 2337d4115b [FIX] sale: traceback in sales team dashboard
* Sales > Orders > Sales Team > traceback with error 'user_type_id' isn't defined on account.move.line.
* Also the move.team_id has to appear in some group by because we're using an aggregate function.

Both bugs have been introduced by beaa30a (aka accounting-pocalypse)

closes odoo/odoo#34570

Signed-off-by: Quentin De Paoli (qdp) <qdp@openerp.com>
2019-07-03 21:48:02 +00:00
qdp-odoo 7d19744f3e [MERGE] forward port branch saas-12.4 up to 3e3a244e1a 2019-07-01 13:55:24 +02:00
qdp-odoo 3309ecbd7a [IMP] account: find easily draft invoices for a partner
Requested in issue #28729

closes odoo/odoo#34114

Signed-off-by: Quentin De Paoli (qdp) <qdp@openerp.com>
2019-06-14 07:29:27 +00:00
qdp-odoo 19aa35fabb [FIX] account: fix test_account_move_tax_lock_date.
Make sure the move, journal and the accounts will share the same company to prevent undeterministic error in runbot ('Cannot create moves for different companies.')

closes odoo/odoo#32759

Signed-off-by: Quentin De Paoli (qdp) <qdp@openerp.com>
2019-04-17 08:34:48 +00:00
qdp-odoo 10551f25ab [FIX] account: don't mess the invoice status
Since the invoice validation is well separated from the account entries creation (and made before), the chatter was showing too much status change upon an invoice validation.
This commit makes sure we never consider an invoice paid when its move hasn't been created yet.

closes odoo/odoo#31100
2019-02-14 10:13:38 +00:00
qdp-odoo a02e277817 [IMP] account: keep numbering of reset-to-draft payments
Was github issue #25441

opw-1935427

closes odoo/odoo#30918
2019-02-07 13:33:41 +00:00
qdp-odoo 0237654113 [REF] base, account: removed useless @api.depends on name_get() 2019-01-30 09:16:26 +00:00
qdp-odoo 3ef3aeb640 [FIX] account: Added missing method to save template 2019-01-29 14:18:58 +00:00
qdp-odoo 19ece69850 [FIX] account: manual reconciliation from journal items
use cases fixed:
  1) go in the journal items, filter on unreconciled lines, pick just one and click on 'Action > reconcile', the manual reconciliation widget opens but you directly get the rainbowman and you can't do anything. It's not possible to reconcile the selected entry with a writeoff (to clear a customer account, for example).
  2) go in the journal items, select 2 receivable lines for the same amount but that don't have any partner set then click on 'Action > reconcile', the rainbowman directly shows without processing the reconciliation.

    To fix those issues, we now clearly bypass the regular methods in case we have active_ids and active_model == 'account.move.line', since they weren't adapted anyway.

    also implement real error message when selected lines don't have the same company or account (currently it's displaying a rainbowman): see error messages in 'reconcile()' in account_move.py

  OPW #1919727 and #1930957

  Co-authored by wan-odoo

closes odoo/odoo#29771
2019-01-25 12:21:16 +00:00
qdp-odoo c5a8e39758 [FIX] l10n_be_intrastat: adapt to new regulation for belgian intrastat
This is essentially a backport of module l10n_be_intrastat_2019 made for
Enterprise v12 + the refactoring needed on the original v10 module to
allow the changes to apply where needed.

Was requested by opw-1887019

closes odoo/odoo#30400
2019-01-22 07:22:59 +00:00
qdp-odoo 22637aadec [FIX] account: typo introduced in d44437f93830afae60e5354e0b4777413be29c93
closes odoo/odoo#29874
2019-01-03 09:21:50 +00:00
qdp-odoo 98313838da [FIX] account: aged partner report
The aged reports were wrongly taking the previous day of the requested date to compute the different report periods.
E.g: An aged balance requested for the 31-12-2018 was excluding entries made on the that exact date and was starting from the 30-12-2018

closes odoo/odoo#30195
2019-01-14 14:33:52 +00:00
qdp-odoo 57856c7536 [FIX] account: reconcilation widget in multi currency
utils.round_precision() is expecting a float as precision (0.01) whereas utils.round_decimals() is expecting the number of digits to consider after the coma (2).

The previous code was totally wrong in that regard, which led to reconciliation wrongly considered as total in foreign currency, as long as the amount_currency difference was lower than the currency precision digits.

closes odoo/odoo#30091
2019-01-10 09:05:46 +00:00
qdp-odoo 4fde773938 [FIX] account: don't propose partial reconciliation on blue lines
Create a vendor payment of 100€
Create a bank statement line with an amount lower than the payment
Open bank reconciliation view
Reconcile the bank statement line with the blue line of 100€, the triangle for partial reconcile appear.
Current behavior:
If you click the triangle, you can reconcile this payment with the statement line but it becomes unbalanced.

Expected behavior:
The triangle should not appear.

Fixes odoo#29654

closes odoo/odoo#29718
2018-12-21 15:53:21 +00:00
qdp-odoo 3d119415a2 [IMP] account: usability of payments
Backport of commit 771f65ecf5

Payments created without partner_type (field not required)
were previously not shown anywhere, as well as internal transfers.

opw 1910590

closes odoo/odoo#29647
2018-12-19 13:53:28 +00:00
qdp-odoo 299f9f1eb0 [REF] account: refactoring of the invoice validation
Better split of invoice_validate() and action_move_create() functions: the later now only deals with the account.move creation while the former assigns missing values (dates) and gets its number. The move now always receives its name from the invoice, which means there's no need anymore of the 'invoice' arg in account.move post() method.

We now also put the origin of the invoice in the move ref, in order to allow searching on that reference in the bank statement reconciliation widget.

closes odoo/odoo#29343
2018-12-07 10:29:16 +00:00
qdp-odoo fd7aa0cfa0 [IMP] sale: invoice creation for downpayments cleanup
don't set the SO name in the reference/description field of the customer invoice, as it's already copied in the origin field
2018-12-07 09:08:06 +00:00
qdp-odoo 069c2f2304 [FIX] account: fix invoice access rights
removed the access right that was granting the read access on invoices to any internal user, because there's no reason to do so.

Fixes #28486
2018-11-13 17:18:43 +01:00
qdp-odoo 3c36745672 [IMP] l10n_ch: adds a res.config.setting field for config parameter
commit 68dafa0620 introduced a solution to hide the Swiss QR code by default, by conditionning its display on the existence of an ir.config.parameter that one could manually add.
This commits creates the ir.config.parameter and relates it with a field in the accounting settings for more convenience for when we'd need to enable it

closes odoo/odoo#28654
2018-11-14 08:38:42 +00:00
qdp-odoo 68dafa0620 [FIX] l10n_ch: fix swiss QR Code crap
The specifications of this feature have not been frozen yet and the feature is not expected before mid-2020. Merging it in stable was premature.
There's now an ir.config.parameter to hide the feature until really needed: a field in the accounting settings will be added in a next version to show it, in the meanwhile people can manually add the parameter to use/test the QR code.

Also fixed all 3 typos/grammar errors in the single sentence message displayed when some pieces of information were missing while printing the QR code

Also fixed the place where the Swiss options for the ISR are displayed in the accounting settings (under 'invoices' instead of 'fiscal periods')

Also fixed a 'not-a-multiple-of-4' indentation.

closes odoo/odoo#28035
2018-10-23 07:21:02 +00:00
qdp-odoo 14884a18b4 [FIX] account_bank_statement_import: fix traceback on bank accounts creation
This completes the patch landed at https://github.com/odoo/odoo/commit/ac65a6df6d8461173d4059d0c431c90ae0622218 which was correct, except for that condition.

Fixes #27423

closes odoo/odoo#27870
2018-10-17 06:54:23 +00:00
qdp-odoo 91b7c8a6aa [FIX] account_bank_statement_import: fix crash when there's no import format available
When you run the setup wizard to add a bank from the setup bar, it will write 'file_import' on the field 'bank_statements_source'. But in the module 'account_bank_statement_import', the possible values of the field 'bank_statements_source' was updated with 'file_import' ONLY if additionnal account_bank_statement_import_xxx modules are installed.

So, prior this fix, if you only had the module 'account_bank_statement_import' and no additionnal bank statement import modules, you were getting a traceback.

Fixes #27423

closes odoo/odoo#27672
2018-10-11 10:26:23 +00:00
qdp-odoo 48b596d533 [FIX] account: Shorthand method names aren't supported in IE11 2018-10-01 12:12:52 +02:00
qdp-odoo 5fd19cc80e [REV] account: default taxes on default sale/expense accounts
This reverts commit c539311. The default taxes will now be found in the invoice's onchange() which makes more sense and will work on all income/expense accounts without having to set the taxes on all these accounts.
2018-09-14 17:29:49 +02:00
qdp-odoo c52d809032 [IMP] account: add setting to hide the products in bills
Was part of PR #26876
Was part of task #1882329
2018-09-14 10:21:02 +02:00
qdp-odoo c5393118c6 [IMP] account: set default taxes on default sale/expense accounts
This will allow default tax to be proposed when no product are entered in vendor bill encoding

Was part of PR #26876
Was part of task #1882329
2018-09-14 10:19:33 +02:00
qdp-odoo 005fbddbcd [FIX] account: caption position in reconciliation widget
Default position is now bellow, but in the reconciliation widget we want it above each line so we explicitly have to say it
2018-08-30 11:10:04 +02:00
qdp-odoo a86381831b [IMP] account: usability of journal
better names for journal sequences
2018-08-24 16:31:40 +02:00
qdp-odoo 97eff5b68b [FIX] account: usability in account.journal form view 2018-08-24 16:10:14 +02:00
qdp-odoo 206a0eef72 [FIX] account: usability of bank accounts 2018-08-24 12:12:07 +02:00
qdp-odoo 21ab939b4c [FIX] account: access rights on account.account.tag
Accountants should be able to edit, create or unlink tagsµ
2018-08-24 11:36:26 +02:00
qdp-odoo 0c34698c47 [FIX] account_voucher: unexpected error thrown when using a tax
In case of a sale receipt including a tax, the error 'cannot create unbalanced entry' was raised illegetimately. The reason was simply that the tax line was defining a debit instead of a credit.
2018-08-21 16:41:40 +02:00
qdp-odoo 858893494f [IMP] account: remove '/' in invoice's journal entries
Fixes #25938
2018-08-17 17:35:39 +02:00
qdp-odoo d519082137 [FIX] stock: fix module installation
In case there are multiple companies that need to call create_transit_location() at the installation of module, orm was crashing because expecting a singleton when doing self.partner_id or self.id
2018-07-26 02:18:37 +02:00
qdp-odoo 73d664f7f7 [FIX] l10n_generic_coa: bank statement demo data 2018-07-05 15:28:55 +02:00
qdp-odoo 2e074a2780 [IMP] account: keep numbering of reset-to-draft payments
Was github issue #25441
2018-07-02 10:38:31 +02:00
qdp-odoo 07c111fa72 [IMP] account: onboarding improvement
Improves the 'chart of account' step by showing all the accounts in the list instead of the default limit

Was part of task 1838269.
2018-06-22 13:05:19 +02:00
qdp-odoo d1a148a2ba [IMP] account: better order of details in aged partner balance report 2018-06-21 16:00:01 +02:00
qdp-odoo 6424111f7a [FIX] account: cash based taxes mixed with regular ones
Previously, the use case where a cash basis tax and a regular one were combined on the same invoice line (for example) was not supported (technically, there's a single boolean for the tax exigibility of the sale/purchase line). Since it appears this is a real need, this have been improved in the generic tax report (in enterprise repo) in revision https://github.com/odoo/enterprise/commit/f7e33b8114d4d649551a155d0ca8cc4f43f1fc01 and this commit fixes the community side, to copy only the base line of the tax exigibile on payments in the cash basis move
2018-06-20 17:18:21 +02:00
qdp-odoo 2bcff00065 [REF] account: dead code removal
since revision b30fed7a7b the model account.opening does not exist anymore, that function was deadcode leftover.
2018-06-20 16:42:00 +02:00
qdp-odoo 660be186fd [FIX] test_main_flows: let the redbot go green 2018-06-08 20:50:48 +02:00
qdp-odoo e0591346a4 [FIX] purchase: fix test_main_flows.
The action 'account.action_invoice_tree2' has been changed into a server action, so we want to open the tree view of invoices by modifying some values of the action we should now use the xml reference 'account.action_vendor_bill_template'.

Additionally, the help tooltip is now completed as would do the server action
2018-06-07 11:28:11 +02:00
qdp-odoo a6b75d401d [REF] mail_thread: refactoring of _find_partner_from_emails()
More flexibility equals more powa
2018-06-06 14:17:03 +02:00
qdp-odoo 579b233d38 [FIX] l10n_fr_certification: can't change module dependancies on stable version
Commit https://github.com/odoo/odoo/commit/2eb344f23b3a9daa8e7c7ddaead145a8b05b39bf changed the dependancies of l10n_fr_certification which is not acceptable on stable. Instead, the method to check is now moved in account module (to avoid duplicated) and it is called by l10n_fr_certification and account_lock module.
2018-05-31 14:37:24 +02:00
qdp-odoo d5359cfcf4 [FIX] l10n_be: fix installation of module
The previous commit https://github.com/odoo/odoo/commit/7a31a92afa9a2ad280a6ec110fc9547e48b89466 removed the liquidity transfer account template to replace it with a system of prefix like we already had for bank/cash accounts. However, that transfer account template was used as account_id in an account.reconcile.model.template object.

To fix that, at the creation of chart template (using _update() of ir.model.data, because we need to have the module/xml_id reference) we create the account.account.template and its xml reference in ir_model_data table

Was OPW https://www.odoo.com/web?#id=1851523&action=333&active_id=1278&model=project.task&view_type=form&menu_id=
2018-05-29 13:52:12 +02:00
qdp-odoo 7bd1694008 [FIX] hr_payroll: removed deprecated-and-broken menuitem 2018-05-29 10:44:56 +02:00
qdp-odoo 98fa196e00 [FIX] l10n_be: fix installation of module
The previous commit https://github.com/odoo/odoo/commit/7a31a92afa9a2ad280a6ec110fc9547e48b89466 removed the liquidity transfer account template to replace it with a system of prefix like we already had for bank/cash accounts. However, that transfer account template was used as account_id in an account.reconcile.model.template object.

To fix that, at the creation of chart template (using _update() of ir.model.data, because we need to have the module/xml_id reference) we create the account.account.template and its xml reference in ir_model_data table

Was OPW https://www.odoo.com/web?#id=1851523&action=333&active_id=1278&model=project.task&view_type=form&menu_id=
2018-05-25 16:49:08 +02:00
qdp-odoo 82592edaba [REF] account: removed company_id field on account.chart.template
Because that field doesn't have any meaning on a template object...
2018-05-25 16:49:08 +02:00
qdp-odoo 2a3048316e [REF] account: removed company_id on account.tax.template
Because this field doesn't have any meaning on a template object...
2018-05-24 15:14:54 +02:00
qdp-odoo 01216345e2 [REF] account,payment(_*),sale*: downgrade transactions into debug items
It was very confusing for the user to distinct account.payment and payment.transaction. From now on, the transactions are
technical objects and, in the backend, we only refer to it in log messages (Front end will be adapted in the same fashion
later on). They are hidden in debug mode in accounting\configuration\payments as their purpose is now purely technical/log

This commit also aims to reduce the gap between the accounting app and the transactions: account.payment objects are
created/validated upon completion of transaction.

To ease the capture/voiding of pending transactions, the related buttons are now displayed directly on the SO/invoice
instead of the transactions.

Was task: https://www.odoo.com/web#id=35857&view_type=form&model=project.task&action=333&active_id=967&menu_id=4720
Was PR #24043

[FIX] add domain based on journal to payment tokens

Was opw: https://www.odoo.com/web?debug#id=1828206&view_type=form&model=project.task&menu_id=5200
2018-05-23 15:44:55 +02:00
qdp-odoo e2864c87a2 [FIX] account: tax cash basis for supplier vendor bill
Fixes #24743
2018-05-18 17:04:09 +02:00
qdp-odoo 6558d52e9b [FIX] account: adjustment wizard usability
This commits removes a disambiguation on the choices of the 'Adjustment Type' selection as 'in your favor' could be achieved by debitting the 'Collected Tax' account or creditting the 'Paid Tax' accounts (respectively for 'in favor of the Estate'). The choices now refers directly to the journal item where the tax is gonna be copied

Related to https://github.com/odoo/odoo/commit/c58ef14a01f600d75391f2a9c38bb2b30e0e2528
Related to OPW 1826242
2018-05-15 16:47:38 +02:00
qdp-odoo f53d9c369d [IMP] analytic: slightly improves demo data
by adding an analytic group to analytic accounts
2018-05-15 15:06:39 +02:00
qdp-odoo d5cf6be26e [IMP] account: make currency_exchange_journal_id field visible in settings 2018-05-15 15:04:17 +02:00
qdp-odoo f5ab17dd53 [FIX] base_vat_autocomplete: vat field label on res.company form view 2018-05-07 10:40:00 +02:00
qdp-odoo fd53539f8e [FIX] account: fix unreconciliation with several exchange rate entries
Use case fixed: manual reconciliation through the account.move.line list of items with several currencies, that will create a full reconcilation with several exchange rate entries to balance the amounts in all foreign currencies. Unreconciling these lines was wrongly creating an account.move with a lot of lines with debit = credit = amount_currency = 0.
2018-04-25 16:20:37 +02:00
qdp-odoo b9ce1affbf [REV] account: reverts commit 0351b492d5.
Unexpected runbot failure detected. Pach reverted for further investigation. Sorry for the disturbance
2018-04-24 12:10:06 +02:00
qdp-odoo 0351b492d5 [FIX] account: fix unreconciliation implying several exchange rate entries
Use case fixed: manual reconciliation through the account.move.line list of items with several currencies, that will create a full reconcilation with several exchange rate entries to balance the amounts in all foreign currencies. Unreconciling these lines was wrongly creating an account.move with a lot of lines with debit = credit = amount_currency = 0.
2018-04-24 10:46:51 +02:00
qdp-odoo 61fe7a7820 [FIX] account: allow switching from CoA if empty moves exists
This is needed in case we open the Chart of Account step from the configuration bar, as it will silently create the opening journal entry
2018-04-24 09:21:01 +02:00
qdp-odoo fef949047c [FIX] account: missing default for company_id in _convert 2018-04-23 13:26:53 +02:00
qdp-odoo 204935119d [FIX] account: default journal on payment shouldn't be misc
This was fixed by https://github.com/odoo/odoo/commit/8327b67cf5498a1d9d133ec02f0e7619c4ce26d1 but somehow lost in the forward port I suppose
2018-04-19 10:59:24 +02:00
qdp-odoo ccd58febd4 [FIX] base, account: usability on company currency selection.
We now display all the existing currencies (even the unactivated) instead of a link to activate more of them, and upon the save we make sure to activate the selected currency if it's not yet the case. That's better from a point of view since it avoids jumping off of the screen then come back to make this setting
2018-04-19 10:59:24 +02:00
qdp-odoo b874448e79 [FIX] base_vat: import missing file
A whole XML file was missing in the initial import which had as effect to still display 'TIN' instead of 'VAT' in the res.company form view even if the module was installed
2018-04-19 10:59:24 +02:00
qdp-odoo 23bf2ba33a [FIX] base_vat_autocomplete: enable feature on res.company
Filling the VAT on the company form will now call VIES to try to fill the rest of the company address
2018-04-19 10:59:24 +02:00