Before this commit, non-editable forms could switch to edit mode
when clicking on a field or a label.
Now, the edit right is checked when the quick edit is triggered.
task 2456324
closesodoo/odoo#65964
X-original-commit: 298746a3cce3d241417bcf62f4deeeb8f3d3ca92
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
RATIONALE
Stored editable fields receive their values either from compute either from
user input. If a user input is given to create / write compute method is not
called. If multiple fields are computed through the same method giving one
field value discard call to compute method and other fields are not called.
SPECIFICATIONS
Split ``_compute_contact_info`` compute method on registration model
so that partner related fields are independent.
Split ``_compute_from_event_type`` compute method so that event template
configuration related fields are independent.
Split ``_compute_from_event_type`` compute method on event model
so that event type related fields are independent.
Add tests related to registration / partner contact fields synchronization. Add
tests with user input and/or partner synchronization to ensure editable stored
fields work as expected on lead model
LINKS
Task ID-2455165
COM PR odoo/odoo#65688closesodoo/odoo#65963
Forward-port-of: odoo/odoo#65923
Forward-port-of: odoo/odoo#65688
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
RATIONALE
Stored editable fields receive their values either from compute either from
user input. If a user input is given to create / write compute method is not
called. If multiple fields are computed through the same method giving one
field value discard call to compute method and other fields are not called.
SPECIFICATIONS
Split ``_compute_parnter_info`` compute method so that partner related fields
are independent.
LINKS
COM PR #65688
Task ID-2455165
X-original-commit odoo/odoo@12d7aae9ee
X-original-commit: 436fb7d7aa339e86753721d3385df4f4517d2d30
RATIONALE
Stored editable fields receive their values either from compute either from
user input. If a user input is given to create / write compute method is not
called. If multiple fields are computed through the same method giving one
field value discard call to compute method and other fields are not called.
SPECIFICATIONS
Split ``_compute_from_event_type`` compute method so that event template
configuration related fields are independent.
Fix seats_limited being computed in sevearl method which should not occur.
LINKS
COM PR #65688
Task ID-2455165
X-original-commit odoo/odoo@3c09e86b4e
X-original-commit: ddc4ade6ad81c63efebd848ec56d197cd18e8041
RATIONALE
Stored editable fields receive their values either from compute either from
user input. If a user input is given to create / write compute method is not
called. If multiple fields are computed through the same method giving one
field value discard call to compute method and other fields are not called.
SPECIFICATIONS
Split ``_compute_contact_info`` compute method so that partner related fields
are independent.
LINKS
COM PR #65688
Task ID-2455165
X-original-commit odoo/odoo@dfc319f584
X-original-commit: c251048cfead27d12117557fe4b6601bef39e8e1
Add tests related to registration / partner contact fields synchronization.
Add tests with user input and/or partner synchronization to ensure editable
stored fields work as expected on registration model.
Add tests related to event track / partner contact fields synchronization.
Add tests with user input and/or partner synchronization to ensure editable
stored fields work as expected on track model.
Add tests related to event / event type configuration fields synchronization.
Add tests with user input and/or event type synchronization to ensure editable
stored fields work as expected on event model.
Warning: those tests are currently partly failing. Next commits will split
computed fields into several methods in order to fix computation.
LINKS
COM PR #65688
Task ID-2455165
X-original-commit odoo/odoo@6b0346bbb5
X-original-commit: 7f0c7339c39b05e20efa163d0ea91f7dd5c0017c
According to its description, the field `is_valid_balance_start`
of the `account_bank_statement` model shall be `False` if the starting
balance of the current statement, is different from the previous
ending balance.
That means, it shall be set to `True` when no previous statement has been
set (`previous_statement_id` is NULL), whatever the starting balance value.
closesodoo/odoo#65941
X-original-commit: 096fcfa30b3ead8314b1162db357450a8c1b2a0e
Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
Signed-off-by: Cedric Snauwaert (csn) <csn@openerp.com>
- make all the mailing trace fields readonly inside the form,
beacause a user would not want to edit a mailing trace as
this will make the related statistics about the mailings
incorrect
- change the mailing trace form view interface to give more
clarity to the user and to better separate between different
fields
- add a stat button to redirect the user to the coressponding
mailing contact so that he can easily access the mailing
contact in order to blacklist/output/correct the email address
or the phone number
- remove the warning messages in the mailing trace form view
because the user already has all the information in the
status bar of the form
- update the inherited mailing trace form view located in the
mass_mailing_sms module to adapt to the new changes in the
trace form view of the mass_mailing module
Task-2440420
Enterprise PR: https://github.com/odoo/enterprise/pull/16105closesodoo/odoo#65469
Related: odoo/enterprise#16105
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Before this commit, occurences of 'null', 'true' and 'false'
strings as autocomplete values in the search view were replaced
respectively by None, True and False.
Fixes#65743closesodoo/odoo#65958
X-original-commit: 885932ae8e31905e08b79141a445933b6afc9f15
Signed-off-by: Géry Debongnie (ged) <ged@openerp.com>
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Currently, the user doesn't receive any feedback or notification when updating
his subscription preferences. Therefore, he might be prompted to open the
subscription modal again to double-check that his modifications were correctly
applied or not.
With this commit, We are now displaying screen notification with success message
after successfully applying the changes.
Task : 2445481
closesodoo/odoo#65957
X-original-commit: 95aebcbc8051f71762724149f6b20f3501485cdd
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
before this commit: badge widget was not displayed vertically aligned
after this commit: badge widget will display vertically align
task-2351554
closesodoo/odoo#65940
X-original-commit: 1f99f5df22b3d36775a7386af170c126a481279b
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
This display colors of the tags on leads' kanban view,
same as opportunity.
Task-id : 2453047
closesodoo/odoo#65677
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Steps:
- Go to Settings > Users & Companies > Companies
- Create a new company (1)
- Install a payment acquirer and Website
- Go to Website > Configuration > Settings:
- Select "My Website 2"
- Assign it to company (1)
- Add a custom domain
- Save
- Switch to company (1)
- Go to Invoicing
- Create a new Invoice:
- Add a product line
- Post it
- Click Action > Generate a Payment Link
Bug:
The base domain is used instead of the domain of the website linked to
the invoicing company.
Explanation:
The app only uses the URL on which the user has logged in to generate a
payment link. If the user has multiple companies, this can confuse
customers if they land on another domain than the one they are used to.
This commit makes the app use the domain of the website of the record
linked to the payment if it has one.
opw:2440251
closesodoo/odoo#65938
X-original-commit: 700dba53843e71f5f34c86305cc658d9273914aa
Signed-off-by: backspac <backspac@users.noreply.github.com>
PURPOSE
The current form view of Activities(from the technical settings) is not very
useful. There is no indication of which document the activity is linked and the
buttons like save/discard etc. looks weird within the form view.
SPECIFICATION
-Adding field 'res_name' for indication of document at the top of the form which
is read-only.
-Removing 'save', 'discard', 'mark as done' and 'done & schedule next' buttons
within the form and simply make a form view without buttons.
LINKS
PR #63121
Task-2371023
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
Create a standard tax included in the product price.
Add that tax to a product and the down payment product.
Create a sales order (i.e. 1 line, 100$ total, 15% tax incl).
Create a percentage down payment invoice, i.e. 50%.
Post the downpayment invoice.
Go back to the sale order
The sale order line relative to the downpayment was asjusted to remove
the tax amout while this should not occur when dealing with tax included
in price
Added test
opw-2426294
closesodoo/odoo#65911
X-original-commit: 3b58b373e1c6c155f65b88c31cbb47794cb0a554
Signed-off-by: agr-odoo <agr-odoo@users.noreply.github.com>
This commit update owl from 1.2.3 to 1.2.4, and
introduces a few fixes for code that was broken (because it accesses
private owl values)
Note the fix for the test menu code is interesting. Before this commit,
the handler for the click on the home menu component was not called, so
the click had a side effect: it modified the url to its href, which
caused the action manager to load the next application, even though the
home menu was not mounted.
With the update to Owl, this is no longer true: the handler is called,
and call preventDefault on the event. Because of that, the url is not
changed. However, since the home menu is itself not mounted, it cannot
communicate to the web client that we should load the next app. This is
why it was broken. The fix is simple: we actually make sure that the
home menu is displayed before clicking on the app menuitem.
closesodoo/odoo#65906
X-original-commit: 2385e58d76aa5e4bca0fc6d76ecedc7de5fd4267
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Signed-off-by: Géry Debongnie (ged) <ged@openerp.com>
PURPOSE
Improve daily management of surveys by adding a responsible and
removing states to use an archive-based flow instead.
SPECIFICATIONS
The goal of the draft state on survey is to have the survey under edition
mode before before sending it to participants. Under this mode:
- the responsible can test it (can be done with "In Progress" mode)
- the survey can't be answered (same as the state closed)
The risk that the survey can be leaked before being ready is really
limited. If it's a live survey, participants will have to guess the
4 digits access code and wait for the host to go to the next question.
Else, participant will have to guess the token.
Considering these facts, the use of the draft state is very limited so
'draft' state can be dropped. If we do so, we are left with only two
stages that are 'open' and 'closed'. But whether to consider survey
open or closed can be simply achieved with active field we already
have (if active=False, survey is closed, otherwise it's considered
as open).
So with this commit, we remove the state field from survey and thus
simplify the flow. It means that we no longer require 'Start Survey'
button, and so that button is also removed, and for the closed surveys,
instead of the button 'Set to draft', now we have a 'Reopen' button
which will activate the survey. And instead of displaying few buttons
after saving a record, we now display all the buttons from beginning.
This commit also enable users to set a 'Responsible' for the survey by
adding 'user_id' field. Demo data for the same is also updated.
LINKS
Task ID-2389434
COM PR odoo/odoo#62712
ENT PR odoo/enterprise#15217
UPG PR odoo/upgrade#2006
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
This commit enable users to set a 'Responsible' for the survey by
adding 'user_id' field. Demo data for the same is also updated.
Task ID-2389434
COM PR odoo/odoo#62712
ENT PR odoo/enterprise#15217
UPG PR odoo/upgrade#2006
The goal of the draft state on survey is to have the survey under edition
mode before before sending it to participants. Under this mode:
- the responsible can test it (can be done with "In Progress" mode)
- the survey can't be answered (same as the state closed)
The risk that the survey can be leaked before being ready is really
limited. If it's a live survey, participants will have to guess the
4 digits access code and wait for the host to go to the next question.
Else, participant will have to guess the token.
Considering these facts, the use of the draft state is very limited so
'draft' state can be dropped. If we do so, we are left with only two
stages that are 'open' and 'closed'. But whether to consider survey
open or closed can be simply achieved with active field we already
have (if active=False, survey is closed, otherwise it's considered
as open).
So with this commit, we remove the state field from survey and thus
simplify the flow. It means that we no longer require 'Start Survey'
button, and so that button is also removed, and for the closed surveys,
instead of the button 'Set to draft', now we have a 'Reopen' button
which will activate the survey. And instead of displaying few buttons
after saving a record, we now display all the buttons from beginning.
Task ID-2389434
COM PR odoo/odoo#62712
ENT PR odoo/enterprise#15217
UPG PR odoo/upgrade#2006
Add suport of gift card for ecommerce.
Split the generic part to allow others modules to us it (e.g. pos)
A customer buy 1 Gift Card, he receive a code by mail and see it into the
sale order.
Another customer can now use this code in the payment step to deduce this
amount.
Product Gift card is sold by default without tax, because we don't know on wich
ecommerce, the shipping address ans sot the tax that will be used.
So the tax is deduce from the sale order that use the gift card.
We considere to be in the MPV case from:
https://www.vandelanotte.be/fr/actuel/actualites/624-les-bons-soumis-a-un-nouveau-regime-de-tva-a-partir-de-2019
Courtesy of @bvr-odoo for the email and product image
Co-Reviewed by @rde-odoo and @jke-be
task-2428004
pr-64195
closesodoo/odoo#64195
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
Before this commit, calling do_hide/do_show/do_toggle on a
widget that had been destroyed before being rendered crashed
(because this.$el was undefined).
Obviously, calling those methods in this situation is useless, but
with asynchronous code, it might happen that you call them in an
handler, and they have been destroyed meanwhile.
This commit checks if this.$el is set before accessing it to avoid
the crash.
closesodoo/odoo#65897
X-original-commit: 320c29f5b37d4f02b4d5f7b1b6ff64462b000c92
Signed-off-by: Géry Debongnie (ged) <ged@openerp.com>
Purpose
=======
In event, many files have different naming format. We want to clean
them, to group the lines by models before changing and adding a new
event group.
Task ID-2204364
COM PR odoo/odoo#65867
Migration odoo/upgrade#2150
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Purpose
=======
In event, many files have different naming format. We want to clean
them, to group the lines by models before changing and adding a new
event group.
Task 2204364
PR odoo/odoo/pull/65867
Migration odoo/upgrade/pull/2150
Purpose
=======
Move the security tests of event to "Test Event Full", so if we
change the ACLs in a sub-modules, we are sure to test it.
Task 2204364
PR odoo/odoo/pull/65867
Migration odoo/upgrade/pull/2150
Add and improve onchange warnings when a duplicate SN is used in
following cases: inventory, picking (any type), manufacturing, scrap,
and "Update Quantity" (i.e. directly edit quants from product form).
Improvement includes:
- include location where the existing SN is
- auto-correct source location when appropriate (e.g. trying to scrap a
SN in the wrong location)
The goal of this is to prevent but not restrict duplicate SNs so users
can have some flexibility (especially if a dupe SN occurs because of an
error such as doing pick-pack-ship out of order.)
closesodoo/odoo#61287
Task: 1924758
Signed-off-by: Arnold Moyaux <amoyaux@users.noreply.github.com>
The purpose of this task is to reflect the coupon discount perfectly
from sale order to invoice. This issue is already fixed in 13.0 in
commit: bb5d999 but during refactor of coupon it was removed due to
module split.
So in this commit, improve the default invoicing policy of coupon product.
The default invoicing policy should always be by ordered quantity.
Otherwise, if the user changes the default invoicing policy to
"delivered quantity", coupon won't be applied to the invoice.
closesodoo/odoo#65845
Taskid: 2303244
X-original-commit: 98a3ca3274e9829666a773d5fe79f2e695524f51
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
- Send the new Inbox counter when marking as read, to guarantee the JS has the
correct value (instead of having to guess it which was impossible when an
arbitrary domain was given to the method).
NOTE: Manual increment is kept on receiving a new Inbox message because that
one was reliable and it would have been more tricky to compute the new counter
for each target partner (mark as read is one user doing an action for himself,
whereas new message is from another user to potentially many different users).
Generic counter for threads is also not sent on every change for similar
reasons.
- Refresh Inbox automatically when some messages are marked as read and there
are more message on the server than currently loaded.
- Remove confusing (and impossible to maintain) counter on non-origin threads
(in particular channel followers). This behavior in JS was not consistent with
the server which always counted only origin thread (model/res_id).
task-2446302
closesodoo/odoo#65842
X-original-commit: f9bc1f98ed8f76846697cde68a760217b3af2aaf
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
Before this commit, clicking on some field labels threw an error.
This was because we were searching for the associated field by its id
to get the name.
Now, we don't search the associated field anymore, we use
`fieldIdsToNames` to get the name from the id.
task 2456348closesodoo/odoo#65838
X-original-commit: ad97c32b236d92afd4a0b6d7b39e137448b0a9a5
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
In a previous fix [0], the call to exif_transpose was kept to allow
rotation of images format different than `JPEG`.
After a small test, it appeared that the call would crash if the image
in another format had the same `LensInfo` tag.
So it's safer to not call this method at all.
With this commit, the rotation tag is retrieved disregarding the file
format by using the `getexif` method if available, falling back to the
private method for Pillow < 6 support.
As a bonus, a test is also added with a small embedded `JPEG` image,
crafted with an `Orientation` exif tag and, for reference, the
`LensInfo`tag that caused so much trouble.
The fix referenced in [0] was not forward-ported as it was only moving
the code the is completely removed in the present.
[0] b83c48d5c48954193
closesodoo/odoo#65823
X-original-commit: bfd3f857b44f31f8077182d10cab869f42076464
Signed-off-by: Christophe Monniez (moc) <moc@odoo.com>
Before this commit not all messages where translated/translatable.
By adding _() to them they're now translatable. This means that if somebody puts OdooBot to another language the messages would be translated.
closesodoo/odoo#65787
X-original-commit: 355ae0d59a446a87d195b6749e66cd732f21ae2f
Signed-off-by: William André (wan) <wan@odoo.com>
Right now, if the expected revenue is not set on the opportunity, the
rainbowman is not displayed and it does make sense to ask for a revenue
so that we can measure if this is a record or not. However, revnue is not
necessary to congratulate the user for his first win.
With this commit, for the first won lead of a user, we congratulate user
with rainbowman, even if there is no exptected revenue set.
closesodoo/odoo#65378
Task-id: 2410443
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Replenishment is great to replace MTO but misses the direct link between SO and PO (smart buttons on both SO and PO to link to the corresponding PO and SO).
The info is actually there in the forecasted report but it is not accessible directly from the PO and in the case of the SO does not highlight the corresponding line of the SO.
This adds a graph icon in the PO, MO and receipt form to directly access the forecasted report (it already exists for SO and delivery).
The information linked to the SO/PO/MO/receipt/delivery is also sent to the forecasted report to highlight the corresponding line.
Note that in the case of the SO, the information needs to go first through the qty_at_date widget (which contains the link to the forecast report).
The graph icon for the PO, receipts and MO turns red when the forecasted quantity at expected date is negative. This is done using the new 'forecasted_issue' field.
closesodoo/odoo#62264
Signed-off-by: Arnold Moyaux <amoyaux@users.noreply.github.com>
Before Commit:
When users wants to send an SMS to someone with help of the phone widget,
the composer is opened, and users expect to be able to write the message
right away. The issue is that the default focus is on the phone number, so
if users start writing, it will corrupt the phone nubmber, and they have to
discard the changes and have to click the body to finally start typing SMS
content.
After Commit:
When the composer is opened, if the phone number is valid, 'body' field is
focused automatically so that users can start typing right away. If number
is not valid, the focus will still be on the phone number. This is managed
by providing 'default_focus' attibute on the body field, which appears or
is hidden as needed.
For the mass mode also, we simply focus on the body field to enable user
to start writing content right away.
closesodoo/odoo#65443
Task-id: 2394488
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Whole code is relying on composer having a linked thread, which makes sense
functionally too, so let's explicit this requirement on the field.
task-2453459
closesodoo/odoo#65531
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
- Install product_margin
- Go to Invoicing > Customers > Invoices and create an Invoice
- Add a Credit Note
- Go to Accounting > Reporting > Product Margins and check Product used in the Invoice
The "Avg. Sale Unit Price" is incorrect. It should be 0 as it is for "# Invoiced in Sale"
Credit Notes are not taken into consideration when computing "Avg. Sale Unit Price".
This is also the case for discount.
opw-2382797
closesodoo/odoo#65777
X-original-commit: 8c7feb45f1ee8581e259f3c2aaff7a139f516d94
Signed-off-by: Anh Thao PHAM <kitan191@users.noreply.github.com>
Previously, the many2one widget from the web_editor used jQuery's
'.html()' method when inserting a record name into the page. The record
name was not HTML-escaped before this, which may have unexpect result
and break the layout.
This commit fixes that by using the '.text()' method instead.
This bug only affects pages containing a many2one (contact excluded)
at the time of selection and not after the selection.
e.g. on the /event page, changing the category of an existing event
via the website editor
closesodoo/odoo#65686
X-original-commit: 53aff7f07317a8261b8b9c3e462d930141c7081b
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
Before this commit, even if another attachment decoder managed to parse an attachment into an invoice, all the decoders were called.
closesodoo/odoo#65764
X-original-commit: ec05004acb2a3283920e3d7730a971814ccc2ac1
Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
Signed-off-by: bfr-o <bfr-o@users.noreply.github.com>
When `qty_available` was being called
for a kit and its components at the same time,
e.g.:
- Kit product
- Product 1
- Product 2
The kit product available qty was always computed to `0.0`,
because when computing its component available quantity,
they were computed to `0.0` because they were marked
as `protected` by the ORM when calling the compute method
for these records at the first call.
When the `qty_available` compute method for the kit
then called recursively the `qty_available` compute
method for the component, as the component record
were marked as protected,
the ORM filled their value with the Falsy value `0.0`.
This issue occured particularly in the upgrade integrity unit test
which makes sure the available quantities of the products remain
unchanged after upgrade. This test computes the available
quantities for a bunch of products at the same time,
and its therefore likely a kit product gets its available
quantity computed as the same time than its components.
upg-3185
upg-4215
upg-4228
upg-5558
upg-5745
upg-5856
upg-6012
upg-6064
upg-6076
upg-6306
upg-6514
upg-6588
upg-6729
closesodoo/odoo#65758
X-original-commit: 8e152a567a6003dae4abb3b537b963eec4142d6d
Signed-off-by: Arnold Moyaux <amoyaux@users.noreply.github.com>
Signed-off-by: Denis Ledoux (dle) <dle@odoo.com>
Probably linked to merge and forward of odoo/odoo#65688 that split some
computed fields. This may have an impact on some fields computation and
therefore queries.
Task ID-2455236
closesodoo/odoo#65748
X-original-commit: b1520ad39c7abd18f8af1c3b23e6e3e897916004
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
This commit makes it so when the bom structure report (Structure & Cost
smartbutton) is opened the product quantity defaults to the BoM's
`product_qty` amount rather than 1.
Steps to reproduce:
- Create/open a BoM
- Set `product_qty` to any value greater than 1
- Click on "Structure & Cost" button.
Expected result: product quantities scaled to the `product_qty`
Actual result: product quantities scaled to Quantity = 1
closesodoo/odoo#65747
Task: 2429885
X-original-commit: 30c05ad99bcf5884e071ebfa41adc6b44f23ba1e
Signed-off-by: Arnold Moyaux <amoyaux@users.noreply.github.com>
Before this commit, the button 'Retry' would appear if the blocking_level of an account.move (aggregated value of all the related edi.document) was lower than 'error' even though the button 'Send now' also appears. The button 'retry' should only show if the blocking_level is 'error'.
closesodoo/odoo#65714
X-original-commit: 4fda4838b8e3462b6428f316bfe9814cd743e891
Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
Signed-off-by: bfr-o <bfr-o@users.noreply.github.com>
Before the introduction of account_edi_extended and blocking_level, if an edi.document was in error, it was retried each the time the edi.documents were processed. With account_edi_extended a bug was introduced and only the document not in error were processed. This commit aims to restore the previous behavior.
Also fixes tests of account_edi.
See https://github.com/odoo/odoo/commit/a9a46cf09b0c841c7fda95b5ed03033fc6936ca2
X-original-commit: 385fa29322f6dffc7d7d0de96a1cfbddb0cab7f0