Commit Graph
1672 Commits
Author SHA1 Message Date
Stéphane Bidoul 9224313e34 [IMP] account: search on parent_state instead of move_id.state
By searching on account.move.line parent_state instead
of move_id.state, we avoid a join in many circumstances
and allow the database to benefit on an index on
company_id+parent_state to optimize several
queries, such as the default filter on the Journal Items
menu which shows posted items.

closes odoo/odoo#82504

X-original-commit: ef61db1cf8ebf1ab11e5dfdd439256d0607edba8
Signed-off-by: Quentin De Paoli <qdp@odoo.com>
Signed-off-by: Florian Gilbert <flg@odoo.com>
2022-01-11 06:48:27 +00:00
Stéphane Bidoul 35f8e21c65 [IMP] account: avoid join when filtering on journal
account.move.line has a journal_id field that is related on move_id.journal_id.
By searching on journal_id we avoid a useless join,
offering more room for database query optimizations.

closes odoo/odoo#81856

X-original-commit: 2741f245f8a47e971309e97128662f1863329e45
Signed-off-by: Quentin De Paoli <qdp@odoo.com>
Signed-off-by: Florian Gilbert <flg@odoo.com>
2022-01-10 14:49:49 +00:00
oco-odoo 5817e69a56 [IMP] account: reconciliation models: No confusing label anymore for "Match Invoice/bill with"
This label was defined with 'for="match_text_location_label"', even though it actually isn't met for just that field, but for the three boolean fields allowing to choose where to match on the statement line. As a consequence, in debug, it displayed the helper of that field, which was confusing for the user.

closes odoo/odoo#81730

X-original-commit: a89c6300f3b9b22fc4e18b286f2f28734e750638
Signed-off-by: Laurent Smet <las@odoo.com>
Signed-off-by: Olivier Colson <oco@odoo.com>
2021-12-21 15:55:56 +00:00
Camille Spiritus fbb5b074f7 [IMP] account: rename non-trade filtering option, spread its use
Renamed the 'Other' account type into 'Non Trade' to enhance clarity and coherence

Changed the filtering system in the accounting search view to improve coherence with the filtering system available in the reports.
It is now possible to filter the trade/non trade accounts in the accounting views.
This change may be overriden by default selections already in place.

Renaming Receivable/Payable to Trade Receivable/Trade Payable could have turned out to be confusing for accustomed users.

They are now renamed Receivable/Payable, though the Non-Trade option is still present.

task-2669128

closes odoo/odoo#79752

Related: odoo/enterprise#21773
Related: odoo/upgrade#3004
Signed-off-by: Laurent Smet <las@odoo.com>
2021-12-21 12:54:54 +00:00
Julien Van Roy e4818b6821 [IMP] account: Invoice / Bill Outstanding Debit / credit improvement
This commit:
1) fixes the customer invoice/vendor bill outstanding debit/credit warning anchor link
2) improves the customer invoice/vendor bill outstanding section
3) fixes the customer invoice/vendor bill outstanding debit/credit warning messages when viewing an account move reversal
4) modifies the order of the 'invoice lines' tab for mobile view

1) The anchor link did not work when pointing to a field (the id of a field is not propagated into the DOM).
Hence,the target field is put inside a div with the correct id.

2) The outstanding section is placed to the right, below the amount due and next to the description for clarity purpose.
The 'Add' button is turned into a secondary button (s.t. it is more noticeable). Each entry name is now a link to to the corresponding account move.

3) The warning messages are modified because they were not consistent and confusing when viewing an account move reversal.

4) Previously, the order on the 'invoice lines' tab was: narration>total>widget, now it is: total>widget>narration

task-2669132

closes odoo/odoo#78550

Signed-off-by: Laurent Smet <las@odoo.com>
2021-12-15 09:26:54 +00:00
Camille Spiritus 3732aea4b8 [IMP] account,sale: move partner_shipping_id field from sale to account
The computation of 'partner_shipping_id' is now done using a 'compute' instead of 'onchange'.

task-2601934

closes odoo/odoo#78449

Related: odoo/enterprise#22098
Related: odoo/upgrade#3000
Signed-off-by: Laurent Smet <las@odoo.com>
2021-12-14 14:47:25 +00:00
Laurent Smet 26a5d7d299 [FIX] account: Fix available_partner_bank_ids in payment & register payment wizard
When paying an expense, we should take the bank accounts from partner instead of the ones set on the company.
Also, the computation of the partner bank account is different on the wizard and the payment.
To unify both models, the 'available_partner_bank_ids' should also be put on account.payment.

