With this commit, the routes of the components of a kit are applied instead of the routes on the kit itself.
To do this, a refactor of '_adjust_procure_method' was made in order to use it on stock.moves
The method '_adjust_procure_method' was moved to the stock module in order to be used in a future task concerning repair orders ( TaskID: 1887961).
TaskID: 1863856
Avoids querying and updating an ir.config_parameter which (according to
rco) blows the caches (of all workers) every time it happens, which is
inconvenient.
closesodoo/odoo#29066
While many crons will process some sort of queue and can either delete
or mark items as processed, others are more concerned with time ranges
and may not want (or be able to) write on the objects to mark them as
processed. In that case, crons maintaining a processed date range is
useful.
Task 1912648
In the BoM structure and cost report the purpose of _get_bom_reference
was to add content with an override in order to display it directly in
the column BoM. It could be improved by using the classic display name
and add a name to column in order to use an xpath in another module.
The function _get_bom and _get_bom_line can also be used in order to
introduce extra content directly in the column added with an xpath.
Task ID : 1875677
closesodoo/odoo#26493
Task #1909424
The mass_mailing module used a lot of JS "include" to override
the behavior of the kanban view and the html_frame widget.
This commit cleans the overrides by using proper inheritance with "extend"
instead of "include".
It also slightly changes the current behavior of the mass_mailing kanban view
to disable the drag and drop feature only when the view is grouped by "state" or "email_from".
(Before this commit, the drag and drop feature was disabled for ALL fields).
closesodoo/odoo#29452
In the KanbanRenderer, the _setState method extracts the groupBy field name and tries
to get the field information from that string.
When the field is a date/datetime grouped by day/week/month/..., the field name becomes "my_date:month".
This prevents the gathering of state information since those information are stored in a dictionary with a 'my_date' key.
This commit will detect if the field has additional grouping info (:month, :week, ...) and clean the name
with a substring before accessing the state dictionary.
The KanbanRecord config was not correctly taken into account when
initializing the columnOptions (for the KanbanColumn).
This completely prevented overriding the KanbanRecord in the kanban view if the KanbanColumn
was used for rendering (= when the view was grouped by a field).
Ics file generation should be possible even when only event is
installed as it is a basic feature of events.
Moreover we need to be able to generate such files in order to replace
the old outlook api used in the event templates, api which is not
supported anymore.
We decided to use ics files because it is supported by most calendar
schedulers hence working with outlook.
Linked to task #1853063closesodoo/odoo#28477
Feedback should be the first part of the message without title
to make it more concise.
If the activity has a note, the note should be displayed
but after the feedback.
We can also remove the field feedback that was not so useful
since it was only written just before unlink. Feedback is now
passed as another parameter to the template.
Task: 1918392
closesodoo/odoo#29605
If the journal_id is already set on the payslip and if there are
no journal_id on the contract, don't erase the value on the onchange
method
closesodoo/odoo#29616
This commit adds two fields:
- compute_date on payslip (set once computed)
- registration_number on employee (used to identify the
employee)
These fields are displayed in the payslip_report
It also adds the worked_days to the same report
These fields are a legal obligation in some countries (like Belgium)
Purpose
=======
Give the possibility to elaborate plans through Odoo. For instance, in HR,
you could create an onboarding plan when a employee is created. Someone manages
laptop and other equipment, someone check hr stuff, ... This feature is generic
but in a first time we will apply it only on the hr module.
Ease HR process in a company by creating plans: a plan is an assembly of Next
Activities that will be launched together whenever you need it.
Example of plan for an employee onboarding:
Activity: Prepare materials
Responsible: Alain
Deadline: At the contract signature
Activity: Manage Cars
Responsible: Cécile
Deadline: at the contract signature (both signature)
Activity: Plan Training
Responsible: Caroline
Deadline: After signature
Activity: Training
Responsible: Employee
Deadline: 1 week after the employement date
Specifications
==============
On HR Configuration: Add a menu "Activity Plans"
Activity plan object:
- Name
- Model (debug mode) (hr by default)
- Activity Template o2m
- Activity Type (only the one related to hr)
- Deadline (come from Activity Type)
- Responsible \/
0 Coach
0 Manager
0 Other
[Responsible_name] \/ (coach, manager or manually set if other)
Add datas, 2 plans:
Onboarding
- Name: Onboarding
- Plan lines:
Activity: Setup IT Materials
Responsible: [a user] (manager)
Deadline: At the contract signature
Activity: Plan Training
Responsible: [manager]
Deadline: After signature
Activity: Training
Responsible: [Employee]
Deadline: 1 week after the employement date
Offboarding
- Name: Onboarding
- Plan lines:
Activity: Compute Out Delais
Responsible: [a user] (manager)
Deadline: today
Activity: Take Back HR Materials
Responsible: [manager]
Deadline: today
Activity: Manage Car
Responsible: [manager]
Deadline: today
When to trigger it ?
HR specific use case:
1/ On employee, from the employee chatter:
when you create an employee, Odoobot will log a note with the following message:
"Congratulations ! May i recommand you to setup an onboarding plan?", with a link
create a plan from it.
2/ Add a button 'launch plan' to open a wizard to select the plan
3/ When archive an employee
Open a wizard with:
- Reason (selection)
- Action plan (m2o not required)
Error if employee not linked to a user.
Task : 1912681
closesodoo/odoo#29151
We try to define common classes in test with helpers to
set testing data. Here, we had a test extended a class
with test methods, making those tests executed twice:
when hr_timesheet was installed, and on project_timesheet_holidays
installation.
This is not very stable, as some behavior might change when
other are installed.
closesodoo/odoo#29538
Non deductible taxes (ones without an account set), increase the target
account of the product.
In case of a inventory operation, this means the inventory account.
To reflect this stock valuation wise, we need to calculate this incremented
values and rely on it during the inventory move price calculation.
This commit does exactly that.
**Description of the issue/feature this PR addresses:**
- Inventory value and accounting value diverge on taxes which are summoned upon the target account
- This is due to a inventory valuation based on the subtotal amount
- Meanwhile balance accounts are charged with subtotal + value of taxes without accounts
**Current behavior before PR:**
- Inventory valuation and accounting valuation diverege
- Consecutive accounting moves originated by stock moves do not reflect the accounting value at which the first move was charged (eg. by an invoice).
- There is always an "inexplicable" price difference when working with taxes that don't have an account set (cost increasing taxes)
**Desired behavior after PR is merged:**
- The stock move will take exactly the same valuation as has been accrued on the taxed accounting move.
- Balances do not diverge
- No "mysterious" price differences appear.
**Note:** Please do not close, even if not immediately accepted (`wishlist` tag). This PR is meant to be carried along and actively maintained, until this semantic will be completed this way or another.
--
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
@xoe-labs
closesodoo/odoo#26367
This merge improves code of access rights checks when creating or updating
activities. Several points triggers this commit
* we would like to use _filter_access_rules and override it on activities
model in order to be more standard;
* we would like to get rid of sudo used in various CRUD overrides as using
standard ORM method allows to correctly use current user;
* we would like to get rid of create_user_id field once we can keep the
current user as create_uid;
Access rights are a bit updated. They are now the following
* you can create activities for documents like posting messages (using
_mail_post_access attribute; if not defined, write access on document
is required);
* you can read activities for documents you can read;
* you can write and unlink activities either following the defined access
rule (created OR assigned), and otherwise like posting messages (
using _mail_post_access attribute; if not defined, write access on
document is required);
In this merge we also hide edit / mark as done / cancel buttons for
activities the current user cannot modify.
Finally create_user_id field related to activities is replaced by create_uid
everywhere.
This commit is linked to task ID 1856417.
closesodoo/odoo#27619
As activities are created using the current user there is no need anymore to
have another field to store the activity creator. We can therefore remove
create_user_id and replace its use by the magic create_uid field.
This commit is linked to task ID 1856417 and PR #27619.
This commit improves code of access rights checks when creating or updating
activities. Several points triggers this commit
* we would like to use _filter_access_rules and override it on activities
model in order to be more standard;
* we would like to get rid of sudo used in various CRUD overrides as using
standard ORM method allows to correctly use current user;
* we would like to get rid of create_user_id field once we can keep the
current user as create_uid;
Access rights are a bit updated. They are now the following
* you can create activities for documents like posting messages (using
_mail_post_access attribute; if not defined, write access on document
is required);
* you can read activities for documents you can read;
* you can write and unlink activities either following the defined access
rule (created OR assigned), and otherwise like posting messages (
using _mail_post_access attribute; if not defined, write access on
document is required);
In this commit we also hide edit / mark as done / cancel buttons for
activities the current user cannot modify.
This commit is linked to task ID 1856417 and PR #27619.
Co-Authored-By: Sébastien Theys <seb@odoo.com>
Co-Authored-By: Thibault Delavallée <tde@odoo.com>
This commit improves the CRM reporting by:
- adding new field on the report model
- providing new predefined filters for users
- renaming labels to be more precise
- reorganizing filter and group by
- remove wrong measure in report (probability and days
to close), as they were not correct when multiple
activity on a lead.
Main purpose is to ease finding usefull KPI for the
user, and make the activity reporting a bit less
confusing and limited.
It also now include all user messages (discussion
subtype) and note from activity (when marking activity
as done) in the reporting, so we can have a complete
analysis of action taken on the leads.
Task-1862209
closesodoo/odoo#27767
Rename shipping policy in the UI. Also adapt the stock picking
state's tooltip in order to explain the reservation process
according to shipping policy
closesodoo/odoo#24039
Decimal precision for volume on products is always set to 2.
Some users that work on more precise volume would like to increase it.
In order to do it without customisation we add another system parameter
for Volume.
When a user produces multiple finished products with SN/lots, he has to
save the wizard go back to the production order and click again on produce
button for the second SN/lot. It could be annoying with a huge number of
SN/lots to encode.
This commit adds a 'Continue' button that saves the wizard and directly
opens a new with the new lot/SN.
The view on maintenance show the duration with the hours as
UoM. However the tooltip explains that the duration is set
as minutes and second. This commit modify the tooltip in
order to be coherent with the view.
Purpose of this merge is to ease first steps with mass mailing application by
improving demo data about links and clicks. Demo data now call convert links
and add click in order to generate statistics.
Small improvements are also done on mass mailing views, adding responsible
field and grouping by default in kanban.
This merge is linked to task ID 1907994 and closes PR #28533.
Purpose of this commit is to improve a bit demo data in mass mailing. This
includes notably
* having real links and UTMs generation for them calling manually
convert_link in demo data;
* having real statistics about clicks by calling add_click in demo data;
It will help having demo data feeling like a real mass mailing has been
sent.
This commit is linked to task ID 1907994 and PR #28533.
Purpose is to allow to use the 'use' tag allowed by _eval_xml (see convert.py
for more details). It allows to read a specific field instead of id when using
a search tag in xml. Feature is already supported; this commit just enables
it in order to use it in demo data notably.
This commit is linked to task ID 1907994 and PR #28533.
Otherwise it is not possible to change it in order to re-assign the mailing.
Also update the field label in order to better match its intended use.
This commit is linked to task ID 1907994 and PR #28533.
Since 4cd379cf6e the ControlPanel is now a child of the viewController.
This breaks the clickEveryWhere test.
With this commit, the view_controller selector is adapted in the clickEverywhere
test.
cheery-pick of 5e92adb39cclosesodoo/odoo#29396
Check that it makes custom binary fields into attachment as that's the
main reason for the change: when users create binary fields via Studio,
they're necessarily db-stored (as the interface doesn't allow altering
the attachment attribute and it's unclear how we'd handle users
switching it on/off every time), which significantly bloats their
database (and burns storage & backup space), especially as the primary
use case for binary fields is adding images and documents to records.
* check that binary fields are properly created as attachment=True
* add attachment=False on fields where that seems relevant (most but not
all of the fields previously using the default)
* remove occurrences of attachment=True
closesodoo/odoo#29308
Better split of invoice_validate() and action_move_create() functions: the later now only deals with the account.move creation while the former assigns missing values (dates) and gets its number. The move now always receives its name from the invoice, which means there's no need anymore of the 'invoice' arg in account.move post() method.
We now also put the origin of the invoice in the move ref, in order to allow searching on that reference in the bank statement reconciliation widget.
closesodoo/odoo#29343
Purpose of this commit is to clean a bit the test mode of surveys before
working a bit on ACLs and survey access. Currently when taking a survey
with a magic 'phantom' token it generates a test answer allowing to go
through the survey process. However it has several drawbacks :
* 'phantom' is not a real token. Token parameter should be used only for
real tokens and avoid having corner case when managing simple parameter;
* token should only be used to ensure people have been granted access to
answering surveys;
* it is currently available for every users;
* it is pure unwanted magic;
In this commit we add a separate route for testing surveys that create the
test answer and then redirects to the survey with this answer. It is now
also limited to survey managers or survey officers testing their own surveys.
Survey JS tour now uses the standard URL and not the testing one. Indeed as
testing is now limited to survey officers and managers tour should test
real life use cases.
This commit is linked to task ID 1916034 and PR #29339.
Purpose
=======
Survey assets were incorrectly overridden in the website_survey module and all copy/pasted.
This will correctly include the survey_assets template and get rid of these copy/pasted
assets references, while keeping the website style on survey pages.
Task: #1915790closes#29314
This branch introduces a large-scale reorganization of the
component tree generated by the web client. The short version is
that now, the control panel is a child of the view controller and
no longer a sibling. Graphically (and simplified), we go from
this:
webClient
/ | \
... ... actionManager
/ \
controlPanel viewController
/ \
to this:
webClient
/ | \
... ... actionManager
|
viewController
/ | \
ControlPanelController
/ \
CPRenderer CPModel
The motivation is that this work moves the code where it should be.
Before this commit, it was kind of weird to have code in the
controllers to render buttons outside of their root node (in
renderButtons). Also, the action manager had to take care of
coordinating search view states between view transitions.
So, this work simplifies the code. It also makes it easier to
extend. We see day after day that Odoo needs to take care of more
complex UI needs, and in many cases, these needs were quite
difficult to implement (we prefer spaghettis in our plates, not in
our code). The changes in this branch should open the way to
implement these features.
For example,
- it will now be easy to add the possibility of views (for example,
the search view or a new ControlPanel view) to add custom buttons
(of type action or object) in the control panel.
- Another need will be to serialize/ restore the state of the
search view across action boundaries (needed by the dashboard).
- Another example is the possibility for views to customize easily
the presence/absence of sub menus (filters/groupbys/favorites/
time range/...)
- Another need is an easier way for views/client action to customize
their control panel.
This commit also contains a large rewrite of the search view (so it
is more inline with our architecture and easier to maintain).
Part of task 1893568
Co-authored-by: Aaron Bohy <aab@odoo.com>
Co-authored-by: Mathieu Duckerts-Antoine <dam@odoo.com>
Co-authored-by: Martin Geubelle <mge@odoo.com>
--
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
closesodoo/odoo#29106
=========
PURPOSE
=========
{Any employee can work on a PoS session, even if he has no user. This decreases the cost of PoS App.}
We are not competitive enough on the PoS Market because customers have to pay one user per cashier while they expect to pay one user per cash station.
===============
SPECIFICATIONS
===============
pos.config
- Add a checkbox : "Login with Employees"
- If set to TRUE, an "Allowed Employees" many2many appear
- If employees many2many is empty, all employees can log on this PoS
- If set to FALSE, can only log in with the currently logged user
hr.employee
- The barcode and pin fields were be moved to the hr.employee
- Set a barcode (not pin) by default at the creation of any employee
- No Employees module with PoS > dependency to hr
Open the PoS if "Log in with Employees" = FALSE
- Same behaviour than now, when I open the PoS, I'm logged in with the current user and can start working at once. The only difference is that it is not possible to switch users anymore.
- The button to close the session is visible
Open he PoS if "Log in with Employees" = TRUE
- When I open the PoS, the first screen I see is the login screen.
(a) I choose my employee and enter my pin code (if there is pin code on my employee, otherwise not required) (I can only see employees that have access to that PoS)
(b) I scan my barcode
(c) I scan my rfid card (future development)
- When I click on the employee name, I can log in with another employee
- If the employee is linked to a user that has the pos user/manager access right, I can see the button the close the session. Otherwise I cannot close the session (and thus cannot access backend).
- Add field employee on all records created by PoS (and replace the field user by that one) (on pos.orders)
Lock Screen
- Improve the PoS Interface
- Add a new feature to allow to "lock" the session. When a session has been locked, the user/employee has to re-log-in to access the PoS
- When I try to re-log-in, by default suggest the last employee logged in in the login screen
Migration
Plan a migration strategy > barcode and pin is now on the employee and not on the user anymore
closesodoo/odoo#28567
This commit adapts the code for the 'Add to Google Spreadsheet'
entry in the Favorites menu, according to the large refactoring of
the SearchView/ControlPanelView in web.
Part of task 1893568
This rev. adapts the code of the 'Add to Dashboard' entry of the
Favotires menu, according to the large SearchView refactoring. It
also does some tweaks for the dashboard app due to the move of the
ControlPanel from the ActionManager to the controllers.
Part of task 1893568
according to changes in web.
Some changes have been made to the webclient template (and widget)
in web, and the pos (using the webclient widget as well) needed to
be adapted.
Part of task 1893568
This rev. moves the backbone library from web to pos, as one of its
two usecases (the search view) has just been removed. From now on,
it is only used in the pos.
Part of task 1893568
to ControlPanel/Search view refactoring.
*: mail,sale,web_diagram
The ControlPanel being now inside the DOM of views' controller,
those existing widgets needed to be adapted (in the way they define
if and how they want a ControlPanel, and in the way the manipulate
their DOM as it slightly changed). Tests needed to be adapted as
well.
Part of task 1893568
Co-authored-by: Mathieu Duckerts-Antoine <dam@odoo.com>
Co-authored-by: Martin Geubelle <mge@odoo.com>
to ControlPanel/Search view refactoring.
The ControlPanel being now inside the DOM of client actions, those
existing widgets needed to be adapted (in the way they define if
and how they want a ControlPanel, and in the way the manipulate
their DOM as it slightly changed). Tests needed to be adapted as
well.
Part of task 1893568
Co-authored-by: Mathieu Duckerts-Antoine <dam@odoo.com>
Co-authored-by: Martin Geubelle <mge@odoo.com>
This branch introduces a large-scale reorganization of the
component tree generated by the web client. The short version is
that now, the control panel is a child of the view controller and
no longer a sibling. Graphically (and simplified), we go from
this:
webClient
/ | \
... ... actionManager
/ \
controlPanel viewController
/ \
to this:
webClient
/ | \
... ... actionManager
|
viewController
/ | \
ControlPanelController
/ \
CPRenderer CPModel
The motivation is that this work moves the code where it should be.
Before this commit, it was kind of weird to have code in the
controllers to render buttons outside of their root node (in
renderButtons). Also, the action manager had to take care of
coordinating search view states between view transitions.
So, this work simplifies the code. It also makes it easier to
extend. We see day after day that Odoo needs to take care of more
complex UI needs, and in many cases, these needs were quite
difficult to implement (we prefer spaghettis in our plates, not in
our code). The changes in this branch should open the way to
implement these features.
For example,
- it will now be easy to add the possibility of views (for example,
the search view or a new ControlPanel view) to add custom buttons
(of type action or object) in the control panel.
- Another need will be to serialize/ restore the state of the
search view across action boundaries (needed by the dashboard).
- Another example is the possibility for views to customize easily
the presence/absence of sub menus (filters/groupbys/favorites/
time range/...)
- Another need is an easier way for views/client action to customize
their control panel.
This commit also contains a large rewrite of the search view (so it
is more inline with our architecture and easier to maintain).
Part of task 1893568
Co-authored-by: Aaron Bohy <aab@odoo.com>
Co-authored-by: Mathieu Duckerts-Antoine <dam@odoo.com>
Co-authored-by: Martin Geubelle <mge@odoo.com>
This rev. adds a factory class to generate MVC components, to
properly standardize the way MVC components should behave (in the
odoo way). The most popular MVC of the webclient concerns views
(Model, Controller, Renderer, for each view type). However, we
wanted to generalize the notion of MVC (and extract it from the
views), as we will use it in a future commit for the ControlPanel.
Part of task 1893568
Co-authored-by: Aaron Bohy <aab@odoo.com>
Purpose
=======
On a payslip rule computation you can return 3 parameters:
- result_qty
- result_rate
- result
From this, we compute the total amount as following:
tot_rule = amount * qty * rate / 100.0
If we set parameters result_qty=0 or result_rate=0 to force the tot_rule to
be equal to 0, then their values are set to the default one, which is ambiguous.
So
result_qty = 0
result_rate = 0
Become
qty=1
amount=100
We can't fix this in a stable release as this could imply unwanted
behavior changes for customers, and also quite difficult to spot.
closesodoo/odoo#29206
In order to facilitiate the configuration of a livechat on the website,
the first livechat channel that was demo data from im_livechat
is now set as data. Website is now using this first livechat channel
instead of creating a new one and using it.
Merge related to task ID 1912056.
closesodoo/odoo#29020