Commit Graph
144972 Commits
Author SHA1 Message Date
Thibault Libioulle 741663f9de [FIX] project: fix project update default
Prior to this commit, the case where the update status was not set is
not handled in the STATUS COLOR mapping.

This commit associate a lighten dark color to the unset update status.

See PR : #68899
See task-2393768

PR : #70527

task-2458135
2021-09-06 10:41:14 +02:00
Thibault Libioulle 22cd824772 [FIX] account: fix invoice count
Prior to this commit, the count distinct on move_id called in the read
group was not used correctly.

This commit uses the move_id:count_distinct result of the read_group,
which represents the number of distinct invoices.

See task-2469742

PR : #70527

task-2458135
2021-09-06 10:41:14 +02:00
Cedric Prieels (cpr) c5048ebc6a [IMP] test_main_flows: improve test for project,timesheet
This commit improves the test to handle the changes made in the
project, sale_timesheet modules.

PR : #72736
See odoo/upgrade#2706

task-2545084
2021-09-06 10:41:14 +02:00
Cedric Prieels (cpr) fa88c5fd04 [ADD] account_sale_timesheet: extends project form and panel
This commit adds a bridge module in order to extend the project form
and panel.

PR : #72736
See odoo/upgrade#2706

task-2545084
2021-09-06 10:41:14 +02:00
Cedric Prieels (cpr) 69e34a253f [REM] sale_timesheet_purchase: remove bridge
This commit removes the sale_timesheet_purchase module which was meant
to extend project overview feature.

Since this feature is removed in previous commit, this bridge is now
useless.

PR : #72736
See odoo/upgrade#2706

task-2545084
2021-09-06 10:41:14 +02:00
Cedric Prieels (cpr) 2f77c86275 [IMP] sale_timesheet: remove overview and improve updates
This commit removes the project overview feature and views.
This commit improves the project updates right panel informations and
adds the buttons added in the project form view of this module.

/!\ This commit also improves the timesheet_invoice_type granularity
and precision.

The project overview view lacks of genericity and lacks of clarity
regarding the information to report.

PR : #72736
See odoo/upgrade#2706

task-2545084
2021-09-06 10:41:14 +02:00
Cedric Prieels (cpr) 66bf742c15 [IMP] sale_project{,_account}: extend project form and panel
This commit extends project form and panel in order to add buttons
which allow user to view documents linked to the project analytic
account.
This commit removes the computed field related to project overview
feature which is removed in the following commits.

This commit adds bridge modules in order to handle those extensions.

PR : #72736
See odoo/upgrade#2706

task-2545084
2021-09-06 10:41:14 +02:00
Cedric Prieels (cpr) 2b3e3a44a9 [IMP] project_{account,purchase,hr_expense}: extend form and panel
This commit extends project form and panel in order to add buttons
which allow user to view documents linked to the project analytic
account.

This commit adds bridge modules in order to handle those extensions.

PR : #72736
See odoo/upgrade#2706

task-2545084
2021-09-06 10:41:13 +02:00
Cedric Prieels (cpr) 0df93da823 [IMP] account,analytic: move the track cost setting
This commit moves the Track cost setting from account to analytic in
order to use it in modules depending on analytic.

This setting is based on a group defined in analytic
(analytic.group_analytic_accounting), this group is not moved.

PR : #72736
See odoo/upgrade#2706

task-2545084
2021-09-06 10:41:13 +02:00
Cedric Prieels (cpr) e8d0473b3b [IMP] hr_timesheet: remove activities from project update
This commit removes the activities from the project update default
description.

This commit prepares the removal of the project overview feature and is
a part of the global project update description improvement.

PR : #72736
See odoo/upgrade#2706

task-2545084
2021-09-06 10:41:13 +02:00
Cedric Prieels (cpr) 1ec2b3c0b0 [IMP] project: improve project updates
This commit improves the project updates panel and the data reported
in the update description.

This commit prepares the removal of the project overview feature.

PR : #72736
See odoo/upgrade#2706