see https://github.com/odoo/odoo/pull/79737

closes odoo/odoo#81236

X-original-commit: 89d8c0a1ea03919e9f3085ea0d05aa80ad443ff7
Signed-off-by: Olivier Colson <oco@odoo.com>
Signed-off-by: Laurent Smet <las@odoo.com>
2021-12-10 16:24:45 +00:00
jbw bc772f4784 [IMP] account: track lock dates changes
Allow log date changes tracking by adding chatter on company and tracking lock date fields.

closes odoo/odoo#78730

Task: 2651834
Related: odoo/enterprise#22479
Signed-off-by: Laurent Smet <las@openerp.com>
2021-11-25 09:13:47 +00:00
Julien Van Roy c31f971508 [IMP] account: hide field currency on misc journal
- Hide the field 'currency' on the journal entries (for the miscellaneous journals only) because it is neither necessary functionally nor doing anything technically.
- Accounting journal views: amount in currency is made optional (shown by default)
- Journal entry view: currency is made optional (hidden by default)

closes odoo/odoo#79486

Purpose: lighten the user interface/make it clearer
Signed-off-by: Quentin De Paoli (qdp) <qdp@openerp.com>
2021-11-24 14:04:28 +00:00
jbw 82763d81bf [FIX] account: fix manual reconciliation widget
- set journal_id, tax_ids, analytic_account_id, analytic_tag_ids & force_tax_included as optional hide
- fix _get_write_off_move_lines_dict to make clicking a reconciliation model button have the same result as doing the operation manually :
    - add journal_id parameter
    - use reco line label in new aml name

closes odoo/odoo#80176

Task: 2611348
X-original-commit: 4514f0ec4a1eebb4652c34c4926d0cd1ff336e17
Related: odoo/enterprise#22435
Signed-off-by: Florian Gilbert <flg@odoo.com>
Signed-off-by: Laurent Smet <las@openerp.com>
2021-11-23 14:42:05 +00:00
Martin Trigaux a8e50921af [FIX] *: correct typos and English errors
closes odoo/odoo#80181

X-original-commit: efd178daee689192d4e930a075475587038b3e0d
Related: odoo/enterprise#22439
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2021-11-22 14:48:04 +00:00
Fabio Barbero 1a9b6422ff [IMP] digest: organise digest view
Purpose
=======

Give the user a more organized view of the digest KPIs in the backend and
improve global wording of digest sections and KPIs.

Specifications
==============

Reorganize order of KPIs in digest view. Fix some typos, move buttons in
list and form views.

Task-2582128

closes odoo/odoo#77507

Related: odoo/enterprise#21340
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2021-11-16 19:20:57 +00:00
anhe-odoo 93f17e9e3c [FIX] accouting: fix 'unpaid invoice' filter on main dashboard
Expected Behaviour

When clicking on the "XX Unpaid Invoices" link on the main dashboard of the accounting app, we should get to a list view with only unpaid (and partially paid) invoices

Observed Behaviour

When cliking on the link, we get all the invoices, even the paid ones.

Reproducibility

This bug can be reproduced following these steps :
1. Create some invoices
2. Make sure some of them are paid and some are not
3. Go to the main dashboard
4. Click on the "XX Unpaid Invoices" link in the "Customer Invoices" app

Problem Root Cause

The problem comes from a change in the filter name from V14 to V15 ("unpaid" category has been replaced by "open").

Related issues

opw-2681099

closes odoo/odoo#79643

X-original-commit: 9212d07c5919470361b638f0e70c2069957c7d6f
Related: odoo/enterprise#22221
Signed-off-by: Olivier Colson <oco@odoo.com>
Signed-off-by: Hendrickx Anthony (anhe) <anhe@odoo.com>
2021-11-16 08:20:26 +00:00
Thibault Delavallée 3659546738 [IMP] mail, various: support email notification xmlid at model level in composer
RATIONALE

Currently we can specify email used for notification layouting through context
use in mail composer. It is then propagated to message_post, stored on
mail.message and used to encapsulate emails sent based on posted messages.

SPECIFICATIONS

Get rid of context usage (``custom_layout``) and use a real field on composer
model: ``email_layout_xmlid``. Use now a default value coming from context
(default_email_layout_xmlid) instead of custom_layout.

