Remove the custom messages and replace with the default odoo tracking message that uses tracking_value_ids as parameters
Journal Items will log all changes of tracked fields in the chatter of the associated Entry - including one2many and many2many fields (by overriding _mail_track)
references original task 2061399
closes task 2469621
closesodoo/odoo#72023
Signed-off-by: William André (wan) <wan@odoo.com>
Steps to reproduce the bug:
- Install Accounting and Expense app
- Go to accounting settings > enable cash basis option
- Go to accounting > configuration > accounting > taxes
- Create a new tax or choose an existing one e.g “Tax abc”:
Tax Computation = `”Percentage of Price”`
Tax Type = `”Purchases”`
Choose any value for amount
Select "Based on Payment" in tax due
choose an account with the "Allow Reconciliation" option activated in the Cash Basis Transition Account field
Save
- Go to expenses > Expense Reports > All reports > Create a new one :
- Add 2 expense and for both set up the taxes to "Tax abc" and unit price > 0
- Submit to manager
- Approve
- Post journal entries
- Register a payment
Problem:
A user error with the following message is triggered: “You are trying to reconcile some entries that are already reconciled”
In the use case we have two expenses and for each, an `" account.partial.reconcile "` will be created,
so we will loop twice and therefore add twice all the `”account.move.line”` linked to the taxes
in the dict `" to_reconcile_after "`: https://github.com/odoo/odoo/blob/beccf82e09d536255d9d9cb9bfe58ebae2559843/addons/account/models/account_partial_reconcile.py#L585
Then we loop to reconcile all the `" account.move.line "` which are in the dict `" to_reconcile_after "`,
but since we added them all twice, at each turn of the loop we give them all as a parameter
of the “reconcile” function without checking whether they are already reconciled or not.
opw-2565934
closesodoo/odoo#74432
X-original-commit: fb2b1482f5d3dec924b08e08dc915d6608c7d6b3
Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
Signed-off-by: Djamel Touati <DjamelTouati@users.noreply.github.com>
Currently, there are many useful pivot views on reporting models but most
of them lacks the dedicated list view. Dedicated list views will allow users
to see useful information when one directly drill down to the records from
the pivot table in odoo spreadsheet [1].
With this commit
1. we remove 'disabled_linking' attribute from the very important pivot
and graph views (see the full list on task pad);
2. we added dedicated list views for the following reporting models
- account.invoice.report
- fleet.vehicle.cost.report
- hr.timesheet.attendance.report
- purchase.report
- project.profitability.report
- report.membership
- report.pos.order
- report.project.task.user
- sale.report
Task-2547881
[1] See task-2506116
closesodoo/odoo#72394
Related: odoo/enterprise#19122
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
When using the online synchronization, you could have a wrong balance in 'processing' state.
In that case, don't force the user to reset the whole statement to 'open' and allow him to edit balances directly.
closesodoo/odoo#74387
Task: 2606857
X-original-commit: 03f83eb87da00938b9d2df78651c1e06cf8a6d58
Signed-off-by: William André (wan) <wan@odoo.com>
Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
A tax line affecting the base of subsequent taxes is a line having some values in 'tax_ids' & 'tag_ids'.
When creating a refund, tags was wrongly computed in this case.
closesodoo/odoo#74307
Issue: 2596368
X-original-commit: 49d1dbbb74ea97e4337fe1af3b8074dc9146143c
Signed-off-by: William André (wan) <wan@odoo.com>
Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
Explain the situation when a manual change has been done to the sequence
of `account.move`. This was needed because some user didn't realize that
they changed the sequence, and when they realized it, it had polluted
multiple numbers after that.
closesodoo/odoo#74326
X-original-commit: 56f7afb253da6560cddae121f5b6cdab3e3b1c6e
Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
Signed-off-by: William André (wan) <wan@odoo.com>
- Group filters into less technical/more functional approach
- Small tree view change
closesodoo/odoo#73723
Task: 2541366
Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
Improve usability of payments. Allow selecting multiple Vendor Bills AND Refunds
and pay them all together in one single payment.
E.g. When running server action “Register Payment” for :
- one 100€ Vendor Bill
- one 50€ Vendor Bill
- one 80€ Refund
Previous result = one 150€ outgoing payment + one 80€ incoming payment
New result = one 70€ outgoing payment
closesodoo/odoo#69578
Task: 2475598
Related: odoo/enterprise#19902
Signed-off-by: William André (wan) <wan@odoo.com>
When sending the same invoice from Invoices > list view > select an invoice > action > Send and print, the email received by the client does not contain the header and the link to the invoice
This PR adds the custom_layout attribute to the context of "Send & Print" action
opw-2544654
closesodoo/odoo#74311
X-original-commit: 8bb27b88326d6298a03a5fa3978ac99b0e1ee7e0
Signed-off-by: Josse Colpaert <jco@openerp.com>
Signed-off-by: Achraf <abz-odoo@users.noreply.github.com>
The bubble on the invoice view, made the list slightly difficult to read.
It is a little bit better on the right.
closesodoo/odoo#73768
Task: 2476548
Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
The account name field may be a bit too small when
having accounts with a longer name.
Change it to take more of the available space for
this field.
Task id #2608446closesodoo/odoo#74006
Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
action_invoice_sent() triggers two onchanges which normally don't happen at the same time. Added a check to one of them (onchange_is_email()), so that on action_invoice_sent(), only one of them calls the computationally expensive onchange_template_id_wrapper(), effectively halving the time taken.
Time for executing the action for one invoice dropped from over 3 seconds to a bit over 1.
closesodoo/odoo#74160
Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
The license is missing in most enterprise manifest so
the decision was taken to make it explicit in all cases.
When not defined, a warning will be triggered starting from
14.0 when falling back on the default LGPL-3.
closesodoo/odoo#74245
Related: odoo/design-themes#48
Related: odoo/enterprise#19862
Signed-off-by: Xavier Dollé (xdo) <xdo@odoo.com>
Steps to reproduce the bug:
Enable Multi Currency > Accounting > Create Customer Invoice in USD > Pay Invoice in EUR > click on payment and print payment receipt
Bug:
The currency symbol next to "Amount Paid" was in $ instead €
opw:2506868
closesodoo/odoo#73998
X-original-commit: f08bcbf90257d632f7258251059a5390bf3eafa4
Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
Define `data-hotkey` on most used action buttons.
For the modals, the following keys are dedicated for "special"
actions:
- Alt+G: add
- Alt+V: save
- Alt+Z: cancel
closesodoo/odoo#73275
Taskid: 2588233
Related: odoo/enterprise#19464
Signed-off-by: Kevin Baptiste <kba@odoo.com>
Before this commit:
When there is too much records to post and it's take time more than 15 minutes then server was restarted.
So scheduler action will do the process with the same records again and again.
After this commit:
post record in batch of 1000
opw-2451446
closesodoo/odoo#70831
X-original-commit: 819321c3a129613890ce49e3efe9a903c3218070
Signed-off-by: rrt-odoo <rrt-odoo@users.noreply.github.com>
Requires markup every markup-using tip content as Markup. Would be a
nice occasion to migrate everything to a markup-safe markdown I think,
especially if we could migrate the translations so we don't lose them.
Add HTML fields support to kanban view (currently bespoke but maybe it
should be done via `format`), and remove t-raw for HTML fields there.
Also just strip some t-raws which were completely unnecessary to start with
Currently, the payment method lines are only ordered
base on their sequences. This could lead an issue if
the sequences are all the same, where they would be
returned in a random order.
Add a second ordering on the id to avoid such random
issues.
closesodoo/odoo#73984
X-original-commit: ac700908a80f67e5fd15fa242cc111d57abd4aa9
Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
Signed-off-by: Nicolas Viseur <vin-odoo@users.noreply.github.com>
There is an issue when computing the suitable payment token ids making it impossible to
open a payment for a user without access to payment acquirers.
Also, the default computation of payment token was wrong and would never set it
correctly.
The compute for the method lines in payment would not filter unavailable acquirers
line and thus select them by default if they were first in line.
Also fix an issue with the ordering of payment method lines
X-original-commit: 73410a0fd76a70e1730883d35b79fc603741b59c
The journal needs to access the payment acquirers to determine with payment method is still available.
Since the acquirers can't be accessed only for admin users, an accountant doesn't any right to read them, and then, an access error was raised when opening the journal form view.
Also, the 'payment.acquirer' was accessed from the 'account' module instead of being overridden in 'payment'.
closesodoo/odoo#73761
X-original-commit: 7b4580c3756657c902eceb9840984dde76429dcd
Signed-off-by: William André (wan) <wan@odoo.com>
Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
Change dependencies of a few computed fields in order
to avoid triggering them wrongly when migrating.
Also add a company check on the constrains blocking
deletion of payment method lines linked to an active
acquirer.
closesodoo/odoo#73731
X-original-commit: e94b4f09a4c5664360594bee6475cb2ef756be47
Related: odoo/enterprise#19663
Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
- Create 2 invoices (or 2 bills) but let them in draft
- In invoices list view, select all invoices
- Execute Action > Resequence
Resequence wizard will not show.
It comes from a template in resequence renderer using account move name as t-key
that silently crashes because both draft invoices have the same name ("/").
opw-2590273
closesodoo/odoo#73724
X-original-commit: 3e6b7dfd4854069724dde2df43ab2eb7d850e9b5
Signed-off-by: William André (wan) <wan@odoo.com>
In the first days of the month, many of the previous month's invoices
could still to be posted since the lock date is not yet set to the last
day of the previous month. To avoid the user having to modify the
default accounting date on each such bill, detect whether the conditions
allow the invoice to be posted on the very last day of the oldest
possible month, and then adapt the accounting date to the last day of
that month.
task-2575560
closesodoo/odoo#73701
X-original-commit: 2c5c1a4478505688f35e47ca20e7977b134d0fdb
Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
Signed-off-by: William André (wan) <wan@odoo.com>
On reconcile models, a rule can be set to map a partner to a bstline if
the bstline "Notes" matches a regex. This "Notes" field is actually
the "narration" field inherited from move. In commit 0f3c7f153e8bd20f83b7d1df031634996d36935b
this field is converted from Text to Html. This breaks the regex match.
The fix converts back the field value to text for the regex check.
closesodoo/odoo#73618
Task: 2427089
X-original-commit: 8e9616034678a627f92740487f20cf66e60c0f30
Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
Signed-off-by: jbw-odoo <jbw-odoo@users.noreply.github.com>
One could edit bank statement line values with new from a bstline modal. This
is due to new quick edit behaviour. This prevent the editiing of bst lin values
if bst is not new.
closesodoo/odoo#73617
Task: 2427089
X-original-commit: c9e220d0276f59834baeae3196560a7f893ff337
Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
Signed-off-by: jbw-odoo <jbw-odoo@users.noreply.github.com>
For data quality purposes and bug prevention, when I reverse an entry,
the reversal should always be postable on a journal having the same type
as the initial Journal Entry's journal.
closesodoo/odoo#72431
Task: 2497529
Related: odoo/enterprise#19543
Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
To improve the payment method system, proceed to a few changes
such as changing the view a bit, making sure payment acquirers are not
linked to a journal by default and that only the manual payment method
type can be used multiple times in a single journal.
Task id #2573145closesodoo/odoo#73596
X-original-commit: 9122b367baea10e59b66e45bf7c458a6f1e82efb
Related: odoo/enterprise#19623
Signed-off-by: Xavier Dollé (xdo) <xdo@odoo.com>
Before this commit, the narration field was not filled with default terms and conditions when it was defined in the company settigns.
closesodoo/odoo#73501
Taskid: 2587051
X-original-commit: 49ca71337c8e0f00a5f200d5e97c1c246a6ccd03
Signed-off-by: William André (wan) <wan@odoo.com>
Signed-off-by: Arnaud Joset <arj-odoo@users.noreply.github.com>
Domains must be lists on calls to `_where_calc`.
```
Traceback (most recent call last):
File "/tmp/tmpjmcn3gby/migrations/base/tests/test_mock_crawl.py", line 162, in crawl_menu
self.mock_action(action_vals)
File "/tmp/tmpjmcn3gby/migrations/base/tests/test_mock_crawl.py", line 253, in mock_action
mock_method(model, view, fields_list, domain, group_by)
File "/tmp/tmpjmcn3gby/migrations/base/tests/test_mock_crawl.py", line 366, in mock_view_tree
self.mock_web_read_group(model, view, domain, group_by, fields_list, limit_group=5)
File "/tmp/tmpjmcn3gby/migrations/base/tests/test_mock_crawl.py", line 442, in mock_web_read_group
self.mock_web_search_read(model, view, [group["__domain"]], fields_list)
File "/tmp/tmpjmcn3gby/migrations/base/tests/test_mock_crawl.py", line 402, in mock_web_search_read
data = model.search_read(domain=domain, fields=fields_list, limit=80)
File "/home/odoo/src/odoo/14.0/addons/account/models/account_move.py", line 3645, in search_read
return super(AccountMoveLine, self.with_context(domain_cumulated_balance=to_tuple(domain or []), order_cumulated_balance=order)).search_read(domain, fields, offset, limit, order)
File "/home/odoo/src/odoo/14.0/odoo/models.py", line 4839, in search_read
result = records.read(fields)
File "/home/odoo/src/odoo/14.0/odoo/models.py", line 3020, in read
return self._read_format(fnames=fields, load=load)
File "/home/odoo/src/odoo/14.0/odoo/models.py", line 3040, in _read_format
vals[name] = convert(record[name], record, use_name_get)
File "/home/odoo/src/odoo/14.0/odoo/models.py", line 5666, in __getitem__
return self._fields[key].__get__(self, type(self))
File "/home/odoo/src/odoo/14.0/odoo/fields.py", line 1019, in __get__
self.compute_value(recs)
File "/home/odoo/src/odoo/14.0/odoo/fields.py", line 1175, in compute_value
records._compute_field_value(self)
File "/home/odoo/src/odoo/14.0/odoo/models.py", line 4061, in _compute_field_value
getattr(self, field.compute)()
File "/home/odoo/src/odoo/14.0/addons/account/models/account_move.py", line 3655, in _compute_cumulated_balance
query = self._where_calc(self.env.context.get('domain_cumulated_balance'))
File "/home/odoo/src/odoo/14.0/odoo/models.py", line 4247, in _where_calc
domain = [(self._active_name, '=', 1)] + domain
TypeError: can only concatenate list (not "tuple") to list
```
Observed on upgrade request 11722
Ref 9d28c71a71 since saas-13.2
closesodoo/odoo#73522
X-original-commit: e24295da8436b4d24cd03f6ac1f22e86465f950d
Signed-off-by: Christophe Simonis <chs@odoo.com>
PURPOSE
Align default sequence numbering on customer's expectation per journal.
Because of some feedbacks received, we acknowledge that most users will
want an annual sequence on sales documents and a monthly sequence for
the rest.
SPECIFICATION
By default, on customer invoices/credit notes (the default sequence
should be annual.)
We don't want an option and therefore, we make a decision ; user can
change it by resequencing if he doesn't like it.
task-2591145
closesodoo/odoo#73278
Related: odoo/enterprise#19565
Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
Steps to reproduce the bug:
- Go to Accounting > Vendors > Bills
- Create a new Bills
- Delete the contents of the 'Accounting Date' field.
- Click off that field.
Problem:
-An AttributeError is triggered because we try to recalculate a new name via the function `"_compute_name"`
and we base ourselves on the date field, but we do not check if it is null or not before accessing it.
This field is only used for purchase receipts, vendor bills, vendor credit notes, payments
and regular journal entries. Other move types are unaffected here.
opw-2511799
closesodoo/odoo#73490
X-original-commit: f830efa1af28de4a4cc3b861643ac9b6fb352c8d
Signed-off-by: oco-odoo <oco-odoo@users.noreply.github.com>
Signed-off-by: Djamel Touati <DjamelTouati@users.noreply.github.com>
The current icon used by the revert button on account.move.lines
group by view is a refresh icon. Change it by an undo icon like
on the bank statement lines.
Task id #2585445closesodoo/odoo#73163
Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
https://github.com/odoo/odoo/pull/71872 made country_id readonly in every circumstance. This made it impossible to create an account.account.tag targetting taxes from scratch in the UI. We only want to prevent edition of this field when the tag has been generated by a tax.report.line.
closesodoo/odoo#73142
X-original-commit: 8f0ae54cd24e9a6299d86c47ed37aea2a7fa4ad8
Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
Signed-off-by: oco-odoo <oco-odoo@users.noreply.github.com>
Due to EU e-commerce 'One-Stop Shop' which becomes available on 1 July 2021, EU companies involved in distance sales are able to file their taxes using the new OSS process. Adopting OSS is now simplified in Odoo.
On installation of the module, all companies having a fiscal country in the EU will be processed.
For all existing domestic taxes in the company, an associated foreign tax (standard rate, reduced rate, etc) is found in the `EU_TAX_MAP`. This mapping will be created in a fiscal position that is automatically detected based on the customers' country.
All that is required from the user, is to review the tax mappings according to the products and services sold by the company.
A refresh button is also available in the odoo settings to redo/update the fiscal positions. This might be useful after adding a new tax.
Note: The tax mapping herein is not intended to cover all possible tax mappings between EU countries, but rather, the most commonly used ones. It is advised that users with special tax cases update the created Fiscal Positions according to their requirements.
Closes [Task 2579615]
closesodoo/odoo#73042
X-original-commit: 9c548c423614d1305542ebdffdbcd0da3cf09899
Signed-off-by: oco-odoo <oco-odoo@users.noreply.github.com>
Signed-off-by: Habib Ayob <h4818@users.noreply.github.com>