task-2545084
2021-09-06 10:41:13 +02:00
Xavier Morel 94018575c6 [FIX] web: issues with bounding rects and mouse hit locations
On my system in chrome 92 there are issues of chrome's hitboxes (and
rounding) being off leading to tests failures, something which given
the adjustment in `triggerMouseEvent` had been an issue in the past.

The first test failure was / is in the "correctly display year view"
calendar test, where the very first event dialog would fail to open
when clicking on the `2016-11-16`.

After tracing through fullcalendar, it turned out fullcalendar was
told to hit `2016-11-*09*`, suspiciously 7 days before the cell we
were looking for in a monthly calendar, hinting to an incorrect
vertical offset / hitbox.

Fix by offsetting the top coordinate in `triggerMouseEvent`, but
rather than just increment by one update the entire thing by trigger
the event right in the middle of the element being targeted, that
seems more reliable long-term, though it could be slightly confusing
for events like mouseenter/mouseover/...

The second issue was with a list test, where two cells are supposed to
be sized equally. Apparently the offset sizes are supposed to be the
rounded version of the actual size (which can be fractional), but
dumping the information of `foo` and `text` I'd get real widths (via
getBoundingClientRect) of respectively 480.46875 and 480.5, and
offsetWidths of 481 and 480 (the smaller of the two in "real size"
is rounded higher than the other one).

In Python we might use `assertAlmostEqual` for this, but we've
apparently not introduced this in JS take the real width and round up
by hand, this fixes the issue as both end up at 481.

Aside 1:

Before finding out the actual root cause I landed in
`_onYearDateClick` with missing data in the events so looked at the
API to figure what I was looking at, and turns out fullcalendar's
event object has documented properties to get the date-converted start
and end bounds of the event, so use that directly instead of doing the
same thing by hand.

Aside 2:

The attributes passed to `triggerEvent` in `triggerMouseEvent` are
pretty much nonsensical, we're getting the element's location using
`getBoundingClientRect` which is based off of the viewport, but
setting the keys

* `screen(X|Y)`, which should be the location of the hit relative to
  *the physical screen*
* `page(X|Y)`, which should be the location of the hit relative to the
  page / document (so takes in account the content scrolled off-screen)
* `layer(X|Y)`, which is the position of the hit relative to the
  nearest positioned (non-static) element, falling back to page if
  there isn't one

The one attribute which matches the semantics / reference of
`getBoundingClientRect` we didn't even set, instead it would be
automatically copied from `pageX`/`pageY` by the events mapping.

Fix that by just providing `clientX`/`clientY` and updating the
mapping functions to not overwrite it.

If the others are needed they should be computed properly based on the
document's bounding client rect and scroll information, as well as the
window's screenX/screenY (and offsetParent for layerX/layerY though
that seems unlikely to be necessary).

closes odoo/odoo#75953

X-original-commit: d26a4edffd6bdaed46143a30e99f17eb91f44e7e
Signed-off-by: Xavier Morel (xmo) <xmo@odoo.com>
2021-09-06 06:12:43 +00:00
Julien Giannone 19c364ea2d [IMP] mail: add model for message reactions
Add the model in the freeze for next version, the interface is not fully ready
to merge yet but it will be added in https://github.com/odoo/odoo/pull/75630

Part of task-2361194

closes odoo/odoo#75911

Signed-off-by: Samuel Degueldre <sdegueldre@users.noreply.github.com>
2021-09-04 13:01:02 +00:00
Arnold Moyaux 55588eba57 [IMP] stock: reserve on return to select delivered lot
Since return moves are linked to their original move, it's easy to
manage reservation in those case. We just don't bypass the reservation
when it comes from a reservation outside our stock in order to manage
the computation on linked moves and reserve pieces that were not yet
return.

Also add a return picking type for 2 reasons:
- Allow to select existing lot.
- Display reserved move line for an incoming picking.

Note that this picking type is just a default configuration and could be
modify by the user without any issue.

closes odoo/odoo#64384

Related: odoo/enterprise#20605
Signed-off-by: Arnold Moyaux <amoyaux@users.noreply.github.com>
2021-09-04 11:58:36 +00:00
Brieuc-brd 48aa2445e8 [IMP] website: update the bewise-1 color palette
This commit updates the bewise-1 color palette. It replaces the
o-color-2 by the extra color of o_cc4 and improves the compatibility
with the others palettes when we switch between them.