Support old context key in composer for backward compatibility, working like
a default value for the field itself.

Task-2621326 (Mail: add 'view' button in 'light notification template')
Task-2647302 (Mail: add layout field in composer)
UPG odoo/upgrade#2829

Part-of: odoo/odoo#76418
2021-11-10 09:58:09 +00:00
Aktiv Software 9e35bcf667 [FIX] account: currency symbol not displayed in Subtotal and total amount
Under account.document_tax_totals template the subtotal and total were using the float amounts for printing.

There was the formatted currency returned from _compute_tax_totals_json but not printed.
This commit uses the formatted_amount and formatted_amount_total keys to display the amount with currency on PDF and portal view.

closes #77996

closes odoo/odoo#79153

X-original-commit: a2dbc4eb40a868860a7f8448a680a9f0e2ed16f4
Signed-off-by: Olivier Colson <oco@odoo.com>
Signed-off-by: William André (wan) <wan@odoo.com>
2021-10-28 16:08:53 +00:00
jbw 1273eb3f1e [IMP] account: set is_base_affected only visible in debug
Make tax field "Base Affected by Previous Taxes" only visible in debug mode.

closes odoo/odoo#78733

Task: 2608764
Signed-off-by: William André (wan) <wan@odoo.com>
2021-10-26 13:22:21 +00:00
Wolfgang Taferner be28be1eb0 [FIX] account: only display qr code if residual > 0
In case an invoice is already paid it is useless to provide
a QR Code for scanning to pay a residual of zero.

closes odoo/odoo#78437

X-original-commit: bfb5bcc07465240b0952e031522dd513dff8c2ab
Signed-off-by: oco-odoo <oco-odoo@users.noreply.github.com>
2021-10-15 16:13:51 +00:00
william-andre b57b884430 [FIX] account: allow to edit some fields with Invoicing only
The only fields added in
`//page[@name='invoicing']//group[@name='accounting']`
are `unspsc_code_id`, `intrastat_id` and `email_template_id`, which
should all be available with only the rights for invoicing.

opw-2665030

closes odoo/odoo#78260

X-original-commit: 1f69445f0a7ed02030f3f16f126e34b0d507ed80
Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
Signed-off-by: William André (wan) <wan@odoo.com>
2021-10-12 18:11:56 +00:00
oco-odoo 26c2c705e4 [FIX] account: carryover lines: improve view
- allow editing the date of a carryover line manually

- don't display the tax report line the carryover line is linked to anymore, as the user goes through this line to open the carryover line anyway, and it shouldn't be editable.

- also remove a domain that made no sense on carryover lines: pointing to a related field depending on the field defining the domain

Manual forward-port of https://github.com/odoo/odoo/pull/77718

closes odoo/odoo#78213

Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
2021-10-12 12:56:55 +00:00
oco-odoo 394e24396b [IMP] account: foreign VAT fiscal positions: add a button to open the list of l10n modules to the banner for the admin
Before, when someone with settings rights created a foreign VAT fiscal position for a country in which there was no tax template yet, a banner was displayed, telling that the right l10n module needed to be installed. However, there was no link to the list of modules, and the user had to go back to the app switcher, then to the Apps menu to install the module he needed. We now display a link to this page, only for the users with setting rights. Other users will still see the same thing as before.

Manual forward-port of https://github.com/odoo/odoo/pull/77687

closes odoo/odoo#78209

Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
2021-10-12 12:56:51 +00:00
Mathieu Duckerts-Antoine 85b8a95116 [REF] *: clean some useless %% in xml files
The commit https://github.com/odoo/odoo/commit/1b40e9265f88f57aaaf311bb8fae3d1fd1966d7d
allows to get rid of most escapings %% in xmls but there were still occurences
of useless %% in some of them. We remove them.

closes odoo/odoo#78069

Related: odoo/enterprise#21553
Signed-off-by: Géry Debongnie (ged) <ged@openerp.com>
2021-10-11 12:34:47 +00:00
kir-odoo d4fb97e655 [IMP] account: align the label of fields narration in both
Purpose of the task is to:
1) Label becomes "Notes" rather than "Terms & Conditions".
2) Fields reorganization from left to right.

So in this commit, Updated Label "Terms & Conditions" to "Notes", Fields
reorganization from left to right in 'account.bank.statement' and
'accont.bank.statement.line' model and make group_by bank statement.

