Commit Graph
107690 Commits
Author SHA1 Message Date
qdp-odoo 554ca7ba7f [FIX] base: set US back as main company's country in demo mode 2017-02-02 15:50:52 +01:00
qdp-odoo e0be5bb11c [FIX] requirements: add num2words. Needed in l10n_mx_edi 2017-02-02 15:31:34 +01:00
Aaron Bohy 9fb68e6c96 [FIX] mail: Activity widget: undefined model
Former implementation tried to retrieve the model in the 'model' and
'res_model' attributes of the widget, but both of them were undefined.

The model being required for some of the RPCs performed by the widget,
there were bugs (e.g. the messages weren't refreshed after the creation
of a new activity).
2017-02-02 14:27:32 +01:00
Christophe Simonis 6a942a9e96 [MERGE] forward port branch 10.0 up to 8a0151b4bc 2017-02-02 12:42:51 +01:00
Nicolas Lempereur 8a0151b4bc [FIX] mail: unhide relevant "Odoo Session Expired"
With how the chat manager was currently started, the "Odoo Session
Expired" could cause an arcane js error which would overshadow it.

This is caused by doing an RPC request too soon which invalidate the
session too soon which disable web client `show_application`.

With this commit, we have the error message "Odoo Session Expired"
instead of:
 "Uncaught TypeError: Cannot read property '$el' of undefined"

closes #15313
opw-706346
2017-02-02 11:23:30 +01:00
Christophe Simonis b7c7591bfb [MERGE] forward port branch saas-11 up to 71773e1f1c 2017-02-01 19:08:14 +01:00
Christophe Simonis 71773e1f1c [MERGE] forward port branch 9.0 up to a53063606a 2017-02-01 18:16:15 +01:00
Christophe Simonis a53063606a [MERGE] forward port branch saas-6 up to 63b7db377e 2017-02-01 18:06:03 +01:00
Christophe Simonis 63b7db377e [MERGE] forward port branch 8.0 up to e3232c85b9 2017-02-01 18:04:47 +01:00
Denis Ledoux f9272264c1 [FIX] account: invoice report multi-company security
This record rule added in the below revision:
1950fc4216

has been removed for an unknown reason during the account refactoring
c04065abd8

Without this rule, a user can see invoices from other companies
through the invoices analysis.

opw-705718
2017-02-01 17:32:40 +01:00
Martin Trigaux 365d6a888d [FIX] stock: correctly compute custom search method
The search on qty_available was refactored twice:
- b9853db8 to split the method
- a989680b to remove the eval operator

At b9853db8 the order of evaluation introduced a bug so that the domain
   ('qty_available', '=' 10.0)
was evaluated
   if product[qty_available] = 10.0:
which crashed (`=` instead of `==`).

Before b9853db8, this code did not crash as the operator was converted via
  if operator == '=':
    operator = '=='
which is no longer executed after the split

a989680b replaced the eval by a dictionnary that replaced the eval error by a
KeyError when searching with `=` operator.

This commit changes several things:
- replace the `operator in ('==', '>=', '<=')` as this was evaluated before the
  operator replacement code mentionned above
- remove the replacement code as no longer justified since a989680b
- replace the OPERATOR key `==` to always match given key
2017-02-01 16:09:10 +01:00
Denis Ledoux 6d1df94614 [FIX] account: payment term currency
This is related to revision
52db42d3df

The total sent to the `compute` method is always
within the invoice company currency, not
in the invoice currency.

`total` comes from the first tuple result
of the method `compute_invoice_totals`,
which is always in the invoice company currency.
if the company currency is different than
the invoice currency,
the total is the sum of the `line['price']`
converted to the company currency, as stated
by
`line['price'] = currency.compute(line['price'], company_currency)`
and
`total += line['price']`

In the above revision, the possibility to pass
its own currency in the context is added. This is in case
the payment term used comes from another company
than the one of the invoice (see the commit message of the revision).

The mistake was to use the invoice currency, while it should
use the invoice company currency, as the `total` amount is
within the invoice company currency, not the invoice currency.

