Extend new dynamic chatter to manage rating
when posting comment.
The model should inherit of rating.mixin and
its frontend chatter should allow rating to enjoy
star widget and rating card.
This is more generic : stats, rating, ... are manage
in one place (this module) for all document.
rating module provide now post a message with a
rating value, though `message_post` method.
'mail.message' also has now a `rating_value` field
to ease searching and filtering.
This will help the ecommerce (and other website modules)
to post a comment associate with a rating.
Message are now fetched and display using javascript
to optimize performance.
Also the chatter is completely rewrite : add pager,
filter possiblity, ...
This commit is mainly technical: posting feature does
not change. Only the display with pager is new.
The goal is also to prepare frontend chatter for a
better integration with rating widget.
The mail.thread mixin is extended to manage the field
website_message_ids (display all messages that can be
seen on frontend by user (employee or not).
When fetching or posting message, a check is done to see
if we need to do it as sudo(). website_mail implement posting
messages with token or sha_in (using in website_quote).
The same verification is now done when fetching messages, via
'_special_access_object' method.
mail.thread mixin will (re)provide the field 'website_message_ids'.
Models can redifined its domain, since it can differ a bit (blog, forum,
... are not the same).
Even if the domain can differ, we still keep it on the mixin since
it will be required for the new chatter frontend (see following
commits).
- Labels are now left-aligned in xs
- col-md-* sizes of newly added field were not the same
Note: forms should be reviewed to have a proper bootstrap structure and
website_form_editor should be smarter (see task-34451)
task-31510
The "Uninstall" button on the module form no longer changes the state of
modules, so that cancelling the wizard will not unexpectedly perform the
uninstallation. The uninstallation is performed only by clicking on the
"Confirm" button on the wizard.
Moreover, the wizard provides clearer information about the impact of the
uninstallation: what apps/modules will be uninstalled and what documents
(models) will be lost.
Each time the invoice is printed, it shows an updated remaining amount on the invoice. The first print, though, is kept as canonical reference as attachment.
Was PR#16343
Some reports require additional information to render. When
accessed in Odoo, the user has to fill a wizard to provide those
information. However, when these reports were opened in Studio,
it crashed as those information were missing (we don't pass
through the configuration wizard in this case).
This fix checks if all the required information are given before
trying to render those reports, and it displays a warning in
the logs in they are missing, which is better than a traceback.
In P3, random.sample requires that its parameter be a Sequence or a
Set. This blows up _cart_accessories.
So opt BaseModel into both ABC, seems to work fine.
* P3 gets a "proper" arg node
* P3's arguments adds two parameters (kwonlyargs and kw_defaults) for
keyword-only parameters
* P3's ``fn(**bar)`` only works if ``bar`` *only has string keys*,
some of the contexts in qweb passed non-string keys and blew up
* P3's ast.If requires a non-empty body, add ``[ast.Pass()]`` ballback
for non-literal bodies
* Python 3.4 adds new convenient bytecode-inspection API to dis which
is nice, however Python 3.6 also switches from the old bytecode to a
new wordcode which breaks _get_opcodes and *requires* that we use
the new API
* add various opcodes which either were added in Python
3 (CALL_FUNCTION_EX) or were only used for some small corners of
Python 2 but have been expanded or despecialised in Python
3 (BUILD_SLICE)
This fix 2e18070a66595a72a9a626a196c97a689832f667 has been done in stable and some customers
wants to keep the button "Post Inventory" available all the time.
Now the button is just visible in developper mode.
opw:748347
- Create a stockable product, get 61 units in stock
- Create a SO of 75 units, validate
- In the picking, transfer only 50 units, validate and create a
backorder
- Print the Delivery Slip of the picking: it shows 61 units ordered
- Print the Delivery Slip of the backorder: it shows 61 units ordered
- Receive the 14 missing units, recheck availability on the backorder:
it shows 25 units ordered
The quantity ordered should be recomputed from the stock moves when a
partial transfer is done.
opw-747983
Rev. cf1df16aea introduced new callback
fields with restricted access. The lazy hash generation in create() was
however causing access errors for manual transactions created by users
who are not administrators (e.g. Accountants).
Those manual transactions do not typically need a callback, but checking
the presence of the callback requires a limited sudo() context.
Similarly, the execute_callback() method may be called for a manual,
non-admin transaction, and should not do anything if there is no
callback, instead of crashing with an AccessError.
The generation of the hash and execution of the callback should be done
with a normal environment, though, as these must only be used for
transactions run by the system.
opw-747536
- Update view with external_id=stock.view_move_picking_tree and remove
editable attribute on the tree view.
- Create a new picking
- Add a line (form view will open) and click on "Save and close"
=> A traceback show up since 'scrapped' was not in the form view.
- The picking location fields become readonly, and the status bar
disappears
- Save the picking
=> Error: "creation/update: a mandatory field is not correctly set :
[object with reference: location_id - location.id]"
Courtesy of @benwillig
Closes#17738
opw-748353
Steps to reproduce:
1. Create a new Stockable Product
2. Set cost price to 2.00
3. Adjust stock to 10 pcs
4. Enable developer mode
5. Go to Inventory > Reports > Inventory at Date
6. Select current time and retrieve the inventory value
Bug:
The stock valuation for the product was 0.0.
Reason:
When creating a stockable product, Odoo creates
two price history entries with the same datetime
but different cost. The stock valuation report only
takes one of them into account.
Fixes#14889
opw:747857
This is not how you check that a dict contains keys.
This also break the contract of method `get_html` that may now return
`None`, which `get_pdf` does not handle.
This reverts commit 0d2fb541e8.