Commit Graph
107937 Commits
Author SHA1 Message Date
Thibault Delavallée 80d26e26bb [IMP] mail: notify author of internal notes when replied through gateway
Currently if an user mentions someone in an internal note he is not
notified of any reply as replies create internal notes. This commit
ensure the author of the first note is notified of the reply even
if it is still an internal note.

Tests have been updated accordingly.
2017-02-21 10:39:43 +01:00
Thibault Delavallée 1d9052fc19 [IMP] mail: add tests about replies to internal note through mailgateway
Replying to internal notes should create internal notes and should
not notify anyone. Future commit will change that behavior. This
commit ensure the current behavior is working as intended.
2017-02-21 10:39:43 +01:00
Thibault Delavallée 21720f0a3f [FIX] mail: slighty improve notification email layout
* Limit company image to match buttons size and avoid badly
   sized image
 * Add a margin below internal note notice because it currently
   overlaps with actual email content
 * Avoid having signature direclty included in message by
   enclosing body in a div
2017-02-21 10:39:42 +01:00
qsm-odoo b4d8a270e1 [FIX] web_editor, website: restore content menu feature
Commit 3c9e6c89e7 made big changes to the
link editor dialog... but also broke many features with it.

Commit 9a1ea6dc08 already fixed some of
them but this commit fixes a bigger one. Indeed, the menu edition
feature was totally broken since the changes. Also, the DOM was messy
which broke form navigation, etc.
This commit also simplifies the LESS which was uselessly big.
2017-02-20 17:37:15 +01:00
Florent de Labarre a5361605cb [IMP] account: hide deprecated accounts
To be consistent with other domain added at ee97028

Closes #15432
2017-02-20 16:29:10 +01:00
David Arnold 99f365523b [IMP] base: allow to extend synched of company address
To easily add fields

Closes #15213
2017-02-20 09:27:31 +01:00
Simon Lejeune fbae45703b [FIX] stock: settings: multi location and advanced location
Disabling multi location should disable advanced location, the same way
disabling multi location disable the multi warehouse.
2017-02-17 13:21:58 +01:00
Dhaval Panchal b1b3de1339 [REF] stock: no more global push/pull rules
Global push/pull rules are error prone and can be replaced efficiently
by creating a "global" route.

There was an odd behavior when you delete a route, the different rules
of this route were'nt deleted and thus became global. A lot of users
didn't understand that, so to avoid this unexpected behaviour, we
delete on cascade the push and pull rules when a route is deleted.

To avoid inconsistencies in the system, we also restrict the deletion of
rules when they are used in a stock move or in a procurement. We also
restrict the deletion of routes used in warhouses and order lines.

We change the global pull rule test by applying the procurement rule on
a route and apply this route on a product.

Menu items related to global rules are removed, so are the logic to look
for them in the methods looking for which pull/push rule to apply.

joint work by @dpa-odoo, @pimodoo and @sle-odoo
2017-02-17 13:21:58 +01:00
Dhaval Panchal 9770256f66 [IMP] stock: inventory adjustment report
Do not display the location or lots columns if the user is not working
with them.

Group the inventory lines by locations.
2017-02-17 13:21:58 +01:00
Dhaval Panchal d37a7b1c5d [IMP] stock: picking view
Disolay the procurement group only in technical mode.

Only allow the user to change the picking type while the picking is in
draft.
2017-02-17 13:21:58 +01:00
Dhaval Panchal 10d5c11de3 [IMP] stock: picking type view
- Only display the warehouse and location field when the user is working
with multi warehouses and multi locations.

- MRP defines a stock.picking.type on manufacturing order, so that you can
easily set the source/destination locations and benefit from seeing a
manufacturing vignette in the inventory dashboard. However, the
manufacturing orders do not use every options defined on this view,
specifically the return picking type, the barcode nomenclature and the
packs and lots. This commit hides these options when the vignette is an
MRP one (manufacturing code).

