Don't show HSN value for sale.order not linked to this localization.
Before this commit, if you have multi company with multi localization,
you see this field whatever the current localization.
It uses the same condition than other report: purchase/invoice/...
closesodoo/odoo#160833
X-original-commit: e2a684018d7f92994aa5d30ded8f64703254f0fb
Signed-off-by: Olivier Dony (odo) <odo@odoo.com>
Signed-off-by: Jérémy Kersten <jke@odoo.com>
Without sudo, an user in a company can change the type even if somes not done stock.move.line exists.
closesodoo/odoo#160856
Signed-off-by: Arnold Moyaux (arm) <arm@odoo.com>
The conditionnal `isinstance(exc, NotFound)` is shadowed by the
conditionnal `isinstance(exc, HTTPException)` two lines above. Nobody
ever complained that the warning for NotFound error was gone. Since
werkzeug 1.0.0, the status code in the response log is colored, 404 is
colored yellow which should catch the eye. The explicit warning line
isn't really necessary.
closesodoo/odoo#159895
X-original-commit: 851b91f19b87446662421cb8d801a9472725bc72
Signed-off-by: Julien Castiaux (juc) <juc@odoo.com>
Before this commit:
The cursor kept on flickering when attempting to enter a space at the end
of label text field of a link resulting in not being able to add space at all.
After this commit:
Now, it's possible to add spaces at the end of a link label.
task-3820250
closesodoo/odoo#160780
X-original-commit: 1af59ba5054dae5272506aead8b2c8dd0e5616fb
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
How to reproduce:
- Install website_slides with demo data
- Log in from localhost
- Log in from dev.localhost
- Switch to localhost
- (The system property web.base.url is http://dev.localhost:8069 but we are
on localhost)
- Go to a course in the back end and click on “Go to website” button
You are redirected to the frontend website home page instead of the course
home page.
This fix solves the problem.
Afer correcting this error for the courses (slide.channel), we have found the
same problem for:
- event.sponsor
- event.meeting.room
- slide.slide
So we apply the same correction for them.
Technical note: the button "Go to website" uses the open_website_url method of
WebsitePublishedMultiMixin that relies on website_url. That method expects a
relative URL in the computed field website_url and not an absolute one
(actually, the method already handle adding the website domain, so it expect
the relative part). The problem is that the compute method for the field
website_url of channel compute an absolute URL. The consequence is that the
user is redirected to the home page instead of the course page (by
WebsitePreview, see get path method). In stable, we cannot change easily
website_url to make it relative as it is used in other of places (ex.: if we
make it relative the share link in the sidebar on the frontend is relative
which is not correct and in mail template, the URL might not be correct as the
mail system append the default domain for relative URLs). So instead, we
override open_website_url to use a relative URL when the website is not
defined. If the website is defined on the course, we call the super
implementation because a domain change might be required. Note that by doing
that, we duplicate the code of _compute_website_url in open_website_url but
making the URL relative instead of absolute. So we should clean that in master.
Task-3635856
closesodoo/odoo#160763
X-original-commit: 1f798428fc0f403755512a45f67b5f70aae0c808
Signed-off-by: Warnon Aurélien (awa) <awa@odoo.com>
Signed-off-by: Pierre-Yves Dufays (pydu) <pydu@odoo.com>
In mobile, having a somewhat 'large price' (like a few thousands
currency units) can cause the bottom of the card to overflow (esp.
if buttons like 'add to card' or 'add to wishlist' are present).
This commit modifies the card template so that content is normally
spaced and can wrap to a new line if need be.
opw-3706637
closesodoo/odoo#160628
Signed-off-by: Bouvy Damien (dbo) <dbo@odoo.com>
Resolves an issue with Afterpay via Stripe not receiving correct
shipping address details, causing transaction failures. Now,
ensures shipping address from the order or invoice is accurately
sent to Stripe if we have it.
opw-3419984
closesodoo/odoo#160300
Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com>
Previously, methods on python objects such as sets and strings were
implemented as functions returning a function returning the result.
While curried functions can be a great tool, they're also confusing at
first glance and in this particular case they can be easily replaced by
a simple function and the usage of Function.prototype.bind to bind it to
the correct argument. We also add a simple whitelist for pyjs functions
as a sanity check as it makes no sense to call JS functions from python
code.
With this change, we can also treat functions and methods from any
object more uniformly instead of having many return points that are
treated like special cases.
task-3762958
Part-of: odoo/odoo#139451
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Commit[1] aimed to fix a layout issue inside the eCommerce categories
form view on mobile devices.
Prior to Commit[1], a `.float-start` class was applied to the content
of thesheet, moving it "out of the flow", resulting in a wrong sized
form_sheet.
To fix the issue, we removed the `.float-start` class, but doing such
a change introduced a risk for users's customizations.
======
After
======
To prevent this issue, we reintroduce the initial lines, and will provide
a fix in another PR.
Commit[1]: 9837396
Related to task-3847917
closesodoo/odoo#160858
X-original-commit: 0914a0bd179a6b644e51de25bfad0555ea0f40ca
Signed-off-by: Pierre Paridans (app) <app@odoo.com>
Signed-off-by: Chrysanthe Gomrée (chgo) <chgo@odoo.com>
The main purpose of this test is to ensure that line return are removed,
but all other special character are kept once the file is saved.
Unfortunately, werkzeug versions have different strategies on how to
quote the filename, removing less special character in latest versions
like after https://github.com/pallets/werkzeug/commit/babfc93b3834bcbb22163442a9af70141bcc5a81
This also changes after the changes that removed werkzeug urls methods
replacing them by urllib, making the behaviour different again.
This commit makes the test more robust by checking that the filename
correspond to the expeted one once unquoted, not comparing the quoted
versions.
Part-of: odoo/odoo#160842
In ubuntu noble, some timezone where removed leading to errors when
trying to assign/access them.
This was partially fixed in the code by removing all references to old
timezones but one issue remains: if a database contains timezones that
are not defined in the os, the resolution will fail and break at runtime
This patches proposes to alter timezone to fallback on the new canonical
timezone if the timezone was removed.
This list was generated by checking all symlink in /usr/share/zoneinfo
in ubuntu 22.04 that disapeared in ubuntu 24.04
This solutions will work when moving a database from one server to
another, even without migration.
The all_timezone is not modified on purpose to avoid breaking existing
logic. This list may be used to define if a timezone is known by
postgress, define selection fiels, .... we don"t want to increase the
list in those case.
Some other logic using all_timezone may need to be updated but This
will be done in master.
Part-of: odoo/odoo#160842
Some of the non canononical timezones are not present in Ubuntu Noble,
it would be a better practice to only use canonical timezones in data
and tests.
Note that this is not a real fix for all cases since the database that
ran on Ubuntu Jammy and are moved to an ubuntu Noble server will have
the issue with timezones already in database.
One of the possible fix would be to manage that during upgrades, but
this isn't a verry flexible solution since upgrade are meant to manage
chyange of version, not change of server. If an old 17.0 versions needs
to be moved to a Noble server, this won't work.
Another solution would be to install package like tzdata-legacy that may
keep the old timezones but it is not the only think since TAI-10 are
also in this package. This solution is not ideal because non canonical
timezone will still be shown in the dropdown. We would need to filter
them.
A last solution would be to add the support for those old timezones by
monkeypatching the lib. This way, only new timezones would be shown but
non canonical one won't crash when used. This is not ideal either
because we may need to keep this for a while. But in combination with
the upgrade solution, it may work proprely.
Part-of: odoo/odoo#160842
In latest versions of werkzeug, the `werkzeug.urls` module has been
reduced to remove feature present in urllib.parse. This commit vendored
the old version to avoid breaking compatibility with older versions of
odoo on ubuntu Noble, without adapting the whole codebase. This
should/may be removed in stable by adaptaing eveything to urlib.
This version of the lib was minimalized to avoid redondunce with feature
still present in werkzeug.urls. Some unused features in odoo are still
vendored for ease but are not exposed on the werkzeug.urls for now.
Part-of: odoo/odoo#160842
When python expression is evaluated in odoo form an action or qweb, we
are checking the opcodes generated by the evaluation of this code. We do
such a verification, because the code from actions and templates can be
written by someone having not access to the server and we don't want to
let them perform actions out of the scope of their database.
In python 3.11, some opcodes from previous versions of Python have been
renamed, grouped or sepcified. There are also new ones that have been
introduce.
In this PR, we are whitelisting the new ones that are needed by odoo to
properly work in this version of Python.
Part-of: odoo/odoo#160842
This commit fixes an issue regarding unwanted interaction between the
regular autocomplete option click selection and the onChange handler
from the input field hook used in the PartnerAutoCompleteCharField
component. This became an issue starting from https://github.com/odoo/odoo/pull/154203
because of the disappearance of the t-on-mousedown.prevent handler
placed on the autocomplete options list which would prevent the onChange
event from being triggered when clicking on an option. The issue would
be that the onChange handler from the input field hook would take
precedence over the option click handler of the autocomplete which would
most of the time be ignored afterwards. The solution found for This
problem is to prevent the immediate propagation of the change event
in the autocomplete handler when an option has been clicked on so that
it will never be propagated to the input field hook handler in this case.
Steps to reproduce:
- Go to contacts and open a company contact
- Type in the name field a few characters (at least 3)
- Click on any autocomplete option
Most of the time, the option will not be applied and the name won't change
closesodoo/odoo#160561
X-original-commit: aa1e5eabb67800fbf4155c9cae12b90d97bb75db
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Signed-off-by: Julien Carion (juca) <juca@odoo.com>
Signed-off-by: Louis Baudoux (lba) <lba@odoo.com>
this commit fixes an issue introduced by https://github.com/odoo/odoo/pull/154203
which could keep the autocomplete options list opened even after a click
away when the user would "drag and drop" an option out of the list instead
of simply clicking on it. This is caused by the fact that the onInputBlur
code is directly terminated in this case (because of ignoreBlur) while
it is the only way for the autocomplete list to be closed in this case.
The solution is therefore to add an external listener on pointer down
which will always close the autocomplete list when clicking away from it.
Steps to reproduce:
- go to any autocomplete (crm salesperson for example)
- click on the input
- drag and drop a result outside of the list
- try to close the autocomplete list by clicking away
Before the fix, the autocomplete list would only close by scrolling
or clicking on the input once again.
X-original-commit: 57801ab7292e3d369615740a5f67aac9a4b9a521
Part-of: odoo/odoo#160561
At the moment, the partner being used to get the information
for the efaktur module is the partner set on the invoice.
This is wrong, since if the partner set on the invoice is a
child record of a company partner you cannot set most of these
fields.
To fix this issue, we will update in order to fetch the efaktur
related fields from the commercial partner instead. (vat, along
with all efaktur specific information used in the process)
closesodoo/odoo#160267
X-original-commit: 108a87407b7c46cc1682d93524398a968b025441
Signed-off-by: Brice Bartoletti (bib) <bib@odoo.com>
Signed-off-by: Nicolas Viseur (vin) <vin@odoo.com>
Strings within inline templates are not translatable, so we convert
these templates into standard templates so that they can be.
Task-3761551
closesodoo/odoo#160768
X-original-commit: 29497433bb7e19fd58287ba2af28fac4890b0b76
Related: odoo/enterprise#60185
Signed-off-by: Brice Bartoletti (bib) <bib@odoo.com>
Signed-off-by: Mohammed Basioni (basm) <basm@odoo.com>
At the moment, duplicating a website is not possible in the sense of
duplicating content, pages, etc. It is still available as an action from
the form view, and it could make sense to start up a new website with a
few common values (social media? etc?)... but many of website fields are
technical fields that should not be copied and many are dubious to copy
and not even visible in the form view. Really, duplicating a website at
the moment is misleading. This commit disables the possibility from the
form view.
In the future, we want to focus on the ability to export / import a full
website, but that's not for now.
opw-3782830
closesodoo/odoo#160587
X-original-commit: 43971a22c56b197306060ac3be7903d36d2c4be9
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
Related to previous commit: a9a9d2f12740b02c025f992d62c0d4f5feeaab1d
From initial PR: 158843
Improve Regexp to match double slugs /blog/blog-1/post-2 or /blog/1/2
Ignore param order: `?a=<param>&b=<param>` == `?b=<param>&a=<param>`
Remove trailing / from base url when querystring is present
Ignore '/en' url instead of '/en_US' since the default url_code has been
updated meanwhile (269aa59411).
Add a new test to check that urls are cleaned as expected
Remove crawl as admin, since the demo user already have all groups and
so we will check the same urls. The overlap is important for a really
low value.
X-original-commit: f17b210c6ad2364aebc6199153523ea5b767f67f
+ remove support of # part in clean url, not handled server side
+ support path in querystring (forum_origin)
closesodoo/odoo#160409
X-original-commit: 818e7af5650fae464090e7249f776193dc2b3814
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
Signed-off-by: Jérémy Kersten <jke@odoo.com>
On firefox and safari applying a position-sticky on an element inside
an other element with an overflow is causing a rendering issue (see
issue [1]).
This was occuring with the dropdown `.o_optional_columns_dropdown`
making it unusable as soon as the `overflow-x` triggered the horizontal
scroll in the table.
This commit works around this bug by moving the dropdown's menu out of
the actual table and attachs it to the ListRender's root element.
As this issue is specific to the Optional Fields dropdown, we
implemented it only in the ListRender (and not for all Dropdowns). Also
the issue is not present anymore in master since the Dropdown
refactoring (see PR [2]).
Note: a unique class identifying the ListRenderer has been introduced to
handle multiple List Views rendered at the same time (in the same view,
in modal...) as the the `t-portal` requires a global selector and
doesn't allow to use relative one (i.e. searching only the parents ; cf.
OWL feature request [3]).
task-3696473
opw-3682280
opw-3697814
X-original-commit: 01cd6d4d0cfa418f5a72a90742d10ee44af523a4
[1]: https://bugzilla.mozilla.org/show_bug.cgi?id=1887116
[2]: https://github.com/odoo/odoo/pull/137691
[3]: https://github.com/odoo/owl/issues/1428closesodoo/odoo#160566
X-original-commit: 9a9da10bf5d1c0f96f48c9d56807512e0ad1d6ef
Related: odoo/enterprise#60116
Signed-off-by: Pierre Paridans (app) <app@odoo.com>
Before this commit, when adding two columns to the address, the search
string would become formatted as such:
"47:abigail peterson|address Belgium address0: 12, |abigail..."
Searching for "abigail" would incorrectly match with "0: 12, |abigail",
leading to the addition of the partner with ID 0 and causing an error.
With this commit, we have refined the search to match only at the
beginning of a line. This prevents incorrect matches and the subsequent
errors, improving the reliability of the partner search.
opw-3847934
closesodoo/odoo#160475
Signed-off-by: Joseph Caburnay (jcb) <jcb@odoo.com>
When creating a new company from a move, if the tax ID is repeated, a warning is displayed.
The warning includes the company name, address and VAT, if those have been added. In this case,
address is shown in an extra line, which looks broken.
This commit removes additional partner information by updating the context,
displaying only the partner name.
It also slightly rewords the warning, from "are you sure to create a new one?" to
"are you sure you want to create a new one?".
To replicate the issue:
1. Create an invoice
2. Click on the empty field next to Customer, type a new name and click "Create and edit..."
3. Add a Tax ID that is already in use (e.g. US12345673)
4. Warning of duplicate Tax ID shows, displaying company name, address and VAT
task-3829641
closesodoo/odoo#160373
Signed-off-by: Quentin De Paoli <qdp@odoo.com>
Steps to reproduce:
- Open project share any project which has task.
- My account > project > open that project you can see task .
- Open any task and add new sub-task you can see once the sub-task is saved
'task view' button is displayed.
Issue:
- Sub-tasks notebook > add a line > 'view task' is displayed at the creation but
is then hidden once the task is saved.
Solution:
- Correct the attrs and change the condition in able to invisible 'view task'
once the sub-task is saved
task-3602610
closesodoo/odoo#160117
X-original-commit: cd6ed7f9fd2e0654cfb0672d7a9536dca21035cf
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
Configure the group of taxes 5% GST to be price_included and apply it on 295.
Both children taxes must have the exact same amount.
However, this is not the case. In this example, we get 7.02 for one tax (correct) but 7.20 for the other.
This is because both taxes are "include_base_amount".
opw-3758458
closesodoo/odoo#160541
X-original-commit: ce28edbaae5a9af0a8c6e1f2addf4285ec56e9e1
Signed-off-by: Claire Bretton (clbr) <clbr@odoo.com>
Signed-off-by: Laurent Smet (las) <las@odoo.com>
Steps:
- Install project app.
- Share a project which contains a task and
sub-task and project should have allow milestone
- Go to task form in project sharing.
- Go to milestone field of sub-task page.
Issue:
- Milestone field has can create and can open options
enable and because of that portal user able to create
edit or open milestone and which leads to tracebacks
Cause:
- There was no options added to prevent those attribute
from that field for project sharing views.
Fix:
- Added option to prevent those operation for project
sharing view.
Note: Add this options in blockby page in FW port.
task-3764782
closesodoo/odoo#160514
X-original-commit: 9b5da888af627e0d7efc8cdd49f41c023c79bb25
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
Steps to reproduce the bug:
- Create a storable product “P1” and "P2":
- Weight "P1": 1kg
- Weight "P2": 2kg
- Create a picking with the product “P1”
- Change the product of the move to “P2”
Problem:
The picking weight is not updated
opw-3754884
closesodoo/odoo#160215
X-original-commit: 849ece86a6cf49c0a9249ed910aa52add197f431
Signed-off-by: Djamel Touati (otd) <otd@odoo.com>
This reverts commit 8a5541d16caa793c7549d78c082f7879d3aba233.
It's a too big change for stable. It breaks the flow for poeple
that want to be in just in time but want to consider the future
deliveries to order all at once. Due to reverted commit they see
their reorder in advance.
The fixed use case, could be achieve with the security days or the
global lead days system parameter.
opw-crl
closesodoo/odoo#158302
X-original-commit: 51833e4735fb0b761d3cd2867dfd166813469e70
Signed-off-by: Arnold Moyaux (arm) <arm@odoo.com>
Before this commit:
Using the "Download logs" button from the IoT box form view will
fail every time due to an Internal Server Error on the IoT side.
```py
File "/home/pi/odoo/odoo/tools/misc.py", line 189, in file_path
FileNotFoundError: File not found: /var/log/odoo/odoo-server.log
```
This happened due to changes introduced in:
https://github.com/odoo/odoo/pull/99658
The changes enforced to double check that the file path was in an
odoo addons (for security reasons).
However, it is generally not the case, thus the error
After this commit:
The log file is downloaded as intended
opw-3827121
closesodoo/odoo#160576
X-original-commit: a7aa4c6e58d6448556c85c393f2910490a0519f5
Signed-off-by: Loan Sens (lse) <lse@odoo.com>
Currently, when you copy the viva wallet webhook to
configure it in your account, you have to select it manually.
With this commit we add a “CopyClipboardChar” widget
which does this automatically.
closesodoo/odoo#160516
Signed-off-by: Quentin Lejeune (qle) <qle@odoo.com>
Create an expired loyalty program with code
Open POS session
Add product
Apply code
Issue: code is applied even if expired
opw-3624670
closesodoo/odoo#145609
Signed-off-by: Joseph Caburnay (jcb) <jcb@odoo.com>
A partner found a bug, when this public method is called on a recordset
of more than one journal then the restriction will traceback, as the
`id` can only be called on one journal.
Simplest solution is to simply get `id` on the loop variable instead,
and let the code normally block the user with a UserError.
Credits to: https://github.com/juppe
Old PR: https://github.com/odoo/odoo/pull/150888closesodoo/odoo#160585
X-original-commit: a0ca663b78741a82fcc8f4bea97779aa97087754
Signed-off-by: Olivier Colson (oco) <oco@odoo.com>
Signed-off-by: Paolo Gatti (pgi) <pgi@odoo.com>
-Before this commit the url is like /blog/1/feed then it will become a
redirect 301 url to /blog/travel-1/feed which is not good for SEO.
Therefore we change to slug(blog) to ensure no redirect occur
closesodoo/odoo#160583
X-original-commit: 3192d2d531e918a705aee2341881a80294f848dd
Signed-off-by: Jérémy Kersten <jke@odoo.com>
*: test_mail_full, website_blog
Steps to reproduce the bug:
- Enable the comments on a blog.
- Add a comment.
-> Problem: The avatar of the comment is the default placeholder image.
The problem appears since [1]. This commit was created to bypass the
read access of an image if a correct `token` was provided in the dataset
of the `.o_portal_chatter` element. The problem is that since [1], if
the `.o_portal_chatter` element does not have a `token` (or a `hash` and
a `pid` since [2]) in its dataset, the avatar images are displayed as
the default placeholder image by default. The goal of this commit is to
correct this behavior; if there is no token provided, the previously
used `/web/image` route is used to show the avatar. Thanks to this
route, the avatar is displayed if the read access is fulfilled. If it is
not the case, the default placeholder image is displayed.
[1]: https://github.com/odoo/odoo/commit/d4eb996cd3caea3fbb822437057a6a5a8a722293
[2]: https://github.com/odoo/odoo/commit/7f69708bcce3b3c4b096d89cb0ec354998eac191
opw-3749422
closesodoo/odoo#160240
X-original-commit: https://github.com/odoo/odoo/commit/c65cffd6447afce65a45a38690c003e84afd63d9
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
Signed-off-by: Colin Louis (loco) <loco@odoo.com>
Use case:
- Create a Kit BoM with finished qty to 5 consuming 10 components
- Do a sale order for 3 units (3/5 of BoM)
- Update the sale order line to 4 units
Current behavior:
The delivery has a huge amount to deliver
Expected:
The delivery is for 8 units
It happens because the method `_compute_kit_quantities`
always expect a BoM for 1 units.
`bom_line_data['original_qty']` always contains the number of times the
BoM will be needed and not the quantity of finished products.
In order to have the number of component by unit of finished product we
have to introduce the BoM quantity in the formula
closesodoo/odoo#160149
Signed-off-by: Arnold Moyaux (arm) <arm@odoo.com>
Commit [1] resolved an issue related to the behavior of small font sizes, which
caused 'NaN' to appear in the font-size dropdown within the floating toolbar.
This occurred due to the removal of a variable definition, resulting in the
inability to compute the font size. This commit rectifies the problem by
reintroducing the variable in the SCSS file to ensure correct rendering.
[1]: 7931d1a14a
task-3801894
closesodoo/odoo#158811
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
This commit fixes an issue with the embedded views of "My dashboard"
view: the embedded could take as much height as they needed which could
result in excessive place taken by a single embedded view and this also
had issues with the virtual hook which is not adapted to embedded views
without scroll (this could result in completly blank space inside
embedded gantt views when they would take too much space). To solve
this issue, the commit adds a fixed maximum height to the embedded views
(80% of the window height) and also adds a minimum width to their content
so that it will be horizontally scrollable instead of being weirdly
squished. Also tweaks a bit the padding of the embedded view so that it
looks a bit better even with the added scroll bars.
task-3834795
closesodoo/odoo#160568
X-original-commit: 3df65df6a4ea027b14cc7d877de96db0987f688f
Related: odoo/enterprise#60117
Signed-off-by: Mathieu Duckerts-Antoine (dam) <dam@odoo.com>
Currently, a traceback appears when you attempt to generate a Facturae
document for a credit note created manually.
Steps to reproduce
------------------
* install `l10n_es_edi_facturae`
* create a credit note manually (not from an invoice)
* confirm and attempt to generate the Facturae EDI file
You should be me with a traceback:
`ValueError: not enough values to unpack (expected 1, got 0)`
Cause
-----
To generate the EDI document, the system needs the credit note to have a
link to the refunded invoice. However, in this case, there's no invoice
since the credit note was created manual.
opw-3786219
opw-3772085
closesodoo/odoo#160565
X-original-commit: 202387e518118171051e0db0fe857f44d442fb95
Signed-off-by: Olivier Colson (oco) <oco@odoo.com>
Signed-off-by: Séna Serge Nshimiyimana (sesn) <sesn@odoo.com>
Before this commit:
When disabling the submenu for events, it would show a 404
Page Not Found error.
After this commit:
the current behavior is that when the
submenu is disabled, it redirects to the /register page of the event.
task-3658380
closesodoo/odoo#160544
X-original-commit: ea140d5cfea992caad7207ff6499a46a8f575729
Signed-off-by: Warnon Aurélien (awa) <awa@odoo.com>
Signed-off-by: Aashish Thakur (aath) <aath@odoo.com>
Currently when a time off using an overtime is written to for any
reason, it will compare the duration of the overtime with the
number_of_hours_display. However, the duration check will always be
triggered since overtime duration is number_of_hours_display * -1
This causes problems if an overtime time off is modified for any reason
and the employee does not have enough total_overtime
closesodoo/odoo#160381
X-original-commit: 1c477259d08995d1b0bfe8ebd551452073e0c03b
Signed-off-by: Sofie Gvaladze (sgv) <sgv@odoo.com>
**Current behavior:**
Creating an ewallet loyalty program and removing the default
value for `trigger_product_ids` without adding another in its
place will result in any ewallet created using that program to
not have its balance deducted after being used in a sale order.
**Expected behavior:**
The default product should not be required here, nor should any
product, seeing as there is no `required` constraint on this
field nor any related ones.
**Steps to reproduce:**
1. Create an ewallet loyalty program and remove the Top-up
ewallet product
2. Create an ewallet, give it some balance, and use it in an
order
3. Check the balance of the wallet to see the erroneous behavior
**Cause of the issue:**
In the _program_check_compute_points() method of `sale.order` in
`sale_loyalty`, the conditional block:
`if not products_per_rule.get(rule):
continue`
will normally prevent rules belonging to ewallet program types
from going further in the method because they have the default
ewallet top-up product in their domain. When the continue is not
reached, they will reach this line:
`amount_paid = sum(max(0, line.price_total) for
line in order_lines if line.product_id in rule_products)`
which will end up offsetting the actual subtraction of a SOLs
`points_cost` from an ewallet `loyalty.card`'s balance.
**Fix:**
Add another check prior to the calculation of order points which
prevents ewallet coupons without any top-up products from
reaching the problematic code. If an ewallet program doesn't
have any `trigger_product_ids`, it shouldn't ever need to
perform such calculations.
opw-3756134
closesodoo/odoo#159957
X-original-commit: 695b3a687a3d160451339a675aab8986682389eb
Signed-off-by: Vincent Ethan <etvi@odoo.com>