Purpose is to clean a bit the card layout in documentation courses, notably
* better layout for cards:
* fetch (in controller as slides in course display are sudo-ed to display
a card even if current user has no access) completion data and display it;
Commit linked to task ID 1941250 and PR #31317.
When a user join a channel, the button 'join' changed and indicates
him that he is now member, but since the page is not refreshed, he
still can not access to slides displayed on the page.
This commit makes the widget trigger a page refresh.
Commit linked to task ID 1941250 and PR #31317.
Last review should be a comment. When fetching the last message on a course
the returned message can be a system notification (like "Channel created").
This is not what we want, mostly with the feature allowing to modify the body
of a message. This commit add restriction on the domain fetch last message.
Fix default rating value on popup widget. The conversation ratio (rating 1-10
and 5 stars) was not applied everywhere. So, the number of displayed stars was
doubled. This is now fixed.
Commit linked to task ID 1941250 and PR #31317.
Purpose: the "My courses" button on the slides home page now redirects the user
to the list of channels for which he is a member of.
In this commit we also clean a bit controller code to remove support of
category_id which makes no sense on a page displaying courses as categories
are not cross-courses, only course-specific.
A clear search icon is also added.
Commit linked to task ID 1941250 and PR #31317.
This commit do some small UI adjustment:
* remove a potential doubled <hr/>;
* remove a "mb8" to make views consistent whether you're a channel publisher
or not;
* add a specific parameter to see 'uncategorized' slides on a documentation
channel as /category is a slug and does not allow Falsy values;
Commit linked to task ID 1941250 and PR #31317.
Purpose of this commit is to add a circular progress around the rank of
a user when seing its profile. It allows to see at a glance advance for
next karma rank.
Commit linked to task ID 1941250 and PR #31317.
Some addition to demo data, notably some members and a few more slides.
I bet there will be other commits improving demo data, one slide at a time.
Commit linked to task ID 1941250 and PR #31317.
Currently tooltip goes out off the screen when the
graph view (in line mode) presents a large number
of groups.
The present commit splits the tooltip content in
three columns when the number of groups exceeds
20. This split is not done in mobile mode because
it is not an appropriate in that situation.
Co-authored-by: Mohammed Shekha <msh@openerp.com>
Related to Task: 1917958
closesodoo/odoo#30288
In graph line mode, min and max abs are
displayed beyond the screen when there are less
than 3 abs.
This is happening because nvd3 fixes their
text-anchor to 'middle'. The present commit fixes
correctly their text-anchors to start and end
respectively by using the '!important' rule (it
seems difficult to do otherwise).
Co-authored-by: Mohammed Shekha <msh@openerp.com>
Related to Task: 1917958
Before this commit, when adding an emoji from the emoji menu next
to the composer, the focus was not automatically set on the input.
The input was correctly focused during the event handler of the
clicked emoji, but the browser default behaviour applied right
after was focusing out the input.
Task-ID 1943770
closesodoo/odoo#31325
It is assumed that there is a unique mail.channel.partner per (channel, partner)
pair, yet there is nothing enforcing this restriction.
As a result field access on the channel partner crashes on field access.
closesodoo/odoo#31259
The three columns in the skills widget (namely: skill name,
skill level and progress) did not evenly span the width of
the table.
This commit set the css width attribute of the first two
columns to 33%. The last column (added by js) takes the
remaining space)
closesodoo/odoo#31326
In mobile, a many2one field is displayed as a kanban view
instead of a tree view.
However skills and resumé widgets have been designed
to work for tree views.
=> traceback when displaying the widgets in mobile.
Fix: force the mode to `tree`
On the accounting dashboard, click on the button
"new invoice" on the customer journal.
Validate the invoice
Before this commit, it crashed because, as always
the key "default_type" was propagated all the way down
to the attachment creation
After this commit, we clean the context from that key
to avoid the problem
Note: There is no clean and safe method to clean
the context from keys only useful to `default_get`
in stable...
OPW 1943439
closesodoo/odoo#31319
The purpose of this commit is, remove "our order reference" because it is already in the title, replace purchase order confirmation by purchase order and add the purchase representative.
Task Id #1902886closesodoo/odoo#31099
Signed-off-by: Simon Lejeune (sle) <sle@openerp.com>
The next test was identical to the removed one, with the exception that
it inserts a character at the end, which really is the behavior we want
to test. The removed test was broken because it expected the range on
the parent, which is anyway equivalent in this case. This is confirmed
by the fact that inserting a character at either ranges indeed inserts
the character where it is expected to do so.
Deleting all the contents of a block node replaced it with a blank
paragraph node. To restore v12 behavior, it should only do that when
pressing backspace in an already empty block, which is now what it does.
In the user preference, change the timezone of the user to blank (False value)
Save
Before this commit, a cryptic error was raised because the field tz in
resource.resource is required
Note that when writing on res.user, we write some fields (including tz)
on hr.employee, which is a resource.mixin, and therefore uses resource.resource
After this commit, we make the field required in the view
OPW 1934462
closesodoo/odoo#31312
When in the media modal, if one selected no media but clicked the "ADD"
button it resulted in an error and a failed RPC instead of simply
closing the modal without doing anything. v12 behavior is now restored.
closesodoo/odoo#31308
Purpose of this merge is to provide several fixes related to new elearning
application. Those are mainly fixes for front-end templates and first
design improvements / fixes.
See sub commits for more details.
Merge linked to task ID 1941250 and PR #31279.
closesodoo/odoo#31306
- slidesChannelDropdownSort : dropdown items back to visible (was white on white)
- Featured lesson : change icon to bullhorn instead of + icon
- Pass certification fullscreen button : btn primary
- set max height to fullscreen content to 100% minus header
- Fix 'infographic' slide type image view
- change image for 'Furniture Technical Specifications' course
- fix fullscreen presentation mode: The condition to add the iframe that
contains the presentation of the document was wrong and, so, never met.
Those conditions are evaluated in javascript and not in python as it's part
of t-name template linked to a javascript widget.
Commit linked to task ID 1941250 and PR #31279.
The main condition to be able to see a profile is that the user we want to
see the profile is website_published.
But if a new user sign up and wants to access his own profile, he must
get access to his own profile, even if he is (not yet) website_published.
Commit linked to task ID 1941250 and PR #31279.
* remove useless slide management buttons. This commit removes the frontend
edit/publish/unlink buttons on slide cards (for the 'document' channel view)
as they were not handled on the backend side.
* hide slide type filter for documentation channels. The slide type filter
(including statistics) on the left side of the channel frontend view
was only handled for channels of type 'documentation'. This commit hides
the slide type stats/filters if the channel is not of type documentation.
* display add content/section buttons based on user rights. Fixes two channel
frontend issues with user rights management:
* Users that have the right to upload (can_upload field) should have the
"Add content" button available.
* The "Add section" button should only be available to website_publisher
accordingly to ACLs
Commit linked to task ID 1941250 and PR #31279.
Force white background + add the default bootstrap shadow. Do not use <h4>
tags to keep the right font-size on mobile. Simplify layout, add a second
navabar to handle content supposed to be moved to the right.
Commit linked to task ID 1941250 and PR #31279.
Various fixes linked to homepage of courses
* move channel navigation in its right container, clean its display and
related templating;
* display a Completed badge for completed courses;
* display a cropped image for channel image card in order to avoid blank lines
around image not having the right aspect ratio;
* use standard qweb widgets, notably float_time;
* make header and footer of /slides and /slides/all editable and improve
their styling;
* remove old and unused css linked to previous versions of homepage;
* various small code cleaning;
Commit linked to task ID 1941250 and PR #31279.
Co-Authored-By: Thibault Delavallée <tde@odoo.com>
Co-Authored-By: Stefano Rigano <sri@odoo.com>
This commit puts the certification slide from the demo data into a category
so that it's correctly displayed on the channel frontend view.
Commit linked to task ID 1941250 and PR #31279.
- Go to Accounting > Reports > Invoices
- Go to the pivot view
- Enable 'Total' and 'Untaxed Total' in the measures
The Total is wrong.
`amount_total` is retrieved on the invoice, unlike the subtotal which is
retreved on the invoice line. We apply the same logic than
`residual_company_signed`.
opw-1950663
closesodoo/odoo#31991
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
When used with a mutable default value, `dict.fromkeys()` builds a dict
where each key references the same value:
>>> r = {}.fromkeys(['foo', 'bar'], {})
>>> r
{'foo': {}, 'bar': {}}
>>> r['foo']['val'] = 1
>>> r
{'foo': {'val': 1}, 'bar': {'val': 1}}
Updating one key's value will change the value for all keys.
closesodoo/odoo#31659
Signed-off-by: Jérome Maes (jem) <jem@openerp.com>
Import a list of partners with their addresses.
The state_id field is usually filled with the state codes.
E.g. 'CA' is used for California, but also for Cádiz (Spain), etc.
The import function (db_id_for) uses a name_search on the res.country.state,
and takes the first matching result.
It follows that the state does not necessarily match the country.
Therefore we add a _check_import_consistency in the create.
Here we check that the country matches the state's country,
try to find a correct match, and if we can't we put the state to False.
Note that if the country is not set both fields will end up set to False:
this is because only a state would mean using a code could give an abitrary
country.
opw 1943904
closesodoo/odoo#31599
Signed-off-by: Nans Lefebvre (len) <len@odoo.com>
make sidebar filter generic
Adding `res_model` and `res_fields` attributes on a field of
a calendar view adds a filter in the sidebar.
It saves the result as the defined model and should save it
in the defined field.
However `partner_id` has been hardcoded in the rpc call that creates
the record. This breaks genericity, it cannot be used with another
field than `partner_id`.
This commit makes this generic by correctly setting the field name
in the rpc call.
closesodoo/odoo#31858
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
Co-authored-by: Ildar Nasyrov <iledarn@gmail.com>
In a report a lot could be opened with an action that was a number
instead of expected string or falsy value.
In web and web_studio, we sometime expect the action name to be a string
or falsy (calls to `bc.title.trim()` in breadcrumbs code).
opw-1951174
closes#31816
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
When creating a new PO from a purchase requisition, the order date of
the PO is the last date of the contract. There is no reason for this,
and althoguh the date can be manually changed, it is error-prone.
opw-1937141
closesodoo/odoo#31969
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>