Commit Graph
100214 Commits
Author SHA1 Message Date
Géry Debongnie 739301be09 [FIX] mail: add link to urls clientside, not serverside
the server should avoid as much as possible modifying emails.  Adding
links is a presentation concern, so this commit moves this logic client
side.
2016-01-08 15:02:22 +01:00
Aaron Bohy dfdd38e3b2 [FIX] mail: Discuss: don't suggest to join private channels
Problem was that administrators have access to every channels, even private
channels they are not registered to, because when trying to join an existing
channel, the autocomplete proposed every channels accessible for the user, but
didn't filter private ones.

This rev. makes sure to only suggest non-private channels.

Also prevent '|' domain injection to disable filters (odoo/odoo@44e65e72d3)
by using expression.py to build domain.
2016-01-08 14:32:51 +01:00
Aaron Bohy 0fbc128033 [FIX] mail: followers: subtypes: correctly notify channels
Except for messages, activities on a document like internal notes posted
trigger notifications to partners and channels following the corresponding
activity's subtype.

Rev. 69ed801 rightly re-introduces a filter on followers to prevent notifying
more partners than necessary. Unfortunately, this filter doesn't take into
account channels, which are thus automatically removed from followers to
notify, whatever the subtypes they follow, e.g. internal notes on a document
don't appear in channels following the 'Note' subtype of this document.

This commit makes sure that channels always pass through that filter, but warns
users that public channels should probably not following internal subtypes.

