Commit Graph
103218 Commits
Author SHA1 Message Date
Nicolas Lempereur 29851b74aa [FIX] sale_crm: if no company on lead use user currency
When displaying the `sale_amount_total` of an opportunity, the amount of
the related order are summed up in the opportunity company's currency.

But when creating a lead, we can leave the company empty which warranted
this commit adding in that instance a fall back on the current user
company currency.

closes #11611
opw-673167
2016-04-06 13:11:48 +02:00
Géry Debongnie c4e0562144 [FIX] web: editable list view waits for record to be loaded
The editable list view method 'edit' is supposed to wait for the
record to be completely loaded.  But when loading the defaults values,
it ignored the actual loading and completed too early.  This commit
chains the deferred with the form record.
2016-04-06 12:30:30 +02:00
Denis Ledoux 6e6e8ea185 [FIX] hr: mention suggestions for employees with disabled user
This is related to revision 84b45515bd

It's actually the user on which the `active` field  should be checked,
as this is possible to disable a user without disabling his partner,
but it should no longer be possible to mention him as soon
as the user is disabled.

opw-673719
2016-04-06 11:48:38 +02:00
Nicolas Martinelli 076b837e36 [FIX] mail: duplicate translations 2016-04-06 11:32:23 +02:00
qdp-odoo a7639c7acc [ADD] account_tax_adjustments: new module to deal with miscellaneous operations you make for adjustments on the VAT report
[IMP] l10n_be: added adjustment taxes for grid 61 and 62
2016-04-06 11:28:01 +02:00
Nicolas Martinelli 20ea4edabe [FIX] mail: translate static channels
The name of the static channels ('Inbox', 'Starred') are not translated
in the breadcrumb. The reason is that at intialization of the chat
manager, the translation are not yet loaded.

The fix is to use the lazy translate functionality, which applies the
translation when the string is displayed.

Courtesy of @aab-odoo

opw-673856
2016-04-06 10:46:33 +02:00
Géry Debongnie dac37163d1 [FIX] web: fieldmany2manytag issue
I recently removed some rpc from init fieldmany2manytag (it was in a
mutex) and moved it to the willStart method (without mutex).  The
fieldmany2many tag widget needs this information before it can be
rendered.  However, in editable list views, the rendering engine does
not wait for the fields to be ready before completing its initialization
process.  As a result, the field many2many tag was rendered before it
was ready, which broke various things, including its position.

This commit attempts to bring sanity to this issue by making sure that
the rendering engine waits for its fields to be ready.  Also, the
editable list view should detect correctly when the form is loaded.

If this commit introduces new issues with the editable list view and
onchanges, I will not be pleased.  You don't want to bring me this sad
news without at least something to buy my good will.
2016-04-06 09:55:06 +02:00
Nicolas Martinelli d4eebd7f22 [FIX] mail: fix translation
Missing translations and typo.

Closes #11604
opw-673853
2016-04-06 08:29:23 +02:00
Christophe Simonis 9e2de9b1ae [MERGE] forward port of branch saas-6 up to 7f5ca1d 2016-04-05 19:04:36 +02:00
Christophe Simonis 7f5ca1d94a [MERGE] forward port of branch 8.0 up to ceb87b7 2016-04-05 18:59:00 +02:00
Julien Legros ec444bf091 [FIX] calendar: mail_thread overrides
Since calendar_event overrides read to handle virtual ids, we need to do
the same for mail_thread _get_message_unread and _get_message_needaction
methods. Otherwise virtual ids may end up in the cache and browsing them
would fail.
2016-04-05 18:19:52 +02:00
Martin Trigaux 44c0245a6a [FIX] base_import: example files
SQL dump:
- Recent export with -O to remove owners
- correct poor Ramzy name

purchase order CSV:
- use correct column names
- remove destination and pricelist columns
- first file should not contain order lines
- second file should be same as first + lines
2016-04-05 13:57:44 +02:00
Xavier Morel ceb87b78f0 [REV] usage of m2m listview for o2m
Turns out to break way more than it fixes.
2016-04-05 11:32:59 +02:00
Joren Van Onder 7318ab6710 [FIX] web_calendar: fix read_slice race condition
When quickly changing the range in the calendar view, multiple
asynchronous read_slice requests will be launched. The read_slice
returns the records and sets the ids property on the dataset according
to a set domain, context etc.

This creates a race condition because although the read_slice calls will
be launched in the correct order, there is no guarantee that they will
resolve in the correct order. In practice issues will occur quite
frequently on a slower connection and with a big read followed by a
small read. The big read that matches a lot of records will be slower to
complete than the small read which will result in it resolving later
than the small read. This causes the dataset to not be in sync with the
rest of the view. When you click on an affected event everything will
look fine in the popup, but when clicking on edit the form view will
show a new event instead. The reason for this is that switching to the
form view requires a correct dataset.index, which is set by
dataset.get_id_index(id) which won't exist.

A potential way of fixing this would be guaranteeing the order of
read_slice calls by only allowing one of them to be active at a
time. This would not be ideal because you could end up with a long chain
of read_slice calls when changing the range fast on a slow
connection. In theory the UI would have to block as well then.

