The default sale and purchase tax are determined by the default_get
method of wizard.multi.charts.accounts. It will pick the sale and
purchase tax with the lowest sequence.
This adds a sequence field in account.tax.template.csv so the default
ones can be given a lower sequence.
opw-781247
Use case to reproduce:
- Install delivery/batch picking
- Process 2 pickings in a batch.
-> Traceback due to ensure_one.
It happens because the action_done method in delivery is
not multi and batch_picking launch action_done on multiple
picking.
This commit makes action_done in delivery multi.
Previous to this commit, installing sale_managmenet/account_invoicing
would add some menu items for the `sale/account` module
(which contains all the logic for the sale/accounting flow)
and it would also install sale/account since it's a dependency, however,
horror would strike if one were to go and uninstall
sale_management/account_invoicing: nothing happens!
This is because these "facade" modules don't actually install anything, and
uninstalling an app does not force the uninstallation of its
dependencies, thus the `sale/account` module would stay installed, along with
the views introduced by the "facade" module.
To fix this, we create an uninstall_hook which forces the removal of
the ir.ui.menus that the "facade" modules introduce, so that the
functionality remains (for modules that depend on it) but it's not
user-accessible (because it should only be accessible to users if the
facade module is installed).
When exporting to a tarfile, we first export each module's translations
to a file on the FS, then create a tarball from all of them.
With the P3 bytes/string split, translation export was defined to export
to a bytes IO object in order to work correctly with CSV (which work on
bytes IO for better cross-version compatibility). However the tgz file
export was left opening module's files in `w` mode, which in P3 means
text, which blows up as POFile expects to ultimately write to a bytes IO
object: it uses text, and a StreamReaderWriter is used to translate that
into an underlying bytes IO.
Fix by explicitly opening the files in binary mode.
Fixes#22700
A name_search on attribute line would possibly ends up with a domain like:
['|', ('attribute_id', '=', 'm'), ('value_ids', '=', 'm'),
('attribute_id', '=', 'm')]
which would just search the attribute.
This is caused by calling the default name_search. This commit forgo
the default name_search when we are in this attribute line special case.
courtesy-of: @fmdl
opw-813505
closes#22619closes#22760
Before this commit, when having a simple employee (group employee) accessing the form view
of hr.employee, there was traceback because the field is_address_home_a_company was not in the view
This is because of commit 2d777d5
which restricted this field to the group_hr_user (Officer) in Python
When the view itself is not group-restricted
The JS loads everything from the view but puts invisible=1 on sections that have a group
The field, in our case, is forbidden before that and is not loaded, whereas the domain in which it is used is loaded
After this commit, the view loads correctly, while avoiding leaks as intended
OPW 813721
The data in tests use 'datetime.today()'. This can
add second and milli seconds: if those are not zero,
a 4th day of work will be count (hence the '+1').
The test craches with "3 != 4" when the test was executed
on a 'zero second' time.
As Dr Emmett Brown would say : "Time traveling is just
too dangerous !"
Name of scripts piped to `odoo shell` were `__builtin__` (`builtins` in
python3), which is not really obvious (and awful if your script must
handle python2 and python3).
Change it to `__main__`, allowing to use to common pattern
`if __name__ == '__main__':`
Before this commit, when duplicating a task,
the pad of the original one was updated with plain text
Hence losing all the layout.
This was because, in all likelihood, Odoo's Etherpad server did not support pushing HTML
At the time of the commit, Odoo's pads can receive HTML.
We then push HTML by default, falling back to pushing text as before
if necessary
OPW 806064
Before this commit, when connected as a portal user, the user was not
able to post replies to existing replies. This is because the textarea
section was marked to be displayed for connected internal users only.
This commit removes the whole group restriction. Indeed, it makes sense
(as a fix), to show the textarea section for public users too. Indeed,
the "Reply" button is already shown to public users but does not do
anything. With this commit, clicking the "Reply" button shows the
textarea section for everybody and, if the user is not connected,
redirects to the login page when posting the message. This of course
needs usability improvements in master.
Note: the problem had originally been fixed for regular answers with
commit https://github.com/odoo/odoo/commit/b81b03c82d282dc94595a9beb94444041509ef25
Note 2: both mentioned problems were originally introduced by commit
https://github.com/odoo/odoo/commit/9069d0127c176317436b67b23ae5677dd9d53de7
Closes https://github.com/odoo/odoo/issues/22648
Use `ir.values` for default taxes. Stop using `ir.config_parameter`. The
logic is made in order to be as error-proof as possible.
Backport of a9ede7fdfa
opw-807226
In case an invoice is required to be paid thanks to the route
'/my/invoices/', the user is redirected to '/shop/payment/transaction/'.
If website_sale is not installed, this causes a crash.
Complement of 2bd17285ea
opw-813481
Some sips provider don't use 2 as key_version.
E.g. mercanet uses '1' as production key.
Now we allow to override it in Ir Config Parameter for stable version.
Todo:
Need to make it customizable by end user into the configuration of acquirer.
Courtesy of BEK for reporting
Don't rewrite the wheel with serve_404.
It is the job of HandleException to do it.
In the same time, that will fix the status code that was
previously 200 instead of 404 in serve_404
This commit closes#22438
Before this commit, if you call a route with an missing ID, you
see an internal error 500 "Record not existing" (MissingError)
It has been intriduced by commit 9dc173cc2e
Now we catch the missing Error and return explicitely a 404 exception.
removeSrcAttribute should avoid these rpc, but for some
unknown reasons, on firefox it works but not with chrome.
Because the purpose of the test is to check the url and
not the content, that works to use an existing route.
Courtesy of @kangol for the fix
There is a slight visual inconsistency since: 9af8d5e6 the xml/less
editor for first level of descendants were just prefixed by an invisible
space.
opw-807624
closes#22704
From a form view (say Bill of materials)
Edit the form
Click on a bom line
Click on the external button that makes the product form pop up
change the order of suppliers on that product
Before this commit, a JS traceback was raised
This was because the changing object was not present in the localData that the Model object holds
or more accurately, it was not the **right** model object that was targetted
and this was due to the propagation of the resequence event
After this commit, no error is thrown, and the resequencing works as expected
OPW 807196
When saving a modified mass mailing, the editor will do a number of
things to improve the mail readability accross mail client.
One of those is replacing font awesome icons by image, but firefox acts
differently than other browser. On a display:none iframe, doing
.css('color') or .height() on an element returns respectively
`undefined` and 0.
This caused an error when getting the color that we could solve by
doing a fallback for firefox like this:
window.parent.getComputedStyle($font[0]).color
But to get the height() of an element, it seems we always need the
iframe displayed.
With this change, when the iframe is hidden and the browser is firefox,
the code try to display the iframe (with "visibility:hidden;height:1px")
when this part of the code happen.
note: backport of 10.0 13c326caaa
opw-807180
closes#22701
Backport of this commit: c13c9e0b5c
Steps to reproduce the bug:
- install application MRP Maintenance
- open maintenance request form view, and from top right corner click Studio icon
- click on Equipment field while you are still in studio interface
- It will show left side studio panel, click Domain box and it will throw an error
opw:813594
Set up the following kanban columns:
| Col 1 | Col 2 | Col 3 | Col 4 | Col 5 | Col 6 | F |
| | | | | | Card | |
<------- Screen width ---------->
Col x are unfolded columns.
F is a folded colum.
Moving the Card from Col 6 to F is impossible: the card won't go 'out of
the screen' on the right, which prevents its center to reach F.
Commit 5ba6d93810 deactivates the drag & drop on read-only fields.
In order to restrict the kanban cards displacements, the `containment`
attribute is used to either restrict the displacement:
- in `o_kanban_view` if draggable
- in the parent if not (to allow the resequence)
The class `o_kanban_view` is too restrictive: when movind the card to
the folded column F, the card must go out of `o_kanban_view`.
opw-803929
Before this commit, the boolean_toggle widget was rendered
but the less contained errors that prevented it from displaying correctly
This was due to commit 9dead7e3d3
After this commit, the widget displays correctly
There might be an issue in the future because of
field_utils.formatBoolean, when this function decides to pass the full options dict
OPW 80782
The field `scheduled_date` on `stock.picking` is used to set the field
`date_expected` on `stock.move`. Since `date_expected` is required, we
should make `scheduled_date` required as well.
Closes#22684