Before this commit, updating the color previews in the editor panel was
only done if the user remained in the "Theme" tab.
This means that those steps worked:
- Add a snippet in your page
- Go to the theme "tab"
- Change a theme color: validate the color you chose by closing the
dropdown by clicking inside the theme panel, staying in the theme tab
- Click on the snippet
- Open the background option colorpicker -> theme colors are right
But those apparently same steps did not work:
- Add a snippet in your page
- Go to the theme "tab"
- Change a theme color: validate the color you chose by indirectly
closing the dropdown by directly clicking on the snippet you added
- Open the background option colorpicker -> theme colors are wrong
task-3419142
closesodoo/odoo#135703
X-original-commit: 83c0bd93f0948bed4220ba5e505516f305b1c6ce
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
If leads are created using live chat, users without CRM rights cannot
access the visitors list anymore because the lead/opportunity
information is not available to them.
This commit limits the display of `lead_count` to the
`sales_team.group_sale_salesman` group.
Then, the visitor's form cannot be accessed because the "Lead" smart
button fails to load.
This commit therefore limits the display of the button to that same
`sales_team.group_sale_salesman` group.
In 14.0, the column still appeared without the `lead_count` value
displayed, but clicking on it raised a traceback.
Steps to reproduce:
- Install `website_crm_livechat`
- Login as Mitchell Admin
- Send a message in the live chat
- Go to Discuss
- Answer the livechat message with `/lead New`
- Go to Settings / Users / Marc Demo
- Remove the Sales rights
- Logout
- Login as Marc Demo
- Go to the Website / Reporting / Visitors page
=> The page could not be reached and an access right error message was
generated.
opw-3475301
closesodoo/odoo#135571
X-original-commit: 4f67701f99e4b86cb0a4330a32b455bd6ff4686a
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
Co-authored-by: Robin Lejeune (role) <role@odoo.com>
Reproduction:
1. Install website
2. Change to edit mode and edit a link on the main page, for example,
“contact us” at the bottom
3. When you replace the link with /, the rpc breaks and no suggested
links returned
Fix: this issue is gone with a recent update on master, now the rpc used
by linkTools is the new rpc
Task-3444671
[FIX] web_editor: restore double click focusing on URL when editing link
Reproduction:
1. Install website
2. Change to edit mode and edit a link on the main page, for example,
“contact us” at the bottom
3. The focus is on the url at the link tool
Fix: The desired behavior when clicking on links in editing mode is: one
click, edit the text of the link; double click, focus on the URL in link
tools. After converting to OWL, focusing on URL is handled by props, e.g
. `shouldFocusUrl`. We also need to update the state of this prop in
`toggleLinkTools` as we did before conversion.
Task-3444671
Forward-Port-Of: #132167
Also added fix for using the new rpc function instead of the legacy one,
edited the test accordingly.
Part-of: odoo/odoo#135371
Update (some) query counters according to runbot state.
Also make some tests deterministic when involving company name.
Task-36879 (Mail: Support MultiCompany Aliases)
closesodoo/odoo#135288
Related: odoo/enterprise#47345
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Description of the issue/feature this PR addresses:
- In Romania, generating and communicating XML invoices to the government is a requirement. This format is based on UBL/CII for which we already have a very strong base.
- This task aims at completing the localisation with a first step : make Odoo generate the required Romanian UBL format if activated
- Official documentation: https://mfinante.gov.ro/web/efactura/informatii-tehnice
Current behavior before PR:
- CIUS_RO XML export is not supported yet
Desired behavior after PR is merged:
- CIUS_RO XML export will be supported
closesodoo/odoo#130617
Task-id: 3388222
Signed-off-by: Laurent Smet (las) <las@odoo.com>
refactor TaxCurrencyCode as it is supposed to belong ignored
ubl 2.0 according to the documentation
http://www.datypic.com/sc/ubl20/t-ns19_InvoiceType.html
this also allows future EDI that needs this node so that
they won't need to create their own template
Task-id: 3388222
Part-of: odoo/odoo#130617
The aim of this commit is to:
1) ensure the expected file exist or make the test fail if it doesn't
2) file and file_path: switch variables names
3) allows using that method from other module
Context:
1) When the expected_file_path doesn't point to any existing file
2) There is an ambiguity with those variable names
3) run the method from a test in another module
Before this commit:
1) The test fail with an obscure error `can't convert Boolean`.
2) `expected_file` is a path and `expected_file_path` is the file.
3) The method was always looking in `l10n_account_edi_ubl_cii_tests` to
get its files.
After this commit:
1) The failing test clearly states the file doesn't exist.
2) `expected_file` is the file and `expected_file_path` is the file path.
3) The test method is now looking in the module from which it gets run
to get its test files.
Task-id: 3326977
Part-of: odoo/odoo#130617
Links of the current website forums belonging to the user are now displayed in
the sidebar. A forum is considered to "belongs" to a user if either he has
posted a message on it or he has added one of the post in his favourites.
Technical note: we add the value "my_other_forums" in _prepare_user_values
method to display the other user forums of the website in the side menu on
various pages. That value is only added when the "forum" value is a forum
indicating that the page is currently displaying one of the forum (we use
the test "forum and forum is not True" because forum parameter can take the
value True, None or a recordset). We use a lazy value so that the query to
select the forum is only executed in the page that uses it.
Task-3354382
closesodoo/odoo#130469
Signed-off-by: Stéphane Debauche (std) <std@odoo.com>
Purpose
=======
The customer reference is a string that can be added to a SO
(in Other info page). It is well visible when downloading or printing
a SO but not in the overview in the Portal.
Specification
=============
Add the Customer Reference in Sales Order and Quotations if it has been filled.
Task-3355199
closesodoo/odoo#124217
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
The account_edi framework is no more a dependancy.
- Models account.edi.document and account.edi.format have been removed.
All the functions have been moved to the new account.move.send,
account.move, account.edi.proxy.client.user
- The move now holds the l10n_it_edi_state which admits all values that the SdI sends us as a status update
- The sending is now not handled by the cron but by the Send and Print dialog.
- Vendor bills Tax Integration sending by dedicated button
- The move form will now hold the state of the EDI transaction, its number and the EDI attachment as a Binary field on the move itself.
- A new banner will keep the latest message from the SdI, that's not the account_edi old banner.
- All the user messages have been simplified.
IAP-apps PR: odoo/iap-apps#652
Upgrade PR: odoo/upgrade#4893
Task link: https://www.odoo.com/web#id=3339971&cids=1&model=project.task
Task-3339971
Part-of: odoo/odoo#122194
- Proxy user is no longer a computed store=True field, but a proper one.
The type cannot be deduced just by some field on the company.
A company may be Italian and also use Peppol, so the two Proxy Users
must be different.
- The Proxy user `get_proxy_identification` method needs a proxy_type
argument, otherwise the method won't know if the current override
is to be applied or not. It cannot be handled by a field of the user
itself because it is also used contextually to the user creation.
- new `_get_default_enable_send_by_post` function on the Send and Print
wizard, so that it can be overridden by the features of the move
- Renamed `_compute_send_mail_extra_fields`
to `_compute_fields_from_moves_state`
Part-of: odoo/odoo#122194
This commit removes a legacy polling system that was present to query
the server about status change of pending transactions in the shop. This
has not been necessary since that all payment flows go through the
/payment/status page, which already polls the server for pending
transactions' state change.
task-3125913
closesodoo/odoo#119473
Related: odoo/enterprise#47603
Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com>
Instead of monitoring a list of transactions to post-process in the
session, we now track only the last processed transaction, thus allowing
to drop the 10 min delay of the post-processing cron.
task-3125913
Part-of: odoo/odoo#119473
Co-authored-by: mano-odoo <mano@odoo.com>
We explicitly discourage a compute method used for both stored and
non-stored fields, because it may be unexpectedly update the database.
Indeed, we don't expect the computation of a non-stored field to update
the database. Allowing this kind of compute method makes reasoning
about readonly code much more difficult, and would prevent readonly
transactions with such fields.
For instance, consider a compute method for both fields F (non-stored)
and G (stored), and assume that none of those fields are in cache.
Whenever F is accessed, the compute method is invoked, and both fields
are assigned, which potentially generates an SQL update for field G.
This is problematic if we require the current transaction to be
readonly.
Part-of: odoo/odoo#98565
Steps to reproduce the bug:
- Create a storable product “P1” with BoM:
- Add a tracked component
- Add another component (no tracked)
- Create a MO to produce 1 unit of the product "P1":
- Confirm
- Unlock the MO
- Set the "to consume" quantity of the tracked component to 0.
- Try to validate the MO
Problem:
A user error is triggered: “You need to supply Lot/Serial Number for
products:”
Solution:
If the quantity to consume is 0, ignore the serial number verification
for this move.
opw-3471256
closesodoo/odoo#135657
X-original-commit: 5e591cf36cdc6dcbdb8a5ee3753247578a771e9f
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
Signed-off-by: Djamel Touati (otd) <otd@odoo.com>
Steps to reproduce the bug:
- Create a storable product “P1”
- cost= $100
- Create a repair order:
- select any product in the product to repair
- add “P1” as component
- create the quotation from the repair order
Problem:
The cost is not computed correctly and is set at 0 in the
`sale.order.line`
opw-3502317
closesodoo/odoo#135822
X-original-commit: b95ed3617f465a655c8f918bee8edc673c8f202b
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
A previous commit made to add a new (triangular) tax introduced
a bug where the tag 3b (omzet) was archived, leading to journal items
not being picked up by the modified tax report.
This commit should add the new tag 3bl (omzet) on the items containing
the previous 3b (omzet) tag when upgrading the module.
closesodoo/odoo#135809
X-original-commit: a46bf625715a307182443328ffce155f6890bab0
Signed-off-by: Olivier Colson (oco) <oco@odoo.com>
Signed-off-by: Pierre-Rodéric Roose (prro) <prro@odoo.com>
This error occurs when user tries to click on the checkbox to 'Mark as done'.
Steps to produce:
- Install the `website_slides` module.
- Go to Website > Courses > Open a course containing one or more sections
(e.g., 'Taking care of Trees').
- Click on the `Add Content` button located at the bottom in blue.
- Select the video option and upload two videos, one after the other.
- Now, click the 'Mark as done' checkbox for the first video.
- When attempting to click the 'Mark as done' checkbox for the second video,
the error will occur.
Error: AttributeError: 'int' object has no attribute 'id'
To solve this issue we have returned the record for `next_category`from that it
will get the record `id`.
Previously, this code returned an integer value, see here:
https://github.com/odoo/odoo/blob/f34d87ecb7772417f1dd8f3d8836c89ddb903de8/addons/website_slides/models/slide_slide.py#L1321
here we are using that return value from the above line
https://github.com/odoo/odoo/blob/69fca30bb4fb66e6d979ce5ddc1bff4db963ca71/addons/website_slides/controllers/main.py#L1062
Previously it gets the integer and try to get id of that integer value.
sentry-4414398591
closesodoo/odoo#135805
X-original-commit: 9cc11ef9a0f2025a717602fb2087b96eda5e8218
Signed-off-by: Achraf Ben Azzouz (abz) <abz@odoo.com>
Steps to reproduce:
* create an invoice with a line
* change the receivable account
* duplicate the invoice
Result: the receivable account is recomputed to the default one.
Expected: we should keep it.
task-3504443
closesodoo/odoo#135723
X-original-commit: 1043d2b790a625590ca21f8e0d6560ceba3d6a84
Signed-off-by: Brice Bartoletti (bib) <bib@odoo.com>
- Employee smartbutton should not be displayed if contract is not double signed
- Inactive contracts should not be displayed
- Fix some translations
task-3471583
closesodoo/odoo#135689
X-original-commit: 856fbe7e180ababddab9cbd78dc9c43b749b83bd
Related: odoo/enterprise#47485
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
since 17.0 attrs is no more used, replacing the existing
usage with invisible attribute
closesodoo/odoo#134962
Signed-off-by: Jérémy Hennecart (jeh) <jeh@odoo.com>
At the moment, the pos displays the selected order in multiple
screens, such as the `ProductScreen`, the `TicketScreen`, the
`SplitBillScreen`, the `self_order` app, but uses completely
different implementations for each. This means that when
a change needs to be made to the one, it generally needs to be made
to the other as well, which is error-prone.
In this commit we create generic `OrderWidget` and `Orderline` components,
that have not dependencies on POS objects and we refactor the `ProductScreen`,
the `TicketScreen` and the `SplitBillScreen` to use these components.
The `OrderSummary` component was removed and it's contents are now in the
`OrderWidget`.
We also introduce a very simple new component called `CenteredIcon` that
can be used whenever we want to show an icon that fills a whole div. In this
commit we use it for showing the cart icon when the order is empty.
In a future commit, the `pos_self_order` will be refactored in order
to use the same `OrderWidget` and `Orderline` compoenents as the POS.
Task: 3470365
In addition, this commit solves the issue from the task 3491303.
closesodoo/odoo#132248
Related: odoo/enterprise#45972
Signed-off-by: Joseph Caburnay (jcb) <jcb@odoo.com>
When the Wysiwyg is used by website, multiple editable elements are
possible, and each of them carry the related record's model and id in
the element's dataset.
On the other hand, when the Wysiwyg is used by the html field, there's
only one root editable element, and such information is not present in
the editable's dataset, but in the widget's options object.
Before this commit, when saving the content of an html field, modified
images were converted to attachments without the correct reference to
the record's model and id.
This commit makes sure that such information is passed to the route that
handles attachment creation.
task-3495668
closesodoo/odoo#135806
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
Signed-off-by: Antoine Guenet (age) <age@odoo.com>
Commit [1] added a check for the closest ".o_dirty" editable element in
order to define which editable is used for obtaining the model and id
reference from its dataset, and also to avoid multiple attachment
creation for the same image.
But such check for the closest ".o-dirty" element evaluates to null when
the Wysiwyg is used by the HtmlField component, as such class is not
added to editable when saving/committing changes. This resulted in
skipping the attachment creation for pasted, dropped or modified images.
After this commit, attachment creation for modified images is not
skipped if an element with the ".o_dirty" class does not exist.
task-3495668
[1]: https://github.com/odoo/odoo/commit/e631bff05a3588f3304b75b6a0018b096c13f68d
Part-of: odoo/odoo#135806
Add IEPS taxes and tax groups. Make sure the IEPS taxes are
`include_base_amount` and have a lower sequence than the IVA taxes.
Unify the names of the taxes and their labels on invoice.
Resequence the taxes to group them by nature.
task-3100679
closesodoo/odoo#135795
X-original-commit: d4785e5895c9befaeb1ff7d77b02f5ed7b250790
Related: odoo/enterprise#47545
Signed-off-by: Laurent Smet (las) <las@odoo.com>
Signed-off-by: Julien Van Roy (juvr) <juvr@odoo.com>
Issue:
------
Since the commit [^1], it was no longer possible to apply for a job
via the website if it is unpublished.
This made it impossible to apply for internal job offers.
Solution:
---------
Since the commit [^2], it is possible to distinguish
between unpublished and archived job offers.
The behavior after this commit is as follows:
- if the job is published --> everybody can apply;
- if the job is not published --> everybody can apply but the job page is hidden;
We need to know it, i.e. for internal use only.
- if the job is archived --> nobody can apply;
There is an error message "the job offer has been closed".
[^1]: https://github.com/odoo/odoo/commit/72072263ae01a8bea01c7fead000159ae9d060d2
[^2]: https://github.com/odoo/odoo/commit/6c5f38ae37e9c1014bfa93dd82ffc6a3b31f0bd5
opw-3508043
closesodoo/odoo#135791
X-original-commit: abb3afc0c46dd13e0ef8b10ae80d6534a938b3ad
Signed-off-by: Sofie Gvaladze (sgv) <sgv@odoo.com>
Signed-off-by: Thomas Lefebvre (thle) <thle@odoo.com>
Adds a caret to the font selection in the NameAndSignature component.
Prior to this change, the font icon was hidden without the caret.
Also, the caret direction is not being correctly updated when the target
element is closed. This commit fixes this by storing the initial direction
and forcing this direction when the dropdown is closed.
task-3431069
closesodoo/odoo#135774
X-original-commit: 7d11e281fa70a853191378bee3750d12bb76f9b9
Related: odoo/enterprise#47513
Signed-off-by: Bruno Boi (boi) <boi@odoo.com>
If a subassembly was used as component in a finished good and both the
subassembly and finished good were unbuilt, the subassembly could not be
produced again with the same serial (specific use case: medical hardware
refurbishment, medical device is produced/packaged (subassembly), put as
a component into a procedure pack (finished good), both are returned and
unbuilt so the medical device can be refurbished and produced/packaged
again into a subassembly with the same serial).
The _is_finished_sn_already_produced function duplicates domain was
wrongly picking up stock move lines related to the unbuild of the
finished good, making the function wrongly returning True. This fixes
the search domain and adds a test to prevent regression.
closesodoo/odoo#135716
X-original-commit: 4f07b260807053586ac6c01cf92ac3d5e37b1041
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
Implemented support for the BACS payment scheme as per the latest
technical specifications, enabling the processing of BACS Direct Credits
and Direct Debits. Included the mandatory requirement of a Service User
Number (SUN) for businesses conducting transactions via BACS.
closesodoo/odoo#135696
Task-id: 3326945
X-original-commit: 2e6aeffd7ae9116d3445aa53265919cc29afafc7
Related: odoo/enterprise#47487
Signed-off-by: Quentin De Paoli <qdp@odoo.com>
Signed-off-by: Mohamed Erradi (moer) <moer@odoo.com>
- Added ondelete='cascade' to account_payment_method_line's
field definition.
- Fixes the foreign key constraint failure during module uninstallation
by automatically deleting dependent records.
task-3326945
X-original-commit: 9c10cf4dc1da36a2ef826962887a6538d0c522a2
Part-of: odoo/odoo#135696
`_set_dates` didn't work properly with multiple records.
In fact, it only used the `date_start` and `date_finished` of the
first record. The assumption was that `date_start`/`date_finished`
is always the same for each record in self, because it usually
comes from a write call (writing the same values to a batch of
records). But inverse methods are also called by the create
method, and then the previous assumption isn't true anymore.
This bug leads to several inconsistencies between the `date_start`
and the `leave_id`. The `test_replan_mo_without_bom` was fixed in
the previous version, but with the new onchange, it breaks again
because of these inconsistencies.
closesodoo/odoo#135635
Signed-off-by: Raphael Collet <rco@odoo.com>
The 'sale_ebay' module adds the `product_variant_ids` one2many field on
the `product.template` form view. The `product_variant_ids` view
contains `virtual_available` (depending on `uom_id`). When the user
changes the `uom_id` of the `product.template`, onchange is triggered,
it takes a snapshot of the previous data, and it will computes the
previous value of `virtual_available`. But the associated compute
method will fail with a traceback:
File "/data/build/odoo/addons/stock/models/product.py", line 199, in _compute_quantities_dict
res[product_id]['qty_available'] = float_round(qty_available, precision_rounding=rounding)
File "/data/build/odoo/odoo/tools/float_utils.py", line 54, in float_round
rounding_factor = _float_check_precision(precision_digits=precision_digits,
File "/data/build/odoo/odoo/tools/float_utils.py", line 29, in _float_check_precision
assert precision_rounding is None or precision_rounding > 0,\
AssertionError: precision_rounding must be positive, got 0.0
The `precision_rounding` is `0.0` because the `uom_id` of the product is
empty. It is is empty because we force the `uom_id` of the
`product.template` to be `False` in `initial_values` (before the
snapshot), and then the `uom_id` takes the value of its
`product.template` (`False`). But actually, the cache of the product
should be full with its previous values before doing the snapshot.
This was not the case because we only copy data from store fields
(see `fnames`). Then compute fields was computed after setting field
change to `False`.
opw-3334822
opw-3419392
X-original-commit: 5021e77ba52fac465a5d842ac04c0a3a22aea2dd
Part-of: odoo/odoo#135635
Co-authored-by: William Henrotin (whe) <whe@odoo.com>
Purpose is to ease tracking of data and demo through versions by avoiding
the usage of huge file. Instead split data and demo / main model in mass
mailing and mass mailing sms.
Update file naming according to model / guidelines in various mass mailing
sub-addons.
Make real subscription records for contact / list link, in order to have values
for inner model fields and ease their management / update / removal. It is
better than relying on m2m commands.
Also harmonize some xml ids names to ease future changes.
Task-2702607
closesodoo/odoo#135299
Related: odoo/upgrade#5159
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Make real subscription records for contact / list link, in order to have values
for inner model fields and ease their management / update / removal. It is
better than relying on m2m commands.
Also harmonize some xml ids names to ease future changes.
Task-2702607
Part-of: odoo/odoo#135299
Purpose is to ease tracking of data and demo through versions by avoiding
the usage of huge file. Instead split data and demo / main model.
Task-2702607
Part-of: odoo/odoo#135299
Purpose is to ease tracking of data and demo through versions by avoiding
the usage of huge file. Instead split data and demo / main model.
Task-2702607
Part-of: odoo/odoo#135299
And load only two languages, not three.
Faster to load and avoids ambiguity when a Mexican sees es_ES content
closesodoo/odoo#134785
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
Before es_MX was informally considered as the "reference spanish" as
we have an office in Mexico.
Create a new language that will be used by all the local variations of
Spanish and that we can push without overlapping with es_ES content.
Part-of: odoo/odoo#134785
Steps to reproduce:
- Create a survey with matrix-type questions.
- Test the survey.
- Click on the given option it gives a trackback.
Issue:
- The issue occurs because the scope of `this` keyword is unavailable.
closesodoo/odoo#134671
Task: 3485467
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
The icon was missing in the download menu item for portal users that access
a shared spreadsheet.
closesodoo/odoo#134457
Task: 3495200
Related: odoo/enterprise#46977
Signed-off-by: Lucas Lefèvre (lul) <lul@odoo.com>
This commit introduces a new message action to download
all files of the message, when the message contains more
than a single attachment.
This commit also do not show the delete icon on a file
when it's linked to a message without any text content, and
there's only 1 file attached to this message.
This is because deleting message and deleting the file means
basically the same, as deleting the attachment would mean the
message is empty, and empty messages are considered deleted.
We only show "Delete" of the message for clarity.
Task-3340653
closesodoo/odoo#132164
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>