Fixes#10381 (wrong calculation on datetime)
if worked hours > 24h, calculation is wrong because "seconds" funtion does not take into account days
See: https://docs.python.org/2.4/lib/datetime-timedelta.html
total_seconds() should be used instead of seconds function
Before this commit, linking was enable for pivot view of model sale.report.
User that click on a cell will be redirected on a default view list/form
with all fields.
Now linking is disabled.
If you want to open the sale order on click, you need to start with the
pivot view from model sale.order.
This commit closes#25079
Before this commit, you can set the question of a post like the post itself.
That will generate a traceback:
RecursionError: maximum recursion depth exceeded in comparison
Now we check that there is no recursion
This commit fix an access right issue when a user that belongs to account.group_account_user (and not to account.group_account_manager) imports a bank statement file.
Was PR #25041. Courtesy of Alexis De Lattre (Akretion)
Steps to reproduce the bug:
- Create two products P1 and P2 requiring a lot
- Create a BOM B for P1 and requiring 3 P2
- Set on B a routing with a work order
- Create an inventory adjustment with 2 lots for P2:
- Lot1 with 20 P2
- Lot2 with 10 P1
- Create a MO for 10 P1
- Start the production and create a current lot Lot3 in Current Production sheet
- Set as current Qty 5 with Lot3 as current lot and Lot1 as Product Lot
- Click on DONE
- Set as current Qty 2 with Lot3 as current lot and Lot1 as Product Lot
- Click on DONE
- Set as current Qty 3 with Lot3 as current lot and Lot2 as Product Lot
- Click on Done
Bug:
When you checked the produced qty on the MO in the Finished product sheet, it only displayed 5 instead of 10.
opw:1849796
If a user member of group 'group_erp_manager' create a new user and adds
the user in multiple companies, the system raises an AccessError on ir.ui.view
When adding a user in multiple companies, he is automatically added in
the 'base.group_multi_company' group.
Modifying a 'res.group' record recomputes the view architecture.
The ir.ui.view records is writable by 'base.group_system' users.
Closes#21207
Before this commit, the js_class attribute on a tree arch was not present in the RNG of the tree view.
This is inconsistent with what is done in Odoo, where that attribute is used for kanban views,
is defined in the view_manager to select the widget,
yet unusable for other views.
After this commit, we add this attribute in the RNG to be able to use it in tree views
Linked to OPW 1837565
closes#25088
With website_version, when publishing a version and copying the current version,
the copy_translation wrote a new translation for the copy of master in the published
view instead of the copied view.
Reason:
When writing in the view, odoo checked in the context the current version and
wrote in the view corresponding to the key and the verion seen in the website.
So when copying a view, it translated the copied view instead of the copy of
the view.
The write is made by the function copy_translation with the line:
"new_wo_lang[name] = old_wo_lang[name]"
opw:1856150
Before this commit, if you add in your wishlist a product, and that this product
become unpublished, the user will have a traceback.
After this commit, we filter the wishlist product to only show published product.
This commit closes#24857 and closes#24618
Purpose
=======
When a Access Rights user create the invoice for the first time, when
click save it will raise an access right issue
A user belong to group Access Rights, when he create a invoice he'll
be able to edit 'sequence_number_next'
The reason is he belongs to 'group_erp_manager' which makes _is_admin
return True.
However, he does not have rights to edit on model 'ir.sequence.date_range'.
So that we should not allow him to edit the sequence of invoice in any case
Specification
=============
Since only users belong to 'group_system' can edit model ir.sequence.
We should not allow other users edit sequences on invoice form, so
the field won't be displayed for them to edit
Purpose
=======
In the website_sale.product_variants template, for the "checked" attribute in the radio input,
it must be " checked' if variant_id_index == 0 else None " instead of "' checked' if
variant_id_index == 0 else '' ".
For this moment, it checked the last variant because we get " checked="checked" " for the
first and " checked="" " for the others.
Specification
=============
Use None instead of '' for the checked attribute if it shouldn't be checked.
On Python 3, dict.keys() doesn't return a list, so we can't sort it, but
converting to a list on the fly before calling to sort() is not going to
change the original dict_keys object. Storing directly the list in the
variable, we get the expected result.
Side note: the daylist2 variable is there just for the t-set and was
already present in the code. Renaming it to dummy would be clearer
but that should not be done in stable.
Closes#25113.
Purpose
=======
Currently, users have to retype email in the stripe payment popup.
For event registration, the email address must be typed 3 times (the first
for the registration information, the second for the billing information
and finally for the payment on the stripe popup)
Specifications
==============
As the email is already filled on billing information view, isn't
necessary to retype in the payment form.
Currently there are 3 ways of going out of the modal: clicking cancel
registration, hitting the close button or clicking outside the modal.
The latter one however does not trigger the close event for modals and
therefore buttons of event registration are not reset correctly. This
commit fixes that behavior by preventing to close modal by clicking
outside of it. Buttons should be used and flow is now fixed.
Closes#25174 .
- In the POS screen, select a product.
- Set the keyboard on "Price" mode
- Change the unit price
- Set the keyboard on "Qty" mode
- Change the qty
The product qty and the total price doesn't refresh until you go to the
payment screen.
We manually trigger a change when the quantity is updated.
opw-1855970
Purpose
=======
When a contact in a mailing list receives a mass_mailing with an
unsubscription link, then he is automatically unsubscribed once the
unsubscription link in clicked instead of opening the
unsubscription form.
Specification
=============
Now the user can decide wether to unsubscribe or not.
Closes#24969
gevent 1.3.0 removed backward compatibility on gevent.wsgi.
make the new path the default
While the recommanded version on requirements.txt is 1.1, a server can not
launched with the 1.3
Closes#24780Fixes#24779
- Create a product with variants which can be sold in the POS
- Open a POS session
- Delete a variant (e.g. change the attributes)
- Sell the product in the POS, validate
The POS order cannot be created because the product ID doesn't exist
anymore.
We extend the existing constain on `product.template` on
`product.product`.
opw-1850598
backport of 682ae1cc64
Before this commit, if you enable website_form_enable_metadata, that
will crash with a "KeyError: 'meta'"
This commit closes#24888
- Create Product A with 5 Unit(s) on hand
- Created SO for 5 Units(s) A, validate SO and picking
- Return of the same quantity, but assign an owner
- Created RMA for 5 Units(s)
A warning generated: 'A is not available in sufficient quantity in ...'.
By assigning an owner on the return, the product is not considered
available. However, this makes sense since we are not owner of the
product, so it should not be valued.
Ideally, we would need a field `owner_id` on the RMA. Since it is not
available, we use `partner_id`. the logic is the following:
- try to reserve with owner_id = partner_id
- if the available qty is not sufficient, try without owner
When the stock moves are created, we apply the same logic to know
whether we need to create the move with an owner. Note that this is not
really sufficient. Ideally, we should reserve the quantity to repair
when we check if the quantity available is sufficient.
opw-1854346
`sale_timesheet` adds a value to the selection field `service_type`, if
any product.product or product.templates are set to this new
`service_type` and then the module `sale_timesheet` is uninstalled, the
`service_type` field won't be implicitly reset to the default, existing
value of `manual`, due to this, when accessing a view displaying
product.product records the view will crash and won't be accessible as
long as it contains an undefined selection value.
this commit explicitly resets the field to the base value upon
uninstallation.
opw-1856776
res_config_settings.website_id should be ondelete='cascade', however
that is not suitable for stable, so we emulate the ondelete cascade
with an SQL query during ir.model unlink (website uninstallation).
Fixes#25078
According to Authorize.net documentation, the state code should only be
used for United States. For the other countries, use the state name
instead.
opw-1854278
Otherwise the time is printed using the timezone on the user printing
the badge. This fix is inspired by how the times are rendered by
website_event (e.g. website_event.index).
Using the date_{begin,end}_located fields was considered, but their
formatting is not configurable and they result in lines that don't fit
well on the badge.
opw-1853238
When trying to import an OFX bank statetement under MS Windows, a
Traceback states that BeautifulSoup is missing.
During the build process, py2exe didn't autodiscover that BeautifulSoup
is needed by the ofxparse package.
With this commit, BeautifulSoup is explicitely added to py2exe packages.
The Nightly VM was updated accordingly.
opw-1848202
The duration field on a workorder computes the total time spent on it.
The mrp_time_counter widget that is used to display it only computes the total
time spent on it by the currently logged user (ignoring the field stored value).
To help the user understand the inconsistency between the two values, we add a
help tooltip.
Since this really depends on the widget used to display the value, the tooltip
is directly put in the view.
opw 1854802
If you don't define an explicit address type, then the
record is not going to be accessible.
In the ORM:
>>> env['res.partner'].create({'name': 'Test', 'type': False})
res.partner(44356,)
>>> env['res.partner'].search([('type', '!=', 'private'), ('id', '=', 44356)])
res.partner()
>>> env['res.partner'].search([('type', '=', False), ('id', '=', 44356)])
res.partner(44356,)
due to the fact that NULL in the database is undefined and can't be
compared to a specific key.
User B mentions @UserA in a channel on discuss
User A gets two notifications: one for direct chat,the other for the channel
User A clicks on the notification for the channel
Before this commit the form view of the channel was opened
After this commit, the channel is opened in discuss
OPW 1849577
closes#25074
Before this commit one could choose any journal for the registering exchange rate differences.
That could lead to accounting errors down the line
After this commit, we apply a domain on the field, and there is no problem afterwards
OPW 1851616
closes#25101
- Create a PO with 2 different product lines (A & B), confirm.
- Change quantity of B and save
The chatter message mentions A, while the quantity of B was changed.
opw-1849258
When creating an allocation by employee tag if you copied any allocation
made, it was still linked to the parent allocation, hence when
confirming/refusing the parent allocation it would confirm/refuse the
copied one too.
Closes: #25106
In 10.0, the resolution of the m2o field in a read group was
done with a `read` (which sudo the name_get). So, the access
rights were bypassed to get the display_name of the related
records.
In 11.0, a call to `name_get` but not as `sudo` causing access
error in some case. For instance;
- a user has read access on project
- he log some timesheets
- its access to project is removed, but not the timesheet ones
- trying to access its own timesheet via the grid view (which does
a read_group)
- the user gets the access error for project.
The read_group should reproduce the behavior of the `read` method,
so the `name_get` for m2o field during a read_group is now sudoed
to restore previous behavior.
opw-1855942
In bd4f09f there was a typo in the domain portal message fetch (two `&`
instead of one), luckily this did not cause an error in 11.0
But in master expression.AND normalizes the domain, thus we got an error.
opw-1819702
closes#25131
The percentage computation of statistics only uses the consumed ratings
>= 1 (through `rating_get_repartition`), while the initial search of the
first 100 ratings doesn't have this restriction. It leads to an
inconsistency between the ratings displayed and the percentages
computed.
Moreover, if there are less than 100 ratings, the percentage might not
be a natural number => use of float and round.
opw-1854863