task-2573302

closes odoo/odoo#75159

Related: odoo/design-themes#477
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2021-09-04 06:24:01 +00:00
Thanh Dodeur ac99b09cdc [IMP] mail*: add audio and video conference with webRTC
*test_discuss_full,test_lint

This commit adds the audio and video conference feature to mail channels
and integrate it with the groupDM/guest features.

Adds new mp3 and ogg files (from task-2554674) for sound effects.

- Adds three new tables:
    * `mail.channel.rtc.session` to manage the peerToPeer interactions
      during rtc calls.
    * `mail.ice.server` to provide ICE servers necessary to establish
      peerToPeer connections with webRtc.
    * `res.users.settings.volumes` to hold the partner-to-partner volume
      settings, each partner can create one new setting per other
      partner to configure the volume coming from those partners during
      calls.

- changes res.config.settings:
    * Adds new fields for the Twilio credentials to use their STUN/TURN
      service.

- changes res.user.settings:
    * Adds 4 fields for the push to talk and voice activation.

- changes mail.channel:
    * Adds a new field `rtc_session_ids` that represents the active
      participants in a rtc call on that channel.

- changes mail.channel.partner:
    * Adds a new field `rtc_inviting_session_id` that represents the
      rtcSession of the user that is inviting that channelPartner to a
      call.

task-2366708

closes odoo/odoo#66611

Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2021-09-04 06:23:56 +00:00
oco-odoo 0ebe0ede45 [MOV] l10n_eu_oss: new name for l10n_eu_service
This module is now used to support OSS taxes, which replaced MOSS a few months ago. This renaming follows the changes introduced in stable by https://github.com/odoo/odoo/commit/0e7c289003a0a69075188dbfaea724919dac32a4 .

[IMP] l10n_eu_oss: remove dead code from former l10n_eu_service feature

[IMP] account, product, l10n_eu_oss: community adjustements to support enterprise's OSS report

The following changes where introduced in order to support the features implemented in the new l10n_eu_oss_reports module:

- account.tag objects applicable on taxes are no longer required to have a country_id. This way, we allow using tags in generic reports (i.e. the ones available for multiple countries) as well.

- add account_tag_is on product.template and product.category: this fields are m2m to account.account.tag applicable on taxes. When making an entry from this product, these tags will be set on all the tax move lines created for it. We use it in OSS to differentiate between imported and non-imported goods in the report.

- always display country_id on fiscal positions' form view: OSS taxes require to be used in some fiscal position with a country_id set, so that we can infer the country they are mapping the vat from. We make that change in the view so that users are not obliged to create auto-applied fiscal positions to fix the OSS taxes they created manually, and can directly set the country on the fiscal position.

Task 2591541

closes odoo/odoo#73602

Related: odoo/upgrade#2669
Related: odoo/enterprise#19628
Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
2021-09-04 05:21:05 +00:00
Raphael ColletandXavier Dollé 1595c0ee27 [REF] core: replace thread-local "envs" by cursor-bound "transaction"
Refactor the Environments object into a Transaction object, which is
bound to one cursor, and is no longer shared among several cursors.

The following methods/properties have been changed:
 - Environment.envs no longer works (because of the design change);
 - Environment.manage() is deprecated (no longer useful);
 - Environment.reset() is now an instance method;
 - env.clear_upon_failure() is deprecated in favor of cr.savepoint().

closes odoo/odoo#75598

Related: odoo/enterprise#20451
Signed-off-by: Raphael Collet (rco) <rco@openerp.com>
Co-authored-by: Xavier Dollé <xdo@odoo.com>
2021-09-03 15:45:46 +00:00
Raphael Collet 765ec7837c [REF] core: add methods flush() and clear() on cursor
This deprecates the ugly and inconvenient functions flush_env(),
clear_env(), and avoids explicit calls to precommit.run().

