Commit Graph
103218 Commits
Author SHA1 Message Date
Raphael Collet 882bbf46e2 [FIX] models: in onchange, add missing fields when comparing values 2015-12-18 16:51:52 +01:00
Raphael Collet 36ee1ad813 [FIX] yaml_import: add field_parent in context for evaluating onchange on one2many lines 2015-12-18 16:51:52 +01:00
Raphael Collet f4a6f1bfde [FIX] yaml_import: use form views instead of tree views for cleaning up 2many field values 2015-12-18 16:51:52 +01:00
Raphael Collet 0b6058c585 [IMP] yaml_import: evaluate onchange on defaults first 2015-12-18 16:51:52 +01:00
Raphael Collet b96759ca07 [FIX] yaml_import: make post_process filter out readonly fields recursively 2015-12-18 16:51:51 +01:00
Raphael Collet d412203f4a [FIX] yaml_import: make process_vals sanitize field values recursively 2015-12-18 16:51:51 +01:00
Raphael Collet 3cd85bdeef [IMP] yaml_import: introduce and clean up helper functions 2015-12-18 16:51:51 +01:00
Raphael Collet 44240c0c4a [IMP] yaml_import: simplify algorithm for iterating over field elements 2015-12-18 16:51:51 +01:00
Raphael Collet 7056b5cb2a [IMP] yaml_import: small code improvements 2015-12-18 16:51:51 +01:00
Raphael Collet a751377760 [IMP] yaml_import: use method onchange() only to execute onchanges 2015-12-18 16:51:51 +01:00
Nicolas Lempereur 9bdaf45de6 [FIX] website_version: typo write return value
Models' write function has a return value which was not propagated when
overriding it for ir.ui.view in website_version module.

opw-658965

note: fix was already present in enterprise f0975cb
2015-12-18 16:33:36 +01:00
Denis Ledoux c9acaa428c [FIX] web: view pivot, start must wait load_fields
in `view_pivot.js`,
the method `view_loading` must wait the `self.fields` variable
to be defined before working properly.

This `self.fields` variable is filled in the `prepare_fields` method,
which is called in the `start` method, through a deferred named
`load_fields`.

`view_loading` is called in `start`, in `views.js`.

Therefore, in the overriden method `start` of `view_pivot.js`,
the call to `_super`, calling the `start` of `views.js`, must wait for
the `load_fields` deferred to be resolved.

Otherwise, the `self.fields` variable, mentioned above, won't be
filled in time.

opw-660153
2015-12-18 15:49:38 +01:00
Martin Trigaux 7892d99f3a [FIX] all: references to Odoo 8.0 version
In installation script or documentation

Fixes #10052
2015-12-18 15:06:46 +01:00
Xavier Morel d1dea6119f [IMP] base_import: add FAQ entry about CSV date formats
task 21446
2015-12-18 14:42:54 +01:00
Denis Ledoux 644bb3d674 [FIX] google_calendar: default timezone
If no timezone was defined for the user,
the timezone sent to Google for the events
syncrhonization was set as `False` instead
of the right default value `UTC`

opw-660171
2015-12-18 14:31:10 +01:00
Goffin Simon 513497dc03 [FIX] account: Invoice Date group_by
The default group_by for 'Date Invoice' in 'account.invoice.select'
view must group the 'account.invoice' with the field 'date_invoice'.

opw:660033
2015-12-18 13:48:57 +01:00
Thibault Delavallée 52e18acbc8 [FIX] mail: res_users: context update in create
Context was a new one instead of updating the existing one. This was
preventing a correct context propagation.
2015-12-18 13:30:13 +01:00
Martin Geubelle dc25eac8d4 [FIX] sale_stock: replace except_orm exception by UserError
As the raise of this `except_orm` exception
has been replaced by a `UserError`
from revision 0fd773a

opw-658566
2015-12-18 13:15:05 +01:00
Nicolas Lempereur df2d0c4f10 [IMP] crm: add margin next activity 2015-12-18 12:38:42 +01:00
Joren Van Onder 6d43387f58 [FIX] point_of_sale: print amount of guests correctly on ESC/POS receipt
Before this the only thing that would ever be printed was 'Guests: ',
because it was only added when receipt.customer_count evaluated to
false. Another issue is that receipt.customer_count doesn't exist in the
point_of_sale module. It is created by pos_restaurant, so there's where
it should be added to the receipt.
2015-12-18 12:21:30 +01:00
Denis Ledoux 7bae4098b2 [FIX] website_sale: stronger inheritage and handle not published products
- The revision 950d66c086 brokes
   the current inheritage. We replace it with a stronger inheritage.
 - If the product is not published, the portal user cannot access
   it on its product page `/shop/product/`, there is therefore
   no need to set the link to this page.

