Commit Graph
173 Commits
Author SHA1 Message Date
Oussama MESSAOUDIandqsm-odoo 7e8ba9bc2f [IMP] website, *: review the header templates + add CTA as an option
*: portal, website_sale, website_sale_wishlist

Part of https://github.com/odoo/odoo/pull/68149
task-2368576

Part-of: odoo/odoo#68149
Co-authored-by: qsm-odoo <qsm@odoo.com>
2021-09-03 14:29:51 +00:00
Cedric Prieels (cpr) e8c586b6d4 [FIX] portal: fix portal searchbar
Small fix which removes an error when the user tries to search for an element using the enter key.
task-2508883
Related PR: https://github.com/odoo/odoo/pull/70305

closes odoo/odoo#71753

Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2021-06-15 09:03:57 +00:00
Xavier-Do 4c4a740e0a [IMP] web, base: add option to profile dispatch
The profiling tools can be useful to profile a test of some execution
point but this is not convenient to identify a problem on a running
instance.

With this commit, an option available in the debug menu allows to add a
flag on the user sessions to enable profiling of all requests. Each
request will be saved in a different 'ir.profile' entry, but will be
grouped under the same session.

The profiling can be activated on all sessions, even for a public user,
but only if profiling is enabled on the database globally.

This commits also adds a speedscope view to visualize saved results in
the web client.

closes odoo/odoo#66590

Signed-off-by: Xavier Dollé (xdo) <xdo@odoo.com>
2021-06-02 11:46:28 +00:00
Leonardo Pavan Rocha c53724ebc3 [IMP] *: adds generic user avatar
Description of the issue/feature this PR addresses:
It is currently quite difficult to differentiate users. Most of the time, people
don't take the time to upload an actual avatar so everybody looks the same. This
PR generates a custom avatar with the users initials and random color to
differentiate them. For res.users, res.partner and hr.employee, image fields now
hold the binary image and avatar are used to show the image or svg.

Current behavior before PR:
Avatar had only random colors and was being saved in database, being inefficient

Desired behavior after PR is merged:
A new mixin defines image fields and in case no image is set, it generates an
SVG image with the user's initials and random color.

closes odoo/odoo#69819

Task: 2404630
Related: odoo/enterprise#18199
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2021-06-01 14:36:23 +00:00
Mohammed Shekha ccc56e28a3 [IMP] *: replace fa-spinner with fa-circle-o-notch
Slightly improve the overall UI of Odoo with a more modern feel by updating the
current 'loading' icons that look quite old school.

Use fa-circle-o-notch instead of old style fa-spinner

task-2346142

closes odoo/odoo#59454

Related: odoo/enterprise#13908
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2021-05-21 11:48:32 +00:00
Simon Genin (ges) ecfe85db84 [REF] web: static/src/(img|fonts) => static/(img|fonts) 2021-04-29 07:34:40 +00:00
Xavier Morel c7002c7be7 [FIX] portal: de-t-raw-ify
As part of that, also mark one of the searchbar_inputs label as markup-safe.
2021-04-29 05:34:21 +00:00
Xavier Morel 7d1dcd1ec1 [FIX] portal: de-traw-ify 2021-04-29 05:34:20 +00:00
Xavier Morel 32fca57fcb [FIX] *: page['num'] is just an integer, no idea why it'd use t-raw 2021-04-29 05:34:20 +00:00
Xavier Morel 996cb85c27 [FIX] *: mass replace known t-raws by t-out
* QWeb bodies should be markup-safe so `0` should always be
  markup-safe.
* `head` is qweb-rendered so the same.
* The `json` pseudo-module in qweb templates is `json.scriptsafe`,
  which should be markup-safe.
2021-04-29 05:34:20 +00:00
Benjamin Vray 3e03bd9a39 [IMP] website_sale, *: redesign the product page for e-commerce
*: portal, portal_rating, product, sale, sale_product_configurator,
website, website_sale_comparison, website_sale_product_configurator,
website_sale_stock, website_sale_wishlist, point_of_sale

Redesign of the product page + various UX improvements.

task-2009483
Part of #66736
2021-04-01 14:56:36 +00:00
Julien MougenotandSimon Genin 03641610c2 [REF] *: convert all modules to new asset system
Conversion of all modules to the new manifest assets declaration.

Part of task: 2352566

