Commit Graph
10 Commits
Author SHA1 Message Date
Christophe Simonis b31cd558e5 [MERGE] forward port branch saas-14 up to b857fd4c90 2017-07-19 17:04:28 +02:00
Nicolas Martinelli 957d57eaf7 [FIX] hr_expense: mail to manager
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
2017-07-18 13:53:13 +02:00
Fabien Pinckaers eee806e4a4 [IMP] *: remove #general messages at module installation 2017-01-07 21:31:11 -08:00
Yannick Tivisse 3b5d6da5c1 [FIX] hr_expense: Solve several usability issues on the flow
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
2016-08-25 16:06:44 +02:00
Yannick Tivisse 47728ccd40 [FIX] hr, hr_expense: Allow employees to send emails to aliases
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.
2016-08-25 14:55:08 +02:00
Thibault Delavallée 1077423f81 [FIX] hr_expense: fix context access in mako template
As context is a keyword in mako, odoo context is actually called ctx
in mako templates. Otherwise any rendering of the template will
crash.
2016-08-16 14:00:19 +02:00
Fabien Pinckaers b0c9ee669b [FIX] Product view opens as a list view
[IMP] improved planner content
[IMP] Misc usability improvement:
	cost instead of sale price on product form
	improved views and terminologies
	journal entry is RO
2016-06-21 17:23:49 -07:00
Yannick Tivisse f066b1ec4f [IMP] hr_expense: Onboarding improvement + mail gateway
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
2016-06-21 14:09:48 +02:00
Yannick Tivisse 717f9217bb [IMP] hr_expense: bring back the sheets + other new features
NB:
- The option no_delete is not working, a fix will come from chm
- The many2many widget on a sheet creation is not working correctly as
  the called command is a (1, id, values) without a (4, id, _) before.
  A fix will also come from chm, but a disgusting hack has been
  provided for this particular case (to remove after chm fix)
2016-06-17 12:14:57 +02:00
Foram Katharotiya 52d72e61de [MERGE] hr_expense: module rewritten for more easiness and a better usability. Concept of expense sheet removed. Was PR #7387. 2015-09-04 17:23:19 +02:00