When performing the picking action in the context of savepoint, the env
inside the action can randomly change causing an AccessError which is
caught as UserError (in the current point_of_sale code). Flushing before
calling a method in a savepoint will deterministically avoid this issue.
Note that the weakset used to store environments was modified in #121604
to avoid this kind of issue.
When using a cr.savepoint, the transaction must be flushed but in we
don't have any reference to the env that should be used on the cursor,
meaning that the env is chosen in the list of existing env. This choice
is random because Transaction.envs is using a Weakset.
In some case, the chosen env does not have the correct access right
because the context allowed_company_ids is corresponding to a company
coming from another test, leading to an access error, hidden by the try
except.
Flushing the environment before creating the savepoint will help to
prevent this issue by flushing on a well defined environment.
Note that the weakset used to store environments was modified in #121604
(master)
closesodoo/odoo#123048
X-original-commit: c7c268ed50c1f6fd6eebe7d8a01abdb9d4a32573
Signed-off-by: Xavier Dollé (xdo) <xdo@odoo.com>
Steps to reprodue:
- Create a dropshipped product
- Sell the product to a client with a different language set
- Print the delivery slip
Bug:
delivery slip is currently being printed in the vendor's language
Fix:
Print the delivery slip in the client language when possible
opw-3193015
closesodoo/odoo#123047
X-original-commit: 0ad04a80b1f99feda2fdefbf24cbc3c494110a8d
Signed-off-by: Adrien Widart (awt) <awt@odoo.com>
Signed-off-by: Walid Hanniche (waha) <waha@odoo.com>
This reverts commit bfadb8e491fe2acda63a79f9577eaaec8a1c8d9c.
Since that commit, the domain may be double-encoded in the database if
the user reorganizes the layout of his dashboard: once by the JavaScript
code, and once by the serialization of the innerHTML property.
However, there is no need to have it double-encoded, and some tools such
as the upgrade scripts will fail upgrading the domain.
With this commit, we are serializing the document to XML instead of HTML
and therefore the produced output is valid XML that will be correctly
interpreted by all the tools.
However, double-encoded domains might still be present in existing
databases, so we also need to take this into account when reading the
domain.
OPW-3130117
closesodoo/odoo#123045
X-original-commit: dd8f2640a281b86b73d3b296dd0a5aec7664eb4f
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Signed-off-by: Christophe Simonis (chs) <chs@odoo.com>
Signed-off-by: Paul Morelle (pmo) <pmo@odoo.com>
Issue:
------
In a multi-company context, the creation of a public holiday
in one company will affect leaves in other companies.
We cancel leaves that have the same time slot as the
public holiday, regardless of the company.
Solution:
---------
Take account of the company in which
the public holiday is created and compare
it with the company of the employee who has leave.
opw-3339973
closesodoo/odoo#123040
X-original-commit: 2d2d3388df7ffe0243d13d5b922b5ba6776a434d
Signed-off-by: Kevin Baptiste <kba@odoo.com>
If applied, this commit will solve the issue of keyError when we confirm the
manufacturing order and work order (s) are deleted.
Steps to produce:
- Configure BOM with 'Operations'.
- Set operations in the 'Consumed in Operation' field which is in 'Components'.
- Create MO using that BOM.
- Delete the work order(s) from MO.
- Click on the 'Confirm' button.
Fix this issue when the work order is not available for that operation,
setting False in stock.move record(s).
sentry - 4171798106
closesodoo/odoo#123033
X-original-commit: 36e02b91e88c5e014d132643b6ffb24a71342d6c
Signed-off-by: Parth Solanki (paso) <paso@odoo.com>
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
Since this commit [1], the image cropping feature is no longer
functioning properly. The modification of the "activateCropper" function
code to remove the use of underscore has resulted in a change in the
"data" parameter value passed to the cropper compared to before. This
alteration is the cause of the issue.
Steps to reproduce the bugs:
- Open the homepage in Website edit mode.
- Drag and drop a text-image snippet onto the page.
- Click on the image in the text-image snippet.
- Click on the "Crop Image" button in the image options.
- Change the aspect ratio of the image by clicking on the "4:3" button.
- Click on the "Apply" button to apply the changes.
- Bug: The changes are not being applied.
[1]: https://github.com/odoo/odoo/commit/f4f0f783183507df8227b37fe1234c256325df6d
task-3339518
closesodoo/odoo#122996
X-original-commit: d42070b6abe5ca65d43ae4f2426619684c7aec4d
Signed-off-by: Colin Louis (loco) <loco@odoo.com>
Before a longpolling every 5 seconds was set up to sync the number of
orders per table in the pos_restaurant, which was not very
userfriendly / efficient.
Now, the longpolling has been replaced by a bus (websocket). As soon as
an order is sent to the server by another PoS, the server dispatches the
information to all other PoS using the corresponding floor plan.
The bus_service was initialized in the pos_store of the point_of_sale,
but is now used only in the pos_restaurant via override.
This was done for obvious future use.
closesodoo/odoo#121875
Signed-off-by: Heinz Robin (rhe) <rhe@odoo.com>
To reproduce (on runbot):
- Go to /groups url
- click on "Public Mailing List"
This fix `AttributeError: 'PortalMailGroup' object has no attribute 'env'`
(introduced by odoo/odoo@b60cf1f977)
closesodoo/odoo#123032
X-original-commit: 2bd4a907a0db07ee8bb7f4ffa3017f20c25f79d4
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Signed-off-by: Xavier Alt (xal) <xal@odoo.com>
Before this commit, when viewing the received badges tab in an employee's
profile, there was a lack of spacing below the "Grant a badge" button.
This commit resolves the issue by introducing proper spacing between
the button and the displayed badges.
task-3329971
part of task-3326263
closesodoo/odoo#123028
X-original-commit: cace0db0aad57ee09edb1a41763b0a43aa1e46ff
Signed-off-by: Kevin Baptiste <kba@odoo.com>
This commit changes how automatic readonly props are applied to list
fields so that it doesn't override the getFieldProps method
It also fixes the method 'getCellReadonly' in ProjectTaskListRenderer,
which was renamed to 'isCellReadonly' in the framework but not in the custom renderer.
Task-3340379
closesodoo/odoo#123026
X-original-commit: da3b2421b3f851629d5d287223b7ef581a30a5ab
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
Signed-off-by: Larcin Vincent (vila) <vila@odoo.com>
Co-authored-by: Vincent Larcin <vila@odoo.com>
Steps to reproduce:
1. Open the "project" app
2. Switch to the list view
3. Select "All items"
4. Unselect "All items"
5. The focus searchbar is now focused => bug
The searchbar is autofocused (each time it enters into the dom). Unlike
before, in lists, it is removed when there are selected records, and
comes back when there's no selection anymore. As a consequence, it takes
back the focus. It should only take the focus on a first load, not every
time the searchbar re-appears
Task ID: 3336233
closesodoo/odoo#123025
X-original-commit: 15aacceb401a6868b694870693e7679677be80a0
Signed-off-by: Pierre Paridans (app) <app@odoo.com>
Before this commit, due to milk changes, when a user was out of the
office, an alert box with a border-radius was displayed at the top of
the chat. This border-radius needed to be removed.
This commit effectively resolves this issue.
task-3337778
part of task-3326263
closesodoo/odoo#123023
X-original-commit: 41685396c75aa7902e480629b91143381cca8bd1
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
This commit prepares the ground for the refactoring of the
public livechat by prettifying the files that will be modified
in order to ease the diff.
part of task-2212347
closesodoo/odoo#123022
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
Since the coming into force on 01/01/2016 of Legislative Decree 139/2015
implementing EU Directive 2013/34/EU, extraordinary gains and losses
should no longer be accounted separately on the P&L statement.
See this article https://www.fisco7.it/2017/02/come-ricollocare-nel-conto-economico-gli-abrogati-oneri-e-proventi-straordinari/
There is therefore no point in having special accounts for
extraordinary gains and losses.
So we are removing accounts 71 and 72, both from the CoA and from the
Profit and Loss accounts.
Since they should no longer be used since 2016, this should not have any
impact for existing users.
closesodoo/odoo#122990
X-original-commit: 19cd212f762afdc906aa9f41793cc5c1fa9ea828
Related: odoo/enterprise#41687
Signed-off-by: Quentin De Paoli <qdp@odoo.com>
Signed-off-by: Antoine Dupuis (andu) <andu@odoo.com>
Steps to reproduce:
configure easypost for international shipping (e.g. using USPS)
Make a sale order for a customer in another country
Add a discount program (e.g. 10% off)
Attempt to add shipping and get the rates
Get traceback:
`Easypost returned an error: Wrong parameter type.
- value: must be greater than or equal to 0`
To fix this we need to exclude service type products when creating
commodities from order lines (similar to creating commodities from
stock move lines)
opw-3269467
closesodoo/odoo#122869
X-original-commit: c4904454d46036374ea5e9ae7047f1546e9cab44
Signed-off-by: Tiffany Chang <tic@odoo.com>
Signed-off-by: Khanalizadeh Ahmad (khah) <khah@odoo.com>
In this commit we have added "Nobody will be notified" placeholder in
responsible of the leave type model.
task-3334478
closesodoo/odoo#122452
Signed-off-by: Kevin Baptiste <kba@odoo.com>
This commit enables JS tooling inside the sign module, with the exception of
legacy code.
task-3338273
closesodoo/odoo#122304
Related: odoo/enterprise#41421
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
added sequence + handle for tree view and updated compute
to select company's country's structure type first.
task 3279050
closesodoo/odoo#119810
Related: odoo/enterprise#41190
Signed-off-by: Kevin Baptiste <kba@odoo.com>
Use freeze_time to ensure the tour runs on a date where the employee is
supposed to work.
Fixes runbot build error: 21683
closesodoo/odoo#123010
Signed-off-by: Kevin Baptiste <kba@odoo.com>
Prior to this commit, in the "Chatter", when a user planned an activity,
a new section appeared at the top of the chatter displaying the planned
activities. Users had the ability to collapse this section. When the
section was collapsed, a title and a badge were displayed next to it,
indicating the number of activities.
However, since milk, it was observed that the badge was positioned too
close to the title, requiring some spacing adjustments. Additionally,
the badge has been updated to adhere to milk by adopting a rounded-pill
shape.
task-3339256
part of task-3326263
closesodoo/odoo#122945
X-original-commit: fab1f6242cc0d8984a5f36876dcbf4150c340d8d
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
Before this commit, the widget value was updated (based on the current
state) prior to updating the snippet UI. As a result, the widget value
reflected used the non-updated UI labels.
task-3112890
closesodoo/odoo#122810
X-original-commit: edc88a2ab99673427cbeac05246b8e586b121b72
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
Signed-off-by: Divyesh Vyas (divy) <divy@odoo.com>
This commit allows us to add the events on sales order templates, and then
configure them in the sales order quotations. Users will get an error when
trying to confirm a quotation if events are not configured, and they will
be able to configure said events by clicking on them.
Task-2988003
closesodoo/odoo#116974
Signed-off-by: Warnon Aurélien (awa) <awa@odoo.com>
Currently, if you use the automatic entry wizard to change the period of
a journal item dated prior to the lock date, you'll just get blocked
with a UserError, with no workaround.
This commit changes the date of the adjustment entry to be the first end
of month after the lock date. As a result, the adjustment entry can be
created.
Based on PR #92439closesodoo/odoo#122997
Taskid: 2823170
X-original-commit: fdeaff0a879bdf1242ed0a8d85e3e0363dd3276b
Signed-off-by: Antoine Dupuis (andu) <andu@odoo.com>
Signed-off-by: William André (wan) <wan@odoo.com>
At the moment, the lock date message is generated in
_compute_tax_lock_date_message. We delegate it to a separate function
in order to use this message elsewhere as well.
Note: this refactor introduces minor changes in behaviour:
- we remove the second part of the lock date message (that mentions
other lock dates than the most blocking one), because it is too much
information.
- we calculate the new accounting date from the existing accounting date
rather than from the existing invoice date. This should not change
anything in practice, since the new accounting date will be the last
day of the period after the lock date.
task-2823170
X-original-commit: aeb6707dfc0f4aa093d7687bbb0e488558d2a99f
Part-of: odoo/odoo#122997
Before this commit, the reversal of a passed exchange
move was not created on the correct date:
- If sequence is reset by month, the reversal should
be created at the end of the month of the exchange
move, and if sequence is reset by year, at the end
of the year.
Steps:
- With a foreign currency X activated and two different
rates few months in the past.
- Create and confirm an invoice with currency X at the
date of the first rate.
- Register a payment at the date of the second rate
(an exchange move is created).
- Unreconcile the payment from the invoice.
-> A reversal of the exchange move is created, but the
date is wrong (set to today's date).
opw-2856385
closesodoo/odoo#122981
X-original-commit: 130832942d4bd40e0c11676b030db6fb794bfbdb
Signed-off-by: Brice Bartoletti (bib) <bib@odoo.com>
Signed-off-by: Guillaume Vanleynseele (guva) <guva@odoo.com>
Previously, validating an order and initiating a print receipt
request, followed by an immediate exit from the receipt screen
caused an error. The error arose when the system attempted to
update the className of a nonexistent element.
This commit resolves this issue by ensuring the element's
existence before attempting any updates.
opw-3329887
closesodoo/odoo#122940
X-original-commit: 2b4553e4c9b7c0a265ae2d256a0ac99b286ee760
Signed-off-by: Heinz Robin (rhe) <rhe@odoo.com>
Signed-off-by: Pedram Bi Ria (pebr) <pebr@odoo.com>
We are reverting this commit (f9da3590261b304f9c12f01f5800cec50faebc1a) because
it is not compliant to the stable policy and is blocking users that had more than one cash
payment methods in configuring their pos.
opw-3331677
closesodoo/odoo#122882
X-original-commit: 81d995cf5450956e1c664cb5528d98bb9849bb64
Signed-off-by: Joseph Caburnay (jcb) <jcb@odoo.com>
Signed-off-by: Pedram Bi Ria (pebr) <pebr@odoo.com>
Instead of a message at the top of the page, and a likely
very visible footer, the "thank you" page after giving a rating
is now reworked:
- Only the top of the website footer is now visible
- The message is centered on the page
- Other margin and structure changes
Task-3297161
closesodoo/odoo#120687
Signed-off-by: Warnon Aurélien (awa) <awa@odoo.com>
Instead of displaying the feedback field on the rating form
in one of its two columns, we make it go below them in its
own group. As the comment can be very long, this makes the
form / comment much more readable. The max-width of the form
inner group containing the feedback field is set to 100%,
as the default max-width is set to 700px since new Milk design.
( commit 9cd8561bc1011d4224ff0d497290e8f3ec97abc3 )
Task-3297161
Part-of: odoo/odoo#120687
According to Singapore IRD documentation, Box 13 should only involve accounts of type "Income",
Currently, Box 13 calculation is based "Net Profit" which is the combination of Operating incomes, Income, Cost of Revenue, Expenses and Depreciation.
2860997
closesodoo/odoo#123003
X-original-commit: 90190314d31c94abf5d0ba3f40fb5e11c106455e
Signed-off-by: Nicolas Viseur (vin) <vin@odoo.com>
== ISSUE ==
With the refactoring of the `utilities_custom.scss` file, we moved our
custom `bg-*` classes to the `bootstrap_review_backend.scss` file.
While doing this, the `bg-transparent` class actually disappeared.
This commit aims to reintroduce the class in the backend.
== After this commit ==
We reintroduce the `.bg-transparent` class inside
the `bootstrap_review_backend` file. We adopt the default Bootstrap
behavior for `background` classes and use a CSS variable to handle the
opacity.
task-3326297
part of task-3326263
closesodoo/odoo#122995
X-original-commit: 49c0848c4780948d037bbe49aea86dfd0afa27a5
Signed-off-by: Pierre Paridans (app) <app@odoo.com>
=== ISSUE ===
If you open the `Expenses` module, the buttons placed on the left inside
the Control Panel have a custom margin. One of them has a `.mx-1` and
another one has a custom `.gap` defined in the SCSS files.
=== AFTER ===
We remove the `.mx-1` class to replace it with a `.me-1` class, which
is used across Control Panels to space buttons.
We also fix a global issue with the `.o_list_buttons` inside a
`.o_list_view` class, which was adding a gap defined in CSS. Since this
gap is added on top of our `.me-1`, this was generating a higher value
than expected for the margin.
task-3330141
part of task-332626
closesodoo/odoo#122986
X-original-commit: a1d697cc32ef4f94a4a7a89c3b442f58ddb8ecea
Signed-off-by: Pierre Paridans (app) <app@odoo.com>
Since https://github.com/odoo/odoo/pull/121355,
add_to_compute on no-store compute field, lead to recompute the field
at the end of request and it can lead to some non deterministic bug
(compute with a bad context by example).
Avoid to add_to_compute no-store or no-compute fields.
closesodoo/odoo#122973
X-original-commit: 533193106e6c9460d741e504babc7591cb935939
Signed-off-by: Raphael Collet <rco@odoo.com>
Signed-off-by: Christophe Simonis (chs) <chs@odoo.com>
Signed-off-by: Christophe Monniez (moc) <moc@odoo.com>
On this situation:
* P1 consumable product, kit, with components P2 and P3 in its BoM using
1 of each
* P2 comsumable product, kit, with component P3 using 1 in the BoM
* P3 storable product, 10 units in stock
Before:
The qyt_available for P1 is 10. That's incorrect: to assemble one P1 we
need precisely two of P3s, one for P2 BoM then an extra for P1 BoM.
After:
The qyt_available for P1 is 5.
closesodoo/odoo#122939
X-original-commit: b32554322d4c26665bdcb29fd58bb95f12faa20e
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
Signed-off-by: Alvaro Fuentes Suarez (afu) <afu@odoo.com>
**TicketBAI features**
- Generation of XML documents for invoices
- Automatic signing of documents with certificates
- Sending XML to the appropriate tax agency's servers
- Parsing and storing their response
- Preserving the invoice signature chain integrity
- Displaying the TicketBAI QR code on the invoice PDF
- Downloading XSD files for local validation
- Test mode using tax agencies' test servers
**Supported accounting flows**
- Posting and canceling invoices
- Foreign and national customers
- Multi-currency
- Refunds (credit notes)
- Discounts
- Simplified invoicing
**Not supported accounting flows**
- Specific VAT regimes
- Handling of third-party invoices
- XML generation and EDI operations for vendor bills (Bizkaia LROE)
- Modelo 140 (Bizkaia LROE)
- Invoice batching (Bikzaia LROE)
closesodoo/odoo#122691
X-original-commit: f8cad00a6cd5765b6f962909cf849acb1a8aa18b
Signed-off-by: Josse Colpaert <jco@odoo.com>
This way, the demo company is easier to play with as
a certificate is already there.
X-original-commit: 87079e38c388191a8304c2bdf6fa522f7087b654
Part-of: odoo/odoo#122691
Before, if you had multiple lines with noexenta, the lines could
be added multiple times. So, we only add the lines outside of the
for-loop.
For Ticketbai, we also need to make the distinction between S1 (normal)
and S2 (inversion sujeto pasivo) lines, so we return them in different
lists.
X-original-commit: 2fd357a274880e3cf2b33f81414b9145be6807bd
Part-of: odoo/odoo#122691
When we input some string in many2many field under Coins/Bills in configuration
setting of point of sale module . it will give an error with the message -
'could not convert string to float'
Steps to Produce:-
1. Go to Point of Sale then configuration
2. click on 'Settings'
3. Under 'Payment' input some string in Coins/Bills
Trace-back will be generated.
Reason -
The 'name_create' method of the 'pos_bill' model generates an error when a
string is provided as input for the 'name' field, since the expression
'float(name)' is unable to convert a string to a float.
Applying these changes will resolve this issue.
Sentry - 4122478677
closesodoo/odoo#122094
X-original-commit: 8e553f06f1a8e63dbfb4439e989ef27d577ea50f
Signed-off-by: Joseph Caburnay (jcb) <jcb@odoo.com>
Signed-off-by: Preksha Chouhan (prec) <prec@odoo.com>
Steps to reproduce:
- set up a header with company logo
- print 20 sale orders in arabic
Bug:
header disapears on most pages
Fix:
add a setting to allow users to increase the delay before printing
opw-3217155
closesodoo/odoo#122983
X-original-commit: 68f7cbd15df7839aab146023399da1570b12b441
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
Signed-off-by: Walid Hanniche (waha) <waha@odoo.com>
When creating an invoice with a positive line and a negative line, with
different taxes, the DatiRiepilogo node for the tax of the negative
line contained positive amounts when they should be negative.
This is because we were applying `abs()` too naively in the XML template
and in the code of _l10n_it_edi_prepare_fatturapa_tax_details.
This bugfix commit changes the logic to no longer use abs().
opw-3316300
closesodoo/odoo#122982
X-original-commit: 0241e96fe12401f0891efc00f840e03d0c0219fd
Signed-off-by: Quentin De Paoli <qdp@odoo.com>
Signed-off-by: Antoine Dupuis (andu) <andu@odoo.com>
*: base
In the cron updating challenges goals, we were historically filtering
in records of users that logged in since the last update. This doesn't
work because sessions can last a long time, so users are active between
cron runs but their goals are not updated and stale reports were sent.
We temporarily fixed this in v14.0 by updating all goals for internal
users, but this can lead to unnecessary computations too, and still
misses goals of active portal users.
Instead, we are here using the `bus.presence` records to track user
activity, combining it with the session lifetime to avoid indefinitely
fetching old goals that couldn't need an update.
This works for both internal and portal users.
Note: we update stale base comments in favor of exposing bus.presence
to guide developers.
Task-3148858
closesodoo/odoo#121763
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>