Before this commit, when creating a new record, there is no
`_currentClientId` set in the wysiwyg as there is no collaboration
setup for new records. When the user save the record, there is a call
to `Wysiwyg.resetEditor` but as the
`OdooEditor.collaborationSetClientId` was called before
`Wysiwyg.setupCollaboration`, the `_currentClientId` was not set.
That lead to the `OdooEditor._collabClientId` being undefined, which
lead `OdooEditor.serializeNode` to not serialize the node through the
function `serializeNode`.
So unless the client A reload it's page, if another client (B) open
the same record and synchronize with client A, client A will send it's
history when `get_history_from_snapshot` is triggered but no
`_historySteps` mutations nodes will not be serialized.
So when client B will receive the steps in `historyResetFromSteps`,
the code will crash.
After this commit, the proper order will set the _currentClientId in
time because `collaborationSetClientId` is set after
`setupCollaboration`.
task-3359732
closesodoo/odoo#125599
X-original-commit: 85acd380cab34ca507251c8b232520c76f2a3e58
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
For the l10n_es localisation, we needed to print on the invoice the company id
of the partner we send the invoice to. To do that, I had to add some id to make
the xpath work.
Task-3281337
closesodoo/odoo#125596
X-original-commit: 845b275846e49a923a9e181ad37cee3c691f16d0
Signed-off-by: William André (wan) <wan@odoo.com>
Signed-off-by: Maximilien La Barre (malb) <malb@odoo.com>
An error occurs because to convert the amount in sale order line company is
required.
when user remove the company and tries to add a new product in sale order line
error occur.
applying these changes will resolve this issue.
sentry-4090085761
closesodoo/odoo#125575
X-original-commit: c04bc8026eae79c01fb9315d8063b12d3a1e2fa8
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
Signed-off-by: Smit Nagar (smna) <smna@odoo.com>
port of this fix
https://github.com/odoo/odoo/pull/70454
Steps to reproduce the bug:
- Let's consider a delivery carrier DC with invoice policy = 'real'
- Let's consider a consumable product P with a weight = 1kg and sales price = 10€
- Create a sale order SO with 2 P and add DC as shipping cost
- Process the shipment for 1 P and create a backorder
- Process the second shipment with the last P
Bug:
Two lines L1, L2 with DC were created on SO but only L1 as a price unit and a description.
L2 had a price unit = 0€ and no description.
opw-3219711
closesodoo/odoo#125573
X-original-commit: 79dad0a7599584f14e4ab3e96c393983e95aa519
Signed-off-by: Adrien Widart (awt) <awt@odoo.com>
Signed-off-by: Walid Hanniche (waha) <waha@odoo.com>
The reactivity utils were initially an ad-hoc solution to some problems
that came up when using the reactivity in places that are not
components. As it turned out that these needs are actually quite common,
the utils that were originally duplicated in many modules were moved to
the core utils in web, but there were no tests for these utils, and the
Reactive class was not documented.
This commit adds some tests for the reactivity utils and a docstring
motivating the existence of the Reactive class.
closesodoo/odoo#125549
Signed-off-by: Géry Debongnie <ged@odoo.com>
Remove uncessary ThreadIcon that only served as spacing, properly add
module icon for chatter records.
closesodoo/odoo#125388
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
- Added the sum of the hours in the project.task tree view for the
"hours spent on sub-tasks" and "total hours" fields.
- Centered vertically the AA warning on the project form -> timesheet
notebook when the AA linked to the project is archived.
TaskId:3251653
closesodoo/odoo#120664
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
Prior this commit:
In project when tasks was moved to different stages users will get notify with
emails where there is a field showing assigned_date and deadline.
After this commit:
Instead of those fields it's showing only Stage: Stage name
Task-3285822
closesodoo/odoo#119973
Signed-off-by: Warnon Aurélien (awa) <awa@odoo.com>
In this commit, we have implemented a dedicated function that enables
the customization of details in the confirmation dialog for the archive action.
task-3277195
closesodoo/odoo#125533
Related: odoo/enterprise#39926
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
Before this commit, when the MO's BoM is updated, the MO's by-products
are created. These moves have a field, `byproduct_id`, who is supposed
to link the move to the BoM's by-product's line, but this field is
let empty when the move is created.
It's because the field is missing in the MO's form view. This commit had
it (invisible) so moves' `byproduct_id` will be correctly filled.
closesodoo/odoo#110227
Related: odoo/enterprise#35969
Related: odoo/upgrade#4428
Signed-off-by: Steve Van Essche <svs@odoo.com>
The "Update BoM" button action was moved from `mrp_plm` to `mrp` so it
can be displayed if the BoM was updated now. This action can be called
for confirmed MO now.
Each time a change is done on a BoM, all the draft and confirmed MOs
using this BoM will be notified the BoM changed, thanks to a new boolean
field, `bom_has_been_updated`.
An exception however: if the MO is confirmed and the BoM's product was
changed, the MO shouldn't have the "Update BoM" button displayed.
Otherwise, it would change the finished product of a confirmed MO.
Also, it's important to notice than due to a limitation, only changes
done at the BoM level will mark it as modified. That means that
modifying subrecords in their own views (for example, adding steps in a
BoM's operation) will not mark the BoM as updated !
See odoo/enterprise#35969
task-3089368
Part-of: odoo/odoo#110227
In a Manufacturing Order, if the user manufactures a product without any
BoM, they can generate a new BoM who will take the information from the
MO. So, the new BoM will have a BoM line for each MO's component, an
operation for each MO's work order, and the By-Product lines will be
copied too.
task-3089368
Part-of: odoo/odoo#110227
task #3356870
Before this fix, at the first time of sending message in a chat, the tempId of the message in the chatter, crashes the getting lastMessageId and the first tempId in the chat becomes NaN.
closesodoo/odoo#125424
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
*: account, crm, crm_iap_mine, event, hr_expense, hr_holidays,
hr_recruitment, lunch, mail, mass_mailing, point_of_sale, project,
purchase, purchase_stock, sale, survey, web, website, website_blog,
website_event, website_forum, website_sale, website_slides,
test_main_flows
In odoo/odoo#111103 the tour system was rewritten. The previous tour
system used to depend on the `root.widget` js module, and this module
was an async module that indirectly depended on `session_bind` which
would load the translations, meaning that the js module definition code
of the tours would only run after the translations were loaded. This is
no longer the case with the new tour system, this means that the module
definition code is executed as soon as the dependencies of that module
are fulfilled, which is generally befoe the translations are loaded,
causing most tour tips to not be translated.
This commit adds a hacky workaround for this problem: it creates a new
module that has a default export which is a promise, and has a legacy
alias, this creates an async module that waits for the translations to
be loaded. This module is then imported for its side-effect in all
onboarding tours, causing them to be translated correctly once again.
This commit also needs to convert the steps key in the tours internal
registry to a getter. In previous versions, the steps were directly
added as is to the internal state of the tour service, but since
odoo/odoo#122834 the steps are now mapped, and without a getter, any
edits to the steps occurring after registration will not be taken into
account. This causes issues in some modules that change original
behaviour of other modules (eg accounting makes invoices into a menu in
the accounting app instead of a top-level app in the home menu) as they
need to edit the steps of existing tours to make them work.
In a separate PR, we will implement a more proper fix by changing the
API of the tour manager so that we no longer need this workaround.
closesodoo/odoo#125284
X-original-commit: d130699ba82dc9919c9116f4b64a5e461ebb6319
Related: odoo/enterprise#42655
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Signed-off-by: Samuel Degueldre (sad) <sad@odoo.com>
This commit, removes from the compiler all the code made to collect all
the labels of the setting for the search. Now, the labels are collected
at mounted time, by the setting itself.
This commit prepares and is part of the task that aim to refactor the
relational model and migrate it to owl.
part-of task-id 3179751
closesodoo/odoo#125332
Signed-off-by: Pierre Rousseau (pro) <pro@odoo.com>
We added another hook to call the web service after the pdfs were rendered.
It would be clearer if the first hook was renamed to remain consistent.
closesodoo/odoo#125536
Signed-off-by: Laurent Smet <las@odoo.com>
create a vendor Bill
attach the PDF
go back to list view, select the bill > print Original Bills
Issue: a traceback is raised
Similar to f814c607e5ab7ed6f1e594ec8c602a749fcc775d
In some malformed PDF files zlib is unable to extract the data properly.
opw-3368907
closesodoo/odoo#125501
X-original-commit: 6dd9fee03a50310a4db63e3f263eb43ab808dbc7
Signed-off-by: John Laterre (jol) <jol@odoo.com>
Signed-off-by: Grazioso Andrea (agr) <agr@odoo.com>
before this commit, on neutralizing the database the
mollie token is not cleared from the payment provider.
after this commit, on neutralizing a database, the
token from mollie payment provider is cleared.
closesodoo/odoo#125482
X-original-commit: dfdd9c3cf563bebd862ac7d06653273abcc09bd9
Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com>
The autocomplete component intercepts certain key presses allowing the end-user
to select an option from the autocomplete dropdown using either the enter or
tab keys. Before this commit those keypresses where only intercepted when the
autcomplete selection list was already completely loaded.
Consider now for example an x2many list where the lines can be selected using
the autocomplete component. To add a line to the list the end-user will usually
type part of the record name and then select it with tab or enter. Three things
can happen:
* The enter keypress is handled after the list of options is fully loaded
* The enter keypress is handled while waiting for the list of options to load
* The enter keypress is handled while still debouncing the input, no request
to load the options has been made so far
The last two cases commonly occur when inputting lines with a barcode scanner
for example. In this case the enter keypress is ignored by the autocomplete
component and is instead handled by the list renderer component. This generally
results in the list renderer trying to create a new line but failing because
of missing required fields in the previous line. This seems more or less
acceptable. However, if required fields are already filled out or not present
in the list view, a new line is created while the current one remains empty.
This behavior is clearly counterintuitive, as such, this commit proposes to
wait for handling tab and enter keypresses while debouncing the input or
loading the list of options.
opw-3235288
closesodoo/odoo#125464
X-original-commit: 7776e89e293045731e077801113d4ff40507b7c1
Signed-off-by: Tom De Caluwé (tdc) <tdc@odoo.com>
Signed-off-by: Michaël Mattiello (mcm) <mcm@odoo.com>
Use the many2one_barcode widget for the product field in the account.move.line
list view, similar to the sales order and purchase order views.
X-original-commit: c8918e799b23bd4e57a63f354731be78d308b97b
Part-of: odoo/odoo#125464
By RPC an other user in other company can access to an other fec.
closesodoo/odoo#125435
X-original-commit: 857f2e026dd9e4307adda786e2745aa7cb36a2c3
Signed-off-by: Olivier Colson (oco) <oco@odoo.com>
*: l10n_ae_pos, l10n_co_pos, l10n_fr_pos_cert, l10n_gcc_pos, l10n_in_pos, point_of_sale,
pos_adyen, pos_discount, pos_epson_printer, pos_hr, pos_loyalty, pos_mercury,
pos_restaurant, pos_sale, pos_sale_product_configurator, pos_six, pos_stripe
After the architectural refactor of the PoS App, there are two classes that make sense to merge.
In this refactoring task, we're merging them.
closesodoo/odoo#124477
Task: 3358550
Related: odoo/enterprise#42257
Signed-off-by: Joseph Caburnay (jcb) <jcb@odoo.com>
This commit removes the tooltip of the `fold` field because
the second part is no longer true and the first part does not
provide any added value.
It also makes `project_ids` field required in the form view of
Task Stage model (`project.task.type`) to force the user to link
his new stage to a project. Otherwise, the stage won't ever be
visible anywhere in the interface. Indeed, stages not holding
tasks are hidden in cross-projects views.
task-3251621
closesodoo/odoo#121154
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
Before this commit, it was not possible to create a custom monetary
field without having currencies named `currency_id` or `x_currency_id`
in the model.
With this commit, we store the currency_field from the Monetary field
in the database. This allows to create custom monetary field with
currencies name we want.
A good use case for this IMP is for Studio, we can now create and edit
monetary field easily without storing it as a `float` in the ORM.
Part-of: odoo/odoo#118199
This commit will have nested components making use of
the usePosition hook to synchronize their repositioning.
**Before this commit**
Each component handles its own repositioning logic.
If it is mounted somehow inside another component using that
same logic, conflicts occur in some circumstances.
**After this commit**
It is now ensured that, in case of nested positioned components,
the whole chain of repositioning computations is called in the
proper order: from the parent to the children.
**Example**
- Before
![before]
- After
![after]
[before]: https://github.com/odoo/odoo/assets/1159815/3c9cfae7-db68-4707-a73c-ad7e2e71d4bf
[after]: https://github.com/odoo/odoo/assets/1159815/a21f56e0-d8e3-48c1-9509-8e6ee5040d4bclosesodoo/odoo#125531
X-original-commit: 9f947ba3fd3a00a0c80efc40186c36e0de78de16
Signed-off-by: Michaël Mattiello (mcm) <mcm@odoo.com>
Signed-off-by: Bruno Boi (boi) <boi@odoo.com>
Steps to reproduce:
1. Activate Dev mode
2. Settings > Technical > User Interface > Views
3. res.company.form
4. In the architecture add more pages
`<page name="test1" string="This is a test ABC DEF"/>
<page name="test2" string="This is a test ABC DEF"/>
<page name="test3" string="This is a test ABC DEF"/>
<page name="test4" string="This is a test ABC DEF"/>
<page name="test5" string="This is a test ABC DEF"/>
<page name="test6" string="This is a test ABC DEF"/>
<page name="test7" string="This is a test ABC DEF"/>` Save manually
5. Settings > Users & Companies > Companies
6. Open any company.
Issue:
Tabs go off the screen instead of moving down a row like in previous
versions.
Solution:
Adding the proper `overflow-x=auto` will handle the issue.
opw-3079492
closesodoo/odoo#125476
X-original-commit: 19c03accdb5754a6c223bce8ce2cc142e9b2be08
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Before this commit:
In mobile view, the user was unable to select the table size form table
table picker, making table picker of no use.
After this commit:
In mobile view, the picker will not be visible visible and when the user will
write '/table' then a table of 3x3 dimension will automatically be inserted
without displaying the table picker.
Task id: 3283083
closesodoo/odoo#125480
X-original-commit: a1fa78cdc1c18aa663d09641f81a971e2a5aa683
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
Plans with no company defined were not showing in the list when
launching a plan on an employee.
task-3366394
closesodoo/odoo#125478
X-original-commit: d15587e252b55cdcf71c0088482361773dafc8a1
Signed-off-by: Kevin Baptiste <kba@odoo.com>
Issue:
------
When we have the link to the form to apply for a job,
even if the job is not published, we can still apply.
Solution:
---------
Check that the job is published before the creation of the record
in the `website_form_input_filter`.
opw-3331717
closesodoo/odoo#125429
X-original-commit: d68eab464654441d51f618c5d3d036999316ed7f
Signed-off-by: Kevin Baptiste <kba@odoo.com>
Signed-off-by: Lefebvre Thomas (thle) <thle@odoo.com>
Issue: the xml declaration "<?xml version='1.0' encoding='UTF-8'?>" is
lost when opening the send & print wizard with existing xml attachments.
Explanation: When opening the send and print wizard, the PDF are
generated and postprocessed by `_postprocess_pdf_report`. In the
`_postprocess_pdf_report` override in `account_edi_ubl_cii`, the xml
attachments are parsed through `tree = etree.fromstring(xml)`, then the
base64 PDF is inserted, and the etree is converted to a bytes through
`etree.tostring(cleanup_xml_node(tree))` and the resulting bytes is
written back on the attachment, but the xml declaration disappeared.
Solution: include the arguments `xml_declaration=True, encoding='UTF-8'`
in the `tostring` function when converting the etree to a bytes.
opw-3144519
closesodoo/odoo#125523
X-original-commit: ed9a1d83bd7d496a316e8da6a201ca3a14c99d19
Signed-off-by: Julien Van Roy <juvr@odoo.com>
Signed-off-by: Laurent Smet <las@odoo.com>
The bills upload widget uses a custom attr "linkText". translate.py will only generate terms that are in the TRANSLATED_ATTRS constant, thereby not including these in the po template file.
To fix this, the attribute is changed to a recognised attr "title".
The JS widget will still recognize linkText, for databases that have not updated the module.
Task-3335585
closesodoo/odoo#125516
X-original-commit: 8569ceb101f6dfe5882c33c120b9ed6d76ccf5be
Related: odoo/enterprise#42755
Signed-off-by: Habib Ayob (ayh) <ayh@odoo.com>
Signed-off-by: Brice Bartoletti (bib) <bib@odoo.com>
With Jquery.data, you can set everything as value (array, object,
string, etc) wich is confusing. This commit fix the function that check
if the button is ready. It didn't work because the data declared
in this.$submitButton is not a boolean but an object.
Bug was introduced in PR 118012
commit : a6b46fdfdb855
closesodoo/odoo#124795
X-original-commit: 04059d09dfd7dc57a5c86c842d6fea300e1441aa
Signed-off-by: Géry Debongnie <ged@odoo.com>
Before: when using the quick encoding feature on an invoice or bill with payment term containing an early payment discount and the epd computation is set to "Always (upon invoice)", the calculation was done incorrectly.
Example: if you invoice a 100€ product with a 21% tax with a 2% cash discount, the total of the invoice will be 120.58 (the 21% is calculated on 98€ (100€*2%) which is 20.28€).
In our case, if you tried to calculate suggestions from a quick encoding value of 120.58, the calculation would calculate the untaxed amount from the 120.58 based on the 21% tax without applying the 2% discount.
After: when calculating the suggestions check if an early discount is set on the payment term and the epd computation is set to "mixed" ("Always (upon invoice)") and if so, apply the discount to the tax before calculating the untaxed amount from the total.
task-3339223
closesodoo/odoo#125505
X-original-commit: 162443f1ad913a0388bea60f04ff140e75fdb0ed
Signed-off-by: Laurent Smet <las@odoo.com>
The bank recon custom view relies on the noContentHelper. (When there are no records, a custom noContentHelper is displayed including buttons to clear filters)
When the view is activated from a RedirectWarning, the action's help text is not marked up
therefore displaying raw html in the UI.
With this fix, the actions help key is marked up (very similar to the doActionButton)
To reproduce:
- On a DB with demo data
- Accounting -> Actions -> Lock Dates
- Set a lock date for all users (after the last unreconciled date, ensure there are no unposted moved before this date)
- You will be presented with a Redirect Warning Dialog
- Click Show Unreconiled Bank Statement Lines
- If there are lines, use the filter to search for "SomethingThatWontReturnRecords"
- You will see raw html
Task-3366470
closesodoo/odoo#125493
X-original-commit: 0086841addfc5b0e3293d205bdfe8dde67b32ce4
Related: odoo/enterprise#42740
Signed-off-by: Laurent Smet <las@odoo.com>
This results in parent message being displayed as text when it is part
of the result of a load around call.
closesodoo/odoo#125439
X-original-commit: 783a5186cf7529161d95c34c9290dc57a32b8200
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
Forgot to properly sort messages, resulting in returning messages not
actually around but the most recent instead.
X-original-commit: 803f1ad7e3bceaa8f03fca06f920447ce9d8eb69
Part-of: odoo/odoo#125439
Double assignation does not chain, resulting in the non proxified
message being returned, which can potentially cause issues either when
comparing messages by reference or if a reactive version is expected.
X-original-commit: 30a77cb2778ec0fce5892cfd3903aa1982825626
Part-of: odoo/odoo#125439
Currently, we call the web service before the PDF is rendered. This is often required for some localizations, for example Mexico.
However, in some other cases, we need to embed the pdf document in the xml file, like in Peppol. In this case, we need to call the proxy after the pdf has been rendered.
This commit adds an additional hook that is being called in the end of `_generate_invoice_documents`, after all the documents have been generated and postprocessed. `account_peppol` will use the new hook instead of the old one.
closesodoo/odoo#125438
X-original-commit: dd56297e8b462539c913803eeb23a224fc9e93ac
Signed-off-by: Laurent Smet <las@odoo.com>
This commit fixes small bugs:
- Sometimes we don't receive the attachments' file name from the proxy. Instead of saving the attachment with `False` as the filename, we should default to something.
- If for some reason the participant's status is changed on the proxy server after documents have been sent, retrieving the message status will traceback. This commit adds a condition to catch this case.
- Currently, the participant status is only updated if their application is pending. But it can happen that they are approved but not registered to the SMP. Participant status should be checked for approved edi users too.
closesodoo/odoo#125437
X-original-commit: a70a388cc6cba1f0f440ca7b9dafe9b6ef6593f4
Signed-off-by: Laurent Smet <las@odoo.com>
Since d88409e8e5ce77ff3ec3b24fcdc108d8df380994, taxes from different companies
are forbidden on sale.order.line records (which is the expected behavior).
Nonetheless, this highlighted some flows where the taxes were not properly
set/recomputed, especially re-invoicing, which is fixed by the current commit.
Fixes#123675closesodoo/odoo#125434
X-original-commit: 6ce4019968bd0a1a11475910d35aa2ccfc2c6a9a
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
Prior to this commit, the buttons in `binary_field` didn't have space
between them.
This commit fixes this issue.
task-3334887
Part of task-3326263
closesodoo/odoo#125261
X-original-commit: 998f8cc8d096df9e2099df59bb35148f56c88533
Signed-off-by: Pierre Paridans (app) <app@odoo.com>