Commit Graph
81824 Commits
Author SHA1 Message Date
Aaron Bohy 26b00a844a [FIX] mail: client action: traceback on composer focus
wrong copy-paste introduced in c4fb2b50e0.
2015-12-24 09:05:28 +01:00
Denis Ledoux 5e51dc9924 [FIX] mail: unfollow buttons for portal users
The route `/mail/unfollow` is used by the button
`Unfollow` in the mail notification template so a user
can remove himself from the followers of a thread.

To be able to remove yourself from the followers,
you need to have the write access on the thread
(see `message_unsubscribe` in `mail/mail_tread.py`)
which you perhaps do not have, for instance if you
are a portal user.

The unsubscribe of this follower from the thread
should therefore be done as sudo.

opw-659295
2015-12-23 17:59:36 +01:00
Goffin Simon 7021221e2e [FIX] account: difference in account.bank.statement
Since balance_end and balance_end_real are floats, they cannot be compared without rounding.

opw:660299
2015-12-23 17:08:54 +01:00
Goffin Simon 045a859414 [FIX] website_sale: discount display in e-commerce
Each time the quantity of a product is changed, the price must
be updated according to the pricelist of the user.
When the price given by the pricelist is less then the unit price
of the product, the reduction of the price must be displayed.

opw:660178
2015-12-23 16:57:49 +01:00
Denis Ledoux 24eee9d7ba [FIX] purchase: confirm of purchase orders with kit boms
When using phantom/kit boms,
`action_confirm` on the move can lead to the move unlink,
as new moves with the different parts of the product have
been created.

See `_action_explode` in `mrp/stock.py`

The method `action_confirm` on `stock.move` returns the list
of remaining moves.

`force_assign` should therefore be performed on this new
moves list, returned by `action_confirm`, rather than
be performed on the moves list sent to `action_confirm`

opw-660722
2015-12-23 16:21:52 +01:00
Géry Debongnie b6f0e485e7 [FIX] web_kanban: disable jquery sortable in mobile mode
It does not work anyway.  But the real issue is that it intercepts touch
events and prevents horizontal scrolling in grouped kanban views.
2015-12-23 16:14:00 +01:00
Géry Debongnie c4fb2b50e0 [IMP] mail: extended composer for mailing channels
In Discuss, when the user opens a channel, the composer was the same,
regardless of the channel type.  This is fine for chat channels, because
we expect mostly small one liners to be written.  But for mailing
channels, it is a problem:  it is too easy to send a mail to everyone
just by typing ENTER, when the user wanted to go to the next line.

This commit introduces a new widget, the extended composer, to be used
for those channels.  It allows the edition of the subject line, and
don't sent messages when the enter key was pressed.
2015-12-23 14:37:41 +01:00
Denis Ledoux 9c2836090f [FIX] website_forum: set a name for answers
When replying to a question,
there is no possibility to set a title (`name`)
in the answer form, there is no input for the title,
even if the controller `/reply` would accept it.

This revision sets a title for answers so:
 - The answers doesn't appear as `False` in the breadcrumb
 - The subject of the mail notifications sent
   for these answers are set with a meaningful title

opw-659279
2015-12-23 14:35:07 +01:00
Damien Bouvy ed6a52a517 [FIX] sale: no more refund invoices overload
When fetching the invoices linked to a sales order,
the system looked for all refunds which had an 'origin'
field that was the number of an invoice of this SO.

That's nice, except that invoices that are not yet
validated do not have a number, which caused sales
order with an uncofirmed invoices to be 'linked' to
all 'out_invoices' that had no origin (which could
be 1000+ for a substantial db) (basically all out
invoices which had the origin field set to false)

This commit simply extends the domain to exclude
refunds that did not originate explicitly from one
of the SO's invoices.
2015-12-23 11:51:48 +01:00
Christophe Matthieu c7337bf3b3 [FIX] web: Can't save a x2m in list editable if contains a m2m_tags with a color field
m2m_tags inlist editable view try to get color on validation, the field is invalid because the mutex is pending.
Fix: don't re-render the fields

Issue: steps to reproduce:
- Create a new instance, install "sale"
- Create a product "prepayment", service, invoice on ordered qties
- Create aproduct "project phase", service, invoice on delivered qties, manually track delivered qties
- Create a SO with once prepayment, and twice a line with "project phase". ( the name (description) of the lines should be "phase 1" and "phase 2" )
- Create invoice => The prepayment is invoiced
- Go back to the SO, try to change the delivered qties of the first phase to 1
- Save => error, odoo doesn't let you save.
2015-12-23 10:58:37 +01:00
Martin Trigaux edfa2c4732 [FIX] web_planner: untranslated planner
Missing context in call to render the planner leading to untranslated planner.
Use the session to get the user context as outside of the view manager.

opw 660627
2015-12-23 10:51:21 +01:00
Denis Ledoux f3ef7001cf [FIX] account: prevent recomputation of related field internal_type
When creating a new `account.account`,
or writing on an existing one, changing the
`type`, the source of the related field
`internal_type`, `user_type_id.type`, was
re-written (re-stored) because the field
was not read-only.

In addition, the re-store of the value
of this field triggered the re-store of the related
field `internal_type` on all other `account.account`
records using this `internal_type`, which leaded to:
 - Performance issues
 - Potential access rights issues, if this leaded
   to write operations on records to which the user
   does not have the access (multi-company rules, among others)

Forcing the field as read-only allow to not pass the value of this
`internal_type` from the web client to the server when
creating or editing an `account.account`.