opw-705604
2017-02-01 16:01:34 +01:00
Nicolas Lempereur e3232c85b9 [FIX] mrp_byproduct: remove wrong move_dest_id link
A byproduct is a produced when producing another product (the targetted
product).

A move can be linked to another move. eg: we could have a manufacturing
order of 3 units linked to a move of a delivery order of these 3 units.

If we produce 2 units, the manufacturing order is split in 2 units and
1 units, and the delivery order is split similarily because of the link

1. [T manufacturing move split] -> [T delivery move split]

(T is the targetted product, B is the byproduct)

But in 8c307d7b1 a move_dest_id of a byproduct was linked to the targetted
product delivery move, thus in some situation the move of the delivery
order of the byproduct would erroneously be split 2 times instead of one.

1. [B manufacturing move split] -> [T delivery move split]
2. [T manufacturing move split] -> [T delivery move split]

This could also be the source of other issue, and since the byproduct
and targetted product are different, the link should anyway not be done.

opw-697151

note: this change is already in 10.0 (it is inside mrp refactoring 2ddc35a53)
2017-02-01 15:33:53 +01:00
Nicolas Martinelli b34917cd6d [FIX] base: field 'Type' readonly
The field 'Type' should always be readonly since:
- it must not be changed for standard models
- its value must be 'Custom Object' for a custom model

opw-706130
2017-02-01 14:53:35 +01:00
Nicolas Martinelli 02cfb7be83 [FIX] base: field 'Type' readonly
The field 'Type' should always be readonly since:
- it must not be changed for standard models
- its value must be 'Custom Object' for a custom model

opw-706130
2017-02-01 14:44:41 +01:00
Géry Debongnie d96dc25c47 [FIX] hr_expense: unbreak kanban template 2017-02-01 14:01:58 +01:00
qsm-odoo b836e00d70 [FIX] web_editor: allow to copy paste when editing translations
When editing translations, you were not able to copy/paste texts before
this commit. Indeed, in some contexts, in some browsers, copy/pasting
text was creating a new paragraph inside the translation, preventing it
to be saved.

This commit simply adds code to remove these paragraphs each time text
is changed.

A more elegant solution will be found for master with website and
editor improvements.
2017-02-01 13:09:16 +01:00
Nicolas Martinelli e0222de3c2 [FIX] stock: update qty on hand
When the quantity on hand is updated from the wizard, it may result in
completely inconsistent results.

This happens for example in the following case:
- 10 Units in Stock/WH
- 18 Units in Stock/WH/Shelf 1

The "New Quantity on Hand" suggests a theoretical quantity by taking
into account the location and its sub-locations. It the example, that
would mean 28 Units in location 'Stock/WH'.

However, the `_get_quants` method of the `stock.inventory.line` model
doesn't take into account the children locations. Therefore, the
theoretical quantity would be 10 Units in location 'Stock/WH'.

This inconsistency confuses the user, and the new quantity added might
introduce unexpected results.

opw-703886
2017-02-01 13:07:06 +01:00
Géry Debongnie a28405e469 [FIX] web: pivot view properly restores row groupbys
Before this commit, when saving the pivot state in a favorite filter,
then restoring it, the row groupbys were ignored.  This commit makes
sure that we take them into account if necessary.
2017-02-01 12:18:40 +01:00
Géry Debongnie b8922c964c web: pivot view properly updates measure list
Before this commit, when changing measures from the favorites menu (by
selecting a filter with some pivot_measures), the measures in the
dropdown menus were not correctly updated.

This commits make sure that we update the active measures in the menu after
each changes coming from a do_search.
2017-02-01 11:55:53 +01:00
Christophe Simonis 2b4b60dc5e Revert "[IMP] website_sale: add id on cart line qty html block"
Putting a static id on an element inside a loop is a bad idea.

This reverts commit 57e2936fcc.
2017-02-01 11:43:37 +01:00
Christophe Simonis 0a2fa685e3 Revert "[FIX] website_sale: Call SO lines write and unlink as ORM commands"
This is not how to fix wrongly written field dependencies
(recomputation triggers).

This reverts commit 4c58f96c5d.
2017-02-01 11:43:37 +01:00
Christophe Simonis 35db7e3779 Revert "[IMP] base: Admin and Public partners are customers"
No, they are not (by definition).

