1. Show only date not datetime on update portal. When update the
scheduled date, set it to be the last minute of that date.
2. Send updated date immediately when user pick a date.
3. If an activity for update the date already exist, update the
note instead of creating a new one.
Task #2265912
PR 52809
The string formating was called inside _() which does not work.
closesodoo/odoo#53781
X-original-commit: aef420570ca153da34796a80d3e22193f17c2cf0
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
Signed-off-by: Rémi Rahir (rar) <rar@odoo.com>
This commit sets the fields date_from and date_to as optional hidden on
the resource.calendar.attendace.
closesodoo/odoo#51527
Taskid: 2241686
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
1. Generic timesheets improvements
- Portal /my/timesheets
- Add a group bys task, date, employee
- Add search in project, name, employee, task
* The task column should not be visible if none of the timesheets have the Task field set
- If a group by task, date, employee or project is applied, the corresponding column should not be visible
2. Timesheets from sub-tasks on parent tasks
- Portal /my/tasks
- Display the 'Total Hours' spent on a task at the end of the list of timesheets
- Below the list of timesheets for the task, display another table detailing the respective timesheets (and total hours) of each sub-task linked to this task (= 1 table/list per sub-task)
* Title should be: 'Timesheets for sub-task: xyz'
* only visible if there are sub-tasks linked to this task
* only visible if total hours > 0
3. Timesheets on Invoices
- Portal /my/invoices
- Add Project + task fields
* Task field only visible if set on one of the timesheet entries
* Project field only visible if there are at least 2 different projects in these timesheet entries
4. Correct visibility for the portal users
- Portal users is allowed to see timesheets if the users are added in allowed portal users list in the project
- When a portal user is added as the message follower of the project, the user is added to allowed portal users as well
- When a portal user is removed from allowed portal users, the user is also removed from message followers
closesodoo/odoo#47248
Taskid: 2201908
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
Steps to reproduce:
- Create a database with german as main language
- Load the en_US language (keep user preference as german)
- Activate debug mode > find the email template named "Purchase Order: Send PO"
- Edit the mail template > click the "DE" button to show thet translation dialog
Previous behavior:
the en_US translation is empty, it is confusing because the user assumes
that english translation have not been loaded.
that translation is actually fine when you switch to english
Current behavior:
en_US translations' empty value are assumed to be the same as the source
opw-2276673
closesodoo/odoo#53787
X-original-commit: 52975811071af3dbfe31d93b19f8a0f3a1b6b694
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
Signed-off-by: mightyjol <jhk-odoo@users.noreply.github.com>
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
Install payment
Archive the cron
Upgrade system
--> Issue the cron is now active
Note: on testing server we archive cron (we make a an SQL query before upgrade the system)
@qdp-odoo
@nim-odoo
@sla-subteno-it
closesodoo/odoo#53658
X-original-commit: a47f0249d35da805436e33d06800988ca4c3b6a9
Signed-off-by: Quentin De Paoli (qdp) <qdp@openerp.com>
Refactoring this method to make it extensible. After this refactoring, we
can now define methods that can apply defaults to the company's pos.config
records during the installation of a localisation.
To do so, we hook methods to the setup_defaults method. The hooked methods
take pos.config records (self) and a company. The pos.config records belong
to the given company.
When adding floor_ids in pos.config, we show only the restaurant.floor
records that are not linked to any pos.config. We do this so that one
pos.config doesn't steal floors from other pos.config.
Floors associated to the pos.config are deleted when is_table_management
is set to False from the backend interface because the backend issues a delete
request to the server. So instead of setting the [(5,0,0)] command during
onchange, we set it in write method to avoid unintended deletion of the floors.
1. Install the demo data
2. Activate GeoIP and set your IP in Belgium [1]
3. As a non-connected user, go to '/partners'
=> No result found: expected since we want to filter the partners
available in the user's country
4. Click on 'All Countries'
=> All partners are displayed
5. Click on 'Platinum' or search for 'azure'
=> No result found
The last step is not expected, it should filter partners from the 'All
Countries' list.
It occurs because the 'All Countries' filter is not kept when chosing a
Level or searching.
We use `keep_query` for the level filtering and set the `country_all`
`input` field for searching.
[1] IP can be set manually in
https://github.com/odoo/odoo/blob/bbb45e3412a5653d78aacc92903e95d1353ed60a/addons/http_routing/geoipresolver.py#L42
opw-2277343
closesodoo/odoo#53761
X-original-commit: ece98773a18cf0f83a3d2e44397e7e08a3a538a9
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
Well odoo/odoo#40872 is definitely the gift that keeps on giving,
after causing grief with the logging configuration change turns out
inlining the method was *also* a terrible idea because it's overridden
in `mail` in order to note merges on the destination partner, which I
apparently completely missed back then.
Task 2285876
closesodoo/odoo#53756
X-original-commit: 41209dababfaebca7bfd3be6ee5a2f41e9bb4ff5
Signed-off-by: Xavier Morel (xmo) <xmo@odoo.com>
When a theme was chosen, the footer disappeared if any footer template
different from the default one was previously selected. The related
code is actually meant to revert back to the default footer template
when switching theme (allowing the theme to set a different default one
if it chooses to), but it forgot to enable that default one... and was
only disabling all non-default footer templates.
closesodoo/odoo#53762
X-original-commit: 9f5c630768cbcf56aec97ba4296f90f3d7fbfa5b
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
Due to the row_number in the sale.report view, all queries using this
report were slowed down drastically as soon as there were a large amount
of sale.order.lines.
By using existing columns instead of computing new values at each query,
the queries execute in an acceptable time (even if the CASE statements
introduced by e7d8e26ae7 are still slowing down things a bit).
When there is no sale.order.line, min(l.id) would be NULL, so the
sale.order will be used instead. It is negated to avoid id conflicts.
However, note that addons/pos_sale/report/sale_report.py is not doing
anything to avoid conflicts between the ids of sale.order.line and
pos.order.line when doing its union.
closesodoo/odoo#53750
X-original-commit: 03bd6f5243e189cd05b3fc7ad774cc07ea733e14
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
Signed-off-by: Paul Morelle <madprog@users.noreply.github.com>
Before this commit, some code was resetting some default website config
on theme change.
Problem 1:
This was not done when *removing* a theme. Thus when you wanted to go
back to a default website theme, you were not properly reset to the
default theme config. This could actually crash: some themes define
more fonts than others; so if you selected font 13 in one theme then
removed the theme, the default one would crash if not properly reset
as font 13 would not exist.
Problem 2:
It was done for every theme dependency, making theme change slower for
no reason.
Problem 3 (theorically, not tested):
The current code worked by chance as it called the website
'make_scss_customization' method without giving any website to it. It
actually worked by fallback on the right website in normal user cases
(user in the context of installing a theme on a specific website) but
may not be working when trying to install a theme on a different website
calling those functions from custom code.
Now, a dedicated method is there for config reset and is called at the
correct place with the right website in the context.
closesodoo/odoo#53743
X-original-commit: 7307d696449ea2b7a231b0b9087e64f6bbf65d26
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
The timapi.wasm file was not loaded correctly in debug != assets
because the library tried to fetch /web/content/XXX-XXX/timapi.wasm,
which returned the full JS bundle.
We set the full path of the file in the library:
'/pos_six/static/lib/six_tim/timapi.wasm'
closesodoo/odoo#53739
X-original-commit: b21859a1550df08ac96719c16eb380cc71d81cee
Signed-off-by: pimodoo <pimodoo@users.noreply.github.com>
Signed-off-by: Antoine Prieëls <aprieels@users.noreply.github.com>
Electronic payment lines were not displayed correctly. We resize the
text and button and hide the delete button when a payment is done.
X-original-commit: a9c87c141459e947ccef068226f301e390536bfe
- Go to Inventory > Reporting > Inventory Report
- Filter the location with a negative operator, e.g. 'Location doesn't
contain "shelf"'
Locations containing 'shelf' are displayed anyway.
We are adding this condition: `'|', ('barcode', operator, name)`. Since
barcode is empty (or at least doesn't contain 'shelf'), the condition is
met and all records are retrieved.
In case of a negative operator, both `barcode` and `complete_name`
must not match.
opw-2281191
closesodoo/odoo#53717
X-original-commit: 8fedbcda6a89d99d42df3694390eac4cf7a987ed
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
Change of several labels to increase consistency.
Adapt the size of certain images so that they are rendered without
modifying their quality.
Display the employee's profile image in the grid view to improve
the visual.
Add the kanban view to the All Timesheets menu.
Modify the Time Off configurations so that the projects displayed are
those of a company and that the tasks are adapted according to
the chosen project and vice versa.
Make the hr_timesheet and timesheet_grid module icon the same
for better consistency.
closesodoo/odoo#51808
Taskid: 2239802
Related: odoo/enterprise#10745
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
In 13.0, the current company selected in the company switcher can be
different than self.env.user.company_id value.
Wizard "Configure Document Layout" (model base.document.layout) is using
the company in company switcher:
```
company_id = fields.Many2one(
'res.company', default=lambda self: self.env.company, required=True)
```
But the "Preview Document" button is using user company_id, so if you
change the layout then preview, you may see the report layout of another
company which make it seemed broken.
note: also improve code of point of sale added in 59f5e57 (in case of
point of sale, company maybe should be point of sale company but you can
print several ones and the company used on point of sales is the one of
company switcher).
opw-2269849
closes#53712closesodoo/odoo#53730
X-original-commit: bbb45e3412a5653d78aacc92903e95d1353ed60a
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
- emoji button was shifting right on click
- log/send button color was not correct
task-2274349
closesodoo/odoo#53724
X-original-commit: 41a7bb6e9b0c674ca3db5638d17e85f1b3b33f79
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
When company layout is changed, we do not update the company styles for
report: thus we still have the old style for other layout that will not
change anything (besides font).
opw-2269849
closes#53706closesodoo/odoo#53720
X-original-commit: 8897701b1754b40d8a83c5681907c38fb205657f
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
FIX: use the correct API of mail.channel.py to unfollow a channel
i.e.: `execute_command_leave`
FIX: unpinning a channel has immediate effect on the interface
chatWindows are closed, and the inbox is displayed
FIX: unpinning a channel destroys corresponding chatWindows across tabs
It also unpins the channel in other tabs
FIX: python sends is_pinned as part of the channel_info
both at init messaging and in the main bus notification
That way, we can keep track of the synchronization of the pin status
between JS and python
task-2275000
task-2267941
closesodoo/odoo#53703
X-original-commit: d4fcc64acb2fc0c6fd9df505380f665abd8b39c4
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
Unable to get stock inventoy report for a product if inventory valuation is
manual. Because account_id was required on model. Changed it, now account_id
will be required only if valuation is real time.
Fixes-2279412
closesodoo/odoo#53704
X-original-commit: 6b8a85b25586358383e14ca2980cc69d6d5475a9
Signed-off-by: Simon Lejeune (sle) <sle@openerp.com>
The global variable was declared inside a 'if', making it non-global and
thus without any effect.
3 solutions to keep it working with the !default flag:
- Declare it first outside the if with `null !default`
- Declare it inside the 'if' with `null !global !default`
- Use a one-line 'if' *function* to declare it
I chose the third solution as the first one is too verbose and not a
fan of the !global syntax (which could break if bootstrap was imported
inside another 'if' I guess).
closesodoo/odoo#53702
X-original-commit: 96921325b6e6b309996b98c849ba49124d76ab38
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
Since the QUnit config is more strict as to what is allowed to stay in
the DOM after tests, a test has been updated to clean its elements
before the test ends.
closesodoo/odoo#53705
X-original-commit: 33b567a777a69a4da627ff1d62b46ad09127f86d
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Signed-off-by: Julien Mougenot (jum) <jum@odoo.com>
After changing the organisation of the test bundles, some elements seem
to have disappeared from most of the tests, leaving free space for other
undesirable elements to remain on the DOM after tests unnoticed.
Now, any element not allowed in the body or qunit fixture will be
properly detected and removed.
X-original-commit: 65da01e5b96ff77d25e4421d654585bc08e09d75
- Create a product P with 2 variants A & B (e.g. 2 colors)
- Create the following BOM
Component 1
Component 2a, applies to variant A
Component 2b, applies to variant B
- Create a MO
- Set the product to variant A
=> 2 components are added: 1 and 2a
- Change the product to variant B
The component 2b is added but 2a is not removed.
The issue is coming from the result of the onchange, when comparing the
2 snapshots. The result contains the following commands:
- [(5,)]: clear the lines
- [(1, ...): ]: update component 1
- [(4, ...)]: keep component 2a
- [(0, ...)]: add component 2b
In case we are changing the product, we clear the lines.
opw-2270990
closesodoo/odoo#53689
X-original-commit: 89d9e759ae0cc31ad1fc398d41fa7a638056309e
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
Missing super call for product category deletion.
closesodoo/odoo#53699
X-original-commit: ebc75df2b3d3f80aebc2fc1d8500fa57c1755bbd
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
Currently, when kanban card drag and drop, it call onchange method
when onchange fails due to python error raised, e.g. UserError, kanban
view is not reloaded and kanban card stays in dropped column while
kanban card should come back to column from where it is dragged i.e.
kanban view should reload if onchange fails.
After this commit, if onchange trigerred from kanban drag and drop fails
then kanban view will get reloaded and card will come back to column
from where it is dragged.
note: in not stable version, forceFail option will not be added and
promise will fail in all cases but it is not done in stable for safety.
task-2267444
closesodoo/odoo#53695
X-original-commit: 27257d34c8b7374bfd8037de71f175f4ecb2913e
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
In search view, the "invisible" attribute can use complex expression,
and so we must rely on the "modifiers" attribute set by the ir.ui.view
post-processing to determine if a filter should be invisible or not.
For example, considering the context {'hide_myfilter': False}, the
following view:
```xml
<search>
...
<filter name="myfilter" string="My Filter" invisible="context.get('hide_myfilter')"/>
...
</search>
```
Will be returned as such by the server:
```xml
<search>
...
<filter name="myfilter" string="My Filter" invisible="context.get('hide_myfilter')"
modifiers="{"invisible": false}"/>
...
</search>
```
After this commit, the filter "myfilter" will correctly be shown.
OPW-2243639
closesodoo/odoo#53690
X-original-commit: 00969326e24dadd9b3f6e026789a1e575dd1c8dc
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Signed-off-by: Julien Mougenot (jum) <jum@odoo.com>
Signed-off-by: Xavier ALT <xavieralt@users.noreply.github.com>
Accrual allocations with a due end date should also be taken into
account when computing allocation_display as they are still valid.
closesodoo/odoo#53696
X-original-commit: 04cbd27e35fc32c61c183905dcd1c5f06a3db447
Signed-off-by: Jorge Pinna Puissant (jpp) <jpp@odoo.com>
Signed-off-by: Alex Tuyls <alt-odoo@users.noreply.github.com>
Before this commit, Edit pencil on the widget `tax-group-custom-field` was visible on canceled Invoice as well.
Now, Edit pencil will be visible on Draft invoices only.
closesodoo/odoo#53680
X-original-commit: c5a02d3587c33fcf1bd6a0c78f97772a95652801
Signed-off-by: Quentin De Paoli (qdp) <qdp@openerp.com>
`invoice_policy` is defined in `sale`, which POS does *not* depend
on. According to @pim-odoo, pos also doesn't care about invoice
policy, so it's unclear why this is being set.
It's not the hugest issue in 13.0, but starting with 13.4 setting a
not-field doesn't work anymore, so this blows up... unless sale is
installed. Which it often but not necessarily is, likely explaining
why this went unseen for so long.
closesodoo/odoo#53672
X-original-commit: 12dc354411f79cd41eebf965bc02b5bd373b36aa
Signed-off-by: pimodoo <pimodoo@users.noreply.github.com>
Was missing demo data and some modules
closesodoo/odoo#53666
X-original-commit: 957bad16b6df1ee712e0db218fe03285fbf5c420
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
DeferredException was removed in
ab4000fb3c but this specific use was
apparently missed.
closesodoo/odoo#53657
X-original-commit: 0de46bc231622d5b7e4c3e3afeaece6767426af2
Signed-off-by: Xavier Morel (xmo) <xmo@odoo.com>
This commit prevents a user from deleting or archiving the default
"Service on Timesheet" product.
Before this commit, the users were receiving a constraint violation
error.
closesodoo/odoo#53655
Taskid: 2221046
X-original-commit: 761d28bcca1e4f7789d45eb4baa22d08f31717a4
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
Prior to owl, dom changes is normally performed by removing an element in the
dom and replacing it with new one. This is not a problem for the tour service
even if the used mutation observer is only observing attributes and childList
changes.
However, using owl is now a different story because it can change even just a
text of a node when rendering. If after a step this is the only change that
happened in the dom and you are expecting in the next step that the text has
changed, then the tour fails in that next step, but you are given a screenshot
containing the value you are expecting in the failed step. This is a false
negative.
It means that observing only classList and attributes changes in the dom is
not enough, and it is now necessary to observe characterData changes in order
to avoid the false negatives in tour tests.
This change is expected to incur performance tradeoff so the delay in calling
the mutation callback is increased from 500 to 750ms.
closesodoo/odoo#53649
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>