A cleaner patch would have been to adds attrs with an xpath from the MRP
module, but if another modules wants to add another vignette there will
be a problem, so we chose the easiest way here.
2017-02-17 13:21:58 +01:00
Dhaval Panchal da578cb656 [IMP] stock: location route view
Only display the warehouse field if the route applies on warehouses.
2017-02-17 13:21:58 +01:00
Dhaval Panchal cbb9f86b3c [IMP] stock: stock location view
While creating a location, users were able to create a location when
chosing the parent location and it was error prone. We remove the
possibilty to create a location at this place.
2017-02-17 13:21:58 +01:00
Dhaval Panchal f5b0ec4de3 [REF] stock: picking: rename delivery type by shipping policy 2017-02-17 13:21:58 +01:00
Dhaval Panchal db3ebcbc9a [IMP] stock: procurement view
Only display the warehouse field on the procurement form view when the
user is working with multiple warehouses.
2017-02-17 13:21:58 +01:00
Dhaval Panchal 5c837dec2a [REF] stock, etc: rename picking type by operation type
As picking types aren't always used in a picking context, and picking
aren't really meanigful for a lot of people, we rename this concept as
"operation type" in views and in the planner.
2017-02-17 13:21:58 +01:00
Thibault Delavallée 44971c2be1 [FIX] resource: compute working hours of current day using only the current day
Tomorrow never dies; however no need to add its working hours today.
Indeed rrule until parameter is inclusive. This means that in
current implementation next day is included in computation. This commit
fixes that.
2017-02-16 17:34:35 +01:00
Thibault Delavallée 857593068e [REM] resource: remove unnecessary demo data
Resource module defines some demo data that are not used anywhere.
Moreover using resource module on its own does not give interesting
results as this is a tool module used in various addons like holidays
or project issue.

Those modules define their own demo data that will have an impact on
resource. It is therefore not necessary to define specific demo data
that does not help the user in any way.
2017-02-16 16:53:54 +01:00
Thibault Delavallée d5aeaeeba2 [REF] hr: remove login and last_login fields on employee model
Those fields are never used anywhere. Moreover attendance module can be
used to track employee log in / log out and compute its attendances.
Let us therefore remove those fields.
2017-02-16 16:51:51 +01:00
qsm-odoo 68a97420c3 [IMP] web: always allow using "id" field in attrs domain in form view
Before this commit, in the form view, if an attrs domain contained the
"id" field, it only worked if the "id" field was explicitely added to
this form view.
As the "id" is obviously known on a form view without the need to be
explicitely added, this commit allow using attrs domain containing "id"
in all form views.

Note: this seems to already work with list views.
2017-02-16 15:45:44 +01:00
qsm-odoo 9494abc28d [IMP] web: allow to restrict operators in domain selector
The domain selector currently determined the list of available
operators according to field types (and used only a subset of
supported ones).
In some context, we might want to restrict this list of available
operators. Indeed, in client-evaluated domains, the "ilike" operator
cannot be used for example.
2017-02-16 15:45:44 +01:00
Martin Trigaux 645df67631 [FIX] point_of_sale: implement todo
The link between the pos.order.line sequence and the config was lost after
creation.
Using the default with next_by_code is incorrect as every pos.config has a
sequence with the same code.
2017-02-16 15:33:26 +01:00
fwi-odoo ebc1d24fc5 [FIX] web_calendar: set default color when not define in the calendar view 2017-02-16 14:48:01 +01:00
Alexis de Lattre 75f928e919 [IMP] purchase: use sequence field on lines
Was present in the view but not used in the order.
Field introduced at 9d4efc8

Closes #15517
2017-02-16 10:02:50 +01:00
Nicolas Martinelli bdccf5bd64 [IMP] sale: unlock button
Add similar behavior to the one available in Purchase.
2017-02-16 09:15:55 +01:00
qsm-odoo 66fc48e89c [MERGE] web, web_editor, website, base: add LESS edition
See subcommits for details.

* Add LESS files edition in frontend
* Change asset bundle error handling
* Improve usability
2017-02-15 10:53:11 +01:00
qsm-odoo 073bfc5b5b [IMP] web_editor: use select2 in HTML/CSS editor
The select DOM element which allows to select the template or
the LESS file to edit has been replaced by a select2 element
to improve usability.

- Add search bar
- Allow to add "customized", "unsaved changes" and level indentation
  a better way (styled and icons)
- Add debug info (full less url / xml_id) only in debug, in small
2017-02-14 16:37:48 +01:00
qsm-odoo 198673bf35 [ADD] web_editor, website, web: new LESS editor
The old "HTML" editor now handles LESS edition. The editor has now a
button to switch between XML and LESS edition. By default, it only
displays the odoo files which only appear in the assets_frontend bundle
and in debug mode, it allows to see all the files that influenced the
page design.

The new editor has a new set of options which allows to use it as a
xml editor only or a less editor only if needed.

Also: make the "include bundles" option appear only in debug mode.

Technical details:

- When saving a modified LESS file, an attachment is created with the
full modified content and an extension view xpaths the bundle where
the original file was added to link this attachment instead. This
relies on the fact that qweb, when generating assets bundle,
replaces missing files by the "datas" contents of the ir.attachment's
which have an "url" field equal to the urls it is searching.