opw-660191
2015-12-18 12:09:02 +01:00
Denis Ledoux 3ddbb0bd19 [FIX] website_portal: ol.product_id is already sudo
This revision is related to 950d66c086

There is no need to browse the product as `sudo`, this is already
the case, as the template `website_portal.orders_followup` is rendered
with `order` browsed as `sudo` in the qweb context variables.
2015-12-18 12:05:53 +01:00
Goffin Simon 46399ec237 [FIX] product: name_get
When a product is linked to several "supplier.info" records with
the same name or same product_name, the name or product must only
appear once.

opw:660107
2015-12-18 11:50:19 +01:00
Denis Ledoux 950d66c086 [FIX] website_portal: variant name and images rights in portal quotations
1.In a SO, it's the line description that should be displayed rather
  than the product name, for multiple reasons:
    - The portal user may not have the right to see the variant attributes
      values, and therefore the portal user would see which variant
      he bought
    - The description line can be customized by the salesman, adding,
      extra information and so on
    - The description line is within the customer language
2.If the product is not published on the website, the portal user
  cannot see the product image, but the image should nevertheless
  be displayed for his portal quotations. In addition, this is possible
  to install `website_portal` without having installed
  `website_sale`, and in such a case, the field `website_published`
  is not even available on `product.product`.

opw-660191
2015-12-18 11:46:13 +01:00
Denis Ledoux c3489b66bf [FIX] sale: deposit product auto creation as sudo
By default, users can only create/edit/unlink
personal `ir.values`, the values with themself as
`user_id`.

Setting the default `deposit_product_id` should
therefore be done as sudo in case if the `deposit_product_id`
default value has already been created before by another user
but is no longer valid.

opw-660180
2015-12-18 10:52:22 +01:00
Denis Ledoux a678bd4e92 [FIX] project: needaction icon to fa-comments
To be consistent with the needaction icon
already used in the tasks/issues kanban view
2015-12-18 10:26:38 +01:00
Olivier Dony fde3a529ba [FIX] sale_timesheet: no product on timesheet line
Timesheet lines are meant to have no product, and instead rely
on an implicit "Service" product. The UoM used is the company's
project UOM (project_time_mode_id), and the nominal cost of this
product is set on each employee.

Forcefully using the SO product as was done before is useless
and actually caused inconsistencies. The `unit_amount` value
would be expected in the UoM of the SO product, while still
being computed/set in the company's project UoM.

When no nominal cost can be found for an employee, the cost is
assumed to be 0, so the `amount` value is 0 too.

In addition, the product field is not supposed to be visible on
any form where timesheet lines are recorded.

This patch fixes various bits of logic related to this, including
parts which expected the `amount` value to be non-zero, or
the product to be set.
2015-12-18 10:12:53 +01:00
Olivier Dony 6579fc2d49 [FIX] account: fiscal position computation precedence
Zip range and state filtering were added at
377a6ecab0, but the
precedence between country, group, vat_required,
and not required were not correct.

This commit fixes the precedence as follows and adds
the corresponding tests:

 0. Explict position on partner
 1. Direct match on all criterions
 2. Match on country+zip before country+state
 3. Match on country before country group
 4. Match on `vat_required` criterion on all
    the above before trying them all again without
2015-12-18 10:12:53 +01:00
Martin Trigaux 3d688e95c9 [FIX] account: duplicated key
Where do you come from?
2015-12-18 09:54:19 +01:00
Goffin Simon 4ed5d6517c [FIX] sale: sale-onchange_product_uom
To avoid duplication of code and to allow overwrite on product_uom_change
Introduced by ca40236
2015-12-17 16:16:21 +01:00
Goffin Simon ca40236ddc [FIX] sale: onchange_product_uom
The function "product_uom_change" was built to reset the price unit
of a SO line when the uom was changed. Before this fix 503820a, the
price unit of the SO line only depended on the price list then it was
not needed to pass the fiscal position to this function.

After this fix 503820a, the price unit of a SO line also depends on
the taxes set on the SO line(e.g.:if an included tax is deleted, the
price unit must be recomputed without this tax). Then to recompute the
unit price, the function "product_id_change" must take into account
the fiscal position set on the SO to consider the right taxes to
recompute the unit price.

