Adds 2 new modules:
l10n_fr_hr_holidays
l10n_fr_hr_work_entry_holidays
This commit adds modules allowing to compute accurately
the number of days off taken by a french part-timer.
Both modules will automatically install when hr_holidays is installed and
at least one of the companies is located in France
In France, when taking a time off using a different calendar from the
company's calendar you have to count the days as if you were taking time
off in the company calendar.
For example let's say you have an employee working only monday through
wednesday, if that employee were to take a time off ending with
wednesday afternoon, the time off would count up until friday (if the
company calendar if monday->friday), so that a whole week is always 5
days regardless of the employee calendar.
This is also the case for 'holes' in the employee calendar, for example
a calendar where one would work monday, wednesday and friday only.
l10n_fr_work_entry_holidays:
By default time off only generate work entries for intersections between
time off and attendance period, so that when taking a time off for a
whole month you wouldn't get work entries on the weekend if you normally
don't work that day.
But since l10n_fr_hr_holidays computes the number of days it would
normally cost with french rules. We also have to make sure that the work
entries are generated appropriately. Essentially this modules adds the
logic required to fill the holes needed using the company calendar
instead of the employee one.
OTHER:
Fixes a redundant call to super function in hr.leave._get_number_of_days,
improving its performance a bit
task-2602897
closesodoo/odoo#82637
Related: odoo/enterprise#25805
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
Co-authored-by: Bertrand Dossogne <bedo@odoo.com>
This commit fixes a function call that was trying to call on `this`
while the function is imported and not assigned to the object.
closesodoo/odoo#111138
X-original-commit: b01be3ea8f77d42d5162648a078f09328491c102
Signed-off-by: Arnaud Joset <arj@odoo.com>
Signed-off-by: William Braeckman (wbr) <wbr@odoo.com>
Prior to this commit the limit set on accrual plans was in hours but
effectively used as a limit in days in the code.
Meaning that a level with a limit of 240 hours effectively applied a
limit of 240 days (or 1920 hours with 8 hour days).
TaskId-3145560
closesodoo/odoo#110835
X-original-commit: c9df4a33fcfe2dbcbac35923d0bceb3757516fb1
Signed-off-by: Kevin Baptiste <kba@odoo.com>
Signed-off-by: William Braeckman (wbr) <wbr@odoo.com>
Since we reuse sale order lines as much as possible, having reward lines
with no tax means that we need to explicitely reset the taxes on those
lines. However this was not done before.
TaskId-3138483
closesodoo/odoo#110785
X-original-commit: e945526f3a69d0adaa283c9a5aa4f5dde6027e4e
Signed-off-by: William Braeckman (wbr) <wbr@odoo.com>
Fix two issues:
- Payment rewards have to be applied after any other reward, the logic
to do so was already implemented but the condition got inverted
somehow.
- Allow discounts to be applied on orders if the total is zero in case
a payment reward is being used.
TaskId-3138483
X-original-commit: 7104527ffc5606c054e2b8d596b869cd4ccfce64
Part-of: odoo/odoo#110785
Multiple tests introduced in 16.0 created a product template and then a
default product for that template, however a default product is already
created by default in the product module when creating a template and it
somecases triggered an unicity constraint.
closesodoo/odoo#108523
X-original-commit: 3c9ff6e148cd0ee77442dd31079f0fec9c456b4c
Related: odoo/enterprise#35180
Signed-off-by: William Braeckman (wbr) <wbr@odoo.com>
It can happen that the payment transaction route is called without the
amount kwargs, the code would crash in that case as we tried to access
it either way.
We moved the code after setting the default amount in the kwargs to
avoid a crash.
closesodoo/odoo#105576
X-original-commit: c124fb3292439a6237f16eff406c0a7d375cab65
Signed-off-by: William Braeckman (wbr) <wbr@odoo.com>
This commit fixes a traceback when changing the attributes when the
current page has no products to display
TaskId-3045085
closesodoo/odoo#105515
X-original-commit: b8a1b1143eec4a85b9dc8b2c6fbb0112f6b813d7
Signed-off-by: William Braeckman (wbr) <wbr@odoo.com>
Prior to this commit the base_unit_price was computed using the price of
the template instead of the list price displayed on the eCommerce, so it
sometimes made no sense when compared to another currency.
It will now be converted properly and use the list_price instead of
template price to compute the base_unit_price.
Some other issues with the base_unit_price display in the form view have
also been fixed (mainly mobile stuff)
TaskId-3006015
closesodoo/odoo#102884
X-original-commit: 7701033a4d480881d9e1d2c3c842150ca8f55aec
Signed-off-by: William Braeckman (wbr) <wbr@odoo.com>
The bubble is showed whenever a filter is activated and/or a price range
is selected in the filters.
However due to float precision the comparison made to check whether
there is a price filter could be wrong when using "weird" numbers.
TaskId-3009210
closesodoo/odoo#102507
X-original-commit: 9359a5b5f0f72550d69671f975da23d4734b490f
Signed-off-by: William Braeckman (wbr) <wbr@odoo.com>
This commit makes it possible again to change pricelist while on mobile
view.
TaskId-3009210
X-original-commit: d3f6dc8d269f82860d8e93482e03462ef66fa37f
Part-of: odoo/odoo#102507
In the new aside to control filters and attributes (mobile mainly)
clicking on the radio input directly would not refresh the page
accordingly.
TaskId-3009210
X-original-commit: 989c827be5de366e37d92d6a35bcd0e0995db78d
Part-of: odoo/odoo#102507
Fixes an alignment issue between the grid and list icon on the /shop
page.
TaskId-3009210
X-original-commit: 2ea3a5609d5d955ad75baa4bf5c31f8aefb55554
Part-of: odoo/odoo#102507
There was a missing class on the pricelist selector for product pages
leading to the pricelist selector simply not being displayed.
TaskId-3007737
closesodoo/odoo#102425
X-original-commit: 522cb8116d959dbc17717e149b76490b0ec2fd63
Signed-off-by: William Braeckman (wbr) <wbr@odoo.com>
- Make content helper more generic for programs
- Add search fields for loyalty.card
- Fix creation emails for gift cards in pos not being sent properly
- Fix validity date check on loyalty rules being inverted.
TaskId-3002190
closesodoo/odoo#102160
X-original-commit: f893fda1a40127b7510e861c96f4d4cf9d10f79d
Signed-off-by: William Braeckman (wbr) <wbr@odoo.com>
The event listeners were added to the upload object instead of the xhr
object making them being called before they were supposed to.
closesodoo/odoo#102061
X-original-commit: 804467d7b0a583ab36a47212d482b41d29ca2203
Related: odoo/enterprise#32247
Signed-off-by: William Braeckman (wbr) <wbr@odoo.com>
auth="none" pages don't have self.env.user filled in, this throws a
traceback if you try to get the current cart.
This causes an issue when we try to fetch the cart quantity on the login
page.
closesodoo/odoo#102010
X-original-commit: d1c053158f1d306df1f5f1e9d4c81ee642a73f48
Signed-off-by: William Braeckman (wbr) <wbr@odoo.com>
The way we request images for the product's extra images feature did not
work properly with the patch made by `web_unsplash` since we did not
call the super function.
It is now called properly making it work with unsplash as expected.
TaskId-3003948
closesodoo/odoo#101928
X-original-commit: da23f3ad52179c145cbf9a19db20ed6a46193f0d
Signed-off-by: William Braeckman (wbr) <wbr@odoo.com>
By pressing the date in the calendar's date picker, a function computes
a new scale to be used depending on the previous focused date and scale,
for example clicking on the focused date in month scale will switch to
week and so on.
However it bypasses the scales that are available on the calendar's
definition.
It is now prevented.
X-original-commit: a9059b0bee02f635d563b45ee94f04bab5532fe4
Part-of: odoo/odoo#101603
Migrates the attendee_calendar view aswell as the modules patching it.
The code has been simplified as much as possible to reduce complexity
while still retaining a similar flow.
TaskId-2999194
closesodoo/odoo#101492
X-original-commit: ee14c3ec4830454d80a63793a91f6d1c838363f1
Related: odoo/enterprise#31963
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
Signed-off-by: William Braeckman (wbr) <wbr@odoo.com>
Make it easier to override component's sub templates by making them
overridable on the component.
TaskId-2999194
X-original-commit: 4f4e91ebb14d563dd3ec6d305b9984db25e06cbf
Part-of: odoo/odoo#101492
Make it possible to override both before and after execute actions on
all view controllers using `useViewButtons`.
This avoids having to change a value in the env to override the function
being called when clicking on a button.
closesodoo/odoo#101310
X-original-commit: 9f6c2b8e969635f35786d58ee89ca767ff57144d
Related: odoo/enterprise#31860
Signed-off-by: William Braeckman (wbr) <wbr@odoo.com>
Some views still use them.
closesodoo/odoo#101081
X-original-commit: adb5508afd2749dbbfeb85803d707df43358b011
Signed-off-by: William Braeckman (wbr) <wbr@odoo.com>
A crash would occur when creating new records as the code did not take
into account the possibility of having empty "base" data.
closesodoo/odoo#100973
X-original-commit: 497db878fa3f9303ce33035d5737352289c4f97d
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Signed-off-by: William Braeckman (wbr) <wbr@odoo.com>
Prefer using hooks instead.
Makes use of the new open_chat_hook from mail when possible.
closesodoo/odoo#100764
X-original-commit: d058734cf55f2c3f46f2f23e0bbbfc54f2f0da15
Related: odoo/enterprise#31605
Signed-off-by: William Braeckman (wbr) <wbr@odoo.com>
Those fields may be used in the new views.
Some of the legacy fields had to be kept because they are used
in some legacy views, more notably the gantt and activity views as well
as in the mrp work order tablet mode.
X-original-commit: 1c871ad9ea4a77468911ff6a5546688a26398a8b
Part-of: odoo/odoo#100764
In addition to the `displayBadge` option which is already present this
commit adds a new option `displayText` which dictates whether we want
any text at all on our tags list.
This is useful for kanban view where we only want to display the avatar.
X-original-commit: 7930865f0514092960acb0f76532e794f35882a3
Part-of: odoo/odoo#100764
The `TagsList` component may be provided with a list of tags and a
number of tags that should be visible.
In the case where there are more tags then there are tags that should be
visible a ball with the number of remaining records is added with a
popover containing the names of the records.
However the popover contained plain text resulting in
`record1<br/>record2` instead of marked up html.
It will now use a tooltip template and more info.
X-original-commit: baf9711407a01ec196bf7de191372056aa4cab6e
Part-of: odoo/odoo#100764
It seems that the css rule was copied from the legacy version of the
kanban view however the dom related to those rules changed with the new
fields and thus the rule was never applied.
X-original-commit: dbb10524b2d97a0004e4e998e4f2252c1e46982a
Part-of: odoo/odoo#100764
`additionalClasses` can now be set on field components to add certain
classes the wrapper should have.
This is useful in case css rules have been defined on a field widget
that we want to inherit from.
X-original-commit: e882c892ad2bf476a6d25cbd90e72974c5453a38
Part-of: odoo/odoo#100764
Due to the new way of handling qweb assets, one file was missing from
the editor bundle, throwing a traceback when clicking on a product in
the product grid.
closesodoo/odoo#100477
Signed-off-by: William Braeckman (wbr) <wbr@odoo.com>
The colspan attribute was missing for the form view making it look like
there was a label for the org chart widget, which should not be there.
closesodoo/odoo#100469
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
Due to how drag and drop works in grouped kanban views now, no event is
triggered when dragging and dropping, this fix listens to mousedown in
order to define whether the element is going to be dragged.
Part-of: odoo/odoo#98837
The progress bar parsing code was inside a big block of code making it
impossible to override to add custom behaviour.
It is not in a separated function.
Part-of: odoo/odoo#98837
Use the `prefix` slot to give a prefix to KanbanAnimatedNumber, making
it possible to add text while not needing to extend the class/template.
Part-of: odoo/odoo#98837
The generate coupon button would appear after the export button prior
to this commit.
closesodoo/odoo#100463
Signed-off-by: William Braeckman (wbr) <wbr@odoo.com>
The widget `many2one_tags` tags was used in the loyalty program form
view, however it does not exist.
TaskId-2982239
closesodoo/odoo#100170
Signed-off-by: William Braeckman (wbr) <wbr@odoo.com>
Prior to this commit the default values of a reward/rule would be static
and not depend on the program type.
It will now use the default value if the program_type is given in the
context.
TaskId-2982239
Part-of: odoo/odoo#100170
Prior to this commit it was not possible to choose the customer when the
wizard was started form an ewallet's program ewallet list view.
TaskId-2982239
Part-of: odoo/odoo#100170
This views has multiple custom features such as file upload, attachment
viewer and download.
A lot of files have been rendered obsolete and have been deleted,
notably `file_upload_mixin` which has been replaced by the
file_upload service and hooks.
closesodoo/odoo#99769
Related: odoo/enterprise#31145
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
Bootstrap 5 changed the display of `dropdown-menu` to be absolute,
meaning w-100 would take the whole screen.
We set it as relative to take the width of the input.
closesodoo/odoo#100005
Signed-off-by: William Braeckman (wbr) <wbr@odoo.com>
When selecting on site picking and/or onsite payment the public user was
presented with an access error while it shouldn't.
closesodoo/odoo#100001
Signed-off-by: William Braeckman (wbr) <wbr@odoo.com>
Since a field is put inside of the button, the space used by the button
is a bit overblown compared to the text inside, by adding oe_inline we
make it use less space.
closesodoo/odoo#99830
Signed-off-by: William Braeckman (wbr) <wbr@odoo.com>
This commit attempts to fix an undeterministic error, calling an
ensure_one method on an empty recordset.
closesodoo/odoo#99808
X-original-commit: 8e079bc0509f13794c61efeb1080c59baad65590
Signed-off-by: William Braeckman (wbr) <wbr@odoo.com>
Since recently fields are not present in the views if the user does not
match the groups attribute on that field, this means that the field is
not loaded an may not be used in domains in `attrs` for example.
Most fields were properly checked but some remained broken.
closesodoo/odoo#99751
Signed-off-by: William Braeckman (wbr) <wbr@odoo.com>
This commit fixes an issue with the org chart since it was converted to
owl, the data would not be reloaded when changing from record to record.
Instead it would always show the data from the first record it ever
loaded.
closesodoo/odoo#99618
Signed-off-by: William Braeckman (wbr) <wbr@odoo.com>
Introduced by #85428closesodoo/odoo#99672
X-original-commit: e6cef5ab9ec189f1f0b86e21a1400859f021ba06
Signed-off-by: William Braeckman (wbr) <wbr@odoo.com>
Prior to this commit there was no way of removing an automatically
claimed reward from a website order, since it would always get claimed
right after the update to the cart.
TaskId-2951413
closesodoo/odoo#99023
Related: odoo/enterprise#30794
Related: odoo/upgrade#3820
Signed-off-by: William Braeckman (wbr) <wbr@odoo.com>
Adds a setting to enable mondialrelay from the settings just like the
other shipping methods and a way to access the configuration of such
shipping methods more easily.
TaskId-2845799
closesodoo/odoo#98156
Signed-off-by: William Braeckman (wbr) <wbr@odoo.com>
This commit adapts the `mondialrelay_relay` widget to use wowl instead
of legacy.
closesodoo/odoo#99380
Signed-off-by: William Braeckman (wbr) <wbr@odoo.com>
Prior to this commit accrual levels based on worked time did not
properly compute the number of days when the period prorata was taken
into account.
TaskId-2924364
closesodoo/odoo#99183
X-original-commit: d9000d3d883ab6fa8325692f1ac5249d6822046a
Signed-off-by: William Braeckman (wbr) <wbr@odoo.com>
This commit adds a new option for picture zoom on product pages.
The designer may now select a attachment viewer like carousel upon
clicking on images in the view.
The hover zoom has also been fixed as it was broken due to the bootstrap
5 changes.
The designer may choose between zoom on hover, on click, both or no
zoom.
TaskId-2922062
closesodoo/odoo#98305
Related: odoo/upgrade#3785
Signed-off-by: William Braeckman (wbr) <wbr@odoo.com>
The cart popover was broken since the bootstrap changes as data that was
previously set on the jquery element upon creating the popover was not
set anymore.
closesodoo/odoo#98991
Signed-off-by: William Braeckman (wbr) <wbr@odoo.com>
During the forward port of https://github.com/odoo/odoo/pull/96855 the
file gift_card_controller.py was reintroduced by mistake.
closesodoo/odoo#98740
X-original-commit: 0d80cf7c6999f968e9aee1d9622fdf21f3dd5806
Signed-off-by: William Braeckman (wbr) <wbr@odoo.com>
Since odoo/odoo#97347 we support default values for `t-field`
directives.
However this causes some issues in the case where we have: no value, no
default value AND force_display is true.
This is because the indentation for one of the lines in the compiled
code was not correct. (full explanation here: https://github.com/odoo/odoo/pull/97347#issuecomment-1222430659)
closesodoo/odoo#98714
X-original-commit: 2b605d3ccd55dc4f5b1ad44439411542e5b04b31
Signed-off-by: Rémy Voet <ryv@odoo.com>
Signed-off-by: William Braeckman (wbr) <wbr@odoo.com>
This commit attempts to fix an undeterministic error during one of
`website_sale_wishlist` tests.
Due to a race condition it may happen that the button to add to the
wishlist would be re enabled while it should be disabled (if the product
is already in the wishlist) causing the tour to fail.
closesodoo/odoo#98206
X-original-commit: e10f50e6eb3b825113058d29ae79c7aeafd94a55
Signed-off-by: William Braeckman (wbr) <wbr@odoo.com>
By adding features to the web editor for the product page we only
increased the amount of possible categories we might have for our page.
This commit unifies all of those categories into a single one that is
enabled for the editor on the whole page.
TaskId-2925690
closesodoo/odoo#97917
Signed-off-by: William Braeckman (wbr) <wbr@odoo.com>
odoo/odoo#87678 redesigned part of the search_panel however one of the
old bootstrap calsses was still used which resulted in sub categories
rendering poorly.
This commit changes that class to the new name.
closesodoo/odoo#97585
Signed-off-by: William Braeckman (wbr) <wbr@odoo.com>
A test introduced with https://github.com/odoo/odoo/pull/96432
revealed an issue with the level limits for the accrual plans.
The only applied limit was the one of the current level at the end of
the run, however if for whatever reason multiple levels had to be
processed at once (if the database was shut down for a long period of
time for example), the individual levels would not apply any limit logic
to their behaviour which meant that you could have a different behaviour
between running the cron each day and running it after a long period.
This commit aims to fix that issue by applying the said limit.
OPW-2868297
closesodoo/odoo#97540
X-original-commit: 09fa1020f42d641fc0011d482cdd08aea4f4085a
Signed-off-by: William Braeckman (wbr) <wbr@odoo.com>
Signed-off-by: Kevin Baptiste <kba@odoo.com>
Prior to this commit a non existing product type was used in one of the
test.
This commit changes it to an existing one.
closesodoo/odoo#97380
Signed-off-by: William Braeckman (wbr) <wbr@odoo.com>
The invoice status was badly computed since the loyalty refactor due to
the use of the wrong value when comparing to the previous state.
(to_invoice instead of to invoice)
TaskId-2936708
closesodoo/odoo#97002
X-original-commit: e88dcd26eebf0e527929a0c48e259895822cf23e
Signed-off-by: William Braeckman (wbr) <wbr@odoo.com>
Due to the new form and list views some of the customisation of loyalty
were not working properly anymore.
This commit adapts the js customisation inside of loyalty to wowl 2.
TaskId-2929488
closesodoo/odoo#96731
Signed-off-by: William Braeckman (wbr) <wbr@odoo.com>
This commit increases the timeout for some steps in the
`google_analytics_view_item` tour.
The step would time out semi-regularly due to a timeout.
TaskId-2925407
closesodoo/odoo#96454
X-original-commit: 8e6eae7b2a3e6da195e4283a008a14d8296539b4
Signed-off-by: William Braeckman (wbr) <wbr@odoo.com>
With this commit we replace the current way to show alternative
products with a new option on the dynamic snippets.
Instead of having alternative products show up on all products if the
option is enabled, it will now be on a per product (template that is) basis
using the dynamic product snippet.
TaskId-2695187
closesodoo/odoo#85189
Related: odoo/upgrade#3277
Signed-off-by: William Braeckman (wbr) <wbr@odoo.com>
Since "website in backend" the dynamic product snippet on product pages
did not work at properly due to not being able to do a jquery find
inside of an iframe, making context dependent product filters such as
"alternative products" (which will become a dynamic snippet filter) not
show up as an option.
TaskId-2695187
Part-of: odoo/odoo#85189
This commit fixes the product image grid not being updated after
changing a variant.
TaskId-2922057
closesodoo/odoo#96102
Signed-off-by: William Braeckman (wbr) <wbr@odoo.com>
This commit improves the expendability of the attachment_viewer model
and component by making it less dependent on attachment_list.
This is required by the refactoring in wowl of the documents app(s).
TaskId-2898342
closesodoo/odoo#94930
Related: odoo/enterprise#28976
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
Due to the recent bootstrap changes one attribute on the carousel
indicators was badly migrated which caused bootstrap's carousel code to
throw an error.
This commit fixes that issue.
TaskId-2833507
closesodoo/odoo#92447
Signed-off-by: William Braeckman (wbr) <wbr@odoo.com>
This commit adds a new display type for a product page, namely the grid
mode.
The web designer will now be able to choose between carousel (previous
mode) and grid.
The web designer may also choose how much space the images take on the
page between 0%, 50% 66% and 100%.
TaskId-2833507
Part-of: odoo/odoo#92447
This commit fixes a bad call to relativedelta missing a `day` key for an
argument.
closesodoo/odoo#95705
X-original-commit: b59e81b6c34e7a4e2f35cf719c811883b289ddb5
Signed-off-by: William Braeckman (wbr) <wbr@odoo.com>
This commit fixes the css rule for the class `o_kanban_attachment` that
was broken for owl kanban views since f795af0160ed7977d07041d1bb1923598df48320.
closesodoo/odoo#95444
Signed-off-by: Samuel Degueldre <sad@odoo.com>
15.3 introduced a new setting in the website to force users to sign
in/up whenever they try to buy something from the store.
This commit adds the mechanism to redirect the "process checkout" page
to the login page whenever the option is enabled and the user is not
logged in.
TaskId-2844980
closesodoo/odoo#90901
Signed-off-by: William Braeckman (wbr) <wbr@odoo.com>
Slightly improve `_compute_website_order_line` by reducing the
complexity when `website_sale_delivery` or `website_sale_loyalty` is
installed.
TaskId-2786691
closesodoo/odoo#90025
Signed-off-by: William Braeckman (wbr) <wbr@odoo.com>
Backport of odoo/odoo#81474
Before odoo/odoo#86889 a regular user with employees in multiple
companies was not able to change his own language due to a chain of
event calling onchange on all the employee_ids and employee_ids on
res.users being read as sudo.
The fix does work but was wrong because it gave access to the user's
public employee regardless of the active company_id
A domain was added to employee_ids to make force the security rules even
in sudo.
closesodoo/odoo#94618
X-original-commit: 90cec4073e065c142043fcea1d68a10c7cb72e73
Signed-off-by: Kevin Baptiste <kba@odoo.com>
Signed-off-by: William Braeckman (wbr) <wbr@odoo.com>
Prior to this commit if work entries/payroll was installed you could not
cancel a time off in the future if the work entries were generated for
that period, however you should still be able to cancel a time off as
long as the work entries have not been validated yet.
TaskId-2791386
closesodoo/odoo#94165
X-original-commit: 975ac8d2a1809bf7725d577b0fa9143a5b255e0d
Related: odoo/enterprise#28673
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
This commit allows project users to create and modify their own personal
stages.
A lot of overrides have been done on the kanban view to handle our
multiple cases.
Project user will now only see the options to create columns/edit stages
when grouping by personal stage.
This is hardcoded and does not follow possible custom access rules
however.
Any stage created while grouping by personal stage will directly be
assigned to the user and will be seen in the 'My Tasks' menu.
A special method has been added to delete a personal stage.
Upon deletion any task assigned to this personal stage will move to a
lower sequence stage if possible otherwise the next in line.
TaskId-2858445
closesodoo/odoo#92103
X-original-commit: 7b3acbc0b0c21ab106b1b34d9f5c8bc1ceb2fe58
Signed-off-by: William Braeckman (wbr) <wbr@odoo.com>
Signed-off-by: Laurent Stukkens (ltu) <ltu@odoo.com>
Upon deleting a column in the project task view a popup will be
displayed warning the user that the stage will not be deleted but
instead archived.
Prior to this commit that popup would be displayed regardless of the
group by option that is selected. However this could lead to issues when
opening the archive wizard with an id from another record.
closesodoo/odoo#91872
X-original-commit: 24d307716cbd9e05a32dde108838e16d04309116
Signed-off-by: Laurent Stukkens (ltu) <ltu@odoo.com>
Signed-off-by: William Braeckman (wbr) <wbr@odoo.com>
Prior to this commit an user could try to add a product to cart that does not
exist anymore because it was deleted while the user /shop page wasn't refreshed.
This commit avoids this (rare) use case to happen.
TaskId-2835736
closesodoo/odoo#91752
X-original-commit: 7aeec2921d7159f0c7fa4c8caf2d00f802c69264
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
Signed-off-by: William Braeckman (wbr) <wbr@odoo.com>
Prior to this commit cancelled time off were included in the leave
report calendar model and were shown as regular time offs.
They will now be hidden.
closesodoo/odoo#91675
X-original-commit: c8d17c760e27736d0cb809b59e9945f808b1138e
Signed-off-by: Kevin Baptiste <kba@odoo.com>
The file extension detection previously used to determine whether a
filename required an extension was not very smart and in fact only
checked for a dot in the filename.
`mimetypes.guess_type` is now used on the filename to better determine
whether the filename still needs a file extension or not.
This commit is a follow-up to: https://github.com/odoo/odoo/pull/90614
Which aimed to fix the same issue.
TaskId-2826061
closesodoo/odoo#91254
X-original-commit: bf904a7f98ba5bcc0a8909cca3241e2965c4464c
Signed-off-by: Xavier Morel (xmo) <xmo@odoo.com>
Signed-off-by: William Braeckman (wbr) <wbr@odoo.com>
Prior to this commit the discountable amount on specific products was
not computed correctly when using fixed price discounts as it did not
take the taxes into account.
They will now be taken into account and result in the correct discount.
TaskId-2834863
closesodoo/odoo#91202
X-original-commit: 669f4cca94af0c022318f6cb508c1c197aae0846
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
Signed-off-by: William Braeckman (wbr) <wbr@odoo.com>
This commit aims to improve the performance of
`_attendance_intervals_batch`.
The complexity in space has been reduced by a lot.
Prior to this commit an intervals object was generated for each resource
request.
However every resource of the same timezone will share the same ending result.
The number of calls to `localize` and `astimezone` has also been reduced
as they get quite expensive with such a high volume.
Overall we can see a 10x improvement during `test_performance_attendance_intervals_batch`
closesodoo/odoo#90933
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
This commit aims to fix an issue with work entries generation when the
requested period is completely outside of the contracts period.
In this case no work entries should be generated.
Part-of: odoo/odoo#90933
Prep work to allow work entries to be created from multiple sources when
using contracts.
The end goal is to be able to generate work entries from attendance as
well as the planning app.
After that the plan is to make sure the implementation works well with
payroll for hourly wages.
This commit contains the necessary changes for the next work_entry
modules to work.
TaskId-2466871
While investigating an error that occured on production it was noticed
that work entry batching did not happen correctly on the first batch for
contracts that started on the same date, this is due to the microseconds
being different in the `date_generated_from` and `date_generated_to`
fields.
TaskId-2466871
The /terms page may be disabled/enabled in the company settings, however
the page would always be present in the sitemap whether it is enabled or
not.
This commit adds a method that checks for this settings before adding it
to the sitemap.
TaskId-2820292
closesodoo/odoo#90930
X-original-commit: 729b99a789b52c09be0272cefa3bb0eaccd6803c
Signed-off-by: Romain Derie (rde) <rde@odoo.com>