Links
Task - 2613132

closes odoo/odoo#77454

X-original-commit: ce4234c98a701c0071228827187471db167a3bdb
Related: odoo/enterprise#21287
Signed-off-by: Florian Gilbert <FlorianGilbert@users.noreply.github.com>
Signed-off-by: Quentin De Paoli (qdp) <qdp@openerp.com>
2021-10-11 11:27:37 +00:00
Laurent Smet e4926a24da [FW][IMP] account: partner_id not required in payment form view
Create a payment without a partner for a receipt
Go to the form view
Click on the stats button.
=> Error, 'partner_id' is required

In some cases, having the partner not required on the view is needed.

closes odoo/odoo#78124

Task: 2610780
Forward-port-of: https://github.com/odoo/odoo/pull/77727
Signed-off-by: Quentin De Paoli (qdp) <qdp@openerp.com>
2021-10-11 09:02:37 +00:00
Swapnesh Shah 96720339d5 [FIX] account: disable group create from AML Kanban
This commit removes `Add a column` from Grouped
Kanban view of Journal Items.

Creating new Records from `Add a column` should not be supported
from Journal Items and also it is not working for Journal/Account
as required fields are not set. (and also gives Traceback)

closes odoo/odoo#78074

X-original-commit: 21fe5c65fd3170ebfa01ea9a6b530d158f6c0c8e
Signed-off-by: Quentin De Paoli (qdp) <qdp@openerp.com>
2021-10-08 16:09:41 +00:00
Joseph Caburnay 7eb742f6b8 [FIX] point_of_sale: post diff on bank payment methods when closing the session
1. When the diff amount is for "combine" bank payment method, the
account.move record used to represent the combine amount is modified
to contain the diff amount. The journal entry is modified:

FROM:
```
                Debit                           Credit
Outstanding     combine_amount
Receivable                                      combine_amount
```

TO:
```
		Debit				Credit
Outstanding 	combine_amount - diff_amount
Receivable					combine_amount
Diff account	diff_amount
```

2. When the diff amount is for "split" bank payment method, an
account.move moving the diff amount from Outstanding to Diff account
is created. The journal entry is like:

```
                Debit                           Credit
Outstanding     diff_amount
Diff account    				diff_amount
```

closes odoo/odoo#77859

Signed-off-by: pimodoo <pimodoo@users.noreply.github.com>
2021-10-08 11:46:44 +00:00
Victor Feyens ab022ec12d [FIX] *: target v15.0 documentation with doc links
X-original-commit: acc95ec204baa1dddbe292c379a1768fe1deccbf
Part-of: odoo/odoo#77923
2021-10-07 17:59:52 +00:00
oco-odoo e4f9859722 [IMP] account: improve fiscal positions' form view
The 'Country Group' field should be displayed under the 'foreign VAT' one, so that it its grouped together with 'Country' and 'Federal states'.

X-original-commit: 302586c6b35825e19945b92faa48ccc892179ea6
Part-of: odoo/odoo#77663
2021-10-04 09:16:25 +00:00
oco-odoo dfce5361a0 [IMP] account: add preceding_subtotal as optional field in tax groups' tree view
For usability.

closes odoo/odoo#77662

X-original-commit: 360ed18185a420eaccfa1c47aaeee931c7f1fa55
Signed-off-by: Quentin De Paoli (qdp) <qdp@openerp.com>
Signed-off-by: oco-odoo <oco-odoo@users.noreply.github.com>
2021-10-04 07:57:18 +00:00
oco-odoo ba126f6af6 [IMP] account: add debug menu to see tax groups
No menu allowed viewing all tax groups at once before. With the new subtotals features, it could become painful for the user if he wanted to change the groups' sequence in order reorder subtotals on his invoices (he had to change the sequence manually on each group, accessing their form view through taxes using them). It is now possible in the tree view opened by our new menu, with the sequence widget.

X-original-commit: 708899fc0e1a793f29884d82b34ba6c492461737
Part-of: odoo/odoo#77662
2021-10-04 07:57:18 +00:00
Nicolas (vin) eab2a5ce54 [IMP] account: hide journals without payment method line
When registering/creating payments, filter out from the selection
the journals that do not have any relevant payment method lines.

Also, always show payment method lines even when there are only
one of them.

closes odoo/odoo#74741