The fiscal position set on a SO must be passed to onchange_product_uom
each time it will be called because the price unit will be recomputed.
2015-12-17 15:54:53 +01:00
Richard Mathot 43aaf30b15 [IMP] delivery: re-enable the ability to display delivery price in name_get
Was available before 3098ab7fd1.
This time, a special key in the context is required as this behaviour is quite slow.

(This commit could have been named "Dirty Hacking")
2015-12-17 15:31:22 +01:00
Martin Trigaux 57e93f49e5 [FIX] account: missing labels on some fields
And reexport some missign terms
2015-12-17 15:17:49 +01:00
Joren Van Onder 682e66043f [FIX] point_of_sale: fix the +10, +20 and +50 buttons
Because we now correctly format numbers, we have to parse the number
strings with web.parse_value(), then calculate the new amount and then
convert them back to a correctly formatted number string.
2015-12-17 15:13:36 +01:00
Joren Van Onder 631d6b19d4 [FIX] point_of_sale: make tipping adhere to correct number formatting
The number popup uses gui.numpad_input() which now only allows the
correct decimal separator (before this it was hardcoded as '.'). So we
now have to use the correct decimal separator in that particular popup.

Because of that we also have to correctly format the default tipping
amount AND also parse whatever value we get back from the popup through
web.parse_value().

Although you could do this formatting directly in the NumberPopupWidget
constructor, this would not be ideal because this widget is also used
for numbers that shouldn't adhere to the formatting (eg. PIN numbers).
2015-12-17 15:13:36 +01:00
Joren Van Onder da9275abde [FIX] point_of_sale: use correct decimal separator for payment amounts
In some places '.' was hardcoded as a decimal separator. Because now
payment amounts now get passed through web.parse_value() this causes
issues when the the decimal separator is not '.'.

opw-660024
2015-12-17 15:13:36 +01:00
Denis Ledoux 7be2403cf5 [FIX] website_quote: condition to display the Pay Now button
Before this revision, the button "Pay now" on the quotation
in the frond-end was display only if the sale order
was in the state `manual` and that there was not
yet any payment transaction.

The thing is, since the release of 9.0,
the `manual`state no longer exists in `sale.order`,
and the pay now button was therefore never displayed.

From this revision, the condition to display the button
is based on the `invoice_status`, which need to be `to_invoice`,
meaning there is something to pay:
 - The sale.order needs to be in states `sale` or `done`
 - At least one line has to be invoiced:
   - If the product has the `invoice_policy` set to `order`
   - or if the product has the 'invoice_policy` set to `delivery`,
     and at least one quantity has been delivered.

opw-659931
2015-12-17 14:40:37 +01:00
Suganthi, Sodexis d251041c05 [FIX] account_anglo_saxon: analytic account on the expense move line
When using Anglo-Saxon accounting,
the customer invoice has two extra lines:
 - One on the output account
 - One on the expense account

the move line with the expense account should
have the analytic account set on the invoice line

This is related to the revision efee12a1bb,
solving the below issue:
https://bugs.launchpad.net/openobject-addons/+bug/921877

opw-659931
closes #10026
2015-12-17 13:28:02 +01:00
sha-odoo 2f106aa5ac [FIX] sale-crm: default filters for stats button
As the stat button "Quotes(s)" counts Quotations only (draft SO),
and the stat button "Orders" sum the total of Sales orders only (confirmed SO),
clicking on the buttons should open the SO list with the according filters
set.

Closes #9715
opw-660041
2015-12-17 12:36:07 +01:00
sha-odoo a2e12b7a14 [FIX] crm_project_issue: remove unnecessary context from xmlid_to_res_id
Regression introduced with 3e8727e2aa
opw-654063
2015-12-17 12:21:29 +01:00
Denis Ledoux 2f4382f4b4 [FIX] ir_qweb: translatable fields
This revision is related to 5257721

`record._columns` doesn't contain all record fields,
computed non-stored fields are not included in `_columns`,

Therefore, when a computed non-stored field was used in the QWeb xml,
this crashed with a Keyerror exception.

Using `_fields` solves this issue. Nevertheless, translate
is not always set, but is set when the fields is indeed translatable,
so the use of `getattr` was required.

opw-660072
2015-12-17 11:29:09 +01:00
Jérome Maes b6fa479000 [FIX] inter_company_rules : misplaced sudo to prepare value to create PO/SO lines
The initial problem is when generating a PO from SO (or the inverse) the taxes were not propagated to the new created line. Taxes are company dependent field : so when we create a PO in company A, the PO line contains the taxes of company A, but we want the corresponding SO line in company B to have the taxes of company B, which wasn't the case.
This commit makes the taxes propagation works. The initial line is now browse as sudo() to get all the taxes related to this line (or its product). Then we filter them to keep only the ones from the right company.