Co-authored-by: Julien Mougenot <jum@odoo.com>
Co-authored-by: Simon Genin <ges@odoo.com>
2021-03-31 13:57:18 +02:00
Simon Genin (ges)andJulien Mougenot 216b530002 [REF] website: remove priority for assets frontend in portal
This commit removes a needless priority attribute on a portal template.

This has been done to improve consistency in asset bundles declarations
by reducing them to the simplest possible templates.

Part of task: 2352566

Co-authored-by: Julien Mougenot <jum@odoo.com>
Co-authored-by: Simon Genin <ges@odoo.com>
2021-03-31 13:57:17 +02:00
Ivan Yelizariev c2f703e208 [FIX] website,portal: set default lang in website
BEFORE it was mistakenly done in portal module, but ``website`` may be not available there

---

original commit https://github.com/odoo/odoo/commit/e9ef98410fa6acba165f3056d9c52f8e68cc768b
opw-2416586

closes odoo/odoo#64129

X-original-commit: 061190123dc21001aaff6b19cf9a417b390a576a
Signed-off-by: Ivan Yelizariev // IEL <yelizariev@users.noreply.github.com>
2021-01-06 09:13:35 +00:00
fw-bot 0a8f4b6cda Purpose
=======

This PR is in the continuity of odoo#62360.

- Display remaining hours in task sales_line_id (name_get + task form view)
- Remove internal reference from services demo data
- Display sol in project timesheets list if project is billable
- Remove use of non_allow_billable in timesheets as it has been removed from project and task in previous PR (see above)
- Only recompute planned_hours for service product
- Determine the correct SOL for timesheet
- Set the last SOL of customer on timesheet if none is set on task or project
- Allow edition of so_line in timesheet
- Restrict SOL on project to sale lines with a service product
- Use same widget on partner_id many2One than in sale.order (using ranking)
- Remove timesheets table in SO and invoice portal.They were added in previous PR (see above). This introduces the use of links to /my/timesheets/.
- Review portal timesheets (my/timesheets/ and link from orders and invoices)
- Activate group_uom "Units of Measure" on sale_timesheet install
- Hide partner phone number in task form view
- Only determine SOL of task and timesheet if allow_billable=True
- Filter SOL in task so that it matches the SOL of the project SO
- Display red label if remaining hours is negative
- Change SO compute behavior
- Only open SO for salesman on project overview

task-2409761

--
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr

closes odoo/odoo#63695

Forward-port-of: #62900
X-original-commit: b1985773f3a67e28049f9e2bb635bcab059ad9c0
Related: odoo/enterprise#15427
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2020-12-22 13:40:28 +00:00
Ivan Yelizariev 7411403f97 [FIX] portal: show default lang in selector when lang is not found
STEPS:
* install project, website
* install translation, but don't apply to website
* create a task with Customer that has that language
* close the task
* open rating request message in ``Settings >> Technical >> Messages``
* click any of the smiles

BEFORE:

Error to render compiling AST
IndexError: list index out of range
Template: portal.language_selector
Path: /t/t[1]
Node: <t t-set="active_lang" t-value="list(filter(lambda lg : lg[0] == lang,
languages))[0]"/>

AFTER:
no errors, page is translated to customer's language, though language selector
shows default website's language

---

opw-2416586

closes odoo/odoo#63640

X-original-commit: e9ef98410fa6acba165f3056d9c52f8e68cc768b
Signed-off-by: Ivan Yelizariev // IEL <yelizariev@users.noreply.github.com>
2020-12-21 12:18:27 +00:00
Jairo Llopis beb50e8047 [FIX] portal, website_sale: translatable and responsive help text
This help text is invisible in mobiles, where you can't "hover" to see an input's `title`.

Also it was impossible to translate due to the way it was written.

Now it's usable and translatable. Uses a small help text as explained in https://getbootstrap.com/docs/4.1/components/forms/#overview

@Tecnativa TT17694

this commit closes #51152

closes odoo/odoo#62690

Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2020-12-01 14:06:57 +00:00
Adrien Widart 20289fbd1a [FIX] portal: if no user photo, display placeholder
If the website header template uses the user's photo, and if this one does not exist, a 500-error is returned.

To reproduce the error:
(Need website)
1. Go to the website
2. Edit
3. Change the header template
	- Select one that uses the user's photo
4. Save
5. Go to Settings > Users & Companies > Users
6. Select your account
7. Edit
8. Remove your photo, Save
9. Go back to the website

=> 500 error

When the user doesn't have any photo, the template uses the placeholder image.

