Commit Graph
117156 Commits
Author SHA1 Message Date
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
George Daramouskas 96f703ff84 [ADD] web: warning on incompatible databases
If a database is not an Odoo database or is not the same version
Closes #15171
2017-01-31 18:17:55 +01:00
Carlos Alberto Cipriano Korovsky 7cb99ada2d [ADD] base: South America group
Closes #15284
2017-01-31 16:56:55 +01:00
Carlos Alberto Cipriano Korovsky d383436494 [IMP] base: translate country group name
Closes #15284
2017-01-31 16:56:24 +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
Pratima Gupta 8a5360bef7 [IMP] hr_payroll: change the config settings view according to new design 2017-01-31 14:09:58 +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
Yannick Tivisse adb484a1b5 [IMP] web: add a 'close' terminology on FieldBooleanButton widget
This will be used on a sale_coupon_program
2017-01-31 13:16:20 +01:00
Nicolas Martinelli c196b55d61 [FIX] website_slides: use Drive access token
It is not possible to import Google Drive slides which are not publicly
shared.

Google Drive requires an access authorization from the user, not a
simple API key. The access token is generated in module `google_drive`,
but the latter is not in the dependencies of `website_slides`.

opw-703750
2017-01-31 12:00:54 +01:00
qsm-odoo 495b5ef117 [IMP] web: add options to field selector to filter the fields
Before this commit, the field selector had an unique option to filter
the fields it displays: filters.searchable, which tells the widget to
only display the searchable fields (which is the default). Now there
are two more options:

- fields: an explicit list of the fields to use (if null, let the
    widget get the fields itself (this is the default))
- followRelations: a boolean which is true if the user can follow
    relation to build a field chain (default to true)

These options are needed by Web Studio in enterprise where domain
construction for form view attrs can only use fields which are in the
view and do not follow relations.
2017-01-31 11:38:52 +01:00
qsm-odoo 3c452a2ecd [FIX] web: document domain selector options correctly
The "ModelFieldSelector" widget has a "filters" option which can
customize the fields which are displayed.

The "DomainSelector" widget has of course the same option it can
transmit to its internal "ModelFieldSelector" instance... but it
was documented as "fs_filters" instead of "filters".

Also, let the "ModelFieldSelector" document its own options and
sets their defaults (instead of the "DomainSelector" widget).
2017-01-31 11:38:46 +01:00
Aaron Bohy f4bb9bc976 [FIX] im_livechat,web: partial revert of 7f8fe10766
Proxy.load is required by the livechat when it is embedded in an
external page, so that it is able to get the static xml files
(with the correct base_url).

opw-706497
2017-01-31 10:52:08 +01:00
Aaron Bohy 129be7ff78 [FIX] im_livechat: 'web.session' added twice in external bundle
The JS module 'web.session' is already defined directly in the template.
When two modules have the same name, the second one that is read is
ignored, and a error is displayed in the console (in debug mode).
2017-01-31 10:18:27 +01:00
Aaron Bohy adb0312faf [FIX] im_livechat: prefix avatar's src with server url
This is required if the livechat is embedded in an external page,
so that it can correctly retrieve the images.
2017-01-31 10:15:32 +01:00
Nicolas Martinelli 3c1f9ff156 [FIX] stock: reserve consumables
The original issue is the following:
- Configure the warehouse in Pick + Ship
- Activate the packs
- Create a SO with a product which is a consumable
- In the picking from stock to out, add the product in a package, and
  validate.
- In the picking from out to customer, the previously created package is
  not accessible/propagated as it would be with a stockable product.

The core of the issue is that there are no quants reserved for a move
linked to a consumable product. Since the package information is stored
on the quant, the package cannot be propagated correctly.

The fix is therefore to add the quants reservation feature on consumable
products, but only if the move is propagated from another one (i.e. the
move has ancestors).

That solved our issue, but also makes the workflow more logical. Without
the fix, all pickings are "Available" when created, even though one is
linked to another.

opw-702632
2017-01-30 18:19:56 +01:00
Miku Laitinen 321cc715d8 [FIX] product: correct name_create method
name_create returns a tuple (id, name), not a recordset

Closes #15276
2017-01-30 16:56:17 +01:00
Nicolas Martinelli 3f7c25da24 [FIX] sale_mrp: find BOM
1. Activate the variant option on sale settings
2. Create a product and set invoicing on delivered qty and make it a
   stockable product
3. Create 2 attributes, like color red and color blue
4. Odoo creates 2 variants
5. Make a BoM on the product with color red (So on Bom select the
   product template and the product variant)
6. Set the Bom as "Ship this product as a set of components (kit)"
7. Now create a sale order with sale order line for the product variant
   BLUE
8. Delivery order is created, deliver the whole delivery order
9. Go back to sale order and see that delivered qty is not updated and
   thus we can not invoice the lines

opw-706423
2017-01-30 16:51:29 +01:00
Martin Trigaux 59a700c8e6 [FIX] project: do not recreate discovery data
The 'Start here to discover Odoo' is a data to help users to use Odoo.
Once they have understood, user often delete it but it comes back after an
update. The only way was to archive a record.

Using forcecreate is another way to avoid recreating it after an update.

Fixes #15262
2017-01-30 16:27:07 +01:00
Denis Ledoux 911208ad66 [FIX] l10n_gt: correct code digits
The code prefixes being
1.0.01.0
1.0.02.0