Instead of that, we will simply ignore responses to out-of-date
requests. This is done by manually resetting the ids property of the
dataset to its previous value when we detect the range of the calendar
has changed since the read_slice call was launched.

opw-673425
2016-04-05 09:29:53 +02:00
Damien Bouvy 8ae6406a37 [FIX] account: allow forcing company when fetching fpos
The code to fetch the fiscal position of a partner uses ACLs and
ir_rules to select the correct ones, but when calling the function
as admin, multi-company rules flight out the window.

By allowing to force a company in the context, we can get the fpos
as the admin from the pov of any company.
2016-04-04 15:37:22 +02:00
Alexandre Fayolle cc60504bff [FIX] base: only run postinstall tests for installed or updated modules
Uninstalled modules are skipped with the filtering on the state.
Fixes #9768, Closes #11378
2016-04-04 14:32:20 +02:00
Nicolas Martinelli a0e04afe62 [FIX] purchase: supplier currency
When a supplier is added, the potential change of currency should be
taken into account.

opw-672862
2016-04-04 14:17:41 +02:00
Nicolas Martinelli 7c410c7c12 [FIX] purchase: do not add contact in suppliers
When the PO is related to a contact of a company, the current behavior
is to add the contact in the list of suppliers of the product. However,
there is little chance that this is actually the desired behavior.
Indeed, in most of the cases, this will simply add a lot of useless
suppliers on a product.

The fix is to add the parent company of the contact in the list of
vendors, since `_select_seller` wil also search in the parent companies
to get a purchase price.

opw-672862
2016-04-04 14:17:41 +02:00
Géry Debongnie 3d4954b88f [FIX] web: some float fields silently ignores their changes
We have an interesting problem when editing all custom float fields and all
fields with no explicit digit attributes: the propertiesmixin tries to
check if the number was changed, according to their declared precision.
But for these specific fields, it does not find a digit attribute, and
defaults to 2.  Then, it makes sure that the changes are ignored if the
new value is too close to the old value (with 2 digits precision)

For example, if the user sets the value to 1.234, then save, then change
it to 1.235, then save, the form view will display 1.234 and totally
ignore the change.

Not that handling the digit precision is done in the propertiesmixin and
in the field float widget.  Also, they do different things, and in some
case, may not be the same.   All this logic should be moved to the
fieldfloat widget.
2016-04-04 12:18:17 +02:00
Odoo Translation Bot 678a84e626 [I18N] Update translation terms from Transifex 2016-04-03 02:59:02 +02:00
Fabien Pinckaers e49893ab2d [IMP] Balance in Odoo --> Balance in GL 2016-04-01 19:22:13 -07:00
Raphael Collet 7a483a85d4 [FIX] *: do not use computed fields for resizing images
Otherwise recomputation may fail with "record does not exist or has been
deleted" when creating records with a value directly set for e.g.
'image_mediun' on a new product.

The issue comes from the storage of the images.  When creating a product, the
creation of an attachment for storing the field `image_medium` triggers the
recomputation of that field before its dependency `image` is set.  As `image`
is initially null, `image_medium` is recomputed as null, and this deletes the
attachment just created before the latter has completed its creation!  As a
consequence, some code at the end of `create` for the attachment crashes
because the record has been deleted.

The following models have been fixed: `fleet.vehicle.model.brand`,
`hr.employee`, `im_livechat.channel`, `mail.channel`, `payment.acquirer`,
`pos.category`, `product.template`, `product.public.category`, `res.partner`.

opw 666330
Closes #11516
2016-04-02 00:47:57 +02:00
Olivier Dony f6090e69e6 [FIX] ir.attachment: verify mimetypes match w/ contents 2016-04-01 20:44:52 +02:00
Olivier Dony b7b2609328 [FIX] base_import: avoid JS error in callback 2016-04-01 20:44:10 +02:00
Olivier Dony e2d0f1e974 [FIX] base: require wizard for passwd change 2016-04-01 20:42:50 +02:00
Olivier Dony b2c20482c0 [FIX] res.partner: modifying users requires extra access 2016-04-01 20:40:20 +02:00
Olivier Dony 2c13c1ff05 [FIX] res.users: better compatibility of read() override with new API 2016-04-01 20:40:20 +02:00
Olivier Dony 37744cb55f [FIX] base_import: avoid JS error in callback 2016-04-01 20:30:57 +02:00
Olivier Dony bf75f51ddb [FIX] base: require wizard for passwd change 2016-04-01 20:30:57 +02:00
Olivier Dony 08b7e5ab63 [FIX] res.users: better compatibility of read() override with new API 2016-04-01 20:30:57 +02:00
Olivier Dony a7c2377500 [FIX] res.partner: modifying users requires extra access 2016-04-01 20:30:56 +02:00
Olivier Dony 7546123a6b [FIX] base_import: avoid JS error in callback 2016-04-01 20:28:13 +02:00
Olivier Dony 97a96bc96b [FIX] base: require wizard for passwd change 2016-04-01 20:28:00 +02:00
Olivier Dony 3ab436fb7b [FIX] res.partner: modifying users requires extra access 2016-04-01 20:16:11 +02:00
Christophe Simonis de11d8415a Revert "[FIX] ir.qweb: can't edit t-field content if modified by inherit xpath"
This reverts commit 5ab43773cb.
This commit is not needed anymore since d3557de746.
2016-04-01 18:32:32 +02:00
Christophe Simonis 94af66fe8b [MERGE] forward port of branch saas-6 up to df45a31 2016-04-01 18:31:04 +02:00
Christophe Simonis df45a3128d [MERGE] forward port of branch 8.0 up to 1d0b9da 2016-04-01 18:25:48 +02:00
Denis Ledoux 895e77a336 [FIX] website_quote: utility method to determine the transaction type of an order
The transaction `type` of an order can depend according
to the order.