- If a LESS error is introduced, the recent changes in assets bundle
generation (see c248674a5c) will not break
the design but only open a dialog on page loading, with the LESS error.
The user can then go to the LESS editor and reset its changes.

This feature code has been started with original work of @pga-odoo
2017-02-14 16:37:23 +01:00
qsm-odoo 7751c1bfb9 [REF] web_editor, website: split customize_template_get
Commit a2ae219d4e fixed the customize_template_get
function(s) which had been modified for the 10.0 web_studio release.
While the fix also reorganized the structure to make it more efficient
and understandable, it promised that the function would be refactored
in master. This is what this commit does.

The customize_template_get route of the website module was also removed
with commit 5a030db3eb as it was an useless
duplicate of the web_editor customize_template_get route.

The old route handled two totally different features of odoo: getting
all the page-related views to allow their edition with the HTML editor
and getting the "toggable views" which appear in the "Customize"
website menu. The parameter "full" allowed to determine which one the
route was supposed to do and was useless until website was installed to
add its feature (by extending the route behavior). In both cases, views
informations are returned, only the number of views differs. The
above-mentionned fix already did part of the refactoring by returning
the same info structure for each view in both cases.

Now, the function has been split. The web_editor customize_template_get
route is renamed as get_assets_editor_resources and returns the info the
HTML editor needs to work (the "assets" term is in prevision of the
new LESS editor).
A new website route "get_switchable_related_views" has been created to
return the info the "Customize" website menu needs.
Both use the renamed ir.ui.view function "get_related_views" (old
ir.ui.view customize_template_get function) which now returns a
recordset and not a list of dictionnaries.
2017-02-14 16:32:15 +01:00
qsm-odoo ab78680d58 [IMP] web, web_editor, website: small refactoring of LESS files
This commit comments some LESS files to help the user to understand
for what their content is used (preparing the LESS editor feature).
2017-02-14 16:32:06 +01:00
qsm-odoo 8924abc0f1 [IMP] web, web_editor, website: add meaningful bundle names
As the user will be able to customize the bundles thanks to the LESS
editor, this commit give them meaningful names.
2017-02-14 16:31:51 +01:00
qsm-odoo ba72397fee [FIX] base: decode utf-8 for bundle ir.attachment files
If a bundle contains a file whose URL does not match any file in the
filesystem, its content is searched in the ir.attachment records.
The problem was that the content was base64-decoded but also had to
be utf-8 decoded to make its use work (like it would have been done
if the file was found in the filesystem).
2017-02-14 16:31:36 +01:00
qsm-odoo c248674a5c [IMP] base: handle LESS compilation error a better way
Before this commit, when a LESS bundle compilation failed, web pages
were displayed without any style and the error appeared in the DOM
thanks to a custom ::before style which was ugly and not selectable.

Now the error is displayed like any other error in Odoo: in a dialog
with selectable content. The pages are also displayed with the last
style which was successfuly compiled.
If odoo dialog are not defined (a page without any javascript), a
fallback has been implemented to show the LESS error with a JS alert.
2017-02-14 16:29:27 +01:00
qsm-odoo 9a1ea6dc08 [FIX] web_editor: link dialog (init & classes)
Commit 3c9e6c89e7 made big changes
to the link dialog.

This commit fixes two bugs it introduced:
* The color class preview was not properly set when opening a dialog
  (so changing nothing and saving would change the result)
* New btn color classes were wrongly initialized. It did not use less
  generation and made the button text always white. This could
  introduce bugs when using different colors in themes.

Note: this code is already being refactored anyway.
2017-02-14 16:25:56 +01:00
fwi-odoo c93be09f2e [FIX] web: caret misplaced
Due to the library algorithm to place the datetimepicker,
the div containing the input was no longer relative so the caret was misplaced.
Put back the position relative and place the datetimepicker relative to the input.
2017-02-14 15:10:01 +01:00
fwi-odoo 7015ec5062 [IMP] web: update fontawesome 4.5.0 to 4.7.0 2017-02-14 14:14:42 +01:00
qsm-odoo 9049d953ca [FIX] website: restore company edition option
Commit d1a8d54aca broke the feature without mercy.

The mentioned commit introduces a nice improvement to allow the edition
of the company logo directly from frontend. However it also breaks the
option for non-logo parts (example: clicking on the address on the
contact us page). It also leaves most of the option code behind, which
makes useless code being executed for nothing.

