Do not apply the duplicated route to the products/categories/warehouses
the original one was applied to.
Fixes#31610closesodoo/odoo#31619
Signed-off-by: Simon Lejeune (sle) <sle@openerp.com>
Purpose of this merge is to perform a quick linting after having merged
several tasks and PR adding all requested eLearning features. Templates
are split for better understanding now that main templates for homepage,
course and lessons are in.
A model cleaning is performed as well as a-bit-late additions to stick
to specifications, notably splitting short and long description fields
on course.
See sub commits for more details. Merge linked to task ID 1941250 and
PR #31272.
Purpose of this commit is to provide a better way to display channel information.
Description is split into two fields. A text one, holding the short description
and used in channel header. A long html one, holding more details course
description.
Commit linked to task ID 1941250 and PR #31272.
Purpose is to reduce model naming complexity. Currently you have: slide_type
<type>, and related statistics on channel and category nbr_<type>s with a
trailing and error-prone s. Let us remove the trailing s to reduce complexity
of code reading. Some code cleaning in statistics computation is also done.
Commit linked to task ID 1941250 and PR #31272.
This recently introduced mixin allows to hide complexity of defining, using
and resizing images. Let us use it in channel and image model.
Commit linked to task ID 1941250 and PR #31272.
Quiz questions and answers should be translatable as they are intended
for end users and are displayed in courses frontend. Some required fields
are also missing. Some docstrings are cleaned.
Commit linked to task ID 1941250 and PR #31272.
Purpose is to perform some linting in code. No functional change should
occur with this commit, only some code move. Diff may appear huge but
it is just because some files are split.
This cleaning allow to better understand code and templates architecture
now that eLearning feature has landed in Odoo Community. It will ease future
additions, modifications and fixes.
Containing :
* [REF] make some internal slide-related methods private as they are not
intended to be called by outside world;
* [MOV] new channel invite wizard in wizard folder;
* [MOV] split frontend templates in some files to better locate code. There is
now files for homepage, course, lesson, embed and utils in addition to
slide-related profile template;
* [REM] dead (unused) templates;
Commit linked to task ID 1941250 and PR #31272.
Before this commit, doing expression.OR() with only FALSE_LEAF would
yield [] which is equivalent to TRUE_LEAF and is therefore not correct.
The same happened (to a lesser extent) with expression.AND() within an
expression.OR(), since the former would return a [] which would be
ignored by expression.OR().
See tests for a clearer view of the use cases.
Fixes#30113, #26540closesodoo/odoo#31202
The admin can decide to publish/unpublish messages in the comments
of a product from the website. The button is also shown for notes
even if they are never published.
opw-1935337
closesodoo/odoo#31420
When importing an invoice without specifying the type, the invoice type
is set to `out_invoice`, but the account set is the supplier account.
At this point, the invoice type is simply undefined (`False`). It will
be set by default at creation to `out_invoice`. Therefore, we reach the
`else` condition which uses the supplier info.
We simply inverse the condition, so it creates a consistent object.
However, it raises a bigger question about how the action context should
be kept at invoice. We won't address it :-)
opw-1925547
closesodoo/odoo#30154closesodoo/odoo#31373
- Switch to French language
- Go to Inventory > Inventory Adjustment
- Launch an adjustment
The field 'Real Quantity' doesn't follow the float formatting.
This is because the widget is set as `field_float_scannable`, which is
not recognized by the formatting function.
Since the widget descriptor has priority over the type descriptor, we
must explicitly take this widget into account, on top of adding the
`format_value` method.
opw-1940884
closesodoo/odoo#31366
Indeed some slides are available for external people if is_preview is set
to True. It indicates slide is available for teasing. It should not be
marked as completed for non members.
This commit is linked to task ID 1942836 and PR #31239.
Co-Authored-By: Aurélien Warnon <awa@odoo.com>
Co-Authored-By: Thibault Delavallée <tde@odoo.com>
Do not fall into an infinite loop when fetching content of an empty webpage
slide in the newly-introduced fullscreen mode.
This commit is linked to task ID 1942836 and PR #31239.
Co-Authored-By: Aurélien Warnon <awa@odoo.com>
Co-Authored-By: Thibault Delavallée <tde@odoo.com>
Purpose is to ensure more advanced use cases are still supported in new
elearning platform in addition to more public use cases. Fields controlling
access are now
* enroll: who can enroll on course: public (everyone, simply click on join
button), invite (added by already members) and payment (in bridge with
website_sale, if SO with product is confirmed);
* enroll_group_ids: automatically add members of those groups to the channel
to ease having groups for a given subset of users;
* visibility: who can see a channel and its slides: public (everyone, it means
channel is visible on website for example), members (hidden for non members)
* website_published on channels and slides; non publishers cannot see what
is not published, whatever other parameters;
* upload_group_ids: who can upload on a channel;
* download_security on a slide is completely removed as it makes no sense
for most slide types;
To ensure a better user experience responsible of a channel is added in its
members. People uploading a slide are now also allowed to read it to avoid
having inconsistency behavior between upload_group_ids and access rules.
Some tests are added.
This commit is linked to task ID 1942836 and PR #31239.
Co-Authored-By: Aurélien Warnon <awa@odoo.com>
Co-Authored-By: Thibault Delavallée <tde@odoo.com>
Purpose
=======
Add the possibility to generate the 'Compte Individuel' (or 'Individual Account')
based on the belgian payslip for a specific year.
This report aggregates the payslip lines by month, by quarter and for the entire
year.
closesodoo/odoo#30487
On a pivot view with a default filter which has column and row groupbys
Remove the filter
Collapse all columns and rows
Activate another Filter from favorite which has a column groupby at least
Before this commit, the columns were not displayed in the DOM, though RPC's
and internal data were actually correct
This was because we considered the changes had been done "in place"
taking the old tree to build the new one for the columns
when really, we should have recomputed the column tree
After this commit, the columns display the group we want
OPW 1935155
closesodoo/odoo#31247
currently, if the user wants to refund amount to the customer
and enter negative payment form keyboard its throws an error. that will fixed.
Task: #1935602closesodoo/odoo#31061
After discussion with the Mighty Priestess, the address used in the
Delivery Slip should be the picking partner as a first priority, then
the move lines partner.
And we therefore remove the useless 'Assign Partner' button (but not the
associated method since it is public).
opw-1935039
closesodoo/odoo#31250
In the backend interface, lead/opportunity date_deadline is named
"Expected Closing" or sometime "Expected Closing Date" but on the
frontend it was named "Deadline" for opportunity.
opw-1941273
closes#31244
The link modal only opened on double-click directly on an anchor,
meaning that double-clicking text in a span node within the button (as
is the case in the call-to-action snippet for instance) wouldn't open
the modal.
Now it opens as long as we have an ancestor that is an anchor, unless
the double-click occurs on a media (eg: a pictogram), in which case it
should open the media's modal.
closesodoo/odoo#31229
Before this commit, when we post a message and someone
has received it, there could be a traceback.
Steps to reproduce:
1. Two users are logged in.
2. On one user:
- open any app except Discuss
- From systray messaging menu, click on "New messages"
- Open Discuss
- Post a message in a direct chat with other User.
> traceback `Cannot read property 'getID' of null`
closesodoo/odoo#31228
-Add a field note to allow users to record detailed information about a lot/serial number.
Related Task Id : 1938650
closesodoo/odoo#31089
Signed-off-by: Simon Lejeune (sle) <sle@openerp.com>
Task 1920906
remove the l10n_be_structured_comm field
random/date references will not be longer used
adapt for the last changes in account
closesodoo/odoo#29858
Signed-off-by: Quentin De Paoli (qdp) <qdp@openerp.com>
Task 1920906
Rework of the invoice references. We can now select references based on partner or on invoice number, and the Odoo way, or the (newly implemented) european way (SEPA RF references)
The reference type informations are no longer stored on the company but on the sales journals
Since recent changes product configurator is now located in its own module.
Some code remaining in website_sale_stock should be located in its own
bridge module.
closesodoo/odoo#32336
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
post_inventory method does not return anything (in stock), and True (in
mrp). Anyway the returned result is not used anywhere and does not have
any meaning.
In stock_account call to super is done on some sub record sets and result
of super is returned. However due to code architecture it is unsure whether
super is actually called. Let us avoid any issue with res being undefined if
there is no call to super done.
Steps to reproduce:
- Create a channels C with user A linked to an employee E
- Create project P with privacy_visibility='followers' meaning only visible for employees that follow P
- Add the channel C as a follower of P
- Log as user A go to Project app
Bug:
The project P is not readable for A
opw:1958386
closesodoo/odoo#32324
Signed-off-by: Simon Goffin (sig) <sig@openerp.com>
Clicking on 'install more providers' should only show module of external
carrier. In the previous domain, we get delivery_barcode and
website_delivery_ups in the domain which is not intended.
Task: 1942231
Co-Authored-By: Hetal Dhanak <hdh-odoo@users.noreply.github.com>
If a manufacturing order doens't have any raw move, it now triggers a user error in case of action_confirm and simply change it's state in case of cancel.
Task: 1942231
Co-Authored-By: Hetal Dhanak <hdh-odoo@users.noreply.github.com>
On the stock picking form view, we would like the cancel button is at the far right of the button bar.
Task: 1942231
Co-Authored-By: Hetal Dhanak <hdh-odoo@users.noreply.github.com>
This commit change the word 'state' by 'status' in the picking pdf reports.
Task: 1942231
Co-Authored-By: Hetal Dhanak <hdh-odoo@users.noreply.github.com>
Use the priority widget (the yellow stars) to represent the priority field on stock.picking
Task: 1942231
Co-Authored-By: Hetal Dhanak <hdh-odoo@users.noreply.github.com>
Before this commit:
Instead of using the `to_html` method from `ir.qweb.field.monetary`, we would
use `_format_amount` that would mimick `to_html` but without the HTML part,
keeping only the integer amount.
That was making the python, JS and XML code unnecessarily complexe.
Python: code duplicated between `to_html` and `_format_amount`
XML: double badge in DOM, one to show text and one to show t-field/monetary DOM
structure ($ <span class='oe_currency_value'>50.5</span>)
JS: handle both badges depending if need to show text or price, complexe
selector to target t-field integer DOM, and also handle d-none to show only
one at a time.
Now:
We removed the `_format_amount` method and use the standard one.
That way, XML, JS and python could be clean from unnecessary complexity.
Coming from #31857 (task-1867265)
closesodoo/odoo#32327
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
odoo/odoo#31857 retrieve asynchronously the delivery carrier price instead of having to
click on every one of them.
If the delivery is free thanks to coupon, the delivery price should be free and
no need to compute it.
Closes#31857
task-1867265
Before this commit:
User landing on checkout payment step had to select a carrier.
These carriers only showed 'Select to compute price'. This was done to
prevent the page to take seconds to load, since it would compute all the
carrier price by querying these carrier API then display the page.
The users would still click on every carrier anyway to check all the prices and
select the cheapest one.
Now:
Once the page is loaded, we will asynchronously retrieve every carrier prices.
That way, the page rendering page will not be affected and the user will be
able to see the price of every carrier after a few seconds without having to do
anything.
Closes#31857
task-1867265
This commit does nothing except encapsulating code from
_handleCarrierUpdateResult related to badges.
This is needed for the new feature to allow carrier prices to be loaded
asynchronously, see #31857
task-1867265
This commit introduce a new module which is a bridge between
`website_sale_coupon` and `website_sale_delivery`.
Before that, commit odoo/enterprise@a0a8118 and odoo/odoo@1ab53c2 introduced coupon
code into delivery module, and coupon+delivery code into `website_sale`
module.
That was the only way in stable but was nasty as it is not only code from one
module in another module but also code from enterprise module in community
module..
This is done to prepare the new feature to load carrier asynchronously on cart,
see #31857
(Note that `sale_coupon_delivery` already exists)
task-1867265
Coming from #31857
As coupon does, show 'Free' instead of '$0' when a delivery is free
(`free_over` field).
That is more coherent and also prevent flicker when coupon and delivery are
both installed.
Step to reproduce:
- Have a free promotion from `sale_coupon` giving free delivery
- Have a delivery carrier free over x$
- Go to /shop/payment with over x$ in cart
- Select the delivery carrier, it will show 'Free' then will be replaced a
few seconds later by '$0'
Coming from #31857 (task-1867265)
When a delivery carrier can't compute the delivery price, it returns an error
that is shown instead of the price (eg 'bpost Domestic is used only to ship
inside Belgium..').
But since 1ab53c27f everytime the user compute a carrier price and there is a
coupon allowing free delivery, every listed delivery carrier would have their
badges set to 'Free', including also carrier in error state.
This commit will not replace the error message by 'Free'.
Coming from #31857 (task-1867265)
This commit remove part of the condition as an empty jQuery element is always
truthy.
This commit is cleaning code to prepare the new feature to allow carrier prices
to be loaded asynchronously on cart.
See #31857 (task-1867265).