Commit Graph
141473 Commits
Author SHA1 Message Date
Rémy Voet (ryv) ecdde54c5a [FIX] stock: _free_reservation avoid RecordSet union
To improve the scalability of `_free_reservation` avoid use RecordSet
union. Simplify the parameter `ml_to_ignore` of the method into
`ml_ids_to_ignore` which take only OrderedSet of ids instead of
RecordSet.

task-2424248
2021-01-21 11:09:37 +00:00
Rémy Voet (ryv) 6a114cc97e [FIX] stock: improve scalability of _action_done
Replace union of RecordSet by union of OrderedSet to reduce the
complexity and improve the scalability. It can be a bottleneck to
huge number of move to validate.

task-2424248
2021-01-20 14:50:00 +00:00
Rémy Voet (ryv) 073e700625 [IMP] stock: improve populate tools
Add a way to validate pickings in the stock populate,
used to fill a historic of validated picking. it allows to
measure the performance of `_action_done`.

task-2424248
2021-01-20 14:49:22 +00:00
Xavier Dubuc d575cfb3c1 [FIX] website_slides: remove no more useful old activity overrides
task-2429670

closes odoo/odoo#64341

Related: odoo/enterprise#15674
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2021-01-19 11:43:47 +00:00
Nasreddin (bon) e34d710a64 [FIX] website_sale_delivery: Compute summary total amount on delivery update
Issue

	- Connect on smartphone (or use chrome debug mode to switch to mobile view)
	- Install "Ecommerce" module
	- Add a delivery method D with a price on product P
	  and publish it
	- Go to shop and add product P to your cart
	- Go to payment and switch delivery method

	Total amount above the summary is not updated.

Cause

	Update is done on JS when delivery method is changed.
	No targeting Total Amount in summary head card (seen only on small device).

Solution

	Add ID on Total Amount in summary head card element and update it with JS
	in same time as other fields (taxes, total, ...).

opw-2424355

closes odoo/odoo#64808

X-original-commit: 7ab63d323680a6a69e77dcc59819928aa7872582
Signed-off-by: bon-odoo <nboulif@users.noreply.github.com>
2021-01-20 14:25:11 +00:00
Toufik Ben Jaa e34dbd9d9c [FIX] sale_timesheet: multi-company access rights issue
- When trying to timesheet on a task that is linked to a sale order
   line from a different company than the user's current one.
   An error is triggered due multi company access rights issue.

   This is due to two computed fields that are not computed in sudo
   mode.
   They make more sense as `computed_sudo` fields as they are only
   computed stats and are not leaking private data.

closes odoo/odoo#64828

X-original-commit: 721378370f5aadb476e8cc606be9a41a3ffad74a
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2021-01-21 08:18:48 +00:00
William Henrotin 79c2d67c18 [FIX] stock_account: validating svl from different companies
Commit 7fa9ec2638 create accounting entries from stock_account in
batch. The test on `self.company_id.anglo_saxon_accounting` is
problematic in case of multi recordset. Instead, this commit evaluate
the company_id for each record of `self`.

closes odoo/odoo#64813

Signed-off-by: William Henrotin <Whenrow@users.noreply.github.com>
2021-01-20 15:07:56 +00:00
Benoit Socias b6494fcf28 [IMP] website, web_editor: default image gallery and highlighted actions
Before this commit the image wall and image gallery snippets had no
default images (unless overridden by some themes), and the buttons to
add or remove images where not easily visible

After this commit the image wall and image gallery snippets have default
images and the action buttons are their first option line and have
highlighted backgrounds colors

task-2431420
https://github.com/odoo/design-themes/pull/442

closes odoo/odoo#64427