For instance, if the order leads to recurring payments,
the transaction type became `form_save`
instead of `form`.

This new method allow to easily override this `type` value
for other modules, so the entire button
rendering code does not have to be
copy/pasted.
2016-04-01 14:50:10 +02:00
qdp-odoo 845b1bde7b [FIX] purchase: empty the stock interim account in case of purchase in foreign currency with a fluctuating exchange rate 2016-04-01 14:32:24 +02:00
Nicolas Martinelli 5de3900258 [FIX] project_issue: count issues
If an issue is created without default stage, it is not counted in the
total of issues. However, a task without default stage is counted (see
commit 432c01c0).

Fixes #11398
opw-672380
2016-04-01 11:55:18 +02:00
Nicolas Martinelli b3cfec189b [FIX] project_issue: link to issues
On the project dashboard, a user needs to click exactly on the number or
on the label in order to open the issue list. If the user clicks outside
the text (but still inside the box), the project is open instead.

The reason is because the link is specifically defined on the
number/label. The fix defines the link on the box itself.

Fixes #11396
opw-672380
2016-04-01 11:54:42 +02:00
Yannick Tivisse 2e0f55537f [IMP] website_hr_recruitment: valid email address on jobs/apply page
A public user is currenlty able to enter 'georges.pompidou' as email
address which is obviously not valid. We change the input type ffrom
text to email and let the browser manager the email format
validity
2016-04-01 11:18:09 +02:00
Nicolas Martinelli 1d0b9da3f0 [FIX] project_issue: partner email
When a new issue is created, the partner email is not pre-filled.

Fixes #11395
opw-672380
2016-04-01 11:12:39 +02:00
Odoo Translation Bot 6aa601da2a [I18N] Update translation terms from Transifex 2016-04-01 00:28:28 +02:00
Christophe Matthieu d3557de746 [FIX] ir.qweb: branding breaks editing/inheritance
Could not edit t-field content if modified by inherit xpath,
and could not inherit qweb views with non "xpath" nodes with
`position="attributes"`.

Examples:
Can't edit: `<data><xpath expr="div[@t-field='object.test']"
position="replace"><div t-field="object.test"/></xpath></data>`

Inherit doesn't work: `<data><h1 position="replace"/><h1
class="test">tata</h1></data>`

Closes #11561
Closes #11547
2016-03-31 18:11:02 +02:00
Nicolas Martinelli 2e4777bb32 [FIX] account, purchase: price_unit as Float
The price unit on the account move line is defined as a monetary field.
However, on a Sales Order or on a Purchase Order, the price unit is
defined as a float with precision 'Product Price'. Therefore, when an
invoice is generated from a SO or a PO, inconsistencies arise if the
product price precision is larger than the currency precision.

opw-673251
2016-03-31 17:08:37 +02:00
Goffin Simon b44cb82c1b [FIX] account, stock: date invoice for a refund
When a a refund is created from an open invoice and a different
date than today is selected as refund date, the invoice date of
this refund must be the selected date.

opw:673369
2016-03-31 14:18:02 +02:00
Goffin Simon 214231fbce [FIX] purchase: _get_price_unit_invoice
If the costing method of the product is "average", the price unit
of the stock move is set in the currency of the field "price_currency_id"
with the function "do_partial" (addons/stock/stock.py).

opw:672552
2016-03-31 14:05:19 +02:00
Nicolas Martinelli 81748478bc [FIX] purchase, purchase_requisition: make_po
When a product is set up to generate a purchase tender instead of a
purchase order, the associated procurement is set in exception.

This is because the result of `make_po` is returned by the method `_run`,
and the result of `_run` is used to determine if the procurement is
running or in exception. Since a purchase tender does not generate the PO,
the method `make_po` returns an empty list, and therefore the procurement
is considered as in exception.

The fix is to return the procurement_id instead if a purchase order or a
purchase tender has been created.

opw-672170
2016-03-31 12:54:49 +02:00
Nicolas Martinelli 41c42e8623 [FIX] stock: run procurement once
The call to the method `run` is executed at the procurement creation if the
key `procurement_autorun_defer` is not in the context. This is not
necessary since the call to `run` is explicitly done afterwards.

opw-672170
2016-03-31 12:54:49 +02:00