Commit Graph
110647 Commits
Author SHA1 Message Date
Jérome Maes 0339264d11 [IMP] website_*: adapt website modules using frontend chatter 2017-06-30 11:07:00 +02:00
Jérome Maes ccf869a83e [ADD] website_rating: generic rating management on chatter frontend
Extend new dynamic chatter to manage rating
when posting comment.

The model should inherit of rating.mixin and
its frontend chatter should allow rating to enjoy
star widget and rating card.

This is more generic : stats, rating, ... are manage
in one place (this module) for all document.
2017-06-30 11:07:00 +02:00
Jérome Maes f447e9679f [IMP] rating: message_post with rating value
rating module provide now post a message with a
rating value, though `message_post` method.
'mail.message' also has now a `rating_value` field
to ease searching and filtering.

This will help the ecommerce (and other website modules)
to post a comment associate with a rating.
2017-06-30 11:06:32 +02:00
Jérome Maes d79678fdd5 [IMP] website_mail: make the frontend chatter lazy
Message are now fetched and display using javascript
to optimize performance.
Also the chatter is completely rewrite : add pager,
filter possiblity, ...

This commit is mainly technical: posting feature does
not change. Only the display with pager is new.
The goal is also to prepare frontend chatter for a
better integration with rating widget.

The mail.thread mixin is extended to manage the field
website_message_ids (display all messages that can be
seen on frontend by user (employee or not).

When fetching or posting message, a check is done to see
if we need to do it as sudo(). website_mail implement posting
messages with token or sha_in (using in website_quote).
The same verification is now done when fetching messages, via
'_special_access_object' method.
2017-06-30 11:06:32 +02:00
Jérome Maes 890e665b88 [IMP] website_quote: clean page style 2017-06-30 11:06:32 +02:00
Jérome Maes 56ed99cff5 [IMP] website_mail: extends mail.thread mixin to manage website messages
mail.thread mixin will (re)provide the field 'website_message_ids'.
Models can redifined its domain, since it can differ a bit (blog, forum,
... are not the same).
Even if the domain can differ, we still keep it on the mixin since
it will be required for the new chatter frontend (see following
commits).
2017-06-30 11:06:32 +02:00
qdp-odoo 5967600296 [IMP] account: implement account.account hierarchies
This information will be used by account.report to render accounts in hierarchies.

Was PR #17367
2017-06-29 17:05:19 +02:00
Olivier Colson 414ea47fd5 [IMP] purchase: Added selection field 'module_account_3way_match' in purchase setting to (un)install the module account_3way_match which is created in enterprise.
+ made some refactoring in order to plug correctly this new module.
2017-06-29 14:52:56 +02:00
dbh 22c94287dd [IMP] website_sale: make form match website_form_editor structure
- Labels are now left-aligned in xs
- col-md-* sizes of newly added field were not the same

Note: forms should be reviewed to have a proper bootstrap structure and
website_form_editor should be smarter (see task-34451)

task-31510
2017-06-28 16:19:40 +02:00
Raphael Collet b8cf940247 [ADD] base: new wizard to uninstall a module (#17284)
The "Uninstall" button on the module form no longer changes the state of
modules, so that cancelling the wizard will not unexpectedly perform the
uninstallation.  The uninstallation is performed only by clicking on the
"Confirm" button on the wizard.

Moreover, the wizard provides clearer information about the impact of the
uninstallation: what apps/modules will be uninstalled and what documents
(models) will be lost.
2017-06-28 15:36:17 +02:00
Mitali Patel 026f9ce085 [FIX] mrp: Fix typo 'grousp' -> 'groups'
Prefetcion certailny does have it's prace
2017-06-28 11:46:27 +02:00
Laurent Smet 09296e74e9 [IMP] account: show payments on invoice report.
Each time the invoice is printed, it shows an updated remaining amount on the invoice. The first print, though, is kept as canonical reference as attachment.

Was PR#16343
2017-06-28 11:43:32 +02:00
Laurent Smet 8e230ae25d [FIX] base/report: fix attachment creation without attachment_use
If attachment_use is false and attachment_name specified, the attachment
is not created.
2017-06-28 11:43:32 +02:00
Xavier Morel 6ad587dc8f [FIX] db restoration existence check
5ee9ec7d removed bool(Connection), turns out db restore still used it
but muted the logger so that was hard to notice in the logs.
2017-06-28 10:05:33 +02:00
Ankit Joshi 16ebec2324 [FIX] http: avoid crash in web/database/selector when selecting invalid database (#17830) 2017-06-27 16:52:20 +02:00
Joren Van Onder 8108904247 [IMP] account: implement tax_base_amount on account.move.line
Stores the base amount of the tax specified by tax_line_id. Useful for auditing tax reports.
2017-06-27 16:10:54 +02:00
Christophe Simonis d2c30410a8 [FIX] stock: correct import 2017-06-27 15:52:37 +02:00
Christophe Simonis 674a347e13 [FIX] stock: correct PY3 incompatibility introduced by previous forward-port 2017-06-27 14:58:33 +02:00
Christophe Simonis dd43071638 [MERGE] forward port branch saas-16 up to 278e478d55 2017-06-27 14:19:31 +02:00
Christophe Simonis 278e478d55 [MERGE] forward port branch saas-15 up to b141b24706 2017-06-27 12:41:47 +02:00
Christophe Simonis b141b24706 [MERGE] forward port branch saas-14 up to b1f738d1ca 2017-06-27 12:02:56 +02:00
qdp-odoo d3ff26654a [FIX] account: max_date field of partial reconciliation is a date, not a datetime.
This field it is computing the max of 2 date fields, so it has to be a date too. This was messing in the aged receivable/payable reports.
2017-06-27 11:59:38 +02:00
Christophe Simonis b1f738d1ca [MERGE] forward port branch 10.0 up to 89a99407ce 2017-06-27 11:39:43 +02:00
Adrien Dieudonne 1e4f4299bc [FIX] *: reports: check required values for 'render_html'
Some reports require additional information to render. When
accessed in Odoo, the user has to fill a wizard to provide those
information. However, when these reports were opened in Studio,
it crashed as those information were missing (we don't pass
through the configuration wizard in this case).

This fix checks if all the required information are given before
trying to render those reports, and it displays a warning in
the logs in they are missing, which is better than a traceback.
2017-06-27 11:15:24 +02:00
Xavier Morel 89a99407ce [FIX] website_forum: yet more untranslatable terms 2017-06-27 10:36:24 +02:00
Aaron Bohy 05282fd434 [FIX] web: pyeval_tests: typo
Introduced by forwardport 34b432d528
2017-06-27 10:22:35 +02:00
Christophe Simonis 34b432d528 [MERGE] forward port branch saas-15 up to 4d79a1ff58 2017-06-26 19:19:39 +02:00
Christophe Simonis 80775a7362 [MERGE] forward port branch 10.0 up to 4c66eae308 2017-06-26 18:38:41 +02:00
Xavier Morel 6501184e62 [FIX] P3: API changes 2017-06-26 17:23:56 +02:00
Martin Trigaux 4c66eae308 [FIX] website_sale,website_crm: untranslated term
opw-748880
2017-06-26 17:05:39 +02:00
Xavier Morel 5ee9ec7d6c [FIX] P3: __nonzero__ -> __bool__
Also ~removed bool-testing on cursors
2017-06-26 16:45:03 +02:00
Xavier Morel c5dcf75a81 [FIX] P3: Unpickler.find_global -> Unpickler.find_class 2017-06-26 16:45:03 +02:00
Xavier Morel aaf8f3e37f [IMP] reorganise opcodes in categories 2017-06-26 16:45:03 +02:00
Xavier Morel 5810ea2a97 [FIX] P3: random.sample on a recordset
In P3, random.sample requires that its parameter be a Sequence or a
Set. This blows up _cart_accessories.

So opt BaseModel into both ABC, seems to work fine.
2017-06-26 16:45:02 +02:00
Xavier Morel d5c80fd92d [FIX] P3: xmlrpclib -> xmlrpc.client 2017-06-26 16:45:02 +02:00
Xavier Morel 8f6e5dbdd3 [FIX] P3: assertItemsEqual is called assertCountEqual
The python 3 name is more correct as to what the assertion actually
does, but still makes for a breaking change.
2017-06-26 16:45:02 +02:00
Xavier Morel 3c95f7f25c [FIX] P3: ast changes
* P3 gets a "proper" arg node
* P3's arguments adds two parameters (kwonlyargs and kw_defaults) for
  keyword-only parameters
* P3's ``fn(**bar)`` only works if ``bar`` *only has string keys*,
  some of the contexts in qweb passed non-string keys and blew up
* P3's ast.If requires a non-empty body, add ``[ast.Pass()]`` ballback
  for non-literal bodies
2017-06-26 16:45:02 +02:00
Xavier Morel 6e9d29df1d [FIX] P3: bytecode changes
* Python 3.4 adds new convenient bytecode-inspection API to dis which
  is nice, however Python 3.6 also switches from the old bytecode to a
  new wordcode which breaks _get_opcodes and *requires* that we use
  the new API
* add various opcodes which either were added in Python
  3 (CALL_FUNCTION_EX) or were only used for some small corners of
  Python 2 but have been expanded or despecialised in Python
  3 (BUILD_SLICE)
2017-06-26 16:45:02 +02:00
Martin Trigaux b1a3bb7d9a [IMP] doc: warn gantt view is not available in community version
May be confusing for new users

Closes #17817
2017-06-26 16:31:48 +02:00
Goffin Simon d37ef94c4b [FIX] mrp: Post inventory button without finished product"
This fix 2e18070a66595a72a9a626a196c97a689832f667  has been done in stable and some customers
wants to keep the button "Post Inventory" available all the time.
Now the button is just visible in developper mode.

opw:748347
2017-06-26 15:18:32 +02:00
Nicolas Martinelli d6909f42ad [FIX] stock: incorrect ordered quantity
- Create a stockable product, get 61 units in stock
- Create a SO of 75 units, validate
- In the picking, transfer only 50 units, validate and create a
  backorder
- Print the Delivery Slip of the picking: it shows 61 units ordered
- Print the Delivery Slip of the backorder: it shows 61 units ordered
- Receive the 14 missing units, recheck availability on the backorder:
  it shows 25 units ordered

The quantity ordered should be recomputed from the stock moves when a
partial transfer is done.

opw-747983
2017-06-26 15:16:07 +02:00
Christophe Matthieu 4d79a1ff58 [FIX] payment: prevent access error for manual payments
Rev. cf1df16aea introduced new callback
fields with restricted access. The lazy hash generation in create() was
however causing access errors for manual transactions created by users
who are not administrators (e.g. Accountants).

Those manual transactions do not typically need a callback, but checking
the presence of the callback requires a limited sudo() context.

Similarly, the execute_callback() method may be called for a manual,
non-admin transaction, and should not do anything if there is no
callback, instead of crashing with an AccessError.

The generation of the hash and execution of the callback should be done
with a normal environment, though, as these must only be used for
transactions run by the system.

opw-747536
2017-06-26 15:09:13 +02:00
Nicolas Martinelli 831744684c [FIX] stock: empty state
- Update view with external_id=stock.view_move_picking_tree and remove
  editable attribute on the tree view.
- Create a new picking
- Add a line (form view will open) and click on "Save and close"

=> A traceback show up since 'scrapped' was not in the form view.

- The picking location fields become readonly, and the status bar
  disappears
- Save the picking

=> Error: "creation/update: a mandatory field is not correctly set :
   [object with reference: location_id - location.id]"

Courtesy of @benwillig

Closes #17738
opw-748353
2017-06-26 14:07:28 +02:00
Christophe Simonis e1c74e374c [MERGE] forward port branch saas-14 up to 3bac72ba74 2017-06-26 14:04:04 +02:00
Pieczynski Marcin d86f134abd [CLA] signature for piemar1
Done at #17817
2017-06-26 13:46:04 +02:00
dip-odoo 252d65dc23 [IMP] crm: add dependency to contacts
Because the address book is too hidden otherwise.
2017-06-26 13:39:57 +02:00
Goffin Simon 51d072db44 [FIX] stock_account: Invalid product price history breaks stock valuation
Steps to reproduce:

1. Create a new Stockable Product
2. Set cost price to 2.00
3. Adjust stock to 10 pcs
4. Enable developer mode
5. Go to Inventory > Reports > Inventory at Date
6. Select current time and retrieve the inventory value

Bug:

The stock valuation for the product was 0.0.

Reason:

When creating a stockable product, Odoo creates
two price history entries with the same datetime
but different cost. The stock valuation report only
takes one of them into account.

Fixes #14889

opw:747857
2017-06-26 13:22:03 +02:00
Christophe Simonis 3bac72ba74 [MERGE] forward port branch 10.0 up to aaadb232b2 2017-06-26 13:00:18 +02:00
Christophe Simonis 75f93a9cfe Revert "[FIX] *: reports: check required values for 'render_html'"
This is not how you check that a dict contains keys.

This also break the contract of method `get_html` that may now return
`None`, which `get_pdf` does not handle.

This reverts commit 0d2fb541e8.
2017-06-26 12:43:31 +02:00
Christophe Simonis aaadb232b2 [MERGE] forward port branch saas-11 up to 459ea4ab4d 2017-06-26 11:38:54 +02:00