This commit restores the company option the way it was and simply
deactivates it for the logo edition, which was the desired behavior.
2017-02-14 12:33:53 +01:00
Thibault Delavallée cf1df16aea [IMP] payment_*, website_quote: change callback_eval string to parameters
callback_eval is currently a code string that is evaluated directly
at payment confirmation. This commit changes it to have parameters
on the record and method to call on it. Moreover a hash done once at
transaction creation ensure that a modified transaction does not allow
to execute code on other records.
2017-02-13 16:58:47 +01:00
Kinjal Mehta 9363b63a5c [IMP] sale, report: small fixes in sale onboarding 2017-02-13 14:25:42 +01:00
Fabien Pinckaers 6bfb8a1765 Merge branch 'master-automation-rem-fp' 2017-02-10 15:25:27 -08:00
Fabien Pinckaers c56b746221 [IMP] base_automation: default to write instead of python code 2017-02-10 15:22:45 -08:00
Fabien Pinckaers cbb7c2442a [IMP] base_automation: removing domains based on filters in automation
bad ux: it's difficult to understand why there is two way to do the
    same thing. (4 fields for domains, instead of 2)
    Example of confusion:
      What happens if you set both a filter and a domain?
      What happens if you change the filter? does it change the
      automation?
    The new domain widget is good enough. We don't need such extra fields.
2017-02-10 14:10:27 -08:00
Simon Lejeune f915a679fa [FIX] web: database selector and manager
The database manager and selector triggered an internal server error
according to the modules installed.

The issue is that some modules (like utm) overrode ir_http's dispatch
and openned a cursor before calling super. Following rev[1], the
database manager can tell you the incompatible databases. For that, it
opens a new cursor to each database and get back the Odoo's version.
After the information is fetched, the cursor is closed. Closing a cursor
does not release it from the connection pool, so the database cannot be
dropped and here comes the fix [2]: this commit removes all cursors to
`database` from the connection pool.

Now, if a module overrides the ir_http's dispatch and open a cursor
before calling `super`, the automatic commit/close done at the end of
a successful request cannot succeed in the database manager or
selector as the cursor is closed during the call to super, leading to
an internal server error.

To workaround this issue, we explicitely set the cursor to None, as it
will prevent the automatic commit/close at the end of the request.

This is similar to rev 5c6087e38e

[1] 96f703ff84
[2] 610036756a
2017-02-10 21:12:15 +01:00
Christophe Simonis a282d4ae7f [MERGE] forward port branch saas-14 up to be9dfb331f 2017-02-10 18:41:06 +01:00
Christophe Simonis be9dfb331f [MERGE] forward port branch 10.0 up to 9beca598d4 2017-02-10 17:33:06 +01:00
Christophe Simonis 9beca598d4 [MERGE] forward port branch saas-11 up to b5971e417f 2017-02-10 17:32:36 +01:00
Christophe Simonis 80c1d1e355 [FIX] website_forum: wait templates are loaded before binding events
This is required since a4dc9a8032
2017-02-10 16:45:34 +01:00
jpr-odoo b229e9cb8c [FIX] web_editor: Show only image tab in media dialog if field type is 'image'
Reproducible steps:

Select an icon instead of a picture -> it breaks it up
or a video, or a document. The tabs shouldn't be displayed at all.
2017-02-10 15:21:24 +01:00
jpr-odoo d1a8d54aca [IMP] website: Make company logo editable from frontend
Purpose
=======

Clicking the company logo takes to the backend's company settings. Users get lost and don't know how to go back to the website.

Specs
=====

It should be a picture selection wizard. If possible the default picture should be the company logo if already set.
2017-02-10 15:19:04 +01:00
qdp-odoo 765dd38ec1 [FIX] account: manual reconciliation wizard in batch.
Several fixes are addressed in this commit:
- displayed value of writeoff amount now give proper result accordingly to the selection (but that selection may still be wrong!). This is still not ideal but at least it reflects what users can see in the list selection.
- exclude from the reconciliation, entries that have already the boolean 'reconciled' set to True. They shouldn't be passed to reconcile() but are still needed to balance totally the reconciliation so users have to select them.
- avoid crash if no writeoff needed on batch reconcile: Even though the wizard might declare that a writeoff is needed, in batch mode it might not be the case since the reconciliation is done in multiple passes for each currency. If no write-off is needed, no write-off move is created and the code tried to add a boolean variable to a recordset and raised a fruit-salad error (mixing apples-oranges).
2017-02-10 15:03:28 +01:00