Before, when we added view to the dashboard, context was saved too,
including allowed_company_ids. As a result when we checked the same view
from the dashboard, the displayed records corresponded to the active companies
during the time the view was saved and not the current ones - the companies
that are currently ticked from the multi-company widget.
After the fix, the displayed records in dashboard, correspond to the currently active companies.
task - 2809597
closesodoo/odoo#94105
X-original-commit: 9f854262a197782793d329487792a09a101a1a38
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
This change removes the `barcode_nomenclature_id` in the `pos.config`.
Each pos session now starts based on the company's barcode nomenclature.
closesodoo/odoo#93072
Task-id: 2849415
Related: odoo/upgrade#3575
Signed-off-by: Quentin Lejeune (qle) <qle@odoo.com>
Steps to reproduce:
- Install project and timesheet
- Create a project with settings "invited employees only"
- Create a user with administrator project right (and non admin
rights for timesheet)
- Create a task in the new project
- Try to generate a timesheet on the task with the new user (the
user has to not follow the task)
Current behavior:
This generate an access error due to not respecting some rules
Expected behavior:
The timesheet is created
Explanation:
The project admin should be able to handle any timesheet that is
linked to a project to do so we add its groupto the rule that gives
access to the model analytic.model_account_analytic_line if there
is a project_id.
opw-2861042
closesodoo/odoo#94102
X-original-commit: 70a0ad280e0c8a62f24d6943be082298fa98e443
Signed-off-by: Laurent Stukkens (ltu) <ltu@odoo.com>
This commit addresses several issues:
1. The overwrite of `_recompute_completion` was not properly filtering
the partners that had actually completed the course. meaning that
passing through this function could add a course/slide.channel as an
employee skill iven if they did not complete it. Now, we only act upon
employees that have actually finished the course.
2. The function would add the same skill over and over again, assuming
that we could only pass through it once but it is actually called every
time we publish or archive any slide of a course since 9920f20e.
This can lead to a bit of bloat on an employee resume (See task
attachments). Now, we try to make the function idempotent and only add a
resumé line only once.
3. The addition of a resume line could not be achieved and would raise
an ACL when the current user was not an HR Officer (group `hr_user`).
Since it can be called by any eLearning(`slides`) manager, a sudo
privilege is necessary.
Related Task: 2830016
closesodoo/odoo#94095
X-original-commit: 385884afd31f25d61e99d139ecd4c574d99a1863
Signed-off-by: Kevin Baptiste <kba@odoo.com>
Signed-off-by: Rémi Rahir (rar) <rar@odoo.com>
*: website_livechat
This commit is a step towards refactoring the JS of public livechat,
so that it reuses the same architecture as the code of Discuss.
This implies code that uses JS models and OWL components.
Task-2888734
closesodoo/odoo#94090
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
This commit:
- moves the "Company Registry Number" from `res_company` to `res_partner` (which might be different from the VAT in some localizations). This must be unique among all partners of the same country.
- allows the search of partner by using their "VAT" or their "Company Registry Number"
Task-id: 2857253
Community PR: odoo#91938
Enterprise PR: odoo/enterprise#27605
Upgrade PR: odoo/upgrade#3570closesodoo/odoo#91938
Signed-off-by: Quentin De Paoli <qdp@odoo.com>
This commit:
- adds a fiduciary mode which allows fast encoding of invoices. This is an Accounting setting which must be activated. This fiduciary mode allows one to edit directly the invoice sequence and enter the total amount of the invoice (by creating a single line which contains the base price, the tax amount, and the most frequent account) such that we match this 'quick total amount'.
- adds a new test for this feature
- adds a 'quick edit total amount' in the tax computation which verifies that the 'quick edit total amount' correctly matches sum of the base and the tax (in case of fiduciary mode)
- sorts and filters the accounts suggestions in an invoice line. The most frequent accounts for a particular partner rank higher while filtering on the type of account suggested (this is disabled if the user searches itself for the account)
- selects by default the most frequent account for a particular partner when creating a new invoice line
- adds the option to hide some columns (label & quantity)
- moves the car column after the account column in case the Fleet app is installed
Task-id: 2857253
Community PR: odoo#91938
Enterprise PR: odoo/enterprise#27605
Part-of: odoo/odoo#91938
Before this fix, follower subtypes were displayed by order of id,
whereas in DiscussController.read_subscription_data(),
it was ordered by :
\- parent_mode
\- res_mode
\- internal
\- sequence
See : https://github.com/odoo/odoo/blob/fc115ebdf7c3783f9eaabba71eccce23c676d957/addons/mail/controllers/discuss.py#L471-472
In this commit, we just reproduce the same order.
Also, for `parentModel` and `resModel`, we want the record
with their values unset to come first.
We added 'undefined-first',
as this sort order might be needed for other models.
closesodoo/odoo#93315
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
The condition to display the start event warning in the track view was that
the event was not ongoing. This fix adds the condition that the event is
upcoming, preventing the warning to be displayed after the event date.
Task-2692907
closesodoo/odoo#94066
X-original-commit: 17a46270dd826172e072ada1da9911c062a827fb
Signed-off-by: Warnon Aurélien (awa) <awa@odoo.com>
Steps to reproduce:
-Install sales and crm
-Apply multiteam option in crm settings
-Create a user with two teams A and B
-Create with this user a lead with team B
-From this lead create a quotation
Current behavior:
The quotation could have team A (the team of the lead is ignored)
Expected behavior:
The quotation always has team B
Problem when creating the quotation the team id is not propagated
in the context to the final function _get_default_team_id and in
this function the default context team is only check if no teams
have been found for the user, so the function always selects the
first team of the user. To solve the issue we propagate the team
id to the default function and we change it so that if the context
default team is in the user teams it is this one that is going to
be selected and no other.
Small behavior change:
Two cases are added in the _get_default_team_id function that slightly change
the current behavior. For the two first cases instead of just choosing any team in
the list we add a case so that IF there is a default team in the context AND that this
team is in the list then its going to be this one that's gonna be selected. See function
comments:
1- any of my teams (member OR responsible) matching domain
2- any of my teams (member OR responsible)
becomes
1- default from context if in my teams (member OR responsible) matching domain
2- any of my teams (member OR responsible) matching domain
3- default from context if in any of my teams (member OR responsible)
4- any of my teams (member OR responsible)
opw-2830913
Task-2852947
closesodoo/odoo#94045
Forward-port-of: odoo/odoo#93896
Forward-port-of: odoo/odoo#90289
Signed-off-by: Fockedey Martin (mafo) <mafo@odoo.com>
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Steps to reproduce:
-Install sales and crm
-Apply multiteam option in crm settings
-Create a user with two teams A and B
-Create with this user a lead with team B
-From this lead create a quotation
Current behavior:
The quotation could have team A (the team of the lead is ignored)
Expected behavior:
The quotation always has team B
Problem when creating the quotation the team id is not propagated
in the context to the final function _get_default_team_id and in
this function the default context team is only check if no teams
have been found for the user, so the function always selects the
first team of the user. To solve the issue we propagate the team
id to the default function and we change it so that if the context
default team is in the user teams it is this one that is going to
be selected and no other.
opw-2830913
X-original-commit: 0b6c63f2be90928f5d6806ef489c369a1310be04
Part-of: odoo/odoo#94045
Purpose of this commit is to better support default_team_id in context when
computing default team. Indeed currently default key is ignored if the user
is member or responsible of any team. It is used only when no membership
exists as a fallback.
However when giving a default_team_id in a default-like method we think we
should better try to match this value. When having memberships the final
team is the default one if present in the subset of teams. Instead of
taking the first found one in the teams set (filtered on a domain or not)
we first check for the default team presence, then fallback on the ordering
based on sequence.
Task-2852947
opw-2830913
X-original-commit: fb060c86daf0c1d737abc9228002cdfa280e1d2c
Part-of: odoo/odoo#94045
Current sales team ordering is based on sequence. However several sales teams
with same sequence may exist. This leads to a not deterministic behavior as
we are unsure how database will choose the ordering.
This is fixed with this commit: when having teams with same sequence we take
the newest one first.
Task-2852947
X-original-commit: 34da99f6bec92553febfae7bc9c80ccebb38f70f
Part-of: odoo/odoo#94045
Purpose of this commit is to improve a bit tests about default team computation.
Coverage is improved, notably about default context value usage that is about
to be updated.
Task-2852947
X-original-commit: 8e18a27352d2fd9e68cd2b54e49dfca6fb658eaa
Part-of: odoo/odoo#94045
* hr, im_livechat, mail, sms, snailmail, test_mail_full, website_livechat,
website_slides
PURPOSE:
Creating a record with no values has no sense but is sometimes useful during
tests.
The support should be dropped for `default` parameter in `create`.
SPECIFICATION:
All the occurrences of `create()` have been replaced by `create({})`.
Task-2869394
closesodoo/odoo#93917
Related: odoo/enterprise#28538
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
Steps to reproduce:
1- install sales ,accounting, project, timesheets
2- create a new service product p1 that triggers a project and a task
3- create a new sales order so with p1 and validate 1 hour in the task
4- create an invoice from so, an anayltic account is added
5- edit any field of product_id, account_id, partner_id, date
6- the analytic default rule is applied (in this case none) so the
anayltic account is removed
Bug:
the `compute_analytic_account_id` method forces the analytic default
rule even if the field is already set before the changes
Fix:
apply analytic default rule only if the analytic acount is not set and
if it is not a project generated move
OPW-2833912
closesodoo/odoo#94034
X-original-commit: 7f69d623265a53be854eca474876bde2a0b14df6
Signed-off-by: Laurent Stukkens (ltu) <ltu@odoo.com>
Before this commit, some element did not had id in the portal sale order
template. This commit intruduces them to allow easy override.
closesodoo/odoo#93859
Taskid: 2855699
X-original-commit: e829e4353574a1226163ba22b02d3080a8f75c69
Related: odoo/enterprise#28509
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
Signed-off-by: Arnaud Joset <arj@odoo.com>
Before this commit, it was not possible to open the template for the so.
Taskid: 2855699
X-original-commit: 9ddb0fa53639205cffaaa81cecbb376071f7787a
Part-of: odoo/odoo#93859
Purpose of this PR to improve generic UI of project app.
So, in this PR done following changes:
- Added group by assigned to under reporting -> customer ratings
- In quick search, changed "rated rated" operator to "assigned to" under
project.project search view
- Removed rating_status field from project > configuration > settings > customer
ratings
- Switched the 'timesheets' and 'planning' features from place from
project > configuration > settings
- In project.task extra info notebook:
- Added the 'parent task' field above the 'analytic account' field
- Added the 'company' field above the 'sequence' field
- Added send mail and sms action in project.project and project.task
list view.
task-2806292
closesodoo/odoo#88446
Related: odoo/upgrade#3459
Related: odoo/enterprise#26207
Signed-off-by: Laurent Stukkens (ltu) <ltu@odoo.com>
Previously the "call to tender" flow involved creating a
`purchase.requisition` record, creating each RFQ via that record, and
then manually going through each RFQ to compare the prices/dates/etc.
By linking the "call to tender" POs within the POs, we remove an
unnecessary `purchase.requestion` record and makes it easier to track
which RFQs are related to each other as an Alternative RFQ.
On top of this, we add some comparision features to make it easier to
determine the best RFQ, specificially the ability to compare PO lines in
the same view with some visual aids (best price/date colored green +
buttons to check these lines to make them easier to view). We also add
an extra feature to set the qty of selected/non-chosen PO lines to 0 to
aid in the RFQ selection process (only applies to non-confirmed/done/
cancelled POs).
Some other features included with this:
- option to cancel alternative POs when confirming one, which purposely
does not cancel ones that have already been confirmed/completed.
- new wizard for creating alternative POs so user can select whether or
not they want to copy the products/qtys from the original PO.
Important Notes:
- JS Customizations:
- custom many2many widget added so user:
- can click between alternative POs in same window + keep breadcrumb.
This is because all alt POs are interconnected and long breadcrumb
chain is possible (+ we want to avoid windows within windows.) It
is expected that user will be aware that unsaved changes will
auto-save when alt PO is clicked on.
- cannot unlink a PO from itself (this is automagically done during
the write) since this will remove all of its linked POs and might
confuse users.
- custom view js for Comparing Order Lines to help highlight best
options, including ensuring that the best options are still
highlighted after clicking on Choose/Clear buttons (since the best
option can change afterwards, we recalc + update via RPC)
- General implementation warnings:
- Anytime any button/alternative PO is clicked on within a PO, the
form will auto-save. This is due to how the current action service
handles changing views.
- POs created via "Create Alternative" button purposely:
- require a vendor to ensure correct lead times/prices
- show all vendor/product warnings in wizard because we cannot
reproduce the pop-up warning that would occur in the PO when
they are selected. We also purposely block the PO creation when a
blocking warning is set since we cannot remove the values
(especially in the case of a blocking vendor message) from a
newly created PO.
- Technical purchase.order.group model created to help with difficult
management of complicated behaviors:
- unlink from self if a PO is no longer linked to any other POs
- linkages must be symmetric (i.e. linkage PO1 => PO2 must
reflect PO2 => PO1 in their form views)
- don't lose existing linkages (i.e. PO1 => PO2 and PO2 => PO3
should auto-link PO1 => PO3)
These last two behaviors are difficult to do without grouping due to
possibility of remove and adding linkages at the same time. To avoid
complex code to ensure these complexities hold when when creating a
new PO, linkaging to alternatives is not allowed when PO is not yet
saved as a record.
Task: 2695116
Upgrade PR: odoo/upgrade#3586closesodoo/odoo#87656
Signed-off-by: Arnold Moyaux (arm) <arm@odoo.com>
Instead of having to repeatedly manually call `onchange_quantity` at
different points in the code, it is better to have it be computed
instead.
- Logic is left unchanged,
- onchange calls from other methods are removed, and
- tests are adjusted to properly handle compute. I.e. remove
'date_planned': datetime.today().strftime(DEFAULT_SERVER_DATETIME_FORMAT)
from when PO lines are created since this sometimes resulted in
inconsistent date_planned values for PO line and the PO date_order
(by 1 sec), which could lead to inconsistently created 'date_deadline'
values for stock_moves' created by PO line qty changes. Issue
previously didn't exist because onchange was not always called.
Part of Task: 2695116 (to avoid adding more onchange calls for new
feature)
Part-of: odoo/odoo#87656
This commit removes the call for tender feature via a
purchase.requisition. This feature is to be replaced with the ability to
directly compare prices/options of POs/RFQs within a PO to remove extra
steps to compare them. The linkage between POs previously provided by a
purchase.requistion is replaced by the POs being directly linked to each
other. Feature to auto-create call to tenders via a product option is
removed and the user is expected to know/be responsible for when they
should do a call to tender themselves.
All references to old Call to Tenders replaced with Blanket Order, and
we remove/rename the menu items since Blanket Order is now the only
purchase.requisition.type option (we expect minimal customizated types).
Follow-on refactoring to switch purchase.requisition to
purchase.blanket.order to come later. Follow-on refactoring to switch
purchase.requisition to purchase.blanket.order to come later.
Part of Task: 2695116
Upgrade PR: odoo/upgrade#3586
Part-of: odoo/odoo#87656
The Call to Tender purchase requisition is being removed and implemented
as something managed completely within a PO. This includes removing the
'tenders' option for products which means the dropshipping + auto-create
call to tenders use case no longer exists => this module is no longer
needed.
Part of task: 2695116
Upgrade PR: odoo/upgrade#3586
Part-of: odoo/odoo#87656
Until know, Transifex projects were organised as:
- odoo-14
- odoo-15
- odoo-master
with odoo-master changing frenquently to reflect the
last used saas version, to prepare the future odoo-16 version.
This was ok as most people used stable versions at that time.
Now the saas versions are frequently released and many users of
odoo.com are running these versions, the quality of translations is
more important and preparing for the future version is not the only
goal.
Having only one project synchronised with a saas version is not enough
as we frenquently have to support multiple versions in parallel
(e.g. saas-15.2 for users and saas-15.3 for odoo.com).
Switch to a project for each saas release to be more flexible.
Hopefully, it won't be too much additional work for translators thanks
to TM.
New organisation
- odoo-14
- odoo-15
- odoo-s15-2
- odoo-s15-3
and delete projects when it is no longer supported
closesodoo/odoo#94010
X-original-commit: bb071a903d5f0b2de4c3f945ed5f4ed7d13b1e94
Related: odoo/enterprise#28588
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
Purpose of this commit to add the measures in timesheet/attendance report.
task-2782768
closesodoo/odoo#85798
Related: odoo/enterprise#24982
Signed-off-by: Laurent Stukkens (ltu) <ltu@odoo.com>
Before this commit the "Thanks" button of the newsletter block could be
saved as visible. This meant that a visitor who did not subscribe to the
newsletter would see the "Thanks" button on loading before it
disappeared. This commit solves this problem by:
1. hiding the "Thanks" button before saving
2. having an option to show/hide the "Thanks" button in edit mode
3. hiding the "Thanks" button before switching to edit mode
Steps to reproduce the fixed bug:
- Drop a newsletter block.
- Save and register to the newsletter.
- Edit
- Change anything in the newsletter block.
- Save and Logout.
- Now the Thanks button appears and disappears when the page is loaded
opw-2802139
closesodoo/odoo#94002
X-original-commit: 57793ff912ac5aab8f3d3e014992965d06290bf0
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
Avoid leaks in case of exception.
closesodoo/odoo#93993
X-original-commit: 1a1a10b7ce53f24eabed3e3a38f34b354d2d1911
Signed-off-by: Christophe Simonis <chs@odoo.com>
The call to `commit()` can fail during the flush of the environment
and raise an exception before the actual `COMMIT;`, leaving the
cursor unclosed.
This leaked cursor may hold locks that only be released when the GC
collects it. On low-traffic workers like the CronWorker, this can
lock usual database usages.
X-original-commit: 3cb3cec67c28ca147288103adb219e6da8694248
Part-of: odoo/odoo#93993
Purpose
=======
In message_notify, when called on a recordset, call model methods instead of
base one defined on MailThread. This allows to use internal methods overrides.
Also perform some linting on calls to ``message_notify`` in order to better
spot calls, parameters, ...
Task-2852908
closesodoo/odoo#92868
Related: odoo/enterprise#28038
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
When fetching recipients information for user_notification we don't need to
check for followers, as only explicit recipients are considered.
Task-2859935
Part-of: odoo/odoo#92868
Install website and website_hr_recruitment, open /web with ?debug=1, go
to website > configuration > redirect, create a temporary (302)
redirection from `/jobs/detail/experienced-developer-4` to `/404`. Open
the `/jobs/detail/experienced-developer-4` as admin and unpublish the
page. Open the same URL via private browsing (so that you are not
connected), you get the default 403 - Forbidden page, you were not
redirected to the 404 - Not Found page.
Custom 301 (permanent) and 302 (temporary) redirections are fallback
redirections when the requested page does not exist or is not accessible
to the current user. The HTTPocalypse broke the later case, it was not
checking for existing redirection upon access error.
The use case is the one supported with [1] where people want/need to
display something better than a 403 when they unpublish a record like a
job position for instance (most of the requested cases on opw).
Indeed:
- People have link to that record/job everywhere on the internet
- The job position / record is no more relevant, and people need to
unpublish it
- People don't want to delete it (or can't sometimes due to record
relations)
- People don't want visitors to land on a 403, mainly because it is a
non customizable advanced/technical page (it displays a technical
message including the record name etc)
- Their need is to either land a their customizable friendly 404 or
sometimes on another record to promote it.
[1]: https://github.com/odoo/odoo/commit/3b9cd536607b1631dd375ab2e5cc94eb814a6e9bclosesodoo/odoo#93981
X-original-commit: eb7eecec976570ae3301c17a04adc9c110d5b14a
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
Signed-off-by: Julien Castiaux <juc@odoo.com>
Co-authored-by: Romain Derie <rde@odoo.com>
*: website, test_website
Since [1], a race condition seems to have become more dominant. It is
actually due to a tour not properly awaiting the editor to be loaded
before using it.
This commit fixes all occurrences of such 'trigger' selectors, even in
tours were it could actually be not a problem. That will prevent devs to
copy paste the problematic trigger.
[1]: https://github.com/odoo/odoo/commit/57793ff912ac5aab8f3d3e014992965d06290bf0closesodoo/odoo#94000
X-original-commit: 38f3a94263b9cf48e9f5a8de553b8602310bcddd
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
When adjusting the currency rates, the amounts in the edi invoice become
incorrect and the Italian EDI system rejects them (due to contraints on
the content of these fields).
This commit changes the referenced amount to the 'amount_currency' (for
the taxes and the base) for the fields in the EDI templates.
closesodoo/odoo#93991
X-original-commit: 34315a9114eff6fa8ce3b16bb081ad026816a08c
Signed-off-by: Josse Colpaert <jco@odoo.com>
*: website_livechat
This commit is a step towards refactoring the JS of public livechat,
so that it reuses the same architecture as the code of Discuss.
This implies code that uses JS models and OWL components.
Task-2887296
closesodoo/odoo#93966
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
In commit d4b046e238, a sudo was lost,
leading to 403 errors shown to public users browsing the ecommerce.
closesodoo/odoo#93947
X-original-commit: 96f491dafe9b247638db04ecfb33f3dbbc36e73c
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
Currently, certain fields take the decimal accuracy of the product_uom
whilst other's don't follow this logic.
This causes a discrepancy between the decimal accuracy of all fields
where there should be none.
The purpose of this commit, is to stay consistent across all fields in
the view.
closesodoo/odoo#93935
Signed-off-by: Arnold Moyaux (arm) <arm@odoo.com>
Journal items:
- 2 list views were available for the journal items. As these changes
make them very similar, the "grouped" view is dropped and only
the simple/normal list view is used.
- As the usefull information is now available from the list items,
the more complex name that was previously used on the group by
lines is not useful anymore.
- Removed duplicated filters.
- Added and modified columns of the list view.
- Removed the button opening the move form from the move line, and
made the move name clickable (with same behaviour as the button).
- Removed edit button on some group by lines, as it can lead to
unwanted access errors.
- Removed 2 filters and added 1.
- Added a field to use for the matching widget.
- `move_id` was replaced by `move_name`, because the sorting of the
Many2One `move_id` is not based on its name and was thus not
working as intended.
task 2855459
closesodoo/odoo#93586
Related: odoo/enterprise#28361
Related: odoo/upgrade#3598
Signed-off-by: Cedric Snauwaert <csn@odoo.com>
In this commit, added test of timesheet analytic tags
Test Case:
--------
1. Create analytic tags
2. Add analytic tag in project
3. Create timesheet
4. Check the default analytic tag of the project and timesheet
5. Add analytic tag in task
6. Check the analytic tag of the timesheet and task
task-2878938
closesodoo/odoo#93214
Related: odoo/enterprise#28209
Signed-off-by: Laurent Stukkens (ltu) <ltu@odoo.com>
The project privacy_visibility tooltip doesn't reflect the actual behavior
for the "Invited portal users and all internal users" selection.
This commit rephrases the tooltip of that field in order to correctly match its behavior.
It also slightly changes the name of the options to match the new tooltip.
Task-2871771
closesodoo/odoo#93911
X-original-commit: 9ef7030e3346eda267bc27b47a8a168acdc4a7b9
Signed-off-by: Laurent Stukkens (ltu) <ltu@odoo.com>