Part-of: odoo/odoo#75598
2021-09-03 15:45:46 +00:00
Christopher Ormaza 02e0a93e58 [IMP] l10n_ec: Ecuadorian Localization
- Chart of Account based on IFRS
- Validation for RUCs and CI for Ecuadorian VAT
- Taxes and Groups - minimum
- Initial Structure for 103 and 104 Reports to SRI
- Entity, Point of Emission, address of emission, and type of emission added to journal
- SRI payment methods, used on EDI Process
- Ecuadorian Banks data
- Latam Identification Types
- Latam Document Types Related

closes odoo/odoo#75055

Signed-off-by: Josse Colpaert <jco@openerp.com>
2021-09-03 15:45:37 +00:00
Christopher Ormaza d93365c684 [IMP] base_vat: CI and Ruc Validation for Ecuadorian Context
- Added own implementation, for CI and RUC Validation

Part-of: odoo/odoo#75055
2021-09-03 15:45:37 +00:00
bbh-odoo c69fe38b94 [IMP] hr_timesheet,sale_timesheet: improved reporting features
Purpose of the commit is to improve the timsheets's report
of the timesheet app.

So in this commit, done the below changes:
- timesheets by billing type report:
 - add default group by date month > billable type.
 - removed undefine value from report
 - improve helper the to: "No data yet! \n Track your timesheets by
    billing type and make sure your time is billable."
 - added grid, kanban and list view
- list view opened through the graph/pivot view: change the name of the action to 'Timesheets'
- improved name of the report to 'Timesheet by employee'
- improved helper of Timesheet by project report
- Timesheet / Attendance report:
 - disabled list opening after clicking graph view.
 - added a group by Employee on report ,
 - modified pivot view according to company of user.
 - added default measure is total difference' and the default group by
   is date > month for report

closes odoo/odoo#75026

Taskid: 253134
Related: odoo/enterprise#20397
Signed-off-by: LTU-Odoo <IT-Ideas@users.noreply.github.com>
2021-09-03 15:45:29 +00:00
Priyanka KakadiyaandXavier BOL ebf163c6a4 [IMP] hr_timesheet, portal, {sale_}project: few improvements for portal
PURPOSE

Generic UX improvements for the portal

SPECIFICATIONS

For projects list view,

- clicking on the project should open the list view of tasks with groupby stage
- the number of tasks should not be clickable

For tasks list view,

- display the fa-star of the priority field on the left of the name of the task
- add the following fields on the right of the name:
  user_id, time spent, kanban_state
- for the kanban_state,
  only display the colored dot and indicate the name of the state on hover
- for the time spent:
  indicate the nb of hours recorded / nb of planned hours(or days(as per unit))
  (if the nb of planned hours = 0, only display the nb of hours recorded)

For tasks search view,

- add a group by priority and status and reorder accordingly
- add a quick search on status and priority and reorder accordingly
- add a sort by priority, assigned to and status and reorder accordingly

For task form view,

- display the fa-star icon of the priority field on the left of the name of task
- add the kanban state in the top right corner

the kanban_state field should be editable by portal users
increase nb of items displayed in the list view to 80 items per page(generic)

Task-2613330

closes odoo/odoo#74996

Signed-off-by: LTU-Odoo <IT-Ideas@users.noreply.github.com>
Co-authored-by: Xavier BOL (xbo) <xbo@odoo.com>
2021-09-03 15:45:24 +00:00
Nidhi Patel dbe22a3c06 [IMP] {hr,sale}_timesheet: improve setting in the timesheet module
The purpose of this task is to improve the setting of the timesheet module.

In this commit, we improve the following:
 - Rename the label, description and align the field with the name and
   description of the feature
 - Add an 'OK' button in the 'download our app' modal
 - Render the frequency field properly in the employee/manager reminders
   setting on mobile view
 - In configure your services link: change the name of the action to "Services"
 - Display the following options in the community, with the usual 'Enterprise'
   tag:  Round Timesheet, Employee/Manager reminder, Invoicing Policy

closes odoo/odoo#74967

Task-id: 2531338
Related: odoo/enterprise#20182
Related: odoo/upgrade#2771
Signed-off-by: LTU-Odoo <IT-Ideas@users.noreply.github.com>
2021-09-03 15:45:14 +00:00
Romain DerieandTom De Caluwé 78bc86cbec [IMP] website, *: migrate Universal Analytics to Google Analytics 4
*: website_sale, website_sale_delivery

