Before this commit, crm_reveal always pushed a stocky warning to the
bus on rule creation, even if GeoIP was rightly set
(i.e. python package AND the database in /usr/share/GeoIP)
This was because the file imported the variable from another one
that copy was not updated with the initialization of the session
After this commit, we call the variable at runtime rather than import it
at init time
There is no more sticky message
OPW 2052995
closesodoo/odoo#35906
Signed-off-by: Lucas Perais (lpe) <lpe@odoo.com>
There was a first version of mrp_subcontracting at rev [1] and now
there's a second verion at rev [2]. As the second version sensibly
changed the flows and models AND we don't have the time to backport the
changes AND saas-12.3 will be released on the saas, we chose to remove
the module in saas-12.3 to not have to support both version once v13 is
released.
[1] d91db5bde6
[2] 9b6a5398dfclosesodoo/odoo#35898
Signed-off-by: Christophe Simonis <chs@odoo.com>
In v10.0, it was possible, and kinda work, to have
```
<t t-name="kanban-tooltip">
<ul class="oe_kanban_tooltip">
<li><b>Project:</b> <field name="project_id"/></li>
</ul>
</t>
```
In v11.0 onwards, this "feature" has been dropped, since in kanban records
it doesn't make much sense to a field defined/displayed that way
The right way is to call
`record.(field).(raw_)?value`
This commit adapts the only two modules still having kanban-tooltip classes in their views
OPW 2055132
related to #29802closesodoo/odoo#35869
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
If an event track had a speaker assigned who had an email, and the
email field in the track itself was empty, Odoo was suggesting the
user to send an email to an empty recipient, making an error
Now it only suggests the email if there's one.
Fixesodoo/odoo#35941
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
Before this commit, the adaptation of Deferred to Promise was not well done
Hence, the change in video playing status was not handled correclty
i.e. When a video arrives to its end, the next slide or the questions should be displayed
After this commit, when a video is finished, the next slides is displayed
OPW 2052971
closesodoo/odoo#35863
Signed-off-by: Christophe Simonis <chs@odoo.com>
If you change the color of a link with the editor without using the link
edition menu, this do not work (which might be expected), but if the
text outside the font had been colorized, the font will be applied
outside of the link only.
This is unexpected since if we have: "hello <a>cruel</a> world!", if we
select only "cruel" and change color, the change only happen to "hello"
and "world!".
With this changeset, an anchor in the ancestor prevent to use an
ancestor font tag to change color (which prevent the issue).
opw-2044551
closes#35862
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
Same cause, error, rationale and fix than 0ec0a4a32e
#OneCharacterPatch, reloaded
opw-2056251
closesodoo/odoo#35857
Signed-off-by: Richard Mathot (rim) <rim@openerp.com>
When you are adding a line on your sale order that is a delivery line,
the carrier is not always set on the sale order which means that when
the carrier is not explicitly set on the sale order, the carrier won't
be set on picking created from the sale order.
When you are using the wizard on sale order, it works, but when the
carrier is selected on the e-commerce, it is not set on the sale order.
To avoid such difference in behavior, we are writing the carrier_id of
sale order in the function 'set_delivery_line' insread of the wizard and
e-commerce.
closesodoo/odoo#35855
Signed-off-by: pimodoo <pimodoo@users.noreply.github.com>
Since commit e8916a817c, it was not possible anymore to go through the
ecommerce checkout when `website_sale_delivery` module was installed.
Indeed, it would raise a traceback on the confirmation step if more than one
delivery carrier would be available (different qweb if more than one carrier).
Thus, it would not be possible to click on pay now and buy the product.
This commit fixes it and improves the current test to ensure such flows are
working.
closesodoo/odoo#35577
Signed-off-by: pimodoo <pimodoo@users.noreply.github.com>
If partner.vat is an empty string, python evaluates it as falsy and doesn't check the remaining of the line. This makes the framework to send ["", ""] as values for the many2one to the browser instead of false.
By forcing to have True or False, this is not a problem anymore as bool() will be False, and False will result in the correct value in the read.
closesodoo/odoo#35807
Signed-off-by: Quentin De Paoli (qdp) <qdp@openerp.com>
In case of large cart and promotion program with a discount reward
of percentage type, we are rewriting the reward order lines
multiple times while we can do all in one update.
opw-2038791
closesodoo/enterprise#5086
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
X-port/Cherry-pick of odoo/enterprise@243e66663a
Create two models, `object` and `category`. The object have a Many2One
to the category. Override the `search` on the category so it returns a
subset of the records if a context key is present. Create an IR Rule on
object with the following pseudo-domain: `categ_id in category.search([])`.
Search on object with the context key present. Even if the context
should only be applied to category, it is applied to object too thus
there are some object missing.
When evaluating the domain of IR Rules, the current user is propagated
with the current environment context. API calls triggered by the domain
are called with the given context, possibly populating the cache with
different records than it would normally does without the context (i.e.
at `addons/point_of_sale/models/account_journal.py#L19-L23`). Following
requests do use that invalid cache thus return invalid results.
Forcing an empty context on the user used during the evaluation of the
context ensures the IR Rules are working as they should and is
future-proof (cf `load_company` v13 context key)
opw-2041667
closes#35123closes#35125closesodoo/odoo#35667
Signed-off-by: Julien Castiaux <Julien00859@users.noreply.github.com>
Co-authored-by: Hugo Adan <hugo@vauxoo.com>
When accessing a SO's tasks from Contacts (the partner_id's page), and
calling action_view_task, the active_id first corresponds to the contact's id.
Therefore, if a project.project exists with the contact's id, one can access
the SO's tasks, but otherwise, we get the error
Record does not exist or has been deleted.
(Records: [partner_id], User: ...)
Thus, if there is one corresponding project, we first update the context:
active_ids is set to project_id,
allowing access to the SO's corresponding project's tasks.
Note that the same thing is done lower:
eval_context.update({'active_id': task_projects.id})
which is too late to avoid trying to access the wrong record.
In the case where there are more than 1 corresponding projects (or if
there are no corresponding tasks), we don't have the issue.
OPW 2052559
closesodoo/odoo#35792
Signed-off-by: Nans Lefebvre (len) <len@odoo.com>
In some cases, the first request of a test is made before the
proper setting of the cookie. In that case, Odoo picks a new session,
leaving the request unauthenticated.
closesodoo/odoo#35780
Signed-off-by: Christophe Monniez (moc) <moc@odoo.com>
- Take a quizz survey, and fail it
- Go to Answers
- Print the Certification
Even if the quizz was failed, the certification can be printed.
There is no option to prevent printing a PDF, therefore we need to print
a different template.
opw-2049481
closesodoo/odoo#35769
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
- Create Event (Where All Day is Set to False)
- Edit Event > Check 'All Day', make it 'Recurrent'
An error occurs because a mandatory field is not set (`stop_date`).
It is possible to work around the issue by doing:
- Check 'All Day'
- Save
- Make it 'Recurrent'
However, the result should not depend on the order we perform the
action. To solve this we send data to server with `force_save`.
Fixes#27269Closes#33068closesodoo/odoo#35758
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
From the Maintenance app go to "Settings">"Equipment Categories".
Create a new category, insert a name and save. An alias get
automatically created with the same name as the new category.
The new alias point to "Maintenance Equipment" model, so when
an email is matched with the alias a new equipment under the new category
is created. This is indeed the default behavior but the help message
is deceiving the user. Changing it.
opw-2049830
closesodoo/odoo#35728
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
Rewrite the product associated to a serial number.
There is a check to forbid this if some move lines already exist.
This check does not actually care what value is written,
so it can raise uselessly (and forbid a legitimate write).
opw 2049717
closesodoo/odoo#35736
Signed-off-by: Nans Lefebvre (len) <len@odoo.com>
Before this commit, when a user received a needaction notification
on a message already stored locally, it crashed with this error:
`TypeError: Cannot read property 'getThreadIDs' of undefined`
This is caused by `addMessage` returning a Promise not resolved with
the message when the message is not new. The returned promise should
always be resolved with the message, in order to be consistent.
closesodoo/odoo#35724
Signed-off-by: Martin Geubelle (mge) <mge@openerp.com>
Revision on https://github.com/odoo/odoo/commit/e8f7770a13d6ddc1cb8ec1bcebcb22e21962ba52
Commit above fixes an issue with chat windows being open twice.
It fixed the issue by aborting opening a chat window in case a
chat window is already being open.
Opening chat window may be a slow process, due to requiring fetching
some messages beforehand. This operation is necessary in order to
check whether the user has access to messages or not, and prompt an
error message without opening the chat window in the latter case.
The fix did not respect the specs of the method `openThread`: it
pre-emptively returned nothing, instead of returning a resolved
promise. Because of this, it crashed on `undefined.then()`.
Task-ID 2053095
closesodoo/odoo#35722
Signed-off-by: Martin Geubelle (mge) <mge@openerp.com>
Before this commit, The dropdown menu remained open after clicking on
activity icon.
After this commit, The dropdown menu is closed whenever the activity
icon is clicked.
Task-Id: 2047408
closes: #35568
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
Before, If direct chat or channel has no any message in chat history, then
send button is not clickable in discuss.
Now, fix in scss file will allow to click send button for channel and chat.
Task : 2037292
Closes#35570
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
In case a User is defined as Expense Responsible for another
user, and if he has Officer Expenses Rights, he cannot validate
an expense while it should be the case.
opw-2043985
closesodoo/odoo#35711
Signed-off-by: Nans Lefebvre (len) <len@odoo.com>