Besides, the field is required in the view, to correctly trigger
the according onchange method:
```
@api.onchange('internal_type')
def onchange_internal_type(self):
```

opw-660292
Closes #10143
2015-12-22 16:22:13 +01:00
Damien Bouvy 1057542f9f [IMP] project: add link from analytic account form view
Analytic accounts are inherited by project.project, and in some cases it is useful to have a link from the account to the project.

This is a usability-fix, not a code-fix
2015-12-22 15:19:05 +01:00
Nicolas Martinelli fd8e9da7e3 [FIX] hr_timesheet_sheet: link account line and sheet
When an expense is recorded and linked to an analytic account, the
associated line will appear in the timesheet.

This fix links prevents linking an account analytic line to a timesheet
sheet if the line is not a timesheet.

Somehow related to a4b6e3a8

opw-657917
2015-12-22 14:57:47 +01:00
Nicolas Lempereur 3e2369fbb6 [FIX] web_kanban: reference for loaded more records
If the kanban view is loading grouped records, the dataset of the view
itself is the concatenation of the dataset of each groups.

But when using "Load  more..." on a column, these records are not added
in the view dataset which is thus desynchronised. This could lead to an
error down the road.

closes #10156
opw-659016
2015-12-22 14:49:59 +01:00
Martin Trigaux edf276c27f [FIX] typo with en->en translations 2015-12-22 11:59:28 +01:00
Denis Ledoux 7dc2565878 [FIX] website_quote:
This revision is related to 7be2403cf5

The payment acquirers must be fetched if the quote
needs a payment.

Besides, as explained in the above revision, the state
`manual` no longer exists sales orders, and therefore
this must no longer be used to determine if a quote
needs a payment or not.

opw-660575
2015-12-22 11:43:03 +01:00
Goffin Simon 0a7ee85c18 [FIX] hr_payroll: cleaning and writing in new API
Cleaning and writing in new API "onchange_employee" and "onchange_contract".

opw:659338
2015-12-22 11:36:50 +01:00
Denis Ledoux e04ddeaa22 [FIX] web: client action change password
1. To change the page title, you now have to call
`set_title` from `require('web.web_client')`

2. Without the `type="button"`, the `Change Password`
button is regarded as a `type="submit"`, therefore
submitting the form, on `web` on click,
and `web` doesn't expect this POST request.
The POST request must be done on
`/web/session/change_password` only.

opw-660567
2015-12-22 11:23:31 +01:00
Jeremy Kersten 9f795ef295 [FIX] wesite_slides: use embed for document and presentation
For performance, we could use iframe with embed document.
But it's more styled to use our own slide design that an iframe
with a long scrollbar.
2015-12-21 17:21:33 +01:00
Denis Ledoux df745c25fb [FIX] point_of_sale: POS user access rights
- A simple POS user doesn't have the rights to write
   on pos.config, not even to write the `current_session_id`,
   so it must be done as sudo.
 - If no fields is specified to `search_read`, it reads all fields.
   The simple POS User cannot access all fields on `account.journal`,
   (e.g., the computed fields implying `account.payment` records)

opw-659079
2015-12-21 17:13:32 +01:00
Denis Ledoux 7427972f2e [FIX] project_timesheet: timesheets order in task form
This revision is related to 432f199.

Since the above revision make sure to change the
editable list to `bottom`,
the order of the list should be done on the `date` (asc),
on this view, as this is more likely that, when adding a new line,
that the date set on this new line is
more recent than the dates on the other lines.

The new added line should therefore appear directly at the bottom
of the list, to avoid consufing the user.

Besides, the default order of the model `account.analytic.line`
is set to `date desc, id desc`

opw-659892
2015-12-21 17:13:31 +01:00
Odoo Translation Bot 9e211ef127 [I18N] Update translation terms from Transifex 2015-12-20 01:26:02 +01:00
Jeremy Kersten 73c4c727d2 [FIX] website_crm: allow to prefill data from get params
Allow to arrive on the form with fields prefilled with params in url
2015-12-18 17:38:02 +01:00
Raphael Collet 151118daf8 [FIX] resource: add missing field in resource.calendar.attendance form view 2015-12-18 16:51:52 +01:00
Raphael Collet ab4de2a453 [FIX] stock, stock_calendar: fix duplicate names of pickings in test files 2015-12-18 16:51:52 +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
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
Nicolas Lempereur df2d0c4f10 [IMP] crm: add margin next activity 2015-12-18 12:38:42 +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 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
Martin Trigaux 57e93f49e5 [FIX] account: missing labels on some fields
And reexport some missign terms
2015-12-17 15:17:49 +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
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
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
Aaron Bohy 2b99a36921 [FIX] mail: sent messages are plaintext
The problem was that users couldn't write characters like <, > in their
messages because the messages are html (e.g. '3 < 5' resulted in '3' because
this wasn't html valid so the second part was trimmed).

Because of mentions, we can't force messages to be plaintext (mentions are
processed and replaced by html links before the message is stored in DB).

The solution is to escape them just before processing the mentions. In the case
of chat windows, we must be careful because chat windows are also used for the
livechat, for which messages are plaintext. So the escaping should be done for
chat windows in the backend, but not in the livechat.
2015-12-16 15:48:42 +01:00
Aaron Bohy f5e4fbb20c [FIX] mail: correctly redirect to channels
Clicking on a channel link should open that channel in Discuss, not the channel
form view.
2015-12-16 15:48:42 +01:00
vnsoft 4b635a1da7 [FIX] report: barcode controller: correct humanreadable handling
humanreadble arg comes as a string, so bool(0) was True. Cast it to int before.
2015-12-16 14:48:25 +01:00