When opening an opportunity from a notification, it always opens the default view
which is the lead view and then the button "Button "Convert to opportunity" was visible.
opw:792931
As admin every tax is loaded, which is wrong anyway.
When the admin opens a session a change the cashier in the POS interface,
every order is made with every tax ever (on the product)
which could lead to major faulty records
See the case on OPW 786803 which is critical
[FIX] mail: delete leftover followers
Previous to this commit, if during the unlink of a model which inherits
from mail.thread an exception is raised before mail.thread's unlink() is
called, followers for such model won't be properly deleted from the
database.
This commit changes this by overriding ir_model's unlink and deleting any
followers whose res_model is not installed.
Partial back-port of 3614193Fixes#21462
OPW 786790
Changed at 08d48b0ff but was crashing when building the documentation as not
complient for sphinx
Temporary fix that should be restored when our doc engine will be smarter
Before this revision,
Assigning a user for which its partner is inactive
was sending the assignation notification email to the `partner_id`
of the object.
e.g. Assigning a task to a user for which its partner is disabled
sent the assignation notification email to the customer of the task.
opw-787659
When modifying files the a widget FieldMany2ManyBinaryMultiFiles would
not keep its metadata (currently associating attachment to [url,
allowUnlink]) up with current value.
So with an attachment added after init:
- clicking on it would error (because link is wrong)
- deleting it would unlink attachment originating from from onchange
The expected behavior is:
- being able to download attachments
- not unlinking attachment originating from onchange
and this is what this commit fixes.
opw-787746
closes#21813
Discarding a new record triggers the 'history_back' action. This makes
sense if the record was discarded from a normal form view, but not so
much when in a modal, where the expected behaviour is to close the
dialog.
This commit overrides the function in the action manager which handles
the switch to the previous view. It checks whether a dialog window is
open, in which case it simply closes it.
note: 10.0 backport from 11.0 33aa89edcloses#20405
opw-786866
closes#21792
When a user was closing a POS to go into the backend, and click on "Reprendre",
there was an error which prevent him to reopen the POS.
There was a confusion between object <datetime> and <datetime.datetime>, as
the previous code was trying to use the function timedelta() from datetime.datetime
instead of datetime. As a result, the error states that datetime.datetime has no
function timedelta.
opw-801523
- Activate Work Orders
- Go in MRP > Reporting > Work Orders
The status filters ('Ready', 'Pending'...) do not work.
This is because the action forces the domain to `[('state','=','done')]`
instead of using one of the available filters.
opw-788043
Before this commit, website had incomplete context.
It was causing website.menu to not be translated correctly because lang was
not set on website.
Now, since the website has the context correctly binded, menus are translated
opw-787012
Before this rev., when a graph view was reloaded (e.g. by clicking
on the graph view switcher), the inital groupby was lost if it
didn't come from the searchview (i.e. if it came from the context
or from the arch). For instance, go to Sales > Reporting > Sales
(the view is grouped by 'date', and there are two groups), reload
by clicking on the graph view switcher: there is only one group
left.
The reload RPC was actually fine. What was wrong is the 'state'
object given to the renderer after the reload, as it didn't contain
the correct groupby, so the view wasn't correctly re-rendered.
When changing the date of an account move, the method
`_onchange_amount_currency` is called manually on a recordset. If the
recordset length is > 1, it crashes.
- In an account move, change the date
- All debits and credits of the lines are reset
This is because the recomputation of the credits and debits should only
occur in case of currency rate change.
opw-801030
- Create a product A tracked by lot
- From the Dashboard, create a 'Planned Transfer'
- Add product A, any quantity
- Click on "Mark as TODO"
It's now possible to edit the serial numbers, but it's impossible to set
any quantity in the move lines.
This is due to the remaining context key `planned_picking` which makes
`is_initial_demand_editable = True`. In this case, `qty_done` is
read-only in the view `view_stock_move_line_operation_tree`.
As a workaround, `action_confirm` returns an action and set the context
accordingly.
opw-785332
- Create an inventory 1 with "Product A - Variant 1"
- Start inventory
- Create an inventory 2 with "Product A - Variant 1", "product A -
Variante 2"...
- Start inventory
An error pops-up because two inventories for the same product
"Product A - Variant 1". However, you don't know which variant is
impacted sincethe message error only shows the product name:
"Product A".
Closes#21687
opw-799583
First purpose of this commit is to limit access on activity types.
Employees can now only read activity types. Indeed defining or modifying
activity types should not be done by employees as it impacts daily work
of all other employees. Specific app-based rights are added for project
and sale managers. Those have a specific menu to configure activity
types, meaning they should also have the access rights to do so.
Also including :
* ease default computation for res_model_id of activity types: using
default_res_model in context it is possible to specify a default
res_model_id. It is useful for example to give a specific context
in configuration menus;
* add a domain on res_model_id field in order to limit it to models
inheriting from mail.thread and not being transient;
* various improvement in activity type form view to ease configuration
notably the # days renamed to planned in;
Purpose
=======
A 'Access Rights' (group_erp_manager) user can create a company
A 'Settings' (group_system) user can create a resource.calendar
With the resource module, if a resource.calendar is not set on the new company values, a default one is create.
As the 'Access Rights' user can create a company, but can't create a resource calendar, this should be done with sudo.
Specification
=============
When user is creating a new company (in a multicompany environment), by default, he should have access to this company.
Also, do not allow to create new company from allowed companies dropdown
This revision is similar to
6e8faf40bd
but for the opposite case:
When the task is using the pad,
somehow the regular `description` pad
was written as well on save, making both field
being saved together,
and when description is saved
its content is written on the pad.
Therefore, whatever you written in the pad,
the pad was overriden with the current content of
the task regular description field
opw-787773
Purpose
=======
Right now user not able to archive maintenance equipments and maintenance teams which are no longer in use.
Specification
=============
Add archive button in form view of Equipments and teams. Also add filter on list view.
Don't put a specific team by default on equipment, select the first unarchived one instead.
Suppose that modules M1 and M2 belong to a subcategory of some exclusive
category. Then M1 and M2 may not be both installed, unless one of them
transitively depends on the other.
OPW 785434
The stock_history view is generated from by grouping of move from
sources and move to destinations which depending on the request and
number of request can be rather slow.
This fix replace a possibly high number of request by a slower number.
On a production instance, doing an inventory at a choosen date:
- with 300 stock moves, went from 4 minutes to 4 seconds,
- with 130 000 stock moves, went from 66 minutes to 10 minutes
opw-765793
closes#19594
* portal
When there are too many items in the top menu, the menu is broken into
multiple lines (especially on medium screen resolution). This commit
implements a system like in the enterprise backend: the extra items are
placed in a "+" dropdown menu at the end of the top menu.
Also, review the direction used to open dropdown menus. The default is
now left-to-right (while it was right-to-left before) and JS has been
added to determine the safe direction:
- If last item: to the left instead
- If would overflow the window: to the other direction instead
The web planner specified no language for frontend.
This commit add a specialized fallback for this use case so the planner
on the website is in the language of the current user.
opw-781727
fixes#20829closes#21006
The web planner specified no language for frontend so the website
planner on the frontend was never translated.
This commit add a specialized fallback for this use case so the planner
on the website is in the language of the current user.
The code is the same that get_context from web_editor.base but requiring
that would possibly adds delays (for dom_ready) that we don't want.
note: this is for 9.0 up to not including 11.0, in 11.0 another solution
is used and in master a bigger change is being worked on.
opw-781727
fixes#20829closes#21004
Now the colorpicker option can be defined with a `data-color-prefix`
parameter which will allow toggling classes different than "bg-*".
(e.g. if the prefix is set to be "hello-", the colorpicker option will
allow to choose between "hello-primary", "hello-danger", ...).
Before this commit, when defining two sets of classes to be chosen
independently on a same element you had to define two options:
```
<div data-selector=".myElement">
<li class="dropdown-submenu">
<a tabindex="-1" href="#">Classes set 1</a>
<ul class="dropdown-menu">
<li data-select-class="a"><a href="#">A</a></li>
<li data-select-class="b"><a href="#">B</a></li>
<li data-select-class="c"><a href="#">C</a></li>
</ul>
</li>
</div>
<div data-selector=".myElement">
<li class="dropdown-submenu">
<a tabindex="-1" href="#">Classes set 2</a>
<ul class="dropdown-menu">
<li data-select-class="x"><a href="#">X</a></li>
<li data-select-class="y"><a href="#">Y</a></li>
<li data-select-class="z"><a href="#">Z</a></li>
</ul>
</li>
</div>
```
Now, an unique option can be used for this, allowing to not duplicate
the `data-selector` and not creating two JS options:
```
<div data-selector=".myElement">
<li class="dropdown-submenu">
<a tabindex="-1" href="#">Classes set 1</a>
<ul class="dropdown-menu">
<li data-select-class="a"><a href="#">A</a></li>
<li data-select-class="b"><a href="#">B</a></li>
<li data-select-class="c"><a href="#">C</a></li>
</ul>
</li>
<li class="dropdown-submenu">
<a tabindex="-1" href="#">Classes set 2</a>
<ul class="dropdown-menu">
<li data-select-class="x"><a href="#">X</a></li>
<li data-select-class="y"><a href="#">Y</a></li>
<li data-select-class="z"><a href="#">Z</a></li>
</ul>
</li>
</div>
```
Before this commit, defining a snippet option began by choosing an XML
`data-selector` attribute to put on the option's <div/>. This selector
would then be used to find DOM elements on which to attach the option.
A recent refactoring added the `data-exclude` attribute, allowing to
define a selector that a DOM element must not match to receive the
option.
A new kind of need has arrived: allowing an option to be attached on a
DOMElement but making the option's effects be applied on a specific
child of this DOMElement. This can allow to regroup children options on
a main DOMElement.
To that effect, this commit introduces the optional `data-target`
attribute. If defined, its value is used as a selector to find the
option's `$target` inside the element found with previous rules. Note
that the system has been made smart enough to only add the option on
elements which indeed contain such a $target.
E.g. I want an option to appear in the customize menu of my custom
snippet's <section/> but will in fact control the toggling of a class
'super-row' on the `.row` (I don't want the option to be on the `.row`
otherwise it would not be in the main customize menu). All I have to
do is defining a
```
<div data-selector="section" data-target="> .container > .row">
<li data-toggle-class="super-row"><a href="#">Super Row</a></li>
</div>
```
(no JS required)
Note: a similar behavior was already present on the JS side of the
"colorpicker" option.
Before this commit, one could choose the App Switcher as his Home action.
and arriving on /web would trigger an infinite loop at startup
After this commit it is not possible to choose the App Switcher as Home action anymore
OPW 800323
When installing a payment acquirer from the kanban view, this would by
luck display the form view correctly.
But if we go back to the listing then forward to the form view, things
go awry.
This is because the listing action views have not been updated after the
module installed, this worked at install because we loaded a new action.
This commit change the action so when installing a payment acquirer from
the kanban view, the view is simply reloaded.
opw-786454
closes#21757
When reinitializing modules it is impossible to create partners if
stock is installed because picking_warn field has a required column
but no default value if the module does not depend from stock. Use
case is trying to run test_mail tests with stock installed.
As this field is not business critical it is now not required. As there
is a default value behavior should not change for users.
When reinitializing modules it is impossible to create partners if
account is installed because invoice_warn field has a required column
but no default value if the module does not depend from account. Use
case is trying to run test_mail tests with account installed.
As this field is not business critical it is now not required. As there
is a default value behavior should not change for users.
Usecase to reproduce:
- Create a new unit of measure "Pack of 6" of UoM Categ = units
- Create a new product: Coca cola can, sell in unit, purchase in packs
- Create a PO, buy 1 pack of this product
- Receive the pack from the delivery order
- On the picking you just received, click on return
-> If you validate the wizard by clicking on "return", you get 6 packs, so you multiply by 6 the amounts of what you send as the system changed the quantity but not the Uom
It happens because the system compute the quanity to returns in terms of quant uom but when creating the return move it copies the origin move uom.
This commit uses the quant uom on the return move and also adds the uom in the view in order to be less confusing for the end user.
opw-800566