Commit Graph
104848 Commits
Author SHA1 Message Date
Martin Trigaux dfb842ea30 [FIX] web: use the correct grammare in error message
The "There *are* more than 42 fishs" form should be used.
Source: @yenthe666 & http://english.stackexchange.com/a/35998
2016-08-26 11:21:18 +02:00
Pierre Masereel 770c9c4607 [FIX] lunch: remove required on user_id
* Since the user_id field is required, it was impossible to delete
  user when he had 'lunch.order' or 'lunch.cashmove'.
  We removed required arguments on 'user_id' fields in model and set
   "required='1'" on the fields in the view.
* There was a 'ondelete="cascade"' on 'order_line_ids' which does
  nothing because it's not supported on One2many fields.
2016-08-26 10:57:13 +02:00
Jérome Maes ba564c42c1 [IMP] hr_recruitment: remove stupid option
Disabling this resumes indexation option will uninstall
hr_recruitment module, since it removes 'document', which
is in the dependencies of recruitment.
This makes no sense at all and should have been remove a
long time ago.
2016-08-26 10:40:13 +02:00
Jérome Maes 17f69e70fe [IMP] ir_module: make icon_image depends on icon path field
For now, the base64 image (binary field) is the
content of the image in /static/src/description.png

The kanban view use 'icon' field, and form view use
'icon_image' field. For module having no icon defined
the default image is not the same on kanban or on
form view.

Moreover, it makes more sence to add this dependency.
2016-08-26 10:40:05 +02:00
Christophe Matthieu 5c2274e169 [IMP] crm, project: do not assume number of records in column during tour 2016-08-26 09:30:38 +02:00
qsm-odoo 450c685350 [FIX] web_tour: make sure tips are consumed before redirections
If a tour step action induces a direct redirection the _consume_tip
method was called while the redirection was being done. Now,
_consume_tip is always called before any redirection really begins.

Note: as the run method also has to detect redirections and do actions
according to if there is one or not, a function has been created to
implement the redirection detection.
2016-08-26 09:30:38 +02:00
Christophe Matthieu 800852b1d3 [FIX] web_tour: better simulate text changes
The change event has to be triggered when changing an input, a select
and even another DOM element with contentEditable attribute.

When changing an input, the "keydown" and "keyup" events also had to
be triggered.
2016-08-26 09:30:38 +02:00
Christophe Matthieu b536f1bb1b [IMP] web_tour: allow to change a select tag in run 2016-08-26 09:30:38 +02:00
Christophe Matthieu ee4065e2bc [IMP] web_tour: add in_modal option to allow checking the dom below the modal 2016-08-26 09:30:38 +02:00
Nicolas Martinelli c82b65c855 [IMP] website, website_{*}: Google Maps API Key
As of June 22 2016, the use of API key is required to access the
following:
- Google Maps JavaScript API
- Google Static Maps API
- Google Street View Image API

https://developers.google.com/maps/pricing-and-plans/standard-plan-2016-update

For domains accessing the API before June 22, it will still work without
an API key. Since Google advises to use the API key, we hide the Maps if
no API key is defined.
2016-08-25 16:33:23 +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
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
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
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
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
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
Raphael Collet 20b1a9bcaa [FIX] web: pass context in kwargs, otherwise it is taken as load 2016-08-23 16:04:43 +02:00
Yannick Tivisse a765b3e643 [REM] product: Remove product_manager field
The product_manager field is existing since v6.0 and never displayed in any views. It is used in sale_timesheet module. A task created from a procurement_order (if it is a service and we track the service) is assigned to the product manager. It doesn't make a lot of sense as the value should be set directly in the database. We will remove the field and assign the current user to the task instead, which is the common behavior in Odoo.
2016-08-23 13:19:45 +02:00
Csaba Fazekas 00cfb0889b [IMP] website_hr_recruitment: new job position default template 2016-08-23 11:42:05 +02:00
Yannick Tivisse ff63f5d0a3 [IMP] base_setup: Allow the admin to modify the default user acess rights
Add a link in the general settings to access easily the default_user form view in order to modify the default access rights

The default_user manager rights declarations in all the applications have been move in a noupdate="1" definition to avoid the manual configuration overwrittings
2016-08-23 11:14:37 +02:00
Yannick Tivisse 92a60f1340 [IMP] base: The default_user doesn't have 'Settings' access right
It's ok to give the 'Manager' rights to new users for small companies or new saas instances so that newly created users can direcly use all the features.

For bigger companies, someone is creating the new users and give the rights specifically according to their access rights in the company departments.

