In the case where:
1- Do an order on the pos selling a product A (amount = 10)
2- Do another order returning a certain quantity of A (with a quantity < 0)
3- Do a third order selling something else (amount = 5)
Before this commit, the account move lines of the payment move and of the sale move of operation 2 weren't reconciled
This was because the credit to the receivable account of the return was reconciled with the debit of the first operation,
leaving the debit of the payment of the return alone
(i. e. the lines number 1 & 3 & 5 were reconciled together, instead of 1 & 2 & 5, and 3 & 4)
We end up in a situation like this (at validation time)
RECEIVABLE
D | C || OPERATION | Line Number
----------------------------------------------------------------------------
15 | || (1 & 3-Engaging Sale) | 1
| 10 || (1-Payment) | 2
| 10 || (2-Engaging Return) | 3
10 | || (2-Payment Return) | 4
| 5 || (3-Payment) | 5
After this commit, we reconcile the returns for each order before reconciling other transaction chains
The fix is limited in its scope as the automatic reconciliation for the pos transaction is fairly recent
and a "nice to have"
OPW 787298
Rev. 5140d3d1 fixes the google_drive override of the Sidebar in
saas-16. The test specifies param 'sidebar: true', so that a
sidebar is instantiated by the FormView. This param has been
renamed to 'hasSidebar' by rev. 32b8cec in master, so the test
broke when rev. 5140d3d1 has been forwardported to master, and it
thus needed to be adapted.
In a grouped Kanban view, when the user clicks on 'Load More' to
load more records of a given column, then opens one of those
records in the form view, and goes back using the breadcrumbs, the
formerly loaded records should be reloaded, so that the user does
not have to click again on 'Load More' to get to the position he
was previously.
This rev. increases the limit of the given column when the user
clicks on 'Load More' to force this behavior.
Before this rev., the group_by specified in the action context was
completely overridden by the group_by specified in the search view,
even if it was []. In other words, it was completely ignored.
Moreover, it was only took into account (before being overridden)
at the first load of a view, not at reload.
Let's assume an action with a 'group_by' specified in its context.
Unless another groupby is specified in the search view, the action
groupby must be used. For list views, it was only working for the
first rendering of the view. As soon as it was reloaded, the action
groupby was lost.
For instance, go to Project, click on a project in the dashboard
[the action has 'group_by': 'stage_id' in its context], switch to
list view [the list is correctly grouped by 'stage_id'], reload by
clicking on the view switcher -> the view isn't grouped anymore.
It was actually working by chance on other views because they have
specific handling of the groupby (e.g. the kanban view allows the
attribute 'default_group_by' on its arch), but by default, the
action groupby must always be used at each load/reload if there is
no other groupby specified.
This rev. restores the behavior of saas-15, before the new views.
In 60d9f6fe the ir.default replaced uses of ir.values.
But the [ir.default].set user_id has opposite meaning to
[ir.values].set_default for_all_users.
This was not taken into account when adapting javascript in 791152a87
and this commit fixes that.
opw-805871
closes#22437
A few fields present in the "Private Info" tab of the Employee form did
not have the corresponding `groups` attribute.
This could cause access rights problems.
Since the new views, the flag `initial_view` on an action has been removed.
There were in fact multiple ways to do the same thing (open a form view in edit
mode directly with an action) (the supported option is `form_view_initial_mode`
in the context) ; the options have been cleaned up a little bit.
This was the only remaining recurrence.
Closes#22353
Depending on the location, on the website different timezone were used
to display tracks:
- in `Agenda` day date (as of saas-14): the current user timezone
- in `Agenda` track times: the event timezone
- in `Talks` subtitle: the event timezone
- in `Talks` tracks: the current user timezone
- in a track page: the first user (admin) timezone
With this change in all those instance the event timezone is used.
There is still a usability hindrance in the backend: the timezone used
when encoding track or event datetime is the browser timezone.
So if the browser is GMT+2 and the event is GMT+6, encoding a 4h00 time
would save it as 2h00 (in UTC) and display it on the website as 8h00.
This would make sense to encode these datetime in user timezone but
currently there is no framework option to do it.
opw-805358
closes#22427
With attribute 'on_create="quick_create"' on the arch's root node,
kanban views open the quick create widget in the first column when
the user clicks on 'Create' (in the control panel), if the view
is grouped and if there is at least one column. However, this
column may be folded.
Before this rev., the quick create was inserted into the folded
column, which didn't look amazing. This rev. first toggles the
column before inserting the quick create.
Former code of list controller used the searchView of its parent,
which was the ViewManager. However, this has been changed by rev.
32b8cec53, where the ViewManager was removed, and the list
controller now has the reference of the searchView, so this code
had to be adapted. Tests have been adapted accordingly as well.
- Create a new company
- Connect your user to this company
- Do not choose a chart of accounts
- Go in accounting
- Select a step in the config bar (Fiscal Year, Chart of Accounts,
Initial balances)
A warning message is raised : "No miscellaneous journal could be found.
Please create one before proceeding."
However, we should be able to enter fiscal year step. Moreover, the
error message is unclear.
opw-804760
The Calendar controller made the assumption that the Dialog widget
opens synchronously, which isn't the case (for the first instance
actually), as it has to load its xml template. So it crashed as
the controller tried to focus the input inside the dialog, before
it was actually rendered.
Before this rev., an error occurred when the user changed a param
of the url when being in a client action. For instance, open
Discuss, go to 'Starred', then click on the 'Back' arrow of the
browser.
The error occurred because the code made the assumption that the
current action was an ir.actions.act_window.
`&nbsp;` was translated erroneously several times in arabic,
turkish and chinese (in module account, account_reports, ...).
This is solved on transifex and will be available on next translation
updates.
This commit disable the translation of it in the location it was most an
issue.
opw-803248
closes#22373
When validating a leaves from a leaves type "generate timesheet", some
timesheets are generated by the system. When refusing the holidays, we
want the timesheet to be deleted. It does not seem to be the case before
this commit.
Also, generated timesheet has a label containing 'False' if the holiday
description is not set.
Closes#22140
- enable the sublocations
- create an immediate transfer
- add a move of product 1
- save
- add a move line on the move
- create a new move of product 1 without adding any move line to it
- validate
- traceback (record has been deleted)
This is caused by the fact that we loop on `moves` and the
`_create_extra_move` can trigger a merge of move contained by `moves` ;
according to the order of the record in the recordset, we can try to
access a field on a now unlinked move.
Fixes#22356
Before this commit, when having a kanban within a dashboard and clicking on an action button,
the action was not triggered, instead, the board form view triggered 'save' on the board model
leading to a server side traceback
After this commit, the action button triggers the demanded one and only this one.
OPW 805707
closes#22191closes#22371