OPW-2378269

closes odoo/odoo#62174

X-original-commit: ae0acf83cee73f6617200387bb923bf875e1830b
Signed-off-by: adwid <adwid@users.noreply.github.com>
2020-11-23 12:29:25 +00:00
Romain Derie 6bf6688d73 [FIX] portal, sale: scroll correctly if fixed header
Depending of the configuration, on the portal, anchor do not consider the
header, so a part of the text is hidden by the navbar.

task-2290213

closes odoo/odoo#60415

X-original-commit: 2cd9a9d12f4cd7352430c166145a7488af0c120c
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
Signed-off-by: Romain Derie <rdeodoo@users.noreply.github.com>
2020-10-21 09:17:14 +00:00
Benjamin Vray e42dcfba36 [FIX] website, *: keep logged user buttons outside the autohide menu
*: portal

The dividers were removed with the new header templates but we still
needed them to know which items do not need to be folded in the
auto-hide menu. Instead of adding these dividers again, we added a new
class for these elements.

part-of: #59640
task-2312878

closes odoo/odoo#59804

X-original-commit: 59584974aa891b1182164adac3d3563d882bcfd7
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2020-10-12 17:45:22 +00:00
Victor Feyens 2da7bc2adb [REM] portal, *: remove archive_groups dead code
PURPOSE

Clean code and be and more performance oriented.

SPECIFICATIONS

Various portal pages hold references to archive_groups. It was a summary
of customer documents for portal, containing a count of all documents split
by model.

Currently its computation is not used. Indeed archive_groups is displayed
only in 'my_details' page that does not hold any document-based reference
or code call. Other calls to archive_groups are dead code as the result is
not used. Since 13.0 it is even not computed on standard pages to speedup
their load (as it was not used).

It is not used anymore and its computation and references can be removed
safely, especially with v14 in mind for which we want to remove dead code
to maintain.

Followup of odoo/odoo#55228

LINKS

Task ID-2329081
PR odoo/odoo#55800
PR #12368

closes odoo/odoo#56859

X-original-commit: e75086000ee4317b2ad2994db5d906fbcbd5081f
Related: odoo/enterprise#12830
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
2020-09-01 10:30:32 +00:00
Andrea Grazioso (agr-odoo) eda684fc61 [FIX] portal,project: allow other company users to correctly access my/tasks page
In multi-company configuration setup, Company A and Company B.
Have a project in Company A that I want to share with a user in
Company B. The user only has access to Company B.
Share using the project link and open using the user

Traceback error will raise.

Adding a default value to retrieve in case the filter option is used
but the user has no permissions on the records.

opw-2322236

closes odoo/odoo#57090

X-original-commit: bcb62e8f6e20bccc2f2350bdc1268c495b7103da
Signed-off-by: agr-odoo <agr-odoo@users.noreply.github.com>
2020-09-04 13:54:45 +00:00
qsm-odoo 9b2178952d [IMP] portal, website: add the ability to have a lang selector in header
Part of https://github.com/odoo/odoo/pull/56427
task-2264627

closes odoo/odoo#56705

X-original-commit: 9b67f6ee0783e8b02edb260b3ba5a0322187a416
Related: odoo/design-themes#352
Signed-off-by: Xavier Dollé (xdo) <xdo@odoo.com>
2020-08-28 08:19:46 +00:00
Cocographiqueandqsm-odoo 2a1aa808e9 [IMP] website, *: review existing navbar templates and templates system
*: portal, website_sale, website_sale_wishlist

Portal-without-website header is now more basic, without the need of
a collapsed element. It is then entirely replaced when website is
installed with header templates, t-calling all the main parts.

Part of https://github.com/odoo/odoo/pull/56427
task-2264627

X-original-commit: d3d5983e0a76eb6500e0d3f78f128879b50390e0
Co-authored-by: qsm-odoo <qsm@odoo.com>
2020-08-28 08:19:39 +00:00
Cocographique 118057927e [IMP] portal, website: review sign in templates
Move it in an external view to be able to place it at a different
location depending on the header template.

Part of https://github.com/odoo/odoo/pull/56427
task-2264627

X-original-commit: b4866d192e6f4fdfba15b65fa2c209b35b7eb8c0
2020-08-28 08:19:37 +00:00
Cocographiqueandqsm-odoo c8577568a1 [IMP] portal, website, *: review navbar user dropdown
*: website_sale

Part of https://github.com/odoo/odoo/pull/56427
task-2264627

X-original-commit: c93bd93014685dd532d2244aece6bfeec9562b7a
Co-authored-by: qsm-odoo <qsm@odoo.com>
2020-08-28 08:19:36 +00:00
stefanorigano (SRI)andqsm-odoo a65407b9c3 [IMP] website, *: add off-canvas and other hamburger menu options
*: web, portal

Part of https://github.com/odoo/odoo/pull/56427
task-2264627

X-original-commit: 89bf0d4170f42b40cd46915c7d0160c4818f3b8f
Co-authored-by: qsm-odoo <qsm@odoo.com>
2020-08-28 08:19:35 +00:00
Jeremy Kersten 73b4e9b1b6 [IMP] portal,*: /my counter async
Before this commit, the time to compute all counters was making the rendering
of the portal page slow.

Now the count is done in rpc after the loading of the page.

Now you can decide which part you want to show on the portal, and only compute
for these one.

It is not because you have purchase installed for your internal process, that
it means that your supplier use your portal and it avoid the computation for
all end users.

We parallelize the counters in arbitrary 3 rpcs.

closes odoo/odoo#55999

Related: odoo/enterprise#12456
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2020-08-17 15:59:03 +00:00
Xavier Morel ee1b67d607 [IMP] portal: /my/security page
* allows portal users to update their password
* and manage their API keys
* any anything technical / security related we may need to add in the
  future

Also bridge module for the password meter (auth password policy).
2020-08-14 23:06:11 +00:00
Benjamin Vrayandqsm-odoo 745ef9de97 [IMP] website, web, portal: new options language selector in footer
Add an option to display the language selection inline or with a
dropdown. Add an option to choose if language labels are flags, text
or both.

Part of https://github.com/odoo/odoo/pull/55300
task-2203383

Co-authored-by: qsm-odoo <qsm@odoo.com>
2020-08-14 17:40:58 +00:00
704bcc5527 [IMP] portal, *: move language switcher to portal
*: base, http_routing, website

Make the language switcher available on portal without website
installed.

Part of https://github.com/odoo/odoo/pull/55300
task-2203383

Co-authored-by: Jeremy Kersten <jke@odoo.com>
Co-authored-by: qsm-odoo <qsm@odoo.com>
2020-08-14 17:40:58 +00:00
Pierre Collinet (pic) 5aa7839d0b [FIX] project: only internal users in "Assigned To" field of task form
Values filled in "Assigned To" m2o were differing:
- if I "CREATE" task with "group by" then m2o is filled with
internal-users + portal-users
- if I "CREATE: task without group by then it filled with internal
users only.

In Project also same case.

To have a more coherent behaviour, we decided to put only internal
users in both cases.

Task ID #2229592
Community PR #54776

closes odoo/odoo#55820

X-original-commit: 8269c1958843002246c589cdd593417dec44f024
Related: odoo/enterprise#12376
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2020-08-12 14:19:10 +00:00
Victor Feyens 9004e90ab0 [IMP] portal: template performance
Avoid calling thrice the same function during the rendering of the
template.

`can_edit_vat()` checks whether partner has invoices or sales orders to
avoid VAT modifications, but this check should only be done once by
rendering.

Gain of up to 8 queries (if sale & account installed).

X-original-commit: 3860749074608068efdba940ccb983d89516cf8d
2020-08-03 07:23:29 +00:00
DramixDw f0420013e0 [IMP] website: make pager post compatible
As we introduced postlinks, some routes are no longer compatible with
GET requests anymore. Some of those routes were using the pager which
only send GET request. In order to make the pager comptabile, we're
addding a way to use postlinks in the pager.

task-2250385

closes odoo/odoo#52475

Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2020-06-05 15:47:06 +00:00
Ravi Singh c96edead36 [IMP] project: improve responsiveness of description.
In this commit- we have improved responsiveness of description when it's too long
in projects and tasks inside the portal.

task-2124829
Closes #48402

Related: odoo/enterprise#9497
Signed-off-by: Simon Lejeune (sle) <sle@openerp.com>
2020-04-16 06:21:51 +00:00
Ravi Singh 9bfce9a999 [IMP] purchase: revamp of purchase order view inside portal.
In this commit- we have changed purchase order view(portal side) and included
sidebar and chatter just like so view.

task-2124829
Closes #48402
2020-04-16 06:21:51 +00:00
Benjamin Vrayandqsm-odoo cb20435069 [IMP] website, *: add templates for header
*: portal