This reverts commit 3aafb6f8e3.
2017-02-01 11:43:25 +01:00
Nicolas Lempereur 89c0927ce9 [FIX] report: switch route /report/barcode public
In some instances we could want to access the barcode without being
connected.

For example if we print the report in an scheduled action, the report
would be rendered by wkhtmltopdf as public user making the barcode
blank (we have a redirection to a html login page instead of the image).

A solution requiring view updates in stable version was implemented with:
https://github.com/odoo/odoo/commit/14282f165 in 8.0 ( further explained
in https://github.com/odoo/odoo/issues/10621 ).

This commit fix this another way in 9.0 by making the barcode route
public since this doesn't bring any harm, solve this issue and allow the
use of the barcode route for public user (which might be wanted).

opw-694470
2017-02-01 09:49:21 +01:00
Luis Torres 486ae7fda7 [FIX] l10n_mx: Only add the three tags that need in Mexico to set in the
XML.

The SAT xsd allow only three values to tax name, that is IVA, IEPS &
ISR, now are created this tags and are assigned in the sale taxs to use
in the XML generation.
2017-02-01 09:45:43 +01:00
Moisés López 9fc5a5ebfe [FIX] l10n_mx: Use valid label on invoices for taxes description 2017-02-01 09:40:29 +01:00
Jeremy Kersten 91f3a6f918 [MERGE] website_*: quick fixes for website_* module
Fix and imp based on the review of saas14 pad
Courtesy of @mge-odoo for the testing and reporting.
2017-02-01 09:17:20 +01:00
Jeremy Kersten 3bb2318baf [FIX] website_payment: use msg from payment acquirer in portal 2017-02-01 09:05:46 +01:00
Jeremy Kersten ea7d98ca24 [IMP] website_portal_sale: try to make /my/order/ route more responsive 2017-02-01 09:05:46 +01:00
Jeremy Kersten 69e0cb0a11 [FIX] website_sale: no footer during checkout for address edition
+ fix margin to be coherent with others pages
2017-02-01 09:05:46 +01:00
Jeremy Kersten e71b97e4d9 [FIX] website_portal: word wrap table by default
Split row content for small screen by default
2017-02-01 09:05:46 +01:00
Jeremy Kersten 4334715294 [fix] website_crm_partner_assign: avoid duplicate creation of opp in portal.
Disable confirm button during creation to avoid double click, triple click,
quadruple click, quintuple click and even undecuple click ... n-tuple click
2017-02-01 09:05:45 +01:00
Jeremy Kersten 85f7d4b5f2 [FIX] website_crm_partner_assign: fix date_deadline and active_date_deadline mixing
Now we only update/create activity if a date has been setted.
Now we save the deadline that user encode
2017-02-01 09:05:45 +01:00
Jeremy Kersten 8de2ada344 [FIX] website_crm_partner_assign: fix filter domain
Before this commit, lost was always empty because we didn't look for unactive record.
All is replaced by Active (All without lost)
...
2017-02-01 09:05:45 +01:00
Jeremy Kersten ce584f756a [FIX] website_crm_Partner_assign: avoid open lead in opp form and vice-versa 2017-02-01 09:05:45 +01:00
Jeremy Kersten 3d0cc2d6d2 [FIX] website_portal: allow non employee user to log in to the portal
Commit #3649b7f359b640635cbe0bc4f161884ba64c2318 remove sudo when loading the menu.

Add test to check that homepage portal can be loaded with user portal.
That's the first test using portal user, it don't really test the portal features,
but just that the loading of portal homeapge works...
2017-02-01 09:05:44 +01:00
Jeremy Kersten 371bcc6993 [FIX] website_crm_partner_assign: fix layout when no opps 2017-02-01 09:05:44 +01:00
Jeremy Kersten 34fc4a2749 [FIX] website_sale: avoid scroll to top when add to cart
This commit avoid that when you click on the add to cart a-submit link,
you scroll to the top because there are an empty anchor #.

Now we preventdefault th event, and so don't looking for the empty anchor,
and submit form immediately.

