Set expense demo products as 'service' instead of 'consumables' so they
are not shown anymore in inventory products.
Task-2428819
Part-of: odoo/odoo#74364
Following the removal of read access on ir.model (odoo/odoo#69120),
the mail.activity.type model was not accessible to non-admin users due
to the res_model_id many2one field.
Before this commit, a project user could not access the Activity Type
menu.
Convert it to a selection field with the selection values being
computed in sudo.
closesodoo/odoo#74981
Related: odoo/enterprise#20214
Related: odoo/upgrade#2734
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
Purpose of the commit is to hide the expense product from sale and
purchase menu.
So in this commit, make the expense product as sale_ok and purchase_ok
False to make them invisible in sale or product.
closesodoo/odoo#71222
Taskid: 2491238
Signed-off-by: Kevin Baptiste <kba@odoo.com>
Currently, in the expense module, demo expense products are more
specific to the expenses and label tooltip of the cost field doesn't
convey proper difference between fixed and variable cost of
expense products.
So in this commit, replace old expense products with new expense
products and recreate expenses and reports using these
categories(products). it will provide better experience on demo.
overwrite label tooltip of cost field in expense app to convey proper
difference between fixed and variable cost of expense products.
closesodoo/odoo#68955
Task-id: 2491238
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
Currently at odoo we use expense product terminology just because it's
set up using product. Inside the expense app, there is no reason of
not using category instead of product
So in this commit, rename the product term into category for all expense
views.
closesodoo/odoo#62661
Taskid: 2391433
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
=======
This PR is in the continuity of odoo#62360.
- Display remaining hours in task sales_line_id (name_get + task form view)
- Remove internal reference from services demo data
- Display sol in project timesheets list if project is billable
- Remove use of non_allow_billable in timesheets as it has been removed from project and task in previous PR (see above)
- Only recompute planned_hours for service product
- Determine the correct SOL for timesheet
- Set the last SOL of customer on timesheet if none is set on task or project
- Allow edition of so_line in timesheet
- Restrict SOL on project to sale lines with a service product
- Use same widget on partner_id many2One than in sale.order (using ranking)
- Remove timesheets table in SO and invoice portal.They were added in previous PR (see above). This introduces the use of links to /my/timesheets/.
- Review portal timesheets (my/timesheets/ and link from orders and invoices)
- Activate group_uom "Units of Measure" on sale_timesheet install
- Hide partner phone number in task form view
- Only determine SOL of task and timesheet if allow_billable=True
- Filter SOL in task so that it matches the SOL of the project SO
- Display red label if remaining hours is negative
- Change SO compute behavior
- Only open SO for salesman on project overview
task-2409761
--
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
closes odoo/odoo#63695
Forward-port-of: #62900
X-original-commit: b1985773f3a67e28049f9e2bb635bcab059ad9c0
Related: odoo/enterprise#15427
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
PURPOSE
Clean organization of templates in odoo apps: mail.template records in data,
qweb templates (views) used directly in code, notably using post with view.
Purpose is to ease future improvements in posting based on templates.
SPECIFICATIONS
* move those templates in their own file to ease their discovering and
maintenance;
* put them into data (as those are not views even if it contains qweb)
* guidelines are now :
-> Qweb templates should be in data/mail_templates.xml;
-> mail.template records should be in data/mail_template_data.xml;
* put their declaration in no update when not done if template has no
technical code or complex dependency on underlying code;
* move found mail data (mail.message.subtype or mail.activity.type) records
in a mail_data file that should contain only "core" records linked to mail;
LINKS
Task ID-2375767
COM PR odoo/odoo#61814
ENT PR odoo/enterprise#14775
UPG PR odoo/upgrade#1936
The "Incoming Emails" setting is now enabled by default and the email
address shown on the list helper.
closesodoo/odoo#56069
Taskid: 2300864
Related: odoo/enterprise#12494
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
PURPOSE
Review the tips and digest layout design to make sure they have a WOW effect
and increase trial conversion/retention.
SPECIFICATIONS
“Snap pictures of your receipts with the remote app”
See code for specifications.
LINKS
Task ID-2274264
COM PR: odoo/odoo#53580
ENT PR: odoo/enterprise#1139
X-original-commit: 48bc75d340fa3a6d3c98bdd4b9f978036109f403
Purpose of this task is,lots of business flows can be crashed if
the field Private Address(address_home_id) is a private address instead
of a regular contact.
so in this commit,we change the demo data for employee and set the
private type address on employee for private address and also fix
the flows on which errors could occur.
Currently billing administrator does not have right for private address
and while creating payment from expense it was going to set the
customer from the employee's private address on payment so give the
private address right to the billing adminnistrator.
Also chaned admin/demo user's private address as 'private' instead of
regular contact.
and on hr_expense use the Sudo while accessing the home address this
method is used from payslip too.
TaskID:2170016
closes odoo/odoo#46628
Closes: #46628
Related: odoo/enterprise#8924
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
Impacted modules:
hr, hr_contract, hr_recruitment, hr_payroll, fleet, hr_skills, hr_appraisal, ....
Several onchanges have been converted to computed fields in the following modules :
Community :
- hr
- hr_contract
- hr_recruitment
- hr_work_entry
- hr_maintenance
- hr_expense
- hr_expense_check
- hr_holidays
- sale_expense
- account_analytic_default_hr_expense
Enterprise:
- hr_contract_salary
- hr_referral
- hr_payroll
- hr_payroll_expense
- test_l10n_be_hr_payroll_account
There are still 2 onchanges with complex behavior that couldn't be converted easily:
- an onchange that updates "tz" (timezone) that is defined as a related field
to "resource_id.tz". Apparently it is useless except to initialize the default
value of "tz".
- an onchange that updates "name" that is defined as a related field to
"resource_id.name".
the applicant.
closesodoo/odoo#45414
Taskid: 2169099
Related: odoo/enterprise#8572
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
* Code cleanup
* Avoid a safe evaluation of the field value when loading those records.
closesodoo/odoo#44883
Related: odoo/enterprise#8283
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
This branch is the combination of several optimizations in the ORM:
* store field values once in the cache: the cache reflects more
faithfully the database, only fields that explicitly depend on the
context have an extra indirection in the cache;
* delay recomputations by default: use method `recompute` to explicitly
flush out pending recomputations;
* delay updates in method `write`: updates are stored in a data
structure that can be flushed efficiently to the database with method
`flush` (which also flush out recomputations);
* make method `modified` take advantage of inverse fields to inverse
dependencies;
* filter records by evaluating a domain on records in Python;
* a computed field with `readonly=False` behaves like a normal field
with an onchange method;
* computed fields are computed in superuser mode by default.
Work done by Toufik Ben Jaa, Raphael Collet, Denis Ledoux and Fabien
Pinckaers.
closesodoo/odoo#35659
Signed-off-by: Denis Ledoux <beledouxdenis@users.noreply.github.com>
image_original => image_1920 (now resized to 1920)
image_big => image_1024
image_large => image_256
image_medium => image_128
image_small => image_64
image replaced by image_1920 (when writing) or by image_1024 (when displaying
what was previously the big size)
+ add new intermediate format:
image_512
PR: #34925
Purpose
=======
Fields `customer` and `supplier` on `res.partner`
are mostly used in domains of many2x fields.
Those domains can confuse end users because they don't
see the partner they are looking for; and it's not obvious why.
Some identified problems:
1. It can lead to duplicated partners: the user does not find
the partner, so he creates a new one.
2. The user imports supplier contacts in the Contacts app, so they
don't get the `supplier` flag. Then the user wants to make a purchase order,
and cannot find the new suppliers in the list
3. A user removes the customer flag on a prospect, because they don't think
it's a customer yet - except now they can't make a quote for that customer...
Specification
=============
Remove the two mentioned fields.
Since fields `customer` and `supplier` have been removed, all partners
are now shown in many2one dropdowns.
But in some cases, not all partners are relevant or some are more likely
to be relevant than others. e.g. when creating a PO, top suppliers have a
higher priority than other partners.
So, adapt the places where those fields were used with the new mechanism to
display the searched the partners, according to the number purchase/sales
orders they made.
TaskID: 2031147
Co-authored-by: Yannick Tivisse <yti@odoo.com>
Add a boolean field in res config settings to install hr_expense_payroll.
Add demo data to allow expense validation easily without having to create
a journal
closesodoo/odoo#32988
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
This field is a non-sense. By using the same logic, it should be added
to any low level model.
Replace the check by a simple verification of presence of an XMLID.
A more generic opt-in solution should be integrated into ORM.
Partially revert commits 0db0e66e96 and
bbd64c22ab.
See #29257odoo/enterprise#3550closesodoo/odoo#31778
Signed-off-by: Christophe Simonis <chs@odoo.com>
Purpose of this merge is to update main addons and set activity types used
for automated activities as master data. This means they cannot be removed.
Indeed those activity types are used in business flow to generate activities
and removing them may break some flows.
This commit is linked to task ID 1907970 and PR #29257.
1/ Send mail notification if expense is registered successfully
Before this commit, when user submits the expense via email, user is not getting
information about whether expense is registered or not. After this commit user
will get a confirmation email.
Few other usability improvements,
- Improved tooltip for the field 'default_code' in expense's form and in the
'Emails' config setting.
- Added product's default code in product's kanban view
- Filtered uom based on category of product's uom.
2/ Better parsing of expense mail subject
Criteria for matching expense product from email subject is changed,
- The product code should be the first word of the subject.
- Only expense products are allowed, previously there was no filter and user was
able to select any product in expense via mail.
Currency support is added,
- Now user can specify currency symbols and ISO code in expense mail subject.
- If subject contains multiple numbers in that case, number with currency will
get higher priory, and it selected as an amount in expense.
- If multi currency is active, user can use any active currency symbol/ISO code
in mail subject. Respective currency will be selected in registered expense.
- If multi currency is not active, user can only pass company currency. Other
currencies are ignored and expense will be registered as default company currency
- If user pass non active currency in subject then that currency will be ignored
and expense will be registered as default company currency
Examples:
PROD_CODE 2 foo $1205.91 baz
Added python test cases for mail subject parsing.
Related to task #35093closes#22168
Co-authored-by: Lucas Lefèvre <lul@odoo.com>
- Update all the pictures
- Rename the partners with a name that is easy to say for an English speaker (No more 'Agwoleight')
- Update all the addresses/phone numbers in the american format
- Unify the demo data with the new theme (Wood shop/manufacture,...)
PURPOSE
=======
1. Unified product demo data
2. Less demo: one per use case
3. Demo data for all models
Specification
=============
1. Refactor all the brol in the demo data
2. Adapt the tests to make them green, as some products are
renamed, removed, created in python instead of as demo data
...
This commit improves expense flow management through a better integration
of activities and addition of automated activities. Several things are done
in this commit :
* expense sheet (report) model do not inherit from mail.activity.mixin.
This commit adds the inherit so that expense users and managers can now
schedule and manage activities on expense reports. This will help them
in their daily job;
* automatic activities generation is added for expense reports. Activities
are generated for approval. They are also automatically set as done when
validating or unlinked when refusing or resetting to avoid bloating users
with unnecessary activities;
* a menu to configure activity types is added. Indeed HR managers should be
able to see and configure activity types related to their job;
* filters are added to be able to use the systray and to filter the kanban
view based on activities
Having automated activities allow to replace some messages and tracking
that were implemented to warn people of expense reports to approve.
This commit therefore
* simplifies the tracking as tracking to confirm reports is not necessary
anymore;
* removes to approve subtype on report model as well as its parent subtype
on the department. This allows to simplify chatter in hr_expense app;
Since e9734f4975 assignation is now a notification sent in the
inbox or by email to the newly-assigned responsible. It is therefore
considered as not necessary to link a subtype to the assignation itself.
Indeed having it logged in the discussion history as a classic tracking
in addition to the notification is considered as sufficient.
This commit is related to task ID 60790. Closes#23244 .
Moves UoM models, test and data to a new addon in
order to be able to use uom without product.
A simple example is be to be able to use UoM for
timesheets.
This commit only move code, and adapt xml ids
without chaging any feature or functionnal
behavior.
Note: 'product' module now depends on new
'uom' module.
It is simpler to have data split by main model or application like we
already do for models and views. It allows to easily have an overview
of data a module holds.
As we will work on mail related data like adding activities or tweaking
subtypes and templates, having them all in a single file and not lost
between other data helps finding and working with it.
This commit only moves code. No functional change should occur.
This commit adds demo data to populate
the project overview with billable
timesheet on sold projects and tasks.
This will ease the testing and reinforce
the wow effect during demonstration.
Note: those demo data should never be
involved in python test cases.
Closes#21132
- Change the differents states of hr.expense to have
ToSubmit, submitted, approved, refused and paid.
- Add a responsible field on employee model. The responsible is a res.user that belong to the group "hr_expense.group_hr_expense_manager"
The commit change too a "vals" variable that changed in a git rebase operation.
- Make the other_info tab invisible if the user doesn't belong to account.group_account_user.
- Make expense wizard (for expense lines) editable if expense is in reported mode, so when the sheet is in To submit state.
- Move a tour from expense form to expense_sheet form
- rename two fields (attachments and manager)
- The buttons "approve" and "expense" must be hidden if the user isn't the expense responsible.
- The description field of expense line must be editable in draft, reported and refused state
- Add a subtype to follow responsible changes on expenses sheets
Purpose
=======
User tests have been made by the Product Owners team. It showed that the planners are not used by new users on Odoo due to several reasons (They are too static, too heavy to use,...)
Specification
=============
Remove the module and its different applications. The onboarding on the business flow will be improvement in the weeks to come.
When an employee submits an expense, no mail is sent to the manager.
This should be the case, since it works this way on holidays.
The trick, however, is that the expense is created as submitted, but the
followers are only added afterwards. We need to make sure to add the
followers at creation.
opw-751085
Several modules defines records with the external ID `base.foo_bar` while it is
created inside this module (typically menus and groups).
While there is no technical reasons to do so but this may introduce issues:
- these records will not be deleted during uninstall
- if a language is loaded before the installation of the module, it won't be
translated
The uninstallation will only remove the records with an external id linked to
this module (these would only be removed when removing base).
Installing a language before the module will drop the translations not linked
to an existing external id (as it can not be resolved).
This commit correct all the external ids tagged as from base or other incorrect
modules.
Review the subtypes
===================
- Add a subtype for the paid expenses
- Correct subtypes wording
Prevent expense report for several employees
============================================
- Can add lines from every employee, leading to account issues (payable / receivable)
Raise an error if you try to report several expenses for different employees
Don't track onchanges on journal_id
===================================
- Expense Sheet, click on Post Journal Entries: you have 2 produced messages, and
one is strange (Journal Entry: * 1 ?)
Remove useless message on chatter
=================================
- Remove the message to say that the expense report has been validated by ...
It's redundant as the visibility tracker already logs this change
Remove unused method
====================
- 'refuse_expense_sheets' is declared but never used
Log a link to the payment on chatter
====================================
Expense Sheet, click on Register Payment: you have a message containing the
payment name (SUPP.OUT/2016/0001). Add a link to the form view.
Expense duplication
===================
Do not copy 'sheet_id' on duplication. It's wrong and has as secondary effect
to duplicate the state too.
Expense Report tree view
========================
Display correctly the widget monetary
New feature in mail module
==========================
Currently, an email can be sent to an alias from:
- Everyone
- Authenticated Partners
- Followers
This commit is intended to add another category: Employees
The main purpose of this new feature is to allow employees to send an email
to an 'expense' alias in order to create automatically their expenses with
their mobile phones.
Use this new mechanism in hr_expense
====================================
Currenlty, we're overriding message_new to make a security check and create
an expense if the sender is an employee or bounce otherwise, which is not the
correct way to achieve this. A better way is to use the alias mechanism now
that it has been extended to employees too.
Don't hardcode email_from
=========================
The email_from of the bounce email is hardcoded to "help@odoo.com". I am sure
they will be happy to receive all answers from any odoo instance
Review the bounce email content
===============================
content: Your expense has not been created because your email address is not set
on an employee or on a employee's user. Configure your employee's information correctly and try again.
-> this is a message for the admin, not an employee or anyone else
Now the content is generical for aliase defined for employees.
addendum to commit da6b9d1be443999028f021ff81b4cf128a4eaaa2
- better employee name and image for default employee in data (xml-id: hr.employee_root)
- in demo data hr.employee_fp renamed to hr.employee_root to not have 2 employees linked to the root user
- renamed all occurences of employee_fp to employee_root