The old analytics snippet (isogram) is replaced by the newer gtags
snippet. Virtual page views and ecommerce transactions are now tracked
using gtags. The e-commerce data format is updated to correspond with
the new GA4 format.

task-2500769

closes odoo/odoo#72233

Signed-off-by: Romain Derie (rde) <rde@odoo.com>
Co-authored-by: Romain Derie <rde@odoo.com>
Co-authored-by: Tom De Caluwé <tdc@odoo.com>
2021-09-03 15:45:08 +00:00
Joseph Caburnay f19a4b99aa [FIX] point_of_sale: load missing products
When loading pos, orders saved from the local storage is loaded. There
is, however, a chance that the products used in the loaded orders
are missing during the loading of pos. (Which can be caused by backend
changes such as archiving a product.) This situation is similar when
loading paid orders from the backend in the order management screen.
This results to crashing of the pos app and force clearance of the
local storage in order for pos to work again.

In this commit, we try to rectify the issue by loading the unloaded
products. The product remain inactive if it was archived, however,
they can still be visible in the orderlines.

closes odoo/odoo#72108

Signed-off-by: pimodoo <pimodoo@users.noreply.github.com>
2021-09-03 15:45:03 +00:00
Robin Heinz d9dca8feb7 [IMP] point_of_sale: Limit product and partner load
In order to improve the perf at the opening of the point of sale,
this commit allows to only load a limited quantity of products and partners
in the POS.
This also include a new option that allows to load them in the background
if they're not all loaded.

Part-of: odoo/odoo#72108
2021-09-03 15:45:02 +00:00
qsm-odoo 6799161c52 [FIX] web_editor, website: restore backend HTML fields in no-website DBs
The SCSS compilation failed if website was not installed since [1] as
a mixin was used in web_editor while defined in website...

[1]: https://github.com/odoo/odoo/commit/5ffce116a6f8d4775cffe4daef09674db6c159d0

closes odoo/odoo#75938

Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2021-09-03 14:30:55 +00:00
Géry Debongnie 07e163727b [IMP] web: update owl from 1.4.3 to 1.4.4
Github release: https://github.com/odoo/owl/releases/tag/v1.4.4

Release notes:

- fix: overlapping multi-class in t-att-class

closes odoo/odoo#75934

X-original-commit: 085b971b0b1317317fa88116613bb2740233d241
Signed-off-by: Samuel Degueldre <sdegueldre@users.noreply.github.com>
2021-09-03 14:30:51 +00:00
Benjamin Vray 551e4372a5 [FIX] website: fix height and top position of modals
Since we added a z-index: 0, on the wrapwrap, the modals are under the
main navbar and therefore partly hidden by the height of this navbar.

After this commit, the top position of a modal is the height of the
main menu navbar but only if that navbar is displayed. The height of
the modals is also reduced with the height of the navigation bar to
avoid overflowing at the bottom.

