Description of the issue/feature this PR addresses:
When an expense was accepted and then the account move related to the expense was reset to draft/cancelled, the expense's state stayed as payed.
Current behavior before PR:
The expense's state stayed as payed.
Desired behavior after PR is merged:
Change the expense's state to refused with the reason 'Payment Cancelled'.
opw-2559225
closesodoo/odoo#77729
X-original-commit: cfe95a0e3781a23be73541cdae4393b8507cf9c1
Signed-off-by: agr-odoo <agr-odoo@users.noreply.github.com>
before this commit:
- the selection field with OCR options was in hr_expense module
after this commit:
- the selection field is now in expense_extract module
closesodoo/odoo#48617
X-original-commit: 9440139105825d4efa5fda23149c60179870f9f3
Related: odoo/enterprise#9553
Signed-off-by: Christophe Simonis <chs@odoo.com>
Signed-off-by: Thomas Carlier <Explicitapps@users.noreply.github.com>
- if checked in settings, OCR can be used to get infos from the attached receipt image
- set default product to EXP_GEN when created from picture
- use "register_as_main attachment" when expenses are created from receipt images
- Add the upload button to the kanban view to see it immediately in the mobile version
and use it to create expenses from pictures. (with or without OCR installed)
closesodoo/odoo#39559
Related: odoo/enterprise#6493
Signed-off-by: Florian Daloze (fda) <fda@odoo.com>
The reified view on the res users will be dropped in the following commit.
The previous commit adds support to define each group as a computed field on the res users.
This commit defines:
- A boolean field for each 'isolated' res.group, i.e. a group in the hidden category.
- A selection field for each 'Application' res.group, i.e. a group in a application category.
Example:
- The group to manage pricelist in sales becomes a boolean field
- The groups project user/manager become a selection field
- 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.
1/ Modify the no content help message for hr_expense with a dynamic part
which describe how to create a new expense by mail
2/ Mail gateway mechanism. New customizable email alias expense@domain
that creates a new expense by sending an email to it. Check several things
- Check that the email_from is the same than one of the employees or than
on of the related users to employees. If not, send back an email to say that
the expense will not be created.
- If the email address is valid, check if something is between brackets '[]'
If it is the case, check if it is linked to a product internal reference
and set it accordingly. If nothing is found, use a default product
'Fixed Cost'
- If one/several float(s) are found in the mail subject, take the last
occurence and set it as the expense total amount.
3/ If a product template is created, to not add taxes on it. We don't expect it
to have additional taxes
4/ Under Expenses -> Configuration -> Expense Product, use a simplified product
view with only the needed fields.
5/ When generating the account move lines, use the account defined on the expense
line, not the sheet
6/ When creating a payment, make a reconciliation on the payable account move lines
That way, if the total amount on the expense is paid, the expense will be set to
paid automatically when registering a payment
7/ Add a one-page planner to explain how to use the email alias
8/ The field account_id on the expense sheet was informative. After some tests, it
seems that it's more confusing than helping. So we removed it
9/ Add a domain on the field 'bank_journal_id' to select journals of
type 'cash' or 'bank'
10/ If the number of expense lines is equal to 1, the expense summary on the expense
sheet should be the same name the line. So the process can be done in one click