The code digits of the accounts codes
of the Guatemala localisation must be set to at least 9

opw-705457
2017-01-30 15:27:15 +01:00
Esteban Echeverry b14ef6346d [FIX] openerp models.py: Add recompute conditional in unlink
Description of the issue/feature this PR addresses:

This commit adds the recompute conditional clause in the ORM unlink method.
This behaviour is already present in branch 10.0 as it can be seen in line 3431.
With this, the possibility of disabling the automatic recalculation of computed fields is given back to the developer of custom modules in performance critical scenarios. By using the Environment class "norecompute" context manager, the developer can now unlink records in a very fast manner and afterwards, execute the computed fields manually if needed (via an explicit method call or a direct sql update).

Current behavior before PR:

Having this option in the ORM will allow to speed up the system if needed when massive collateral changes must be made. One of this scenarios has to do with the modification of one2many fields and the write_uid and write_date computed fields. In the account module for example, when unreconciling account move lines,  the deletion of the partial reconcile records involved in the reconciliation triggers a one by one update of the related account move lines and account moves. If the involved documents are big, such an account move (Journal Entry) with thousands of lines, if one of its lines is reconciled and afterwards unreconciled, the process can take several minutes due to expensive one by one recomputations such as the ones involved in the modification of the write_uid and the write_date in the models.py recompute() method. This modifications can however be enforced later with a couple of SQL update statements, instead of thousands of them executed by a for loop.

Desired behavior after PR is merged:

Developers of custom modules will now have the possibility of disabling the automatic calculation of computed fields, as it can be done in the create method (models.py "_create()" line 4370). This is vital for performance reasons, specially when handling big documents such as thousands of lines account moves or sales orders.

This is basically a backport of revision f259e74f8a
2017-01-30 13:51:32 +01:00
Esteban Echeverry 9c9003d257 [CLA] signature for nubark 2017-01-30 13:51:32 +01:00
Sagar Ahirrao bb03449bc8 [IMP] im_livechat: visitor history command
this commit introduces the '/history' command
for an operator during a livechat session.

When the visitor load a page, its url is added in
a cookie (kept only 1 day) in order to track his
visited web pages.
The '/history' command will ask the cookie content
and send it to the operator as a transient message
in the livechat channel.
2017-01-30 13:45:03 +01:00
qdp-odoo 602d04117a [FIX] hr_expense: don't try to create twice the taxes journal item from hr.expense when one is given. Fixes #15181 Also fix the domain on applicable taxes to filter the purchase taxes only 2017-01-30 12:08:19 +01:00
Hpar c5bda97494 [FIX] website_sale: fix promise website.ready
This closes #15266 and closes #15267
2017-01-30 11:50:07 +01:00
Martin Trigaux 73b320a3f7 [FIX] purchase: reflect changes of source terms
Introduced at 13010ed9
2017-01-30 11:28:54 +01:00
fwi-odoo be697f7425 [FIX] website_form: lazy load datetimepicker + update
Replace deprecated options for the updated version of the
bootstrap-datetimepicker lib.
Lazy load the library in the front-end as well in order to avoid loading
it in all the front-end views.
2017-01-30 10:29:37 +01:00
fwi-odoo 89093a1695 [IMP] web: various imp for the datetimepicker widget
* toggle datetimepicker when field is clicked
* close datetimepicker when a date is chosen
* disable keyboard navigation in the widget to allow modification of input
2017-01-30 10:29:32 +01:00
fwi-odoo ad6fd5f838 [REF] web: update bootstrap-datetimepicker lib and adapt datepicker widget
from 3.0.3 to 4.17.42
2017-01-30 10:29:27 +01:00
fwi-odoo c5af1d215f [REF] web: update momentjs lib
From 2.8.1 to 2.9.0
2017-01-30 10:29:21 +01:00
hendrikw25 c8bf71cf9e [CLA] signature for hendrikw25
Done at #15261
2017-01-30 08:58:13 +01:00
Martin Trigaux 7b1d3dc030 [FIX] crm: no self-closing span
This is invalid HTML and is not accepted.
Self-closing is tolerated (not required) on some elements but span is not one
of them.
https://www.w3.org/TR/html5/syntax.html#start-tags

This produced error on the Transifex parser, not counting self-closing span as
a closed tag.
cf https://www.transifex.com/odoo/odoo-10/translate/#fi/project/96753026

Done in master to avoid breaking source translations.
2017-01-30 08:57:20 +01:00
Odoo Translation Bot 6a7c05112b [I18N] Update translation terms from Transifex 2017-01-29 04:30:19 +01:00
Odoo Translation Bot 66e2ddd670 [I18N] Update translation terms from Transifex 2017-01-29 02:55:31 +01:00
Odoo Translation Bot 1eb9dc79f5 [I18N] Update translation terms from Transifex 2017-01-29 00:30:57 +01:00
Olivier Dony b0c2adbccb [FIX] config: correctly bootstrap data_dir
Complements the patch in 4715d18e12
in order to properly bootstrap a writeable data_dir when it is
(partially) nonexistant.
Depending on the startup parameters the data_dir might otherwise
have ended up read-only, preventing the creation of its necessary
components (session store, file store). Only the `addons` directory
of the data_dir needs to be read-only by default.
2017-01-28 01:53:54 +01:00