Issue
- Contacts
- Import a contact that will be a portal user
- Test import
Activation email sent
Cause
Testing an import do the whole process including sending an email
because of force_send (email not rollbacked).
Solution
Check if we are testing the import. If yes, do not force
send the email. So, the email will be rollbacked.
OPW-2168868
closesodoo/odoo#44283
X-original-commit: f372334facd189d0a70268e7876511bf1f800a4a
Signed-off-by: Jason Van Malder (jvm) <jvm@odoo.com>
Steps to reproduce:
- install sales and contact
- install another language
- go to contacts, pick a specific contact and set its language to
the new language installed
- go to sales > settings > activate the "product configurator" option
- create a product with a translated variant (the variant has to have
at least 2 translated attributes with custom values)
- create a quotation with the modified contact and the product
with the variant (use the product configurator wizard) > save
- print that quotation
Previous behavior:
product description is not fully translated
the part describing the variants is in the current user's language
while the product display_name is using the associated partner's
language
Current behavior:
product description is fully translated into the correct language
opw-2168102
closesodoo/odoo#44144
X-original-commit: 4a542cbd3655b7058ff4dd22feaeb18c6d3ec510
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
Now, we can again creates ingenico token on production environment.
Commit https://github.com/odoo/odoo/commit/f0e059e6#diff-0c487d0R558 replaced aquirer.id by self.acquire_id.id.
It is wrong since env['payment.token'].create() will call the function with self == payment.token().
self.acquirer_id == False --> self.acquirer_id.state != 'enabled' --> request done in test mode each time.
closesodoo/odoo#44126
X-original-commit: 68028b90c97f84b40bb5952f7867896456c13253
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
Fixes#44133
Before this commit, the Bank account on the new Bill created from the PO was not set due to missing methods to set those fields.
This commits adds missing methods to set Bank account.
closesodoo/odoo#44252
X-original-commit: f66042c96795701c1a313f40fdd320d28e9803ee
Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
- if checked in settings, OCR can be used to get infos from the attached receipt image
- set default product to EXP_GEN when created from picture
- use "register_as_main attachment" when expenses are created from receipt images
- Add the upload button to the kanban view to see it immediately in the mobile version
and use it to create expenses from pictures. (with or without OCR installed)
closesodoo/odoo#39559
Related: odoo/enterprise#6493
Signed-off-by: Florian Daloze (fda) <fda@odoo.com>
In a list view, select some records (either by selecting them one
by one, or by clicking on the header to select all records), then
click on an action (except for the special case of 'Export') in the
sidebar. Some information about the selection is put into the
context:
- active_ids: the ids of the selected records (only those of the
current page)
- active_domain: the current domain
However, before this commit, there were no way to determine whether
the user checked the header checkbox (i.e. all records), or some of
them individually.
This commit adds the information, with a 'select_all' key in the
context.
Note that this is a quick solution, as we need it right now for an
accounting usecase. A more elaborate solution, which will allow the
user to choose whether he wants to apply the action on the selected
ids or on the whole domain, will be developped soon.
Part of Task 2146469
closesodoo/odoo#44248
Signed-off-by: Lucas Perais (lpe) <lpe@odoo.com>
Task 2081612
* Add as an optionnal field "balance" (simple debit -credit)
- usefull for "group by"
- usefull when selecting several lines (in the footer total)
- Hidden by default for journal view
- Diplayed by default for ledger view
* Cumulative balance only for ledger views
closesodoo/odoo#38174
Related: odoo/enterprise#8024
Signed-off-by: Quentin De Paoli (qdp) <qdp@openerp.com>
We get a traceback when we try to unbuild a MO
due to a inexistant field call (scrap_qty) instead
of product_qty -> 8458cc1867.
Fix the issue.
closesodoo/odoo#44249
Signed-off-by: Simon Lejeune (sle) <sle@openerp.com>
- Create and validate a leave
- Go to Time Off > Everyone
- In the Gantt view, move the leave
Nothing prevents the modification of the leave while is it validated.
opw-2179839
closesodoo/odoo#44214
X-original-commit: 05257fc75211ea4b34b35c94eeb42ee5b55bfd5b
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
As this race condition seems not possible to be reproduced in local, all this
is an assumption based on the logs.
After the checkout, the user is redirected to `/shop/confirmation` where there
is RPCs fired every seconds to fetch the payment status
(`/shop/payment/get_status`).
As the test was considered as finished on that page, sometimes the RPC would
still be processed in python while the tour was considered done and killed,
thus also the cookies, session & co.
From that point, the python would crash when accessing the session.
In the logs, the python crash in the RPC call occurs after the test is done.
closesodoo/odoo#44235
X-original-commit: 082c660071283c0475e7ce26954803701cd3d659
Signed-off-by: Romain Derie <rdeodoo@users.noreply.github.com>
This commit prevent the use of the pricelist in the pos after deactivating the option in the res config setting.
Before, the xml was not shown anymore but the option use_pricelist was still True and we could still see the pricelist in the frontend of the POS.
We were unable to change the option in the backend.
Now, when we untick the option in the res config setting, we disable all 'use_pricelist' in the pos configs.
closesodoo/odoo#41613
Task-id: 2151669
Signed-off-by: pimodoo <pimodoo@users.noreply.github.com>
match_total_amount_param on account.reconciliation.model is not
respected when paying a vendor bill through bank statement because
the amounts from both the statement line and the move line that
are used in the comparison will be negative.
closesodoo/odoo#44234
X-original-commit: 1a9221584f78fc7619277c2c0e9b9659e7c80ee2
Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
Before this commit, the survey form widget was focusing on the first text
input found on the page, even if this input was not the first question.
After this commit, the survey form widget focus only on first text input
if that input is the first question on the page.
Triggered by task ID 1972640 (live sessions on survey)
PR #44205
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Since recent refactoring, filter data have 'question' and 'answers' as
filter_data keys, instead of 'question_text' and 'labels'. This commit fixes
the naming in template using filter_data.
Also, comment that does not count as answer is not linked to a suggested
answer. So that filtering on those comment does nothing because we cannot
find an answer_id in that case. As it makes no real sens anyway to filter
on those kind of comment, filtering have been disabled on those comments.
Triggered by task ID 1972640 (live sessions on survey)
PR #44205
This commit fixes a potential division by 0 error by correctly applying the
default division by 1.
Triggered by task ID 1972640 (live sessions on survey)
PR #44205
Use $primary to always get same color in COM and ENT. The goal of using color
variable for styling is to get always the same color, no matter if we are in
community or on enterprise.
Before this commit, *$o-brand-primary* was used in survey stylesheet but this
variable is not matching the same colors in COM and in ENT.
After this commit, *$primary* is used to render the same color no matter the
environment (COM or ENT).
Triggered by task ID 1972640 (live sessions on survey)
PR #44205
This commit avoids the showing of '0.0' for skipped numerical_box
questions and empty rows for other skipped simple entry (i.e. not
multiple choice questions) in the survey results "All Data" tab.
Triggered by task ID 2061937 (improve scoring in surveys)
PR #44205
As access to survey description field is limited to survey users and managers
we can let them put whatever they want in the description field. Otherwise
they cannot use the full power of web editor, notably embedded videos.
PR #44205
Because 0 evaluates as False in "if" statements, generalized answer_type
constraint check logic would not allow user to submit a survey with 0
as a numerical value. This commit fixes this issue by explicitly allowing
this case.
Triggered by task ID 2061937 (improve scoring in surveys)
PR #44205
With this commit, it is now possible to activate a cookies bar on a
website through the res.settings.
The cookies bar can be edited in the frontend by entering edit mode.
The cookies bar will appear until the user clicks on 'I agree'.
Part of https://github.com/odoo/odoo/pull/41294
task-2087003
closesodoo/odoo#41294
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
This commit introduce a new snippet option for s_popup to control the
consent duration in days. This value will be used to know if the popup
should be shown or not.
If the user close the popup, it won't be shown until the consent
duration is over.
This will also avoid popup to be shown on exit (display mode) more than
once. Indeed, every mouseout of the screen (changing tab, changing app,
alt tab etc) would show the popup, as well as page navigation.
Part of https://github.com/odoo/odoo/pull/41294
task-2087003
*: website
This commit is a safety nest to ensure `o_snippet_invisible` will be
found, even if somehow they appear as one of the editable area elements.
It might be the case with some refactoring, as it was the case between
404fa8164 and 83d99941c, in which case, the step to reproduce were:
- Add s_popup snippet into the page
- In the options, select 'Show On All pages' -> It moves to footer
- Now save and enter Edit mode again
- The invisible element (popup in this case) is in the DOM, the widget
is working fine but it is not retrieved as an invisible element,
thus not possible to edit it
+ lint/dead code
Part of https://github.com/odoo/odoo/pull/41294
task-2087003
Enteprrise pr 6836 will allow disabling the delete button on gantt
views. Document it is possible.
task-2088954
closesodoo/odoo#40716
Related: odoo/enterprise#6836
Signed-off-by: Simon Lejeune (sle) <sle@openerp.com>
In this commit, we add a new attribute "Delete" for user conveniency
if he don't want 'Delete' button on popover card they easily achive
by "delete=false" attribute and also add a testcase for it.
task-id:2088954
Since commit: https://github.com/odoo/odoo/commit/c31bf95e4e5e01e9f433ac13c6be33f85a57f9b9
There is typo while getting username from session so it was default set
as 'undefined' for collaborative pad editor name.
Get the proper username from session as 'username' instead of 'userName'.
but now we want's user's whole name so instead of username(login) take
the name(name of user).
closes odoo/odoo#43805
Taskid: 2154331
Closes: #43805
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
When having an invoice in foreign currency and a partial payment in
domestic currency (in a different date with a different exchange rate),
the computed amount due is incorrect. When computing the
amount_residual_currency the payment (in domestic currency) is converted
to the foreign currency using the exchange rate of the invoice date, and
not the one of the payment date (see 56d92213b8).
If the account.partial.reconcile line will have a currency_id and a
amount_currency the amount_residual_currency will not be converted but
simply added.
This behaviour was introduced with e130606602
and backported to version 11.0 with 3363d7235137f286458c734a1a0417beeb1f66bb.
In version 12.0 this behaviour was partially reverted in d3d2612061.
opw-2156001
closesodoo/odoo#44181
X-original-commit: 94d34e052f3757c21884fd5a57cc68ea8c51aafb
Signed-off-by: Jorge Pinna Puissant (jpp) <jpp@odoo.com>
Task 2168197
Especially when writing out checks we would like to track the value of
the state of the vendor payment in the chatter. This way we can see who
prints it, cancels it, etc and at what time this happened. It's
important for traceability. I think we can just enable it for all
payments in general, I can't think of any downsides and payments are
usually sensitive documents so I imagine people want as much info as
possible.
closesodoo/odoo#43505
Signed-off-by: Quentin De Paoli (qdp) <qdp@openerp.com>
PyPDF performs badly on many types of PDF documents.
We add a text extraction with pdfminer, which is designed for this task.
Because pdf content extraction was so flaky, it was completely
deactivated by 1b753b0d53. We revert that :-)
closesodoo/odoo#38508
Task: 2152494
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
Avoid display errors with special characters when copying the href attribute
of links in the web editor.
opw-2078313
closesodoo/odoo#44176
X-original-commit: 19ebcdd20426406250174eb473b081a9e488e542
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
psycopg2 2.7 not be installed on python 3.8, needs at least psycopg2 2.8
use the same version as windows to avoid complicated rules if windows
AND python 3.8
Note that psycopg2 3.8.4 is currently the only one released after the
release of python 3.8 but reported compatibilty issued seems to be
fixed since 3.8 at psycopg/psycopg2#854Fixesodoo/odoo#42660closesodoo/odoo#44143
X-original-commit: f615826486ff8128c00b9a5ed5fbb8f86e6d492a
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
* website, website_sale
The design will be deeply reviewed in a future update. This commit is
just about unifying it and making sure no element is cut/overflowing.
-> All items are now inline automatically
-> If there is no enough space, it becomes full-width over two lines
automatically (this can be forced with the o_we_fw class)
-> Force to stay on one line with the o_we_force_inline class
closesodoo/odoo#44142
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
When we name_search a res.user, we have a special hack so we will
firstly perform an exact search on the res.users login, if none is found
we will search over res.users name.
This is intended but in the case of negative search since 660cebb4faaeb,
for example operator='not ilike' and name='test' would probably just
return all user that do not have a login that is exactly test.
This is not the intended behavior, in this instance we should just
return user that do not have "test" in their names.
Without fix, added test would fail on:
- .name_search('vlad', operator='not ilike') => finding everyone but
user with exactly login vlad instead of user not containing vlad in
their name
- .name_search('', operator='not ilike') => find all users instead of
finding no user
- .name_search('lad', operator='not ilike') => find all users instead of
just finding "Nothing similar"
opw-2170517
closes#44040closesodoo/odoo#44152
X-original-commit: 2378fb63c132c0bcf027785d478c0608b59a3409
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
PURPOSE
=======
When you close a payroll (employees), there are often a lot of document
linked. Archiving an employee should archive the contract, cancel future
leaves, archive the private address
Specification
=============
Add departure date (hr):
- Add a Date field to both hr.departure.wizard and hr.employee. In
the wizard, the field is required.
- In toggle_active() method in hr.employee, set departure_date to
false when unarchive the employee.
- If user has a current running contract, a user error will raise if
user enter a departure date earlier than the start date of the
contract.
Add checkbox to set a closing date on hr.contract (hr.contract):
- In the hr.departure.wizard, set the departure date to be the end
date of runing contract. Set the states of all draft contracts to
"cancel".
Add checkbox to free car (hr.fleet):
- In the hr.departure.wizard, set end_date to
fleet.vehicle.assignation.log, if there is no end_date or end_date >
departure_date
- Go through fleet.vehicle, find records with dirver_id to be the
employee, set it to False.
Add checkbox to archive private address (hr):
- when the private address not link to a internel user, set
employee.address_home_id.active to Flase
- unarchive it after the employee unarchived
Add checkbox to cancel future appraisals (hr.appraisal)
- find all appraisals link to the employee and state in
['new', 'pending'], set their state to 'cancel'.
Add checkbox to cancel future leaves (hr.holidays):
- only consider leaves are not in state ['refuse', 'cancel'],
find leaves with to_date > departure_date, set their state to
'cancel'.
PR #42526
Task 2153106
Related: odoo/enterprise#7471
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
Quizz survey is updated to demonstrate the use case of media on questions and
answers. Happy surveying.
Task ID 2083823
PR #42228
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
- Purpose:
Allow the addition of media on a question and/or answers in order to describe
or illustrate them.
- Specifications:
During the creation of a question, you have now the possibility to set a
description of a question by filling an html field under the tab "Description".
This field can be used to enter text or to illustrate the question with an
image or video.
There is also an option to add pictures on answers for simple and multiple
choice questions. Those are displayed as clickable images.
Task ID 2083823
PR #42228
Login in into a database
Access the database manager
Duplicate a database
Internal server error will occur and display user. This should not
happen (even if the database is duplicated just fine), and occur
because after the duplication the connection is dropped but the cursor
will still hold the old reference and then, in the response generation
it will crash.
Invalidating cursor right after the duplication, like what is done after
a 'drop' operation fix the issue
opw-2170974
closesodoo/odoo#44159
X-original-commit: 59553c8595cdaf50a4c6f3ffe4093116d0f48bf1
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
Before this commit, the CSS rule handling the "activity" of the modals
(their z-index compared to the one of their backdrop) was global and would
interfere with front-end or custom modals which do not use the static Dialog
methods giving them the "active" class.
Now, the rule has been inverted: the z-index of a modal is only changed when
it is given an "inactive" class, thus only impacting the modals instantiated
via Dialog or Owl Dialog classes.
closesodoo/odoo#44067
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Before this commit, a move can be 'assigned' even if it has no reserved
quantity.
How to reproduce:
- For a tracked product, add some quantities for a LN/SN. Create an
another LN/SN with no quantity;
- Create a delivery for this product;
- Confirm it and check availability;
- On the move line, change the SN/LN for the one without quantity.
--> The move has no reserved quantity but is still marked as
`assigned`.
task-2171546
closesodoo/odoo#44145
X-original-commit: d5e70fa9778240b23515cea6ab1a3d0a674ac940
Signed-off-by: Simon Lejeune (sle) <sle@openerp.com>
Co-authored-by: sle-odoo <sle@odoo.com>
PURPOSE
There has been a few changes in the accounting module since the version 12.4.
The field 'invoice_ids' in the 'sale.order' model is now related to the 'account.move'
model instead of the 'account.invoice' model. The field that contain the payment state
is now called 'invoice_payment_state'. This field changed name again in master into
'payment_state'.
SPECIFICATION
Change the call from 'invoice.state' into 'invoice.payment_state'.
LINKS
Task ID : 2180184
PR : #43822
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Migration have long been only accessible thanks to a symlink from
`odoo.base.maintenance` to our private migration repository. Thank to
the change of bbb1a8f it is now possible to give a load the
migrations scripts from a path given in options.
The `initialize_sys_path` function has been updated to hooks the new
paths or the legacy symlink and to provide aliases to the previous
import logic to ensure backward compatibility.
`odoo.upgrades` (`community/odoo/upgrades`) is a new namespace that hook
all `--upgrades-paths` directories or the
`community/odoo/base/maintenance/migrations` symlink if none is previded.
`odoo.addons.base.maintenance.migrations` has been made an alias to
`odoo.upgrades`.
The `odoo.upgrades` is the desired method for accessing migrations
scripts and should be used by all new scripts.
closesodoo/odoo#44117
Task: 2178274
X-original-commit: d963cc05acd882729c4eb5ab940dae2a2197e55a
Signed-off-by: Raphael Collet (rco) <rco@openerp.com>
- Create a product A, FIFO and Automated
- Create a PO for 50 units
- Receive 45 units, no backorder
- Create a landed cost for the picking
The landed cost is split between the two move lines (45 units and 5
units).
This occurs since in v13, there is no canceled picking created for the
backorder, but a canceled stock move.
We filter out canceled moves.
opw-2179145
closesodoo/odoo#44095
X-original-commit: 120a2d116e4820fa9a4529e8ef01569823d02d13
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
When simply need to parse a domain, it is easier
Add .strip() on ir.ui.view as ast.literal_eval produces an syntax
error if the node starts with spaces (as done in the xpath of
hr_attendance.view_employee_form_inherit_hr_attendance)
closesodoo/odoo#43831
Related: odoo/enterprise#7894
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
When a contract is closed, set the date of the day.
In the contract cron, ensure that all closed contracts have
an end date if it is followed by a new contract.
Add multi-edit on work_entry list
closesodoo/odoo#44118
Taskid: 2180263
X-original-commit: 0b5d8ce756eac904a040ca700f44ea860daefcb4
Related: odoo/enterprise#7991
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
With a product configured as buy on order and a warehouse configured as
receipt in two steps, if the user increases the quantity on a po line
generated by a sale order before confirming it, the system will send all
the quantity to input but only the ordered quantity to customer. The
issue is that the "extra quantity" will stay in input.
We fix this issue by creating a new move with the extra quantity to the
input location so that push rules will send the extra quantity to stock
while the ordered quantity will be sent to the customer.
There was also an issue when incrementing the quantity on the po line
after confirmation if the po line was the result of a reordering rule:
only a move from supplier to the location of the reordering rule was
created.
This commit also introduces a change of semantic:
`created_purchase_line_id` is cleared after confirming the RFQ. This
allows to merge more in `_merge_moves`.
task-1981355
closesodoo/odoo#43545
Signed-off-by: Simon Lejeune (sle) <sle@openerp.com>