Do not forward port this commit, since the same patch will be applied in 9.0e
2015-12-17 11:26:33 +01:00
Nicolas Lempereur a2cb0e96e3 [IMP] website_slides: improve not pretty thumbnail
In 9.0 image_medium and image_thumb route are used to display thumbnail
of website_slides document.

These in 9.0 will scale the image, but also crop it so it has a good
aspect ratio.

In saas-6 this croping feature is not present and these thumbnail will
be scaled in diverse ugly way.

To improve a little the situation, this commit use some CSS (currently
not supported only by internet explorer) which give a similar aspect as
9.0's got.

opw-658957
2015-12-16 17:33:09 +01:00
Denis Ledoux 7f29a23118 [FIX] tools: email TLDs can be longer than 6 chars
According to the RFC1034
https://tools.ietf.org/html/rfc1034

A TLD can use up to 63 octets.

The regex checking that an email address is valid
should there allow emails using a TLD with such a length.

Besides, the use of TLD domains exceeding 6 characters is more
and more common, nowadays.

e.g. using a domain `.amsterdam`

opw-660014
2015-12-16 17:11:08 +01:00
Goffin Simon c090d9992a [FIX] analytic: _default_user
The "user_id" linked to the employee_id set on the sheet must be used
when editing a sheet.

opw:659647
2015-12-16 16:48:20 +01:00
Aaron Bohy 9cbab8a04b [FIX] bus: bus_check_disconnect_cron xml_id
Copy-paste error...
2015-12-16 16:31:08 +01:00
Aaron Bohy 5d1b3232fc [FIX] bus,mail: user presence
Before this rev., no notification was sent on the bus when the user presence
changed. Thus, the bullets displayed in Discuss were never updated and stayed
as they were on the initialilization of the chat_manager (on webclient launch).

This rev. makes the bus.presence notifications work, and handles them client
side.

Moreover, the disconnections detection is now performed at each poll (with a
maximum of 1 per minute), instead of randomly (1/100 chance) at each poll, as
it scales better than the former solution. We also added a cron that performs
this check every 5 minutes. It is needed to detect that the last connected user
just disconnected (useful for visitors in the website, trying to talk with a
livechat operator).

Also, the 'away' status is now handled client side, as it makes more sense
that way (being away at each poll, e.g. every 50seconds, during 10 minutes
doesn't mean that we didn't come back between two polls).

Finaly, in bus.js, CrossTabBus, we moved the code writing in/reading the local
storage after the tab registration as this code depends on the fact that the
tab is the master tab or not (and this is known only once the tab is
registered).

This rev. was necessary in stable because the livechat uses the user status to
detect if there is an operator available, and this was often inaccurate.
Moreover, it improves the user experience of the chat in the backend.
2015-12-16 15:48:43 +01:00
Aaron Bohy 89ba0a811b [FIX] mail: traceback on new msg in unpinned closed livechat
The traceback ocurred when the operator closed a livechat channel chat window,
and then unpinned it from the sidebar in Discuss. Then, if the visitor sent
him a message, the channel was automatically re-pinned to the operator, who
received two notifications: the first one being the new channel info and the
second one the message itself.

The channel fold_state being 'closed', the window manager was trying to close
it again, which produces the traceback as the channel didn't exist in the JS
cache anymore (it was re-added to the cache when processing the message
notification, so just after).

Anyway, closing this channel was useless as, even if it was in the cache, it
would already been closed. So this rev. simply checks whether or not the
channel is in the cache before trying to close it.
2015-12-16 15:48:43 +01:00
Aaron Bohy c58c8f4bd2 [FIX] im_livechat: use correct url to find rules that apply
The problem was that, when calling 'match_rules()' from the loader template,
we compared the wrong url with the url regexp defined in rules. Indeed, we used
the url of the page we were leaving, not the one we were going to.

We thus need to know if we are coming from the controller, or from the loader
template directly as the way to get the correct url differs.

Courtesy of JEM
2015-12-16 15:48:43 +01:00
Aaron Bohy 0c92788d88 [FIX] im_livechat: various fixes
- use channel configuration for the auto_popup
- clear auto_popup timeout when chat open to prevent opening the chat twice
  if the user opens it himself before the end of the timeout
- don't send message when no feedback given
2015-12-16 15:48:43 +01:00