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>
Steps to reproduce:
Create one product with FIFO and automatic inventory valuation.
Purchase product with 10 quantity and cost price 100 and mark shipment as done.
Add landed cost for done incoming shipment with 2 cost lines
E.g. 1. Freight Charges - 100
2. Duty and Charges - 50
So ideally after first outgoing shipment total cost should get updated in product is
(1000 + 100 + 50) / 10 which is 115
The issue is that we increment `remaining_value` on the wrong layer.
Fixes#41923
task-2167659
closesodoo/odoo#42871
X-original-commit: 8b89a5e4a85071055bc152b11cf150e62a5c5211
Signed-off-by: Simon Lejeune (sle) <sle@openerp.com>
PURPOSE
Remove partner_autocomplete_address_extended and ensure base_address_extended
effectively works.
SPECIFICATIONS
Commits a6e1eb9 and 8a1815b added among a lot of other things
a bridge module between ``partner_autocomplete`` and ``base_address_extended``.
It is used only to redefine the ``_split_street_with_params`` method from
``base_address_extended``. This method is used to find street name, number and
number2 from an address, given a format coming from the country.
However the override completely fucks up the original method purpose and uses
an hardcoded regex coming out of the blue. Parameters like country format is
not taken into account which is annoying when trying to parse country dependent
data.
Tests from ``base_address_extended`` crash completely when used with the
``partner_autocomplete_address_extended`` implementation.
Considering the original complete specifications from commits
"""
For Name field or M2O, gives a list of companies
Data comes from Odoo IAP Service
"""
Or specs found in the original task ID 1867818 pad
"""
If Extended Address module is installed, the street number should be correctly
splitted Or the complete address is put in street2 if impossible to parse
"""
We think that this implementation is broken by design. Indeed there is no
mention of street2 anywhere in the code, and this implementation ensure street
will never be correctly split. We therefore remove it completely.
In this merge we also
* clean and improve tests in base_address_extended. Purpose is to make tests
easier to understand and more data oriented. Tests about company / partner
address fields are added to ensure coherency;
* reorganize python code of base_address_extended according to guidelines;
* rename compute / inverse methods of base_address_extended;
* remove dead code from base partner model;
See sub commits for more details.
LINKS
Task ID 2158302
PR #42678
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Commits a6e1eb9f0a and 8a1815b31e added among a lot of other things
a bridge module between ``partner_autocomplete`` and ``base_address_extended``.
It is used only to redefine the ``_split_street_with_params`` method from
``base_address_extended``. This method is used to find street name, number and
number2 from an address, given a format coming from the country.
However the override completely fucks up the original method purpose and uses
an hardcoded regex coming out of the blue. Parameters like country format is
not taken into account which is annoying when trying to parse country dependent
data.
Tests from ``base_address_extended`` crash completely when used with the
``partner_autocomplete_address_extended`` implementation.
Considering the original complete specifications from commits
"""
For Name field or M2O, gives a list of companies
Data comes from Odoo IAP Service
"""
Or specs found in the original task ID 1867818 pad
"""
If Extended Address module is installed, the street number should be correctly
splitted Or the complete address is put in street2 if impossible to parse
"""
we think that this implementation is broken by design. Indeed there is no
mention of street2 anywhere in the code, and this implementation ensure street
will never be correctly split. We therefore remove it completely.
Task ID 2158302
PR odoo/odoo#42678
``_split_street_with_params`` method is defined in base, on partner model. It
is redefined in ``base_address_extended`` without calling super. Only that
module use it. That means that the base implementation is not used anywhere
in the codebase, leading to dead code. Let us remove that method.
Task ID 2158302
PR odoo/odoo#42678
Purpose is to make code follow guidelines so that we understand that
some methods are used for computed stored inverse fields.
Task ID 2158302
PR odoo/odoo#42678
Purpose is to reorganize code according to guidelines and split the main
badly named python file, to understand that 3 models are impacted: res.company,
res.country and res.partner.
Task ID 2158302
PR odoo/odoo#42678
Purpose is to make tests easier to understand and more data oriented. We
now understand more clearly what is an input and what is expected.
Tests about company / partner address fields are added to ensure coherency.
Task ID 2158302
PR odoo/odoo#42678
Currently when writing on street field of company model, its sub-fields
(notably street_name, street_number and street_number2) are not correctly
computed again in cache.
Indeed address sub fields have no direct trigger as it depends on its
partner_id and its partner_id children (see ``res_partner.address_get()`` and
``res_company._compute_address()``).
When writing on address fields from the company record, we then invalidate
all address fields cache in order to force their computation.
This commit adds a new tool method giving the list of fields coming from the
address partner to copy upon the company.
Task ID 2158302
PR #42678