Some of what this commit did had already been merged in saas-14.2
(in this PR: #69360) but we realized that we also needed this fix in
v14.

task-2501400

closes odoo/odoo#75928

X-original-commit: d8e9569ef04ad86f0558b3e674bc8b74718c9c70
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2021-09-03 14:30:47 +00:00
William Braeckman 0a3bd7f414 [FIX] hr_holidays: fix action_with_unused_accruals visual
Fixes the above mentioned field in the hierarchical kanban view in the
accrual plan form view.

TaskId-2637152

closes odoo/odoo#75923

Related: odoo/upgrade#2802
Signed-off-by: Kevin Baptiste <kba@odoo.com>
2021-09-03 14:30:43 +00:00
William Braeckman 32fd1fefc6 [FIX] hr_holidays: fix traceback on leave type smart button
Fixes a traceback when clicking the accrual smart button on the leave
type form view

TaskId-2637152

Part-of: odoo/odoo#75923
2021-09-03 14:30:42 +00:00
William Braeckman 36e3a2ab52 [FIX] hr_holidays: fix time off type/accrual plan selection
Previously when selecting one of those two fields the other would be
lost etc. it wasn't practical.

TaskId-2637152

Part-of: odoo/odoo#75923
2021-09-03 14:30:42 +00:00
William Braeckman 8109f6e701 [FIX] hr_holidays: fix is_officer not being computed
Field `is_officer` is required for some of the elements in the from view
to be readonly or not.
However it would not be computed before record creation which would
cause issues.
This is now fixed by adding something to trigger the compute even though
it is not used.

TaskId-2637152

Part-of: odoo/odoo#75923
2021-09-03 14:30:42 +00:00
William Braeckman be6c49a921 [IMP] hr_holidays: improve accrual plan's code
Minor code cleanup; remove dead code; update comments.

Also fixes a bug on the first time the accrual plan is called.

TaskId-2637152

Part-of: odoo/odoo#75923
2021-09-03 14:30:42 +00:00
Stanislas Sobieski 1b82054554 [ADD] ir_cron: allow env variable to force cron_trigger db notification
closes odoo/odoo#75846

Signed-off-by: Fabien Meghazi <amigrave@users.noreply.github.com>
2021-09-03 14:30:29 +00:00
Jeremy Cormier d33c3d34fa [FIX] l10n_pos_cert: Fixed unlink empty cash register
closes odoo/odoo#75825

X-original-commit: 92aec1c9071473f3b9e3254d1b8dc65845c83595
Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
2021-09-03 14:30:25 +00:00
Florent de Labarre 8bf547be1d [FIX] delivery: delivery is not invalidate
- Install delivery and active 'Addresses in Sales Orders' options
- Create a delivery allowed only in France
- Create a partner with two delivery address, one in France, an other in Belgium
- Create SO, select the delivery address in France
- Select the carrier
--> Change the delivery address in Belgium in the partner_shipping_id field,
recompute_delivery_price stay False.

This PR fix this issue, now the delivery is invalidate if you update the field
partner_shipping_id.

closes odoo/odoo#75762

X-original-commit: b53ff03b5cf43c2cd23039b8192f4d90d47e11d2
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2021-09-03 14:30:22 +00:00
Valentin ChevalierandAntoine Vandevenne d9d2b6da6c [IMP] payment_adyen: migrate to the latest version of Checkout API
Checkout API v67
Web Drop-in v4.7.3

In particular, this commit changes the client-side authentication flow
to rely on client keys rather than origin keys as the latter is
deprecated by Adyen and the switch is required in order to upgrade the
Drop-in integration.

task-2590477

closes odoo/odoo#74827

Related: odoo/upgrade#2786
Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com>
Co-authored-by: Antoine Vandevenne <anv@odoo.com>
2021-09-03 14:30:18 +00:00
Jacky (trj) b1e730ed6e [REF] point_of_sale: invoice mail POS UI
Invoices can also be sent by email but this was not properly displayed on the POS UI.

task-2536068

closes odoo/odoo#72873

Signed-off-by: pimodoo <pimodoo@users.noreply.github.com>
2021-09-03 14:30:06 +00:00
Odoo's Mergebot 52575cd0f5 [MERGE] sale_project: improve analytic account
This PR improves the analytic accounting in project:

1) Analytic account of the project is passed to the invoice lines
generated from the project's SO lines.
2) Analytic account and analytic tags are added on task in order to
gain in granularity. Those tags are passed to the invoice lines
generated from the task's SO lines.
3) Employee timesheet cost now may be overriden in the project
employee mapping, if there is an employee rate. This cost is used
to compute the amount (price) of the timesheets.
4) The sale order margin is computed based on the timesheeted
amounts (prices) per unit of measure, for services with quantity
delivered based on timesheets.

PR : #70527
PR upgrade: odoo/upgrade#2616

task-2458135

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

Signed-off-by: LTU-Odoo <IT-Ideas@users.noreply.github.com>
2021-09-03 16:29:54 +02:00
qsm-odoo 6854ff8026 [IMP] website: add no-hamburger-in-mobile option
At the same time, review the whole "hamburger type" option to be more
clear for the user. Unfortunately, the whole "no-hamburger-in-mobile"
option is kinda going against the way our editor works right now so this
commit implements it with well-placed hacks... to improve somehow at
some point.

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