Related: odoo/upgrade#2861
Signed-off-by: Quentin De Paoli (qdp) <qdp@openerp.com>
2021-09-30 18:27:49 +00:00
Swapnesh Shah 81d26dcee6 [FIX] account: disable aml creation from kanban
Steps:
- Go to Journal Items
- Switch to Kanban View
- Click on create

Issue:
- Traeback due to unknow currency

Fix:
Journal Items are not created individually so we have disabled
`Create` button in Kanban view.

closes odoo/odoo#77262

Fixes: odoo#76543
X-original-commit: fa29cd974a9d024349e937b547abe5a6ca522c6d
Signed-off-by: Florian Gilbert <FlorianGilbert@users.noreply.github.com>
Signed-off-by: William André (wan) <wan@odoo.com>
2021-09-28 09:29:14 +00:00
Swapnesh Shah 37d1eba7ad [FIX] account: remove upgrade_boolean from community module
Module `account_check_printing` exist on community edition so
It doesn't makes sense to apply `upgrade_boolean` widget on that.

However, It is necessary to have supported modules installed to
use Check Layout.

closes odoo/odoo#77145

X-original-commit: adc24d9082933f801f972fa93e1866be194c8b7a
Signed-off-by: Florian Gilbert <FlorianGilbert@users.noreply.github.com>
2021-09-24 12:35:13 +00:00
jbw 631440e567 [FIX] account: fix 'upload bill tour' bill layout
- add outer shadow to bill in wizard preview
- move address block to right in generated pdf, same as in wizard preview
- set invoice date & due date on one line in pdf, same as in wizard preview

closes odoo/odoo#77093

Task: 2581377
X-original-commit: ecf2bba66782cd8b2455bf656cdf2a41fafecf89
Signed-off-by: Quentin De Paoli (qdp) <qdp@openerp.com>
Signed-off-by: jbw-odoo <jbw-odoo@users.noreply.github.com>
2021-09-24 11:08:44 +00:00
dbkosky 516c414683 [FIX] account: typo, change active to activate
closes odoo/odoo#76904

Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
2021-09-23 11:25:53 +00:00
oco-odoo 62e72ca121 [FIX] account, l10n_eu_oss: make OSS report work with cash basis OSS taxes
Before this fix, a cash basis OSS tax used together with a product using the "non-EU origin" tag didn't appear properly in the OSS import report. This was due to the fact the product tag was not copied on the cash basis move: it only appeared on the invoice, on non exigible lines.

To fix that, we make the choice to keep the product tag as markup on the invoice, and to copy it to the cash basis lines created from move lines containing this tag. We therefore need a non-ambiguous way to identify account.account.tag objects that are used on products, since we don't want to copy tags used by taxes. Hence, we introduct a new value for the 'applicability' field of account.account.tag, limitating their use to products.

closes odoo/odoo#76626

X-original-commit: 0dd712b876844c3e342447e4cf26b324fcaffc37
Related: odoo/enterprise#20916
Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
Signed-off-by: oco-odoo <oco-odoo@users.noreply.github.com>
2021-09-16 08:36:18 +00:00
Mitul Shah c1ea516aa7 [IMP] various: improves button titles for better command palette
Currently, in some of the important business objects' form views,
few header buttons are missing the title, and so the command palette
displays the button string which is not very clear/useful.

This commit improves the behavior by adding titles to the buttons. Below
are the model wise actions/methods linked with updated buttons:

 - preview_invoice (account.move)
 - action_sale_quotations_new (crm.lead)
 - action_set_lost (crm.lead)
 - action_set_won_rainbowman (crm.lead)
 - crm_lead_lost_action (crm.lead)
 - iap_enrich (crm.lead)

Task-2622266

closes odoo/odoo#75935

Related: odoo/enterprise#20680
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2021-09-15 07:48:06 +00:00
Habib (ayh) bbb9c957eb [IMP] account: simplify invoice payment status filters
Modify search filters on the invoice views:
Open -> Unpaid (not_paid & partial)
Closed -> Paid (in_payment & paid)
Overdue -> Overdue

[FIX] journal kanban view "late invoices/bills" should not include due date = today

Task 2635664

closes odoo/odoo#76362

