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
An update of the library is necessary, since imarker images ("m*.png")
are not accessible on googlecode anymore. They should now be added
directly with the library.
Previous simulation was "mousedown" then "mouseup" then "click". It is
not enough for some feature (like bootstrap, web_editor...). These rely
to have a "mouseenter" before and a "mouseleave" after the click.
The default action for a tour step whose trigger is a <a/> tag is:
* Redirection to the a href if it is a valid link
* Clicking on it if the <a/> is used as a handler-binded button
The previous condition forgot to consider href="javascript:void(0)" as
a non-valid redirection link.
When checking the consume type of an input element, the type attribute
was checked. Indeed a "text" input has a "input" consume event, while
a "button" input has a "mousedown" consume event. The problem here was
that when the input has no type, the "mousedown" consume event was
chosen while the default type for input is "text" for browsers.
When searching the ideal location for a tip on the body or the html
element, the previous implementation was wrong. In that case, the ideal
location is always the body.
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.
This is simply useless and the open door to spam. The inital goal for this
option was to be able to create an expense from any email in the onboarding.
It was even commented with 'Don't use this in production' which is another
point to remove it.
It is wrong because:
- In a saas instance, the employee email = the admin email = the email you
entered while filling the form. So, if the user sends an email with his phone,
the expense will be created. If the user sends an email with another email address
then the expense won't be created but he'll receive an automated email explaining
that he should register his email address either on it's user information or on it's
employee information (professional on employee, private on user for example).
- With this modified behavior, if no email address is matching the sender email address
the system will create an expense with the-first-employee-linked-to-an-user as employee,
which is totally wrong. Furthermore, the guy that sent the email will not see the created
expense because it hasn't been assigned to him.
- Everyone can create expenses, I don't even imagine how fast we can overload the database
with a huge pile of crap
Non-required selection fields and incorrectly updated fields (e.g.
changed options but didn't fix existing values) trips KanbanSelection
badly leading to the entire kanban view failing to appear: the rendering
phase does not find the state in its states list and blows up when
trying to access the state's class.
Fix by adding a fallback default state with an empty class.
Before this commit, the callback which selects the currently used
style in the dropdown menu was binded to the mousedown event on the
div which contains the dropdown-toggle and the dropdown-menu. This
was wrong as the callback is thus called even when clicking in the
dropdown menu.
Instead of logging "Killing tour x" when calling the run method a
second time and then logging "ok" when consuming the old running tour,
the message "Killing tour x" is now logged as an error for phamtomJS.
Also, let "x" be the tour which is killed and not the one which wanted
to be runned.
When a pie chart has no grouping selected, the label was "undefined" (the
javascript variable). Replace by the already translated string "Undefined".
Fixes#13288
Previsouly they were directly included in the tax reports, in the period of the invoice, and even if it was still unpaid.
Although this is a bugfix, it involves creation of new fields and thus cannot lands at it on stable versions where our policy disallow database changes.
* display all lines and don't display the scroll bar into ace editor
* lazy read ace lib and add missing lib file
* use not minified version of ace lib
* Move ace lib from website to web
* Added ace widget for webclient
* XML mode for view text box
* Python mode for server action text box
* Removed web_ace_editor.xml, instead added template in base.xml itself
* Added widget=ace_editor in compute field of ir.model.fields
Exclude purchases invoices from the `invoiced` field
of `crm.team`, as this count is meant to sum
the invoiced - sales - order of a sales team.
opw-686732
* bad creation of a dictionnary with the dictionary comprehension syntax.
correction of the syntax.
* unnecessery use of decimal precision function because the wizard is already
in the good decimal precision. Remove the decimal precision call and lib.
* traceback when the valuation account was not defined on product category.
raise exception when no valuation account, to explain the user why he can't
change the price.
during the conversion of the method "assign_outstanding_credit",
the id parameter was wrongly kept. Now that we are working with
recordsets, the id is now stored in self.id
related to rev d6e1d41128
Without this patch, there's a traceback when creating a segment due
to an onchange trying to set an attribute `ir_filter_id` to a dict.
related to rev 0fa2ac1d5d
During the conversion of the server action "action_account_print_checks",
the "self.env" variable was wrongly kept. Now in server actions we
are using the variable "env" directly.
The previous implementation took the parent of the element to begin
the check, which was wrong when the initial element was the html root.
This commit changes the method to a recursive implementation, which is
clearer.
This commit avoid a traceback when you open the form account_invoice_line
for a supllier invoice without having installed purchase.
The fields_view_get method add domain with purchase_ok field, but this
field can be missing on the model product.template because purchase is not
a dependence of account.
Invalid field 'purchase_ok' in leaf "<osv.ExtendedLeaf:
('purchase_ok', '=', True) on product_product
In stable version, the best fix found, is to remove the domain.
But we need to fix it in master, moving this field from purchase module to
product module. (odoo/odoo##13271)
This commit closes#13268 and closes#315 for stable version.
Todo: merge odoo/odoo#13271 in master (@qdp-odoo agreement)
Since abdca55ea2, the call to '_update_user_groups_view' if made only if the category_id is modified on a res_group. This method is re-computing the xml for the group_ids on res_user form view. This modification is wrong because:
- If the name or the share fields are modified too, the view should be recomputed too.
- It introduce a bug which is the following. When creating a new instance with no demo data, the method is not called and the group_ids field is still displayed as a one2many of the res_groups instead of the prettier way to display the information we're used to.
When a user sends a link thanks to the livechat, the link is not
clickable is the recipient is on the frontend (e.g. visitor of the
website). On the other hand, a link sent from the frontend to the
backend works.
This is because the message is sent as "html" from the backend,
therefore no link conversion is done during the post-process of the
massege (method `message_post`).
Note that a link sent and received in the backend works because
additional formatting is done (convert emojis, add links...).
opw-686063
When creating an asset, there is no restriction on the partner. However,
there is a domain to explicitly restict the categories to the 'Purchase'
asset types. Therefre, the partner is always a vendor.
opw-686636
When choosing a package for a pack operation, we should restrict the
packages to the ones which are actually available in the given
locations.
opw-684007
Since we return nosniff header, we need to avoid the magic mimetype.
In case of picture in compute field (eg. image_small on product),there are
no mimetype saved in column, and impossible to detect it from name/extention
because url are like: /web/image/product.product/47/image_small.
So before to arbitrary return default_mimetype, we try to detect it from the
content itself.
This commit continue to fix odoo/odoo@13193
* get_pdf function expects a list of ids since the removal of old api in
this commit: rev 47c67b640b
There were still some wrong calls.
* while get_action can receive ids and recordsets, get_html and get_pdf
are internal methods and still work with list of ids
* display all lines and don't display the scroll bar into ace editor
* lazy read ace lib and add missing lib file
* use not minified version of ace lib
* Move ace lib from website to web
* Added ace widget for webclient
* XML mode for view text box
* Python mode for server action text box
* Removed web_ace_editor.xml, instead added template in base.xml itself
* Added widget=ace_editor in compute field of ir.model.fields
The onchange produced a traceback because, even if start and stop
are required, they have no default value. Adapted `_get_duration`
function so that it is robust to that usecase.