Also makes the edit subtypes dialog html valid (li's must be inside, e.g., ul).
2016-01-08 14:32:51 +01:00
Christophe Simonis 329c6e7763 [FIX] mail: check if browser support Notification API before verifying permission 2016-01-08 11:48:34 +01:00
Nicolas Martinelli 98e5673c90 [FIX] product: sort pricelist items by sequence
The pricelist items should be sorted by sequence.

opw-660745
2016-01-08 10:44:52 +01:00
Martin Trigaux 44e65e72d3 [FIX] mail: ignore abritrary argument domain for searching channel
We should not trust arbitrary arguments from public method to compose a domain
as it is possible to inject '|' to disable filters and be able to search any
channel (mitigated by access rules).
Create a private method and use a wrapper that ignores the domain.
2016-01-08 10:07:38 +01:00
Nicolas Martinelli ef6116bfb5 [FIX] account: exchange difference date and amount
The use case is the following: the currency of a customer invoice (e.g.
EUR) is different from the currency of the company (e.g. USD). An
invoice is created in EUR, and a payment is done in EUR on the
receivable account which is in EUR.

Between the invoice date (e.g. 2015-01-01) and the payment date (e.g.
2015-02-01), the rate has changed. The reconciliation between the
invoice and the payment is done afterwards, for example 2015-03-01.

When the write-off related to the exchange difference is created:
- the date should be the max date between payment and invoice if the
  corresponding fiscal year is not closed (otherwise, today's date).
- the amount currency on the receivable/payable account should be zero,
  since the amount currency on the foreign exchange account is zero.

opw-659289
2016-01-08 08:11:24 +01:00
Nicolas Martinelli 54be29f0bc [FIX] product_visible_discount: fix price with tax included
_fix_tax_included_price should take new_list_price as parameter.
Moreover, this should be done in both onchange methods.
2016-01-08 08:06:15 +01:00
Christophe Simonis 100d604cb0 [FIX] im_livechat: correct loader js code 2016-01-07 18:16:20 +01:00
Goffin Simon 61cf01b7a8 [FIX] mail: mailing domain not set properly
When selecting contacts from Contacts list views and clicking on
action window "Partner Mass Mailing", the 'active_domain' must be
filled in the wizard with the selecting contacts. In this way,
the right mailing_domain will be set when creating the related
mail.mass_mailing record (in addons/mass_mailing/wizard/mail_compose_message.py
in function get_mail_values).

opw:659383
2016-01-07 16:58:52 +01:00
Stephen Medina 8e1057316f [ADD] doc: mention how to include static files
Does not explicitly mention how static files are loaded. This will
confuse anyone who is using the documentation as a guide and not going
through the pet store example code. Feel free to edit however, as long
as it is mentioned somewhere.

fixes #9170
2016-01-07 12:29:25 +01:00
Denis Ledoux 0b9fbc67bb [FIX] purchase: prevent write on the related stock.location
`default_location_dest_id_usage` on `purchase.order` is
used only for an attrs domain on the field
`dest_address_id` in the purchase order form.

There is therefore no worries to set it as readonly,
it won't break the feature he has been added for.

Besides, this will prevent the useless write of the
same field value on the related `stock.location`
when saving the purchase order.

This is important to prevent the useless write
on `stock.location`, as users might have the rights
to create/edit purchase orders without having
the write access to the stock locations.

opw-660736
2016-01-07 10:29:49 +01:00
Christophe Matthieu 7fcce928f3 [FIX] web_editor: allow custom template for html_frame field 2016-01-07 09:52:56 +01:00
Goffin Simon da03d97003 [IMP] account: test_product_id_change
Forward port of c4fb2c2 in new api
2016-01-06 23:18:54 +01:00
Joren Van Onder 17bb5fd374 [FIX] point_of_sale: fix forward port related issues
Fix 697739d, 682e660, da9275a and 697739d which where forward-ported in
8b4f052a38.
2016-01-06 16:55:59 +01:00
Joren Van Onder 70e43b18e0 [FIX] point_of_sale: use tax_ids on the pos orderline, not the product
We have taxes on pos.order.line and we have taxes on the product of the
`pos.order.line`. There was no real consensus in the POS about which
taxes to use. As long as they're the same it doesn't cause issues, but
if someone where to change the taxes on a product which is used in an
open `pos.session` things will start going wrong.

When closing the pos.session amount_total of the `pos.order` in question
will not equal tax `account.move.lines` + product
`account.move.lines`. The reason for it is that we use the taxes on the
`pos.order.line` for the tax account.move.lines, whereas amount_total
used the taxes on product.

This fixes the problem by always using the tax set on
`pos.order.line`. This tax should be set only once through
`_order_line_fields` during orderline creation. After that it shouldn't
change. Therefore `pos.sessions` won't be affected by changes to taxes
of products anymore.

opw-660765
2016-01-06 16:45:28 +01:00
Cedric Snauwaert 833fe492d1 [FIX] account: add buttons on journal entries and journal item to see reconciled entries 2016-01-06 14:46:19 +01:00
Martin Trigaux bf6b106044 [FIX] doc: remove reference to website_less
No more module website_less needed to create a theme
Fixes #8182
2016-01-06 14:29:38 +01:00
Goffin Simon b935289acc [FIX] sale_analytic, sale_timesheet: _compute_analytic
The default domain set in _compute_analytic didn't allow to recompute
SO lines linked to several analytic lines because unit_amount is always
greater or equal to zero. The idea is to recompute the quantity delivred
on SO line linked to analytic lines with amount<=0 (which means that this
is a cost for the company, an expense or a refund).

opw:660812
2016-01-06 12:41:04 +01:00
Goffin Simon 3756969517 [FIX] account: total_invoiced in res.partner
"total_invoiced" must only take customer invoices into account because
when you click on the button "invoiced" in the partner view form
you just see the customer invoices.

opw:665574
2016-01-06 11:46:31 +01:00
qsm-odoo 49b938a0f1 [FIX] web_kanban: useless breaking-layout o_kanban_mobile
Remove fixed width for kanban records in .o_kanban_mobile (in grouped
view the records overflowed their columns).

Note: this class seems useless and wrongly used by templates. This
should be removed in master (remove the class from templates and
include its less rules in all kanban records for specific classes).
2016-01-06 11:03:55 +01:00
Cedric Snauwaert a81d6121aa [IMP] hr_expense: improve expense report by grouping by employee-state-currency 2016-01-06 10:08:11 +01:00
Nicolas JEUDY eb8c674d63 [FIX] website_portal: bad xpath
"//div[@class='o_my_sidebar']" is not valid and fails when evaluated.
Could have been replaced by "//div[contains(string(@class),"o_my_sidebar")]" but
as needs a view modification, using an id is better for future inheritance.

Fixes #10279
2016-01-06 09:29:33 +01:00
Nicolas JEUDY ac444e90a8 [CLA] corporate signature for sudokeys 2016-01-06 09:29:33 +01:00
Nicolas Martinelli fcab79217a [FIX] purchase: link extra move to PO line
Commit ec949ad5 links the extra move to the Sale Order through the
procurement. To be consistent, we also have to link the extra move to
the Purchase Order.

The original issue is that any extra move is not taken into account in
the received quantity calculated.

opw-665398
2016-01-06 08:22:59 +01:00
Martin Trigaux 136c563bc6 [FIX] mass_mailing: duplicated regex 2016-01-06 08:20:48 +01:00
Martin Trigaux c7d281d846 [FIX] auth_signup,mass_mailing: export added terms
Forward port added a few terms, reexporting, removing bad ones
2016-01-06 08:20:48 +01:00
Martin Trigaux 5ca043b86c [FIX] mail, purchase: forwardport
Missing parts, I only blame rerere
2016-01-06 08:11:45 +01:00
Cedric Snauwaert 4e585fab41 [FIX] account: show reconcile button on account form view 2016-01-05 18:45:53 +01:00
Josse Colpaert 84035b3a1f [FIX] stock_calendar: remove timezoning
Commit 64e1c28e3 introduced timezoning in resource_calendar in resource already.
This broke the stock_calendar module, but as such, the timezoning in the module
is not necessary anymore.  All dates calculated from the times in the calendar
are calculated back to UTC and the results are without timezone in UTC.  That way,
timezones are also not needed for calculating the leaves.
2016-01-05 18:32:07 +01:00
Martin Trigaux 8b4f052a38 [MERGE] Forwardport of branch saas-6 up to c649bb0df 2016-01-05 18:28:06 +01:00
qdp-odoo c649bb0df6 [FIX] account: changing the account on invoices doesn't reset the unit price anymore if it was set (and modified previously by the salesman) 2016-01-05 17:47:55 +01:00
Denis Ledoux c043025e5d [FIX] event_sale: prevent useless write on the product
`event_sale` adds an onchange on the `product_id` of the
sale order lines, which returns values for the fields
`event_type_id` & `event_ok`, which are used for an attrs
domain on the fields `event_id` & `event_ticket_id` in
the sale order line form (dialog). `event_type_id`
& `event_ok` are related to `product.product` fields,
in addition.

Changing the partner of the sale order triggers
the onchange on the lines, which triggers
the onchange of the `product_id`.

As these two fields `event_type_id` & `event_ok` were
not in the sale order lines tree view, as readonly,
they were passed to the write operation when
saving the SO, therefore writing on the product (the
same value than before, in addition).

Indeed, if an onchange returns values for fields
that are reandonly in the view, these are ignored
when saving/writing. However, if the onchange
returns values for fields that are not in the view,
these values are nevertheless passed to the write operation,
even if there was actually no change.

This behavior should probably change, that if an onchange
returns values for fields that are not in the view, these
are ignored, either when saving the record, either when
returning the result of the onchange.

Either way, these are risky changes, that we prefer to avoid
in a stable release such as 9.0. As a workaround,
we therefore add these fields in the sale order line tree view,
as readonly, so they are properly ignored when saving
the record.

This is important to avoid this write on `product.product`, as
users can have the write access to the `sale.order` without
having access to the `product.product`
(e.g. `Sales > See own leads` group)

opw-660716
2016-01-05 16:21:06 +01:00
qdp-odoo 6c9a874635 [FIX] account, l10n_nl: code 9999 was already existing in l10n_nl, raising a unique constraint(code) upon the chart installation if the code_digits field set on the company is 4 (account code length = 4 digits). Fixes ticket 660636 2016-01-05 16:16:16 +01:00
aymericfernez 97e87a42cd [CLA] signature for Aymeric FERNEZ
Closes #10181
2016-01-05 14:47:43 +01:00
jeffery chen fan da17c98833 [FIX] base: China address format
Should be in one line
Closes #10217
2016-01-05 14:35:56 +01:00
Mohammed Shekha edf565881c [FIX] web: refresh in form view when first view mode is calendar
When you are in form view and came from calendar, a screen refresh
throwed an error from fullcalendar lib. Also when going back to the
calendar view, it would not be loaded.

It is due to fullcalendar not being rendered if it is not visible, and
other part of the Odoo code are dependent on it having been rendered.

This commit hide the calendar after having been rendered.

closes #10253
opw-659314
2016-01-05 14:25:57 +01:00
Martin Trigaux 77aee2d78f [FIX] website_forum: escape link content
The links present in forum messages are parsed to integrate "nofollow"
attribuate in it.
In case the content of the link contains some special char (e.g. <a>foo)bar</a>)
the regex fails as it interprates the content as an invalid expression.
2016-01-05 12:34:31 +01:00
Nicolas Martinelli 191128611d [FIX] account: typo in date comparison 2016-01-05 11:29:26 +01:00
Richard Mathot c9c08adbd0 [FIX] qweb2.js: improve debugging 2016-01-05 09:27:51 +01:00
Arthur Maniet e046938372 [FIX] account: update payment's invoices when assigning outstanding debit/credit. Fixes #8788. PR #10030 2016-01-04 16:48:46 +01:00
qsm-odoo 113dad2576 [ADD] website_theme_install (+ base: remove comment)
New module to propose theme installation on website installation.
2016-01-04 15:49:15 +01:00
qsm-odoo f731217a0d [REF] theme_(default,bootswatch)
Add sequence numbers and remove auto_install of theme_default.
Also change the theme_default icon and add a cover.
2016-01-04 15:49:14 +01:00
qsm-odoo 0b7cffc818 [FIX] base: url field for ir.module.module
The ir.module.module model has a 'url' field (so there is a 'url' field
in db) but the 'url' values in the __openerp__.py files were not used.

Now, the 'url' field is filled with the manifest 'url' value with a
fallback to the manifest 'live_test_url' value.
2016-01-04 15:49:14 +01:00
Denis Ledoux 52db42d3df [FIX] account: multi-company payment term
Despite the fact there is a `company_id` field
on `account.payment.term`, there is no multi-company
record rule on this model. The payment terms
are therefore shared by default accross companies,
even if the company is filled on the payment term.

In addition:
 - The `company_id` field on `account.payment.term` is required
 - The field is invisible on the payment term form
 - The default value is the user company

Adding the record rule would imply to change:
 - The fact the `company_id` field is required,
   as you probably would like to share some payment
   terms accross companies, by leaving empty this field
   on the payment term form
 - The field should be visible in the form for users
   having the multi-company group, so the admins can
   create payment terms for other companies than the one
   they are currently in.

This cannot be done in a stable release, such as 9.0.
This is for master.

In the mean time, we keep the behavior as it was in 8.0:
We consider that the payment terms are shared among companies,
and the `company_id` field is simply ignored.

This implies that choosing a payment term from another company
in an invoice must not lead to multi-company access rights issues,
as it was the case before this revision: If a user other than
the admin chose a payment term from another company, the on change
on the payment term leaded to access rights issues, as it needed
the read access on the company of the payment term, to get
the currency decimal places.

From this revision, the currency is took from the invoice directly,
through the context, and if not passed in the context, the company
of the user is used instead of the company of the paymen term.
It makes more sense anyway to take the currency from the invoice
instead of the currency of the payment term company to retrieve
the currency decimal places.

opw-659818
2016-01-04 14:53:16 +01:00
Nicolas Martinelli 2f562af355 [FIX] project: project_time_mode_id in debug mode
project_time_mode_id is the timesheet UoM. However, all timesheet
widgets assume that project_time_mode_id is hours, therefore it is not
supposed to be changed.
2016-01-04 14:12:53 +01:00
Nicolas Martinelli b2d92666d1 [FIX] sale_timesheet: link timesheet line to product
Commit fde3a529 unlinks the product and the timesheet. Although we don't
want to use the cost of the product in the timesheet, we still want to
link the timesheet to the product for reporting.
2016-01-04 14:12:53 +01:00
Arthur Maniet 1b9baf1ac2 [FIX] barcode: value representation for scannable field float
The value was stored as a string when it should have been a float.

opw-665376
2016-01-04 13:58:13 +01:00
Denis Ledoux 0f085db19e [MERGE] forward port of branch 8.0 up to a4e48d4 2016-01-04 12:36:14 +01:00
Alexis de Lattre a4e48d4c28 [FIX] product, purchase: pricelist of PO issued from procurements
When a purchase order is created through a procurement order,
the purchase order pricelist is taken from
the partner `property_product_pricelist_purchase`,
which is a property, which therefore can be different
according to the company. This is therefore
important to force the company to the procurement company
when browsing the partner, to get the correct pricelist,
from the right company. Otherwise, it take the pricelist
from the `SUPERUSER` company (when running the schedulers/cron),
which can be different than the procurement company.

The same as to be applied when browsing the product,
as the `standard_price` field (Cost Price) is a property
as well, and can be different according to the company,
in order to get the correct price unit on the purchase
order line, from the correct company.

Fixes #5329
Closes #5330
2016-01-04 11:35:23 +01:00