closes odoo/odoo#68149

Related: odoo/design-themes#11
Related: odoo/upgrade#2294
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2021-09-03 14:29:52 +00:00
qsm-odoo ff26771e9c [IMP] website: rearrange the logo option in header
Part of https://github.com/odoo/odoo/pull/68149
task-2368576

Part-of: odoo/odoo#68149
2021-09-03 14:29:51 +00:00
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
qsm-odoo 2a8a5dc7a9 [IMP] web_editor, *: allow editor widgets to depend on ancestor ones
*: website

The visibility dependencies are now searched in the current
SnippetEditor instance but also in all its ancestors.

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

Part-of: odoo/odoo#68149
2021-09-03 14:29:51 +00:00
qsm-odoo 1d49b5112b [FIX] website: move configurator templates in dedicated file
Unfortunatly needed while another "complex" bug fix is done: xpath
validation during module install seems to be done after each view
creation. With the upcoming header template refactoring, by mischance,
the configurator template validation will not work at install anymore
while it is perfectly valid (and the only way to define it) after
install:

Before future refactoring:

1) install view which adds nav inside X
2) install configurator view, primary view which removes the first nav
   inside X
3) install view which adds another nav inside X... the nav the
   configurator wants to remove !

-> Validation of (2) works thanks to (1) during install while (2) wants
   to remove something that is not installed yet. But (2) is valid it
   should simply not have been evaluated yet.

After future refactoring:

We remove step (1) -> (2) has to be done after (3) to pass validation
at install while the system is not bug fixed.

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

Part-of: odoo/odoo#68149
2021-09-03 14:29:50 +00:00
Thibault Libioulle 8bbbc69e40 [IMP] sale{,_project}_margin: improve service product cost computation
Prior to this commit, the cost of a service product was computed based
on its standard_price.

With this commit, the product cost is computed based on the timesheet
amounts linked to the sale order, if the sale order has a delivering
method of type timesheet.

PR : #70527
See odoo/upgrade#2616

task-2458135
2021-09-03 12:45:58 +02:00
Thibault Libioulle dbbfce18a4 [IMP] hr{,sale}_timesheet: add employee mapping cost
Prior to this commit, the timesheet amount was computed based on the
employee timesheet cost.
The sale order line related to the employee was also required

This commit allows the project owner to configure a employee mapping
cost that will override the employee timesheet cost if defined.
This commit removes the fact that the sale order line is no more
required, thus the mapping will have no effect.

PR : #70527

task-2458135
2021-09-03 12:45:58 +02:00
Thibault Libioulle dd706ea024 [IMP] (sale_)project,hr_timesheet: add analytic account and tags on task
Previously, all costs allocated to a task were associated, if set, to
the analytic account of their project.

This commit adds a deeper level of granularity, as the user will be able
to override the project analytic account and add analytic tags.
When creating timesheets or creating account move line related to SO
linked to a task, the analytic account of the task is now taken into
account rather than the one defined on the project. If an analytic
account is set on the SO, it remains the default account used.

If a task is related to an SOL and an invoice line is created from this
SOL, the analytic tags of the task are also given to the account move
line.

If different analytic account are linked to a same SOL through the
project using this SOL or the tasks using this SOL, than no default
analytic account is set on the invoice line.

PR : #70527

task-2458135
2021-09-03 12:45:58 +02:00
Thibault Libioulle d4a0bcaa5a [IMP] sale_project: link project analytic account to invoice
Previously when a user added products to a task, when invoicing the
customer, in default case, no analytic account was defined on the
invoice line generated for the sale order line.

With this commit, we define a default analytic account based on the
information of the sale order line.
If the sale order line has a generated task or project associated to
it, we set the project analytic account.
If the sale order line is used on tasks or projects which all use the
same analytic account, then the invoice line created will take this
unique analytic account as default value.

If a sale order line is used in distinct project or tasks
from distinct project, then no default analytic account is defined.

PR : #70527

task-2458135
2021-09-03 12:45:58 +02:00