Issue
- Install planning
- Go on a planning view where you have 2 filters (employee/roles)
- Unselect all items of one filter
All the filters disappear.
Cause
By doing this:
```
if (!_.find(options.filters, function (f) {return f.display == null || f.display;})) {
return;
}
```
We break the function's recursion:
```
return self._renderFiltersOneByOne(filterIndex + 1);
```
So the others filters are not rendered.
Solution
Return the next filter rendering instead of nothing.
OPW-2166932
closes#42703, closes#42433closesodoo/odoo#43025
X-original-commit: dbab68a92ec48b2bb6f21244af1de56691cb43f1
Signed-off-by: Jason Van Malder <jvm-odoo@users.noreply.github.com>
Commit 6c4447ef59 set a new domain on picking_type_id of stock rule but
it was wrongly written. This commit make it syntactically correct.
closesodoo/odoo#43009
Task: 2169836
Signed-off-by: Simon Lejeune (sle) <sle@openerp.com>
Crm Lead has a quite complex form view as the same view is used for both
leads and opportunities. There are therefore some duplicated fields, such
as partner_id.
It is therefore complicated to use xpath to locate such fields. Adding a
name on groups containing those lead / opportunity specific fields make
the view easier to inherit using xpath.
closesodoo/odoo#42895
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Name field on mailing is a technical field coming from its underlying utm
source record, coming from an _inherits. It is not required in view as it
is computed at creation based on subject. Changing it is possible
in debug mode.
However it is possible to try to write a void value, which leads to an issue
as it is technically required. With this commit we make the name field required
at write.
closesodoo/odoo#42368
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
At model level, activity_type_id is not a mandatory field on mail.activity.
Indeed required is added in views, meaning people could have activities
without type.
This make the activity views crash with `TypeError: 'bool' object is not
subscriptable` error when computing aggregated activity data. This commit
fixes that error.
Activities without type are still not displayed in the activity view as
columns are based on available activity types. It means activities without
type have no column to be displayed. As this is a corner case that should
not happen when using activities using the interface this is considered
as a limitation of current implementation.
closesodoo/odoo#42991
X-original-commit: 77f0dd8936df3dddfa3df8041d4b7f7c62595430
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Currently an onchange on event type copy the mail schedulers information from
event type to the event. In order to ease inheritance, some white listed
attributes are directly copied using direct getter (line[attribute], see code
for clarity). However mail and sms templates are many2one fields and the
id should be copied, not the browse record.
There is no issue when the onchange is trigered from interface because a
mapping is done. However when calling the onchange in code there is a crash
as the record is directly given to write.
closesodoo/odoo#42990
X-original-commit: 09c6747ea2de108cf512091b7837a71d4ea4662a
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Impacted versions: 13.0
Steps to reproduce: Add employee, allocate paid leave, set leave in hours.
Standard workweek is set to 40 hours. 5 days 8h per day
Global Time off: Dec.25 00:00:00 - Dec.26 23:59:59
Employee requests one week of leave, during christmas (dec.25 and dec. 26 in the week).
Manager approves.
Current behavior:
Before approval the total hours in the request is 24. The manager approves
and the total hours change to 40. Total remaining hours is also -40.
Expected behavior:
After approval the requested hours should not change and remain 24. The
total remaining hours should also be -24.
This is a similar issue as issue #41848 which has been fixed in #42710
TaskID: 2169161
Closes#42877closesodoo/odoo#42924closesodoo/odoo#42983
Original-signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
X-original-commit: 11a5e3d09dd57d51813fc8151c30a619d4f368b5
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
Purpose
=======
Impacted versions: 13.0
Steps to reproduce:
- Add employee
- allocate paid leave
- set leave in hours
- Employee working hours is
Mo: 8:30-12:30
Tu-Fr: 8:30-12:30 and 13:00-17:30 (total of 38h per week).
- Employee requests on week of leave
- Total hours in request is 38. Manager approves.
Current behavior:
Before approval the total hours in the request is 38. The manager
approves and the total hours change to 40. Total remaining hours is
also -40.
Expected behavior:
After approval the requested hours should not change and remain 38.
The total remaining hours should also be -38.
Taskid: 2166964
Closes: #41848
X-original-commit: b89565b93d8e6905d4cc3fe9d3de8ddecb43acd4
New component: the custom file input. Its purpose is to define a input of type file
with a custom trigger (button, link, etc.).
Its construction is the following:
- attributes: behaviour of the actual input (route to call, multifile, allowed
extensions etc.)
- inner template: the trigger that will fire the upload prompt when clicked
Once a file has been uploaded, the component will emit a 'uploaded' custom event
containing the files.
closesodoo/odoo#38423
Related: odoo/enterprise#6031
Signed-off-by: Géry Debongnie (ged) <ged@openerp.com>
New Owl component: Dialog. It does not rely on Bootstrap but behaves the same
and does not conflict with legacy dialogs.
To call this component, you need to define it in the XML parent template instead
of calling it in the JS file, and put a flag in the parent state to toggle the dialog.
Old dialog file has also been slightly updated to ensure compatibility between both
versions.
This commit also updates a list view test which did not wait for click events to
properly trigger and would cause the new dialog system to crash.
Added a new custom hooks: useFocusOnUpdate.
This hook returns a function taking a DOM selector as an argument.
That function will focus the first matching element on the next repaint of
the component.
Now use direclty the posted state from account move.
* This was changed in a constraint in l10n_latam_invoice_document module, also extend the constraint docstring
* This old states where also in a view domain in l10n_ar module for account.move view. We remove the field for the view (AFIP Responsibility) instead of fix the state name.
closesodoo/odoo#42982
X-original-commit: 33a5cfe068323f7fc4c92f42fadb8e236954d93a
Signed-off-by: Josse Colpaert <jco@openerp.com>
The purpose of this partner is that we do not need to report to AFIP the identification number.
Since this partner identification was configured as DNI it was throwing an error when validate an invoice for that partner in AFIP, AFIP was requesting us to sent the DNI number.
Now we activate the Sigd "Sin identificar/venta global diaria" identification type (code 99), proper configure the it to Anonymous Final Consumer partner, with this change AFIP validate the invoice directly and does not request us the identification number.
Now we set this partner sequence to the biggest one so far to show this identification type as the last in the list of identifications types
closesodoo/odoo#42981
X-original-commit: 842306b06984f4357f9e3cfdbb58bad828a1a627
Signed-off-by: Josse Colpaert <jco@openerp.com>
- Remove the unused field call string_availability_info
on the stock.move model. It was used in version 11.0
in a form view, this form views has been merge and
this fields is now unused.
- Remove onchange_quantity function, because the product_qty
can't be change (_set_product_qty doesn't allow that) and
the product_id is required.
closesodoo/odoo#42972
Signed-off-by: Simon Lejeune (sle) <sle@openerp.com>
Fix an error which occurs during an attempt to access the string
attribute of a non existing measure
If a pivot view is defined with a "string" attribute of a field of
type "row", e.g.
<field name="stage_id" string="Stage" type="row"/>
an error was raised "TypeError: measures[name] is undefined"
closesodoo/odoo#42971
X-original-commit: de1dbc9bfba3ec205c75590d3e38b20d30b39c39
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
Issue
- Install Blog
- Create a post
- Remember the last update date
- Visit the post
- Check the last update date
After visiting the post, the last update date changed.
Cause
In the web_blog main.py controller, we increase the visit
count with a write, so the write_date is updated.
Solution
Keep the old write_date by forcing it.
OPW-2166289
closesodoo/odoo#42954
X-original-commit: 16843c63b97cda746972526f8933bf25b435d585
Signed-off-by: Jason Van Malder <jvm-odoo@users.noreply.github.com>
Reversal of ef46378cd3
The bug we tried to fix with the reverted commit was fixed by 3023cd24af
but it was causing other issues, like the text field translate button
badly positionned
closesodoo/odoo#42953
X-original-commit: d98dde0704f04e1e929bc689fe00814142a9cd40
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Issue
- Take a v13 runbot
- Open survey's app
- Open one of the surveys
- Click on edit
- Click on a question
- Open 'option tab'
- Make sur the field 'mandatory answer' is true
- Try to translate field 'error message'
-> Error
Cause
this occur because because we try to update the model survey.question
from the list coming from survey.survey which mean that the
record.viewType is list and not form.
Solution
As we are looking for the field name we can simply use
ev.data.fieldName.
Another solution should be to use this.viewType instead of the record
one.
OPW-2157631
closesodoo/odoo#42952
X-original-commit: ad115d2710aec2b4ff7d4077714a1816cdfb433e
Signed-off-by: Jason Van Malder <jvm-odoo@users.noreply.github.com>
Since dae065d, model defaults are retrieved based on the env company instead of
the user's company.
However, for a request with auth='none', the company might not be set on the
environnement (if `allowed_company_ids` is not in the context).
This makes the sql query crash, trying to compare an integer to `false`.
closesodoo/odoo#42951
X-original-commit: fa47b1b23a7fa09166c16aacf025cdcefcfaa9fd
Signed-off-by: lul-odoo <LucasLefevre@users.noreply.github.com>
some fields may depend on invoice_ids, which lead to a perf issue when
field is not searchable.
closesodoo/odoo#42950
X-original-commit: 53f363269c21eb6b2615d660f1c558c5a592e04b
Signed-off-by: Christophe Simonis <chs@odoo.com>
*: website_blog, website_event
This commit adds a "Height" option to sections, allowing them to have a
minimum height of the user's choosing (either full screen height or half
screen height, similar to blog covers). Enabling the full screen option
also allows the user to add a "scroll down button" that will scroll down
to the next section, also similar to blog covers.
As such, the classes doing the corresponding things in website_blog and
website_event have been renamed to reuse the same code.
task-2155710
closesodoo/odoo#41623
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
Before this commit, opening the messaging menu might be slow.
This was caused by the parsing of bodies of messages with lots of
HTML nodes. Indeed, the body of a message is linkified and inlined,
and both processes were quite slow due to their implementation: each
node in the HTML were recursively parsed and re-assigning
`innerHTML`. As a result, each node was triggering an HTML parse,
which is very slow on complex nodes.
This commit fixes this performance issue by speeding up inlining and
linkifying of html strings. In the case of linkify, it now triggers
an HTML parse only when necessary, while inlining now relies on its
textContent value.
These changes should drastically improve the speed of opening and
rendering messaging menu, almost ten times faster.
Task-Id 2076299
closesodoo/odoo#42949
X-original-commit: 8db0afb50ce0853a6a8ab7ee11dd5ed876abab64
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
Purpose of the task is that when creating a multi level sub-task
and going back on click of sub-task breadcrumb, sub task is not
going to visible. We need to refresh or go to the parent task
than after its visible.
so display all the sub task when click is press on sub-task
breadcrumb.
replaced action domain with 'child_of' instead of 'in' because the
child_of will return the same result as method returns.
closes odoo/odoo#42916
Task: 2157055
Closes: #42163
X-original-commit: befdce11075753d7530c8b15d1ae2b536c3caace
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
- Create a journal.
- Create a vendor bill on this journal.
=> Odoo allows you to set a starting sequence number for your invoice.
This number must always use the sequence used when posting the invoice.
However, the invoice date was taken instead of the accounting date.
Before this commit, when setting an invoice date at Y and an accounting date at Y - 1,
the edited sequence was the one in Y - 1 but at the one in Y was used at the validation.
Manual forward-port of 42579
closesodoo/odoo#42914
X-original-commit: 525b5b1a8676e4d1ed1082505c33afb29fed6a42
Signed-off-by: oco-odoo <oco-odoo@users.noreply.github.com>
Use window.pdfjsLib instead of window.PDFJS.
PDF returned through getDocument() has _pdfInfo variable instead of
pdfInfo.
task-2124443
closesodoo/odoo#40917
Related: odoo/enterprise#6900
Signed-off-by: Géry Debongnie (ged) <ged@openerp.com>
after this commit:
Worker disable is no longer supported by pdfjs since version 2.0, so
remove disabling worker code.
Used pre-built version of pdfjs as source version dependency with other
lib like SystemJS and we can not add dependency of these libs, so used
pre-built version which don't require any other dependent lib.
pdf.worker.js is always loaded and as we are using pre-built version we
don't need odoo's loader, previously we need it because worker loader of
pdfjs was loading files separately so to avoid it as we were loading
files in asset bundle we had odoo's loader file but we don't need it
anymore.
task-2124443
_log_downside_manufactured_quantity is an api.one method since it would
log the production info on the generated acitivty.
Since commit b499c3308c, an unlink will trigger an _action_cancel on
unlinked MO.
So unlink multiple MO will call _log_downside_manufactured_quantity
with multiple records and traceback.
closesodoo/odoo#42892
Task-id: 2168386
Signed-off-by: Arnold Moyaux <amoyaux@users.noreply.github.com>
When UOM of timsheet is in days, the amount is not correct in the
stat button of sale.
closesodoo/odoo#42764
Taskid: 2160680
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
Purpose of the task is to fix the default value of service invoicing
policy of existing products when sale_timesheet is installed.
when first sales app is installed and product is created with type service
then later on sale_timesheet module is installed then on that product
default value in service invoicing policy is none while the product is worked
as 'Ordered quantities' so in compute set service invoicing policy to
'Ordered quantities' for those products.
closes odoo/odoo#41515
Task: 2146778
Closes: #41515
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
PURPOSE
Improve event management by replacing static states by dynamic global
stages. It gives more flexibility and allows event users to customize their
flow according to their business requirements.
SPECIFICATIONS
From stage to state
===============
event: replace state by kanban stage
(website_)event: adapt to state removal by correctly computing availability
based on available seats.
event_sale: adapt to state removal by correctly computing availability
based on tickets sale_available field (based on number and dates)
event: add a cron that clean the event pipeline. The cron will move every
ended events in the next "ended stage". We inherit from `ir.autovacuum`
so the method `power_on` is called one time per day.
Color picker widget
===============
Move the widget ``color_picker`` from "planning" to web to use it in event
application.
Improve views
===========
Kanban view
- add a field ``sales_total_price`` which contains the total sum of all sale
order lines (care about the currency)
- this field is used in ``event_sale``
- display the number of expected and confirmed
- when clicking on these buttons, redirect to the tree view with the correct filter
- display this new field in the kanban view
- display the location instead of the country in the kanban view
Form view
- Change the order of the buttons in the header of the event form view
- Preview Badge > Contact Attendee > Contact Speaker
- Add a note field on the model `event.event`
Search
- Remove the default filter "Upcoming/Running"
Track improvement
===============
1. the color of a track is now based on the color of the stage
2. the default date of a track is the ``date_begin`` of its event
LINKS
Task #2088538
PR odoo/odoo#39486
Enterprise PR odoo/enterprise#6460
Related: odoo/enterprise#6460
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
The cron will move every ended events in the next "ended stage"
We inherit from `ir.autovacuum`, so the method `power_on` is called one time per day.
Task #2088538
Kanban view
===========
- add a field ``sales_total_price`` which contains the total sum of all sale order lines (care about the currency)
- this field is used in ``event_sale``
- display the number of expected and confirmed
- when clicking on these buttons, redirect to the tree view with the correct filter
- display this new field in the kanban view
- display the location instead of the country in the kanban view
Form view
=========
Change the order of the buttons in the header of the event form view
Preview Badge > Contact Attendee > Contact Speaker
Add a note field on the model `event.event`
Search
======
Remove the default filter "Upcoming/Running"
Task #2088538
Purpose
=======
Remove the state on the event and add a stage.
So, we can have more control on the event flow, and we will have less constrains.
Website event
=============
Before
------
People can register for an event if "seats are available" and if the state is "confirmed".
After
-----
People can register for an event if `event_registrations_open` is True,
- Event: seats are available and the event is not finished
- Event sale: One or more ticket has `sale_available` set to True
Task #2088538
This commit corrects erroneous instructions in the documentation page for the installation of Odoo.
Additionally, the following changes are made:
- Add new instructions where the steps were not clear or complete enough.
- Replace some installation flows for an easier onboarding.
- Rework some parts of the page structure and display.
- Add a "running odoo" section for Mac OS.
- Fix display error in views.rst
task-2072822
closesodoo/odoo#42900
X-original-commit: 82471da5d63f07796c6df1639aa30cc4894d5891
Signed-off-by: Antoine Vandevenne (anv) <AntoineVDV@users.noreply.github.com>
The constraint view in Odoo has no good quick search options to filter/group and find
specific constraints easily.
This commits allows you to easily group and search for the most used values of
constraints. This will make the finding of constraints easier for functional people.
closesodoo/odoo#41288
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
Steps to reproduce:
- install sales, website, ecommerce
- go into debug mode and open your browser's console
- debug menu > start tour > shop
Previous behavior:
tour does not find trigger for the first step
Current behavior:
tour starts properly
opw-2126704
closesodoo/odoo#42870
X-original-commit: 7e0da0b9cd2c8fc22d3fd3125b48102992bf3479
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
Let's assume a many2many_checkboxes widget in a form view with a
dynamic domain (depending on another field in the view). At first
rendering, the widget contains a checkbox for each value matching
the domain.
Before this rev., if the user changed the value of the field used
in the domain, the many2many_checkboxes wasn't redrawn, so it still
displayed the values matching the previous version of the domain.
Closes#38509Closes#40173closesodoo/odoo#42867
X-original-commit: 1ace56f9a8cb56fb39235468dd13447bcbbee40a
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Co-authored-by: Aaron Bohy <aab@odoo.com>
Themes image would not be shown correctly in the theme selection if the
`website` module was installed in CLI.
Indeed, the code supposed to load the theme images was done in the kanban view
during theme selection after installing module through apps screen.
Now, this code is encapsulated and called in post_init hook of website.
This was also needed for an improvement on `test_themes` module, see
https://github.com/odoo/design-themes/pull/195.
closesodoo/odoo#42206
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>