Commit Graph
106440 Commits
Author SHA1 Message Date
Christophe Simonis c578fb792c [FIX] website_blog: read field from browserecord 2016-08-25 16:28:11 +02:00
Yannick Tivisse ce4d207741 [MERGE] hr_expense: Usability review + Mail gateway integration with alias_contacs + Fixes
Merge branch 'saas-12-expense-fixes-yti' into saas-12
2016-08-25 16:13:04 +02: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
Nicolas Martinelli 251344903d [IMP] website_google_map: update markerclusterer
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.
2016-08-25 15:25:27 +02:00
Christophe Matthieu f883022cc8 [FIX] web_tour: better simulate a click while running
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.
2016-08-25 15:13:43 +02:00
Christophe Matthieu 0c2767c892 [FIX] web_tour: prevent redirection if a link is a javascript protocol
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.
2016-08-25 15:13:43 +02:00
Christophe Matthieu 57041f7e6e [FIX] web_tour: properly determine consume event for no-type inputs
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.
2016-08-25 15:13:43 +02:00
qsm-odoo 6b02758278 [FIX] web_tour: ideal tip location for html and body element
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.
2016-08-25 15:13:43 +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
Yannick Tivisse 920b791ac5 [FIX] hr_employee: Don't create expenses from every email address
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
2016-08-25 14:55:08 +02:00
Yannick Tivisse 1bf327d985 [IMP] hr_expense: Reorganize menuitems usability wise 2016-08-25 14:55:08 +02:00
xmo-odoo 0a02325cd7 [FIX] web_kanban: value not in selection states
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.
2016-08-25 14:54:46 +02:00
Martin Trigaux cb0484d562 [FIX] Update Arabic translation terms from Transifex
To correct wrong %s translations.
Fixes #13281
2016-08-25 14:50:29 +02:00
Foram Shah 35a286a38c [IMP] payment, payment_payumoney : remove duplicate PayUmoney menu
There was a bad inheritance of 'payment.payment_acquirer_payu' record
2016-08-25 13:33:47 +02:00
qsm-odoo 57246814e9 [FIX] web_editor: properly bind event to the editor style dropdown
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.
2016-08-25 13:14:42 +02:00
qsm-odoo e671d05525 [FIX] web_tour: log killing tour message as an error
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.
2016-08-25 13:14:42 +02:00
Christophe Simonis 942f288273 [MERGE] forward port branch saas-6 up to f1cb517 2016-08-25 12:45:04 +02:00
Christophe Simonis f1cb5179fc [MERGE] forward port branch 8.0 up to c7d9695 2016-08-25 11:07:14 +02:00
Christophe Simonis c7d9695f52 [MERGE] forward port branch 7.0 up to b431e6c 2016-08-25 11:02:01 +02:00
Wolfgang Taferner a2fa7ec75f [FIX] Remove useless nested class as it breaks compilation 2016-08-25 10:46:48 +02:00
Martin Trigaux 4cb2dc6d71 [FIX] web_graph: no label for ungrouped pie chart
When a pie chart has no grouping selected, the label was "undefined" (the
javascript variable). Replace by the already translated string "Undefined".

Fixes #13288
2016-08-25 10:39:39 +02:00
qdp-odoo 39d68acd08 [FIX] account_tax_cash_basis: add the mechanism to report cash basis taxes at the payment time only.
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.
2016-08-25 10:23:52 +02:00
Christophe Matthieu 9979039889 [IMP] web: add ace editor for xml and python edition
* 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
2016-08-25 09:51:07 +02:00
Fabien Pinckaers b56979c230 [IMP] website_hr_recruitment: clean job offers 2016-08-24 09:40:05 -07:00
keyur gajjar 26ae9e2f0c [FIX] hr_holidays: error during migration
Without this patch Email notification of leaved doesnt have the
action buttons('approve','refuse')