X-original-commit: fa15c73a087bd6b5a81aa448df2e0a8654213246
Signed-off-by: Quentin De Paoli (qdp) <qdp@openerp.com>
Signed-off-by: Habib Ayob <h4818@users.noreply.github.com>
2021-09-10 17:14:02 +00:00
Mathieu Duckerts-Antoine 7545913020 [REF] *: graph archs cleaning
We clean various graph archs taking into consideration that:
 - the default type of a graph is "bar".
 - a bar chart is by default stacked.
 - the field attributes type="row" and type="col" does not make sense for
   a graph view (since its implementation was separated from the pivot
   implementation a long time ago))
 - the boolean attributes should now take 1 or 0 as value (but the other
   values are accepted for retrocompatibility).

Part-of: odoo/odoo#76065
2021-09-07 15:50:14 +00:00
wan fa034b2a64 [IMP] *: product back2basics 15.0
Rework the whole view, generally.

task-2605931

Part-of: odoo/odoo#75862
2021-09-07 15:50:00 +00:00
jbw 299ef94bcb [IMP] account: 'Import First Bill' Modal Improvement
Improve the wizard 'import your first bill':  usability + look & feel
    - Removed the PDF viewer interface which was ugly + useless in this context
    - Display an HTML preview instead which is dynamic
        - Current date
        - Company address depending on the Company
        - bill sequence depending on the date

In the modal of upload, detect if there is no hosting domain @false > then remove this third option

PR #75815

Task: 2581377
Related: odoo/upgrade#2806
Signed-off-by: Quentin De Paoli (qdp) <qdp@openerp.com>
2021-09-06 12:03:10 +00:00
oco-odoo 0ebe0ede45 [MOV] l10n_eu_oss: new name for l10n_eu_service
This module is now used to support OSS taxes, which replaced MOSS a few months ago. This renaming follows the changes introduced in stable by https://github.com/odoo/odoo/commit/0e7c289003a0a69075188dbfaea724919dac32a4 .

[IMP] l10n_eu_oss: remove dead code from former l10n_eu_service feature

[IMP] account, product, l10n_eu_oss: community adjustements to support enterprise's OSS report

The following changes where introduced in order to support the features implemented in the new l10n_eu_oss_reports module:

- account.tag objects applicable on taxes are no longer required to have a country_id. This way, we allow using tags in generic reports (i.e. the ones available for multiple countries) as well.

- add account_tag_is on product.template and product.category: this fields are m2m to account.account.tag applicable on taxes. When making an entry from this product, these tags will be set on all the tax move lines created for it. We use it in OSS to differentiate between imported and non-imported goods in the report.

- always display country_id on fiscal positions' form view: OSS taxes require to be used in some fiscal position with a country_id set, so that we can infer the country they are mapping the vat from. We make that change in the view so that users are not obliged to create auto-applied fiscal positions to fix the OSS taxes they created manually, and can directly set the country on the fiscal position.

Task 2591541

closes odoo/odoo#73602

Related: odoo/upgrade#2669
Related: odoo/enterprise#19628
Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
2021-09-04 05:21:05 +00:00
Sébastien Geelen (sge) 464b454953 [FIX] web,account: fix css for report comments
Since we change the editor for the comments on invoices,
The layout was a bit broken with some unwanted spacings.

task-2586137

Part-of: odoo/odoo#75863
2021-09-03 08:11:57 +00:00
oco-odoo 5419fe445d [IMP] account: allow instantiating taxes from foreign charts of accounts
In multivat setup, we need to create taxes in foreign countries to map them with domestic taxes. Before this commit, this was only possible manually, even though all the necessary information lies in Odoo's account.tax.template objects created by l10n modules.

We now display a banner on top of foreign vat fiscal positions with a button allowing instantiating those templates directly from them when it's appropriate.

closes odoo/odoo#75803

Task: 2453325
Related: odoo/enterprise#20553
Signed-off-by: Quentin De Paoli (qdp) <qdp@openerp.com>
2021-09-03 02:03:43 +00:00
oco-odoo d9a3b938fe [IMP] account, sale, purchase, l10n_latam, l10n_ar: add the possibility to use subtotals above tax groups when displaying them
A new field on tax groups makes it now possible for this group to be displayed under a subtotal label. If not set, this defaults instead to "Untaxed Amount", keeping the traditional behavior. This is intended for withholding taxes, which can now be implemented with negative taxes and a tax group with this field set.

To do that, this commit entirely refactors the way amount_by_group worked, and replaces it with a more complete json field called tax_totals_json. It also streamlines the way taxe totals are displayed on invoices, PO and SO and makes it so that a common code is called instead of copy-pasting the same block 3 times as before.