But granting administrator access by default is definitely questionable. The main admin is bound to make mistakes and fail to notice or remember that they have given admin access to new users. Making the system insecure by default is not a good trade-off for "simplifying the system for small businesses". And this will not be expected by anyone.
2016-08-23 11:14:37 +02:00
Yannick Tivisse 78c215a923 [IMP] mail: Don't display '(no email address)' for suggested partners
remove the '(no email address)' when no address email. Because when you send
the message, a popup appears with the email field required.
2016-08-23 10:34:43 +02:00
Simon Lejeune f9d2f0b509 [FIX] various: slug of a non-existing record
better patch for rev e9b649b555

* also fixes website_event which present the same issue (depends
  on a function that slugs)
* raise an exception when slug is called with wrong arguments
  instead of returning None (which was unclear)
* before calling slug in a function where we got a depends, check
  that the record is actually created
2016-08-22 19:48:16 +02:00
Damien Bouvy b70f159f3a [FIX] product: avoid duplicates in name search
A typo probably introduced during the migration to the new api may have
caused duplicates to appear in the name search results since it added
the ids of the wrong recordset.

The previous fix, while effective, also removed a previous optimization
for databases with a lot of products. While the code may seem obscure
on first read, the comments should shed some light on the
implementation choice.

This commit therefore reintroduce the previous code with the exception
of the call to the wrong recordset (self instead of products).

Amends b02a85f
Courtesy of @rco-odoo
2016-08-22 17:27:25 +02:00
Martin Trigaux 38c1d6fd69 [FIX] pos: remove unused key use in move lines grouping
The key 'tax_code_id' does not exist anymore, therefore the condition
line.get('tax_code_id') == values.get('tax_code_id')
was equivalent to
None == None
which is of course always True.

To make this code more readable and avoid misunderstandings, a clearer
loop implementation avoids checking for this key.
2016-08-22 16:27:10 +02:00
Simon Lejeune e9b649b555 [FIX] website, website_slides: slug of a non-existing record
When you execute the slug method on a virtual record (not yet
saved, virtualid/newid) the slugs obviously fails as it needs
an id and a display_name.

This issue happens when there's a depends on a function field
using the slug method: just after the create and during the
onchanges, they'll raise.

This patch makes the slug method returns None in these case,
anyway the depends are re-triggered after the write and at
this time they have an id and everything is working fine.
2016-08-22 15:19:05 +02:00
dut-odoo 4407dad174 [IMP] point_of_sale: alter Products menus to show kanban of products instead of list of templates 2016-08-22 14:52:47 +02:00
dut-odoo a2a6936056 [REF] point_of_sale: remove sale dependency of POS
Stock account is sufficient for Point of Sale. No need to set sale_stock as
dependency, as it installs Sales Management but is not required for running
the POS.
2016-08-22 14:52:46 +02:00
Simon Lejeune 7abed3b996 [IMP] all: remove unreachable code
This commits adds the check W0101 to test_pylint and fixes the errors.

The index in sequence.py was added in rev 1381ac139e and cancelled a day later in 83fdc271e6
so i guess it is safe to remove it.
2016-08-22 13:51:37 +02:00
Csaba Fazekas 1ede17978b [IMP] website: improve dashboard design 2016-08-22 13:48:49 +02:00
Martin Geubelle b94ddcbd70 [ADD] product,website_sale: attribute without variant
A new field `create_variant` has been added on `product.attribute`.
If unchecked, the attribute will not create variant.

These attributes will be added on the sale order description if bought from the shop.
The lines of a product with these attributes will be splitted to keep the description.
2016-08-22 13:39:41 +02:00
fwi-odoo e36db7a7af [IMP] product: only display attributes with multiple possible values 2016-08-22 13:39:41 +02:00
Yannick Tivisse 2adae8ff0f [IMP] web,web_settings_dashboard: Move 'About' menu to settings dashboard
Fp request: In the user preferences menu, remove "About Us" and put the version number in the Settings dashboard somewhere, as well as the link to switch to developer mode. Odoo is not a desktop application anymore.
2016-08-22 12:56:49 +02:00
Yannick Tivisse c35bf5a845 [FIX] web: Set correct debug mode value in headers variable 'X-Debug-Mode'
For the need of the next commit, we have to know when making a request from an RPC call in which debug mode we are. Previously, the value was always 'true' if we were in debug mode. Now it will return 'true' if we are in simple debug mode and 'assets' if we are in the other one. (this is the current behavior for the simple WebRequest).

Why do we need to know that? When loading the settings dashboard, an rpc request to /web/dataset/call_kw to load the view is accessing the odoo.debug @property method. This value is used in the template to decide which buttons to display to activate or deactivate the debug mode.
2016-08-22 12:56:49 +02:00