Add contraint to limit the level of subtask to
only one. A task can either be 'mother' or 'child'
but not both ! For now, the UI only prevent this,
but xml rpc script can do whatever it wants.
Also move the recursive check from hr_timesheet
to project, since subtask mecanism is now native
from project module.
This commit aims to improve duration field calculation
with subtask. So this commit :
- provides `subtask_planned_hours`as the total of planned our from
children tasks
- removes useless/unclear fields : delay_hours and total_hours
- makes progress computation independent from the stage (before,
progress
of task in fold stage was 100%)
- split the `hour_get` compute method into smaller ones in order to
improve
performances and code readability.
- makes 'progress' and subtask effective hours not including allocated
hours
Task: 38498
This commit improves subtask mecanism, on several points:
1) Drop the project constraint: before this commit, creating
subtask in non parent project was not possible. Now you can move
subtask to any project.
The default project of a subtask is the one from the parent.
2) When setting a parent task, we want to force some field to have
the same value as its parent, like `partner_id` or the `sale_line_id`.
The idea is here, we work for the same client; a subtask count for the
same goal (SO line or customer). Those fields should be readonly on the
view.
3) Refactor some methods
Task: 38498
To send a sms, the number must be in international format. If phone_validation is installed and phone_international_format is set to no_prefix, the number is not in international format.
When calling the function report_action from write_company_and_print_report,
it failed because all the required data from the transient model "hr.holidays.summary.dept"
were lost.
opw:803051
This branch is the first part (out of 3) of the refactoring of the
ActionManager and ViewManager layer of the webclient.
The main changes are:
- there is no ViewManager anymore, its work is now handled by the
ActionManager itself, but isolated in a specific file ; this
eases a lot of things, as the breadcrumbs handling for example.
- the ActionManager code is converted to the new coding principles
and guidelines ; mainly, children widgets communicate with it by
triggering events up, and not by function calls anymore.
- the ActionManager layer is now testable, and a lot of tests have
already been written.
- the code in other addons has been adapted consequently.
What's coming next:
- introduce the 'AbstractAction' Widget, and make client actions
and view controllers inherit from it ; this widget will
implement a common API that could be used uniformly by the
ActionManager (e.g. restore(), canBeLeft(), renderButtons(),
getTitle()...).
- move the ControlPanel handling from the ActionManager to the
AbstractAction.
This rev. is the first part (out of 3) of the refactoring of the
ActionManager and ViewManager layer of the webclient.
The main changes are:
- there is no ViewManager anymore, its work is now handled by the
ActionManager itself, but isolated in a specific file ; this
eases a lot of things, as the breadcrumbs handling for example.
- the ActionManager code is converted to the new coding principles
and guidelines ; mainly, children widgets communicate with it by
triggering events up, and not by function calls anymore.
- the ActionManager layer is now testable, and a lot of tests have
already been written.
- the code in other addons has been adapted consequently.
What's coming next:
- introduce the 'AbstractAction' Widget, and make client actions
and view controllers inherit from it ; this widget will
implement a common API that could be used uniformly by the
ActionManager (e.g. restore(), canBeLeft(), renderButtons(),
getTitle()...).
- move the ControlPanel handling from the ActionManager to the
AbstractAction.
This rev. makes the Rainbowman stop listening to event
'clear_uncommitted_changes' on core.bus, as this event is about to
be removed (in a next commit). It was using it to destroy itself
when such an event was triggered (basically, when the current view
was left).
Instead, we removed the option 'click_close' as, when set to true,
which was the default, the rainbowman was destroyed as soon as the
user clicked outside the raibowman.
- Remove useless snippet background suggestions (only one button to
open the media dialog directly)
- Show meaningful-only tabs in the media dialog (no document as
background, ...)
- When editing a background shows the background suggestions first and
show the background suggestions last for standard images. Technically,
this is done by filtering on the name/fname of the attachments and
adding magic name parts to the fname on image upload (e.g. when
uploading an image from the media dialog when customizing a bg, the
uploaded image will automatically be marked as a background). Note:
there were discussions to implement this feature with a tag system for
ir.attachment/s but the implementation's cost was too great in regards
to the feature.
- When editing an existing link or creating one from selected text, do
not show the "Link Label" field in the dialog; it was confusing. Only
show that field when adding a link at the cursor location with no
selected text.
In 9.0, an "Human Resources / Employee" see only hr.equipment for which
they are set as the "Employee".
But the code automatically subscribed the "Technician" because the field
name was named technically "user_id" which is automatically subscribed
by the system.
This led to a possible issue with read / unread message because of
feature that just happen by coincidence.
For 9.0 only (in 10.0 the field has been renamed technician_user_id and
access rules have been changed).
opw-805185
closes#22273
This commit adds native support of config parameter in res config. Using
a new config_parameter attribute on fields setter and getter of parameters
are automatically managed by the config class. It allows to remove
duplicater and error-prone code in a lot of configuration screens
updattng config parameters.
Configs are now also more strict on naming conventions leading to some
fields being renamed.
See sub-commits for more details.
Those fields are prefixed by default_ which now strictly means they
should be linked to a default value for a given model. Their name
is updated so that it does not conflict with the strict verification
done recently for settings.
Res config currently have some native behavior to support features
like default_XX (setting global default value), group_XX (adding
implied groups) and module_XX (installing or removing modules). This
commit add support of config_parameter attribute on other fields that
automatically links a config parameter to the field. It allows to
hide the set and get of config parameter and their value conversion
as everything is now handled by the base settings class.
Thanks to @rco-odoo for his help and review when working on this
feature.
- Not any text by default
- No padding in sent layout (add padding to the editor for readability)
- Apply font size like gmail
- Line spacing should behave like in gmail, so no margin on <p> tags
- Ordered and unordered lists should have proper margin and bullets
should have black color
Before this rev., terms in the activity systray dropdown weren't
translated because the user_context (containing the user language)
wasn't passed.
Complete c591e4e6
opw-805431
On the payment confirmation page, when the payment is still pending.
Before this commit:
the user friendly message disappeared and a warning icon took its place
After this commit, the warning icon is prepended to the message.
OPW 787799
Put the code to update the MPTT in specific methods, and reduce the number of
queries being made (from 5-6 queries to 2-3 queries). Add test on MPTT to
validate the refactoring.
Since commit 55c0221e38 it is
not possible to unbuild what has not been build by ourself.
However we won't block the customer and let him unbuild everythings.
When the user unbuild a product with a MO specified
the system will generate the inverse moves from the BOM.
However the BOM could have change.
This commit instead use the MO specified in order to
generate the inverse moves.
problem: installing from the source on windows includes manual modification of the requiremnets, as well as
not supported package versions
solution:
- increased the version of lxml, werkzeug and pillow to the latest supported version in debian, it
will fix already a number of issues on windows
- automatically include or exclude dependencies from requirement.txt using requirement specifiers
Note that for lxml on windows, we will always install the latest version because the version 3.7.1 does not exist on
windows in WHL.
This test couldn't be executed within the classic JS web suite,
because it relies on mobile specific files that are rejected in
desktop. Now that a second web suite (for mobile) has been
introduced (see 9bc500948), we can activate this test.
- Create a product tracked by lot with some date values != 0
- Create a MO for this product, click on 'Produce'
- Create a new lot.
The various dates are not registered on the lot.
The product ID is located in the context in this case, not in the
values.
opw-803790
This commit aims to clean the code generating account
moves when posting expenses. This code was old and
its design was too complex. Refactoring was needed
for maintenability and readability.
This commit also renames some files and methods to
fit odoo coding guidelines.
Functionnal scope should not be impacted by these
changes; those commits are purely technical. See
each one of them for more details.
- Select several pickings
- Click 'Add to Batch'
- Create a new batch and do 'Create and Edit'
The selected picking do not appear in the list.
The wizard was not really designed to handle such use cases. Hide the
possibility to 'Create and Edit', since this is just confusing for an
end user.
opw-804359
Added documentation related to the new 'charge' in IAP that allows one
to capture a smaller amount of credit than authorized if needed.
related to 73ef4b0374ab40e2e02168adc74137a6795d20fe
Added a possibility to authorize a certain credit amount and capture another (smaller or equal) at the end of the transaction.
For instance, you want to print 2 jobs and one of them fails, you will be able to only print the one that succeeded.
This commit clean the code generating account
moves and line when posting expenses.
The code was 'spaghetti', using too many
temporary structure and badly name method.
The purpose is here to make the code more
understandable and readable.
Nothing should have change functionnaly speaking.