related to rev https://github.com/odoo-dev/odoo/commit/46ccb7036fc478e613667777c3cd59b6406aff17
2016-08-24 18:24:41 +02:00
Denis Ledoux e123d16e52 [FIX] sale: fix sales team Invoiced this month field
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
2016-08-24 18:21:22 +02:00
Pierre Masereel c43b338bed [FIX] stock_account: do_change_standard_price traceback
* 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.
2016-08-24 17:07:25 +02:00
Pierre Masereel d47242204d [FIX] account: error during migration
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
2016-08-24 17:03:55 +02:00
Christophe Matthieu 0f80e18f4a [FIX] web: ace: implement scrollIntoViewIfNeeded for firefox
When we use firefox top or bottom arrow the ace container does not scroll automatically if the cursor is not visible.
2016-08-24 16:39:33 +02:00
Nicolas Martinelli 438a3742e2 [FIX] account: traceback
There are 6 parameters but only 5 '%s'

opw-686787
2016-08-24 15:14:29 +02:00
Simon Lejeune bef8c204ce [FIX] marketing_campaign: error during migration
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
2016-08-24 14:51:02 +02:00
Pierre Masereel 6db882d50d [FIX] account_check_printing: error during migration
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.
2016-08-24 14:32:00 +02:00
Christophe Simonis 7ca170b511 [FIX] ir_qweb: handle inline css in assets 2016-08-24 12:49:11 +02:00
qsm-odoo 5578d6c79c [FIX] web_tour: prevent crash when checking if trigger "html" is visible
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.
2016-08-24 12:31:52 +02:00
Jeremy Kersten e310d9e1b3 [TYPO] rating: typo in end user view 2016-08-24 12:22:26 +02:00
Jeremy Kersten abf17354f8 [FIX] account: remove domain that depend of purchase when not installed
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)
2016-08-24 12:21:48 +02:00
Yannick Tivisse 0460299549 [FIX] base: Always call '_update_user_groups_view' when updating a res_group
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.
2016-08-24 11:51:15 +02:00
Nicolas Martinelli f30ec3022e [FIX] mail: link in livechat
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
2016-08-24 11:25:34 +02:00
Joren Van Onder cae2c74985 [FIX] website_{payment,portal_sale}: move code depending on sale
From website_payment to website_portal_sale.
2016-08-24 11:19:15 +02:00
Goffin Simon ce5b802df6 [FIX] hr_holidays: undisplay refuse leaves on dashboard
The refuse leaves don't have display in the dashbord.

opw:685604
2016-08-24 09:36:40 +02:00
Nicolas Martinelli 9c67a0d1b7 [FIX] account_asset: partner must be a vendor
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
2016-08-24 08:51:33 +02:00
Nicolas Martinelli c4adc4a566 [FIX] website_event: ticket price
When a ticket is ordered, the price is always with format amount +
currency. However, it should match the standard format of the currency.

opw-682984
2016-08-24 08:49:54 +02:00
Nicolas Martinelli b81ed2fd01 [FIX] stock: package domain
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
2016-08-24 08:48:23 +02:00
Jeremy Kersten 498b266f5c [ADD] base: add tests for mimetype detection 2016-08-23 22:30:18 +02:00
Jeremy Kersten 5a9e1af64a [FIX] base: improve last chance for detection of mimetype
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
2016-08-23 21:09:20 +02:00
qsm-odoo 2cdb9f517f [FIX] website_hr_recruitment: remove odoo content from default template 2016-08-23 17:31:52 +02:00
Pierre Masereel 6979586086 [FIX] website_quote, website_sale: calls to 'get_pdf' function
* 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
2016-08-23 17:21:02 +02:00
Christophe Matthieu 7032346cec [IMP] web: use not minified version of ace lib 2016-08-23 17:03:56 +02:00
Christophe Matthieu 6d04c70abe [IMP] web: add ace editor for xml and python edition
* 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
2016-08-23 17:03:56 +02:00
Simon Lejeune eebdef1a99 [FIX] calendar: traceback during create
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.
2016-08-23 16:25:30 +02:00