Courtesy of @mge-odoo for the reporting.
2017-02-01 09:05:44 +01:00
Jeremy Kersten 0e766c2405 [IMP] website_portal_sale: replace typo Quotes by Quotations
Uniformize the homepage portal where no records.
2017-02-01 09:05:30 +01:00
Olivier Dony af6286bab6 [DOC] setup/deploy: improve deploy guide
Add some extra guidelines for securing a public server
2017-01-31 19:23:11 +01:00
Olivier Dony 76c36079a5 [FIX] website: make GeoIP resolver shared
The GeoIP resolver keeps a permanent open file descriptor on the
GeoIP database file, for example /usr/share/GeoIP/GeoIPCity.dat

Because we initialize a resolver for each registry, servers with
many databases may easily blow up the open file descriptor limit
of multi-threaded workers (gevent or no workers multithread mode).

The Maxmind GeoIP API appears to be thread-safe since v1.1.4, so
it is much less wasteful to use a shared resolver for each process.

This patch keeps the _geoip_resolver class attribute on `ir.http`
for compatibility, but it will be removed for the next version.
2017-01-31 19:21:56 +01:00
Olivier Dony aca34baba8 [FIX] mail: fix cardinality issues in bounce processing
A couple of places in the processing of bounces only
accepted a single matching partner. But there could
be multiple partners matching an email address, and
we should handle them all.

There might also be no matching `bounced_thread_id`
matched by the regex, so we should guard against a
bounced_thread_id == None.
2017-01-31 19:21:56 +01:00
Olivier Dony ac94537b47 [FIX] maintenance: make equipments/requests visible to followers
It used to be based on owners, but owners are automatically
followers. Restricting on followers makes the visibility
of equipments and requests consistent with the mail notifications
linked to them.

Avoids issues with "phantom notifications" that appear in the
inbox counter but aren't visible.
2017-01-31 19:21:56 +01:00
Nicolas Martinelli ac66f296aa [FIX] stock: qty in pack operations
- Enable lot tracking on Product A
- UoM of Product A is kg, but Purchase UoM is lb(s)
- Create a PO for 200 lb(s) of Product A, confirm
- Go in the picking: 200.01 lb(s) shuold be received according to the
  pack operation, while 200.00 lb(s) are expected in the stock move.

The field `product_qty` on the sotck move contains the quantity in kg,
but already rounded from the value in lb(s). If we convert it back to
lb(s), there might obviously be a rounding error, since we do:
lb(s) -> kg -> lb(s)

To solve this, we recompute the quantity in the UoM of the product
without rounding, as a temporary computational value.

opw-705259
2017-01-31 15:33:10 +01:00
Nicolas Martinelli 125f608e1a [FIX] stock: UoM in qty check
- Enable lot tracking on Product A
- UoM of Product A is kg, but Purchase UoM is lb(s)
- Create a PO for 200 lb(s) of Product A, confirm
- Go in the picking, specify the lots.
- Validate, and error: 'You have a difference between the quantity...'

This is because `lot_quantities` contains the quantities in kg, while
`operation.product_qty` is in lb(s).

opw-705259
2017-01-31 15:33:10 +01:00
Yenthe V.G 93eaa16260 [CLA] add Cyhexy to VanRoey's CLA
Done at #15286
2017-01-31 14:21:54 +01:00
Christophe Simonis 59d1f9b564 [IMP] core: only mark updated fields as modified at model reflection
`model` field of `ir.model` may be used as related stored field.
Marking it as modified force recomputation of these, even no change
occurs (by definition).
2017-01-31 13:56:28 +01:00
Yannick Tivisse 57e2936fcc [IMP] website_sale: add id on cart line qty html block
Used to be selected in website_sale coupon in order to hide the qty selector on the ecommerce
2017-01-31 13:16:20 +01:00
Yannick Tivisse 4c58f96c5d [FIX] website_sale: Call SO lines write and unlink as ORM commands
That way, the coupon reward line validations methods are still called on the ecommerce
2017-01-31 13:16:20 +01:00
Yannick Tivisse 3aafb6f8e3 [IMP] base: Admin and Public partners are customers
In order to be able to use the coupon mechanism with them. That's because a coupon can only be used for customers
2017-01-31 13:16:20 +01:00