[IMP] purchase: always display tax totals by groups on purchases orders

Before, tax totals on purchase.order's form were not shown by group, and were instead all aggregated in a single "Taxes" category. The same went for the pdf export. The portal view, though, did show the totals by group. We now display the tax groups in the same way all the time.

closes odoo/odoo#74138

Task: 2457374
Related: odoo/enterprise#19802
Related: odoo/upgrade#2670
Signed-off-by: Quentin De Paoli (qdp) <qdp@openerp.com>
2021-09-02 14:15:13 +00:00
oco-odoo d8c4332c8d [IMP] account: allow mixing cash basis and non-cash basis taxes on the same line
The tax_exigible field of account.move.line made it impossible to mix 'on_payment' and 'on_invoice' taxes on the same invoice line, as the base line couldn't be be tax exigible and non-tax exigible at the same time. However, this use case is needed by some countries in order to implement withholding taxes.

To solve that, we totally remove the tax_exigible field from account.move.line and instead compute it on the fly with a domain (also passed to the query_get for SQL queries). An 'always_tax_exigible' stored computed field is also added on account.move, in order to still allow (like before) putting cash basis taxes on a miscellaneous operation without any payable/receivable line and still see it become exigible without needing any payment.

[IMP] account: improve cash basis traceability

A smart button is now available on invoices generating cash basis entries, so see them all at once. The move originally creating cash basis entries is also shown as a field on them.

Task: 2457374
Part-of: odoo/odoo#74138
2021-09-02 14:15:12 +00:00
Florian Gilbert 0f90e80f9e [IMP] account: Refactor tax group widget with OWL
Refactor the tax group widget with the new JavaScript Odoo Framework:
OWL. This widget has 2 different components, one representing a tax group
and one representing the list of tax groups.

Task ID: #2312900
Initial Task ID: #1986412

Part-of: odoo/odoo#74138
2021-09-02 14:15:12 +00:00
harsh 4f4bfe2c9c [IMP] account,website_sale: improve the UX of terms and conditions
Purpose of the task is, to use our awesome website builder instead of
pad when creating a website page for terms & condition.
Also suggest default T&C to save user time when user enable the feature

So in this commit did the below changes:
 * Added new indicational text below "Terms as note" & "Terms as web page"
 * After enabling "Term as web page', user should be able to see the
term page url
 * For Terms editing:
   - User that have 'website' or 'ecommerce' module should edit the page
directly using the website builder with link "edit in website builder" link.
   - User that don't have nor website not ecommerce module should update
the text in the pad but in a pop-up window.
 * Also added the dynamic default term for company when term type is html.

PS: changed website_sale pre_init_hook to post_init_hook because
invoice_terms_html is compute field which depends on term_type so
when term_type is changed from init_hook it will give the key error
for the invoice_terms_html as it's not loaded to registry.

closes odoo/odoo#68225

Taskid: 2414659
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
2021-09-01 22:03:58 +00:00
jbw 5ad660877f [IMP] account: Improve reconciliation Models usability
This task aims to both explain supported reconciliation cases and improve the reconciliation model form view.
The form improvement is mainly about label wording and make the options more self speaking.

Also, disable bypass of the matching amount we do in case the statement line's label exactly matches the payment reference.
It can be replaced by just making a final model that is applied whatever the amount and will do the partial reconciliation on everything that wasn't matched by others.
That's cleaner, as users can way more predict what models can do and debug their config.

closes odoo/odoo#73043

Task: 2427089
Related: odoo/upgrade#2729
Signed-off-by: oco-odoo <oco-odoo@users.noreply.github.com>
2021-09-01 20:57:00 +00:00
yhu-odoo 45912aaebd [IMP] analytic, project, *: Improve views
Improve the views of analytic.account and project.project.
Add category to analytic.line.

Task-2469742
PR #68708
2021-08-27 16:40:49 +00:00
dht-odoo 4cc4ee8919 [FIX] account: fix editor/Html addition in account.move form view
Followup of odoo/odoo@cb4f597410 and odoo/enterprise@971f3ed9ae

This commit fix the view of account.move model by improving formation of
groups in form view. Purpose is to improve display and usage of editor
in Html field.

LINKS

Task Id-2558824
PR odoo/odoo#74795
PR odoo/enterprise#2011
2021-08-18 08:24:16 +00:00