Part of https://github.com/odoo/odoo/pull/38950
task-2087641

Co-authored-by: qsm-odoo <qsm@odoo.com>
2020-03-31 18:16:08 +00:00
Jeremy Kersten 51c9599b79 [FIX] website: perf - use lang cached to check if rtl or not
Before this commit, on each rendering of frontend layout, we make a new request
to check if env lang was in rtl or ltr.

Now we use a cached method, that have more than probably already cached this
record.

Related to #47257
task-2211013

X-original-commit: 7566b06500e42593919631cc6fa180aececfc623
2020-03-19 15:37:45 +00:00
Kevin Baptiste 6cbe824871 [REV] web: reverts update to fontawesome 5.11.2
This reverts commit ff1c35513a.

closes odoo/odoo#41480

X-original-commit: 116057b26e71db4692280463669f3e80d813ddcc
Related: odoo/enterprise#7110
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2019-12-09 10:33:36 +00:00
Kevin Baptiste ff1c35513a [IMP] web: update to fontawesome 4.7.0 to 5.11.2
FontAwesome 5 introduced new names for some icons as described on
https://fontawesome.com/how-to-use/on-the-web/setup/upgrading-from-version-4#name-changes

This commit replaces the old names to the new ones.

closes odoo/odoo#35826

Taskid: 2050241
Related: odoo/enterprise#5180
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2019-11-28 10:05:12 +00:00
Romain Derie 4178a383fd [IMP] http_routing, portal, website_*: clean 404 templates
A nicer 404 layout was introduced with e9106f8f98 but the specs got changed
just after it was merged.

It has been decided to make the 404 fully editable (before, everything was
fully editable except the popular page div).

In order to do this, the 404 template can't have inherited views, which brings
the following changes:
1. Remove every main website module xpath view adding their most popular page
2. Remove the xpath view in portal to add popular page part (was not needed
   in http_routing/web). It has been decided that having `Home` ('/' url) even
   without portal and/or website is not a big deal.

Those changes allow the 404 template to be written in a single view without any
inherited views.
The 404 will be the same for backend only databases, portal and website.

task-1966460

closes odoo/odoo#40637

Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2019-11-21 14:12:47 +00:00
Romain Derie e9106f8f98 [IMP] http_routing, portal, website: nicer 404 layout
This commit introduces a nicer 404 page, which is basically the same layout as
the one used on Odoo.com.

Also, the 404 is now fully customizable, blocks can be drag'd & drop'd.

task-1966460

closes odoo/odoo#38901

Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2019-11-18 13:59:09 +00:00
fja-odoo 423402f1e5 [IMP] http_routing, *: move error pages to http_routing
* = portal, website, test_website, account, sms

Portal an Survey error pages were ugly default pages.
Now the error pages will be the same as the website ones.

Also fixing single module builds tests

task-2059969

closes odoo/odoo#35535

Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2019-10-02 06:59:15 +00:00
Thibault Delavallée bb197b1f87 [MOV] portal: split portal chatter from composer
PURPOSE

Allow to manage attachments when updating a frontend review.

SPECIFICATIONS

As those widgets grow it is better to have them in separate files in order to
better understand code organization. Future commits will improve composer
behavior, notably in attachments management.

LINKS

Task 2066600 (manage attachments)
Task 2058595 (eLearning v13 testing)
2019-09-04 11:41:47 +00:00
Christophe Simonis b792ba7d9a [MERGE] forward port branch saas-12.3 up to 752b2553c6 2019-08-08 11:52:13 +02:00
Christophe Simonis 7d04dc1c7c [MERGE] forward port branch saas-12.2 up to 9e74730a26 2019-08-06 18:48:24 +02:00
Christophe Simonis 0fadd586fa [MERGE] forward port branch 12.0 up to ff9ddfdacc 2019-08-06 15:57:57 +02:00
Christophe Simonis ff9ddfdacc [MERGE] forward port branch saas-11.3 up to 97d81f1220 2019-08-06 12:13:19 +02:00
Christophe Simonis 97d81f1220 [MERGE] forward port branch 11.0 up to b8be821058 2019-08-05 17:12:30 +02:00
Alex Tuyls 3682232d1e [FIX] portal: zipcode field labelled as mandatory
Field zipcode is optional, while it is labelled
as mandatory.

closes odoo/odoo#35401

Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2019-08-02 09:37:30 +00:00