Related: odoo/design-themes#442
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2021-01-15 10:35:22 +00:00
nie 41d77e9227 [FIX] website: an erroneous Google font makes website not editable
Steps:
- Go to "Website" > "Go to Website"
- Click Edit in the top right corner
- Click Options
- Select "Add a Google Font" in the Font Family field
- Insert an erroneous Google Font link (e.g. https://fonts.google.com/specimen/Robotoj )
- Save & Reload
- Click Edit again

Bug:
The Edit button is not responding anymore

Explanation:
We try to `@import` the link in multiple files.
For example, here: https://github.com/odoo/odoo/blob/70eb39b0cf30c1acf9a7116e109874b60e27aa2c/addons/website/static/src/scss/website.scss#L10
An erroneous font family results in an error 400 from the Google Fonts
server. This prevents parts of the JS to load and makes it impossible to
enter the edition mode.

`EditPageMenu` handles the behavior when clicking on the Edit button.
This menu depends on `website.compiled_assets_wysiwyg` as seen here:
https://github.com/odoo/odoo/blob/b02a99bec709b5a6dc4dabb6cb81435dadc24e7e/addons/website/static/src/js/menu/edit.js#L10-L14
Since there is an error generating the file, the Promise fails but the
error is not handled:
https://github.com/odoo/odoo/blob/70eb39b0cf30c1acf9a7116e109874b60e27aa2c/addons/web/static/src/js/core/ajax.js#L164-L168
This commit prevents CSS loading errors from silently failing. The crash
screen will only show up if the user is logged in and has edition
rights.

This commit also prevents the user from posting the form if the font is
not accessible. At the moment, querying an unknown Google font from a
script will result in a CORS error. A valid one will pass just fine. In
case Google changes the behavior of these queries and allows the 400 to
be sent, the fix also checks if the query returned an `ok` status code.

opw:2439073

closes odoo/odoo#64824

X-original-commit: 604c07edcd4da8cf2a663d06ba91f137eb74691b
Signed-off-by: backspac <backspac@users.noreply.github.com>
2021-01-20 17:09:20 +00:00
Sébastien Theys 7b386de6f5 [FIX] mail: prevent composer cursor from randomly changing position
task-2388600

closes odoo/odoo#64830

X-original-commit: 785fdb6cea6ee7d9a1a4e4c6a44403a275a67763
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2021-01-20 19:42:05 +00:00
Géry Debongnie 18e4b34b70 [FIX] web: protect graph code against destruction
The graph controller _attachDropdownComponents is not safe: it assumes
that it is not destroyed whenever it manipulates its own measureMenu sub
component, but it is certainly not guaranteed. This commit protects
against this possibility.

Also, at the same time, we return the promise in updateButtons, so it
can be chained if necessary (which is useful in the Dashboard view for
example).  This is a new problem, because with the change to Owl, we go
through multiple phases of rendering.

closes odoo/odoo#64820

X-original-commit: 2dcf251c2d7a8bd43193e3e0b715ef3692d4e00f
Related: odoo/enterprise#15869
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Signed-off-by: Géry Debongnie (ged) <ged@openerp.com>
2021-01-20 15:51:36 +00:00
Aaron Bohy 50eff609a0 [FIX] web: update owl to last version
This commit updates owl from v1.2.1 to v1.2.3

See [1], [2] for the list of changes.

[1] https://github.com/odoo/owl/commit/71f545058bc9cdc326003bf8573cef1bb4c903d4
[2] https://github.com/odoo/owl/commit/490cf180794cdc100e33e792f6d12172d42bf981

X-original-commit: b91266be4d13ab5320a57b2e986d545df984af62
2021-01-20 15:51:36 +00:00
Andrea Grazioso (agr-odoo) 21902d1ff6 [FIX] sale,sale_coupon: do not invoice only promotion lines
Create a promotion auto applied with 0 minimum amount on any product in
catalog.
Have a DEMO product invoiced on delivery
Create a sale order with DEMO, apply the promotion. Confirm.
Click on 'Create Invoice'.

The invoice will only contain the promotion because the line for
DEMO is to be invoiced only after delivery, while by default the
promotion product has the invoice policy 'on order'

This commit will:
* avoid highlight the button 'create invoice' if the only
invoiceable lines are promotion lines as well as raising an error if the
invoice is created in the same scenario
* refuse to invoice only promotion lines from a SO.
* adds a test to cover the case

opw-2414630

closes odoo/odoo#64826

X-original-commit: 6532c6ba7acb2de53fc839d5a7c5d8b200716565
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
2021-01-20 17:55:38 +00:00
Tiffany Chang (tic) 5df928f279 [FIX] mrp: make done unbuild form readonly
Some added readonly attributes in the unbuild form view were overriding
the `states={'done': [('readonly', True)]}` attributes in the models'
fields. So we add the readonly when state='done' to the view as well.

Note that same issue exists in saas-12.3 and 13.0, but only for 2 of the
4 fields fixed in this commit (i.e. it probably isn't a big deal for
these older versions.)

Discovered during task: 2033341

closes odoo/odoo#64815

X-original-commit: 8bfa9efd989f4123b021c47f13cfe324eeb14013
Signed-off-by: Arnold Moyaux <amoyaux@users.noreply.github.com>
2021-01-20 15:35:26 +00:00
nouraellm 7cb60c72c0 [FIX] mrp: hide start button if Mo is cancelled
closes odoo/odoo#64803

Signed-off-by: William Henrotin <Whenrow@users.noreply.github.com>
2021-01-20 13:59:47 +00:00
Odoo's Mergebot 7c7af9653a [FIX] web: o_row style not applied on mobile
Before this commit o_row class wasn't applied on mobile because
we wanted that each field take all width.

But we have noticed that this class is quite well used on desktop
and is often used for specic cases that we also want on mobile.
Example: Unit of measure (UOM) next to a numeric field.

So in this commit, we simply removed mobile media queries.
Due to the number of places where this class is used, fixes will
surely follow.

Related to task ID: 1929043

closes odoo/odoo#64532

Signed-off-by: Pierre Paridans <pparidans@users.noreply.github.com>
2021-01-20 16:44:54 +01:00
Adrien Dieudonne 9942ee1751 [FIX] mrp: product_uom_id should be next to the field
Before this commit 'product_qty' had a width of 0 because
the 'product_uom_id' field took 100% as width on mobile.
This rule has been added by the 'oe_inline' css class.

To fix this we simply removed this class as we don't need it
on desktop: rules have been overridden by another
selector for this case.

Steps to reproduce:
- Manufacturing
- Manufacturing Orders
- Create
- Quantity field with UOM active.

Related to task ID: 1929043
2021-01-20 14:45:47 +00:00
Adrien Dieudonne c868f26b70 [FIX] hr_holidays: .o_hr_holidays_dates not useful anymore
We can safely remove 'o_hr_holidays_dates' class since 'o_row'
is applied on mobile too.

Related task ID: 1929043
2021-01-20 12:54:30 +00:00
Pierre Paridans 1eb474243b [FIX] web: Dialog widget should always call on_{attach|detach}_callback
Before this commit, the `on_attach_callback` and `on_detach_callback`
callbacks are not called all the time on the `Dialog` widget when it's
attached/detached to the DOM. Relying on those callbacks could result in
unpredictable behaviours.

To be more precise, the `on_attach_callback` isn't executed on a regular
Dialog#open() call. But Dialog spawned by the ActionManager will execute
it.

This difference prevents from properly binding those callbacks later on
through an extend or include of the Dialog widget as we have no way to
know if they have already been called or not (e.g. which can result in
calling them twice).

This commit normalize this situation by ensuring that the
`on_attach_callback` and `on_detach_callback` callbacks are properly
called by the Dialog widget and allows any extension of this widget to
rely on them. Therefore the ActionManager is adapted accordingly.

opw-2438534

closes odoo/odoo#64794

X-original-commit: 036fc78103e3d8875a5a54c797e1ba0670d02272
Related: odoo/enterprise#15856
Signed-off-by: Adrien Dieudonné (adr) <adr@odoo.com>
Signed-off-by: Pierre Paridans <pparidans@users.noreply.github.com>
2021-01-20 12:40:04 +00:00
Adrien Dieudonne 7384c87b3f [FIX] web: o_row style not applied on mobile
Before this commit o_row class wasn't applied on mobile because
we wanted that each field take all width.

But we have noticed that this class is quite well used on desktop
and is often used for specic cases that we also want on mobile.
Example: Unit of measure (UOM) next to a numeric field.

So in this commit, we simply removed mobile media queries.
Due to the number of places where this class is used, fixes will
surely follow.

Related to task ID: 1929043
2021-01-20 12:39:42 +00:00
Andrea Grazioso (agr-odoo) e08e4826d7 [FIX] account: allow to skip account constraint
To fully allow f4e67d8ae174d7e2ee75a1de1083b31a6ff2af8b
we need also to disable to check on account when
the constraint field has been used to set the account on
the journal

opw-2394959

closes odoo/odoo#64792

X-original-commit: 655597e9a3637abbaeffddcc78663e8733070db4
Signed-off-by: oco-odoo <oco-odoo@users.noreply.github.com>
2021-01-20 12:14:56 +00:00
Wolfgang Taferner 03f14189cb [FIX] account/purchase: onchange on purchase create bill does not work
closes odoo/odoo#64777

X-original-commit: 0f36bbd257ba5e8e03462f675d81fdbdece1893a
Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
Signed-off-by: oco-odoo <oco-odoo@users.noreply.github.com>
2021-01-20 08:42:21 +00:00
Raphael Collet 34c3498981 [FIX] core: exists() with string ids
The call model.browse('xxx').exists() should not return the record.
Instead, it should fail as the string 'xxx' is not a valid ID.

closes odoo/odoo#64783

X-original-commit: 824a6515a528cd2b682c3d3504c0d27ed9427cdb
Signed-off-by: Raphael Collet (rco) <rco@openerp.com>
2021-01-20 10:00:42 +00:00
Laurent Smet 01b27664dd [FIX] account: Fix automatic entry wizard with change_account
'percentage' is computed by default whatever the wizard action (change_period/change_account) but there is a constraint raised when the percentage is != 100 in change_account.

closes odoo/odoo#64743

X-original-commit: 20d6efa817a4d839777c81d403bb8770807e784a
Signed-off-by: oco-odoo <oco-odoo@users.noreply.github.com>
2021-01-19 11:18:34 +00:00
Arnold Moyaux 031088f190 [FIX] stock: lots ids disapear after onchange.
Use case to reproduce:
- Go to MO form produce at least 2 units of a product with a component
tracked by serial number.
- Edit the producing quantity to 1.0
- Save
- Edit the producing quantity to 2.0

The move lines are removed.

It happens because the lot_ids field is empty and thus the setter remove
the existing stock.move.line. It's empty because the compute try to do
a match on existing id. However the stock.move in the onchange
could have a new virtual id.

fine tuning of commit 8dfee8cb2d60942641b73eaa6489b02aa378c5ac

closes odoo/odoo#64788

X-original-commit: a3ab5c3a73243e6f4d5662ee27765439ba9b5363
Signed-off-by: Arnold Moyaux <amoyaux@users.noreply.github.com>
2021-01-20 11:27:14 +00:00
Ivan Yelizariev 3513b059e1 [FIX] odoo/fields.py: fix removing translations on writing ''
cache_value could be empty string rather than None. I'm not sure why it was
different before.

STEPS:
* install an app that adds menu Products (e.g. Sales)
* activate second language and switch to it
* create new product, set some value to field description ("Internal Notes"),
save
* click edit, remove description, save

closes odoo/odoo#64752

Before: the value is not removed
After: value is empty, translations are removed
X-original-commit: 3ef5e63f62f0f84d6e92cb55eb112ab2f2924faa
Signed-off-by: Ivan Yelizariev // IEL <yelizariev@users.noreply.github.com>
2021-01-19 15:02:08 +00:00
Odoo's MergebotandLaurent Stukkens f203fd4130 [MERGE] *_project, *_timesheet: Improvements in Services Apps
Purpose
=======

This PR is in continuity of #62360 and #62900 done in 14.0.
The goal of this PR essentially updates and improves the changes done in 14.0.

## Details

- Remove the context key added in 14.0 to keep the 'Create Sale Order' button in task and helpdesk.ticket. Because at the end we remove this button in these models.
- Remove non_allow_billable field in tasks and timesheets.
- Remove the partner_email from task form view.
- Remove timesheet_product_id from task form view
- Merge sale_timesheet_edit module with sale_timesheet module.
- Remove timesheet table in portal sales order and invoice (deprecated templates in #62900).
- Remove override of project kanban controller (deprecated file from #62360).
- Store remaining_hours field in sale.order.line model (this field has been introduced in the following PR #62900).
- Remove _onchange_task_id_employee_id, the process in the method is done in _compute_so_line.
- Merge bill_type and pricing_type in project.project.
- Move partner_id field in project form view.
- Remove value selected in SO and SOL in project if the customer does not fit with the SO selected.
- Changes SOL in mapping when the pricing type of the current project is "employee rate" if the customer changes.
- Hide the timesheet_product_id field if the project is not a fsm project.
- Move sql constraint for timesheet_product_id in industry_fsm_sale, because this field is no longer mandatory in project which is not fsm project.
- Changes the search of timesheets in portal > timesheets.
    - we allows the user to search with name of SO and invoice to find the timesheets about the wanted SO or invoice rathan than the id of SOL and invoice.
- Move View Timesheets button in portal > invoice
- Remove deprecated codes.
- Miscellaneous fixes.

Task-2424382

closes odoo/odoo#64474

Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
Co-authored-by: Laurent Stukkens (LTU) <ltu@odoo.com>
2021-01-20 12:04:32 +01:00
Andrea Grazioso (agr-odoo) 31029cc8c2 [FIX] stock: add partner info in return svl
Have a product category Inventory Valuation Automatic
Create a SO and deliver the product in such category
Create return and validate

In Journal Entry the accounting move related to return will not have
partner id

opw-2421393

closes odoo/odoo#64764

X-original-commit: 1d4460bcc80e31e9198b19502951d68b447a136a
Signed-off-by: Arnold Moyaux <amoyaux@users.noreply.github.com>
2021-01-19 17:19:21 +00:00
Xavier BOL (xbo) 8d8e054a22 [IMP] sale_timesheet: convert timesheet_product_id in related for task
Before this commit, this field is stored and contains by default the
value of the same field in project.project. Moreover, we cannot choose
another timesheet_product_id in task views. It means that field is most
of the time the timesheet_product_id of linked project.

This commit converts this stored field into related field to the same
field in project.project and remove an inherit view which adds only this
field without displaying in the view.

task-2424382
2021-01-15 15:59:59 +01:00
Xavier BOL (xbo) 1475138e68 [IMP] sale_timesheet: change _get_not_billed to _is_not_billed method
Before this commit, we use the _get_not_billed method to get all
timesheets not billed. But in each using, we call the method after a
filtered method.

This commit changes the method to use this method wiht only one
recordset in the self and rename the method to _is_not_billed. This
change allows to avoid the succesive filtered to get the timesheets that
we want. Now, we can use the _is_not_billed method in the first
filtered rathan than realize another filter.

task-2424382
2021-01-15 15:59:59 +01:00
Xavier BOL (xbo) 82a0422df5 [IMP] sale_timesheet: move View Timesheets button in portal invoice
Before this commit, we show the button in the invoice page.

This commit moves this button in the sidebar (left panel).

task-2424382
2021-01-15 15:59:59 +01:00
Xavier BOL (xbo) 5589154c3a [IMP] sale_timesheet: add SO name and invoice name to search timesheets
Before this commit, in portal timesheeets (/my/timesheets), we need to
give the id of the SOL or invoice to have only timesheets linked to the
SOL or the invoice that we want. The problem is the portal user does not
know the id of both.

This commit changes these both searchs to search with the name of SO or
invoice. The name of SO and invoice are the reference about these both
and should be unique. This changes are more clearly than the previous
search.

task-2424382
2021-01-15 15:59:59 +01:00
Xavier BOL (xbo) f4779930d5 [IMP] sale_timesheet: move sql contraint for timesheet_product_id
Before this commit, we want the timesheet_product_id field be set if the
project is billable and allow timesheets.
But, now the timesheet_product_timesheet field is only required for fsm
project which is billable and allows timesheets.

This commit moves the sql constraint in industry_fsm_sale.

task-2424382
2021-01-15 15:59:59 +01:00
Xavier BOL (xbo) 855a1dcf16 [IMP] sale_timesheet: hide timesheet_product_id if not fsm project
This field is only useful for fsm projects. That's why this commit
hides this field for projects whose are not fsm projects.

task-2424382
2021-01-15 15:59:59 +01:00
Xavier BOL (xbo) 7e1b66fe19 [IMP] sale_timesheet: changes SOL in mapping if customer changes
Before this commit, when the user changes the customer of the project,
the SOL of each mapping remains for the old customer of the project. To
avoid the user forget to change the SOL of each SOL.

This commit add a compute method on sale_line_id field in
project.sale.line.employee.map to automatically remove the SOLs when the
SO in project is removed because of a customer change in the
project. Then, it also adds a require in this field to display a
validation error as long as the SOL of each mapping is not set.

task-2424382
2021-01-15 15:59:59 +01:00
Xavier BOL (xbo) 59477b8aee [FIX] sale_project: remove SO and SOL in project if customer different
When the user changes the project customer we need to check if the SO
and SOL are always for the customer defined in the project. If not we
remove the SO and SOL in project.

task-2424382
2021-01-15 15:59:58 +01:00
Jacky (trj) b6469c5ac1 [FIX] point_of_sale: some fields are now readonly in the views for pos_payment and pos_session. Edit buttons are also gone. Task id: 2394740
closes odoo/odoo#64587

Signed-off-by: pimodoo <pimodoo@users.noreply.github.com>
2021-01-15 07:35:56 +00:00
Priyanka kakadiya 37147dbde2 [FW][FIX] project: propagate internal subtypes to tasks
before this commit:

while changing subtypes of the project it was only
propagating those subtypes to the task, whose parent_id is set.
internal subtypes are not propagating in the task of a project.

So, filter internal subtypes and concat them with the subtypes which
have parent_id.

after this commit:
internal subtypes will also propagate to their tasks

closes odoo/odoo#64767

X-original-commit: f29e9e5edbe08e1a356ceb7c2dbb2f60fb6d3ff5
X-original-pr: odoo/odoo#47336
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2021-01-19 18:11:53 +00:00
b0e7cf9ebe [FW][FIX] mail: fix auto subscribe subtypes computation
This commit contains a followup / rewrite / backport of #34150 :

  * odoo/odoo@16dd3da
  * odoo/odoo@0b11ed8

Fix: propagate generic internal subtypes from parent to childs with auto
subscribe.

  With this commit, when the user subscribes to internal subtypes like
  activities on a parent record (e.g. a project) then the user follows them
  by default on every sub record creation (e.g. all new tasks of this project).

Fix: do not reset existing subtypes when changing parent of a record using
auto subscribe mechanism.

  With this commit, when changing subtype subscription from a parent record
  (e.g. project) avoid resetting all subtypes subscription on existing sub
  records (e.g. all new tasks of this project). Only new records will use the
  parent chosen subtypes. This is done through propagation of followers
  existing policy (see Follower._insert_followers() for more details);

Note that fix done here is slightly different from the one done in odoo/odoo@16dd3da
as there was some mismatch with internal model-related subtypes. Thix fix
will be forward ported and improve the previous one.

Task ID-2205643
COM PR #47336

X-original-commit: 01254f06e8ea37887e190758cc479a098591ab8e
X-original-pr: odoo/odoo#47336
Co-authored-by: Thibault Delavallee <tde@odoo.com>
Co-authored-by: Alexandre Khun <aku@odoo.com>
Co-authored-by: Priyanka kakadiya <pka@odoo.com>
2021-01-19 18:11:52 +00:00
Thibault DelavalléeandPriyanka kakadiya ec874afd77 [FW][IMP] test_mail: add test for auto subscribe
We recently found a bug about generic internal subtypes not being correctly
propagated when doing auto subscribe.

For example: subscribe to a project, check an internal subtype like activities.
Auto subscribe done on project tasks should include actitivities subtype but
is currently not the case.

This test highlights the issue and a fix will be provided soon. In this test
we check both

  * generic subtype propagation (comment- or activities- like subtypes);
  * model-specific subtype propagation through parent relationship (like
    following New Task on project to follow New on task);
  * internal subtypes not being propagated to portal users;
  * auto subscribe at create with both create and parent follower reasons;

LINKS

Task ID-2205643
COM PR #47336

X-original-commit: 1e29d48f5b10deca9ed7b991ea92ffc36f61c725
X-original-pr: odoo/odoo#47336
Co-authored-by: Thibault Delavallee <tde@odoo.com>
Co-authored-by: Priyanka kakadiya <pka@odoo.com>
2021-01-19 18:11:51 +00:00
tanghulu0608 67106f6840 [FIX] website_sale: Sort product by website sequence in website sale.
closes odoo/odoo#64693

X-original-commit: f94d560b9193242eadd5e1dc1af94af7c97a9a25
Signed-off-by: Romain Derie <rdeodoo@users.noreply.github.com>
Signed-off-by: wangting <tanghulu0608@users.noreply.github.com>
2021-01-18 13:29:45 +00:00
Benoit Socias a62745d78a [FIX] web_tour: display the full text of tour tip steps
Before this commit the dimensions of the tour tip text obtained from
the text content was forced onto the complete active tooltip, sometimes
hiding a part of the text because the complete tooltip had additional
borders that prevent the text from using the same space as during the
measurement.

After this commit the dimensions of the tour tip text is computed by
taking the measure on the full tip by temporarily switching it to the
text display during initialization.

task-2391201

closes odoo/odoo#64771

X-original-commit: 8bd038c74c2e3b89b78e54385e5a2380fa1b54b7
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2021-01-19 19:08:39 +00:00
qsm-odoo 05627e4815 [IMP] website: test a website style can properly be edited
This test at least ensures that a SCSS edition through the editor can
properly be done and indirectly tests that the assets order is correct
(in prevision of a future asset refactoring).

closes odoo/odoo#64770

X-original-commit: fe19b48831df17352ea7dbb0b7fa2497ac2da38f
Signed-off-by: Romain Derie <rdeodoo@users.noreply.github.com>
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2021-01-19 18:56:42 +00:00
Benjamin Vray 0d925816f0 [FIX] website: fix a typo in the js file of the snippet popup
We were using 'onExit' instead of 'mouseExit' as the value of the
data-attribute 'display' in the .js code of the s_popup.

task-2312878

closes odoo/odoo#64751

X-original-commit: bca1a13a846b3398a70f12be259a425df140a8f7
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2021-01-19 15:00:53 +00:00
Xavier BOL (xbo) c4a0c301ae [IMP] project: move partner_id in project form view
Before this commit, when the project is billable, we need to define a
customer to have the list of SOL. The problem is the customer field is
in "Settings" tab and not "Invoicing", it can be confused for the user
to directly understand why he does not have the list of SO.

This commit moves the customer field (that is partner_id) to the main
sheet of the form view. Thus, the user can see directly if the customer
is set or not in the project.

task-2424382
2021-01-14 09:02:39 +01:00
Xavier BOL (xbo)andLaurent Stukkens 3378ca8252 [IMP] hr_timesheet: use access rights if user is internal
Before this commit, when the user can only see his own timesheets, this
user can see more than his own timesheets in timesheets portal
(/my/timesheets). It is because we use the domain defined for portal and
we don't use the access rights defined for this intenal user.

This commit uses the access right if the user has the lowest group for
Timesheet App. Otherwise, we use the domain for portal as before.

Co-authored-by: Laurent Stukkens (LTU) <ltu@odoo.com>

task-2424382
2021-01-14 09:02:39 +01:00
Xavier BOL (xbo) bc50f70c44 [FIX] sale_timesheet: move the import to respect guidelines
task-2424382
2021-01-14 09:02:39 +01:00
Xavier BOL (xbo) c824d7416e [IMP] sale_{project,timesheet}: merge bill_type and pricing_type
Before this commit, the user need to select in these both fields to
configure the pricing type of a project. Three choices are possible :
    1. Task Rate
    2. Project Rate
    3. Employee Rate

This commit merges the both fields to have single field called
pricing_type and the user selects the one of three options cited above.
The goal of this changes is to facilitate the configuration of a
project.

task-2424382
2021-01-14 09:02:39 +01:00
Xavier BOL (xbo) 7672d0b91b [IMP] sale_timesheet: remove _onchange_task_id_employee_id method
This method was triggered when the employee_id field changes to change
the so_line field of the timesheet. However, the _compute_so_line
method does the same processing. Thus, this onchange method is useless
and replaces by this compute.

task-2424382
2021-01-14 09:02:39 +01:00
Xavier BOL (xbo) 43da5484d4 [IMP] sale_timesheet: store remaining_hours field in SOL model
When the remaining_hours field is stored, we can search the last
SOL and the remaining hours on SO is greater than 0 for a customer with
only a search in SOL model. With this changes, we increase the
performance because before this commit, we search and retrieve a list of
SOLs and then we filter this list to find the last SOL with remaining
hours on SO is greater than 0.

This commit stores this field in sale.order.line model and we update the
_get_last_sol_of_customer method in project.task.

task-2424382
2021-01-14 09:02:39 +01:00