Commit Graph
102216 Commits
Author SHA1 Message Date
Raphael Collet f9b08f09b2 [IMP] models: make with_env, sudo, with_context preserve the prefetch object 2016-04-25 13:37:11 +02:00
Raphael Collet 8bc7d8565c [IMP] models: attach prefetching data to recordsets instead of environments
The prefetching now has a more intuitive and controllable model: every
recordset is linked to a "prefetch object" that tells which record ids to
prefetch for any model.  The prefetch object of a given recordset is shared
with the records obtained by iteration and relational field access.  All other
operations instantiate recordsets with a fresh prefetch object.

    records = model.browse(ids)
    assert records._prefetch is not model._prefetch

    for record in records:
        assert record._prefetch is records._prefetch
        assert record.relation._prefetch is record._prefetch
2016-04-25 13:37:11 +02:00
Raphael Collet 6037f3a56d [REF] fields: change API and semantics of converter methods
The cache data format has been split between a cache format and a record format
(returned by accessing a field on a record).  We have the following converters:

                                   ANY FORMAT
                                       |
                                       | convert_to_cache
                                       v
                                  CACHE FORMAT
                                       |
                                       | convert_to_record
                                       v
                                 RECORD FORMAT
                                       |
                                       | convert_to_read
                                       | convert_to_write
                                       | convert_to_onchange
                                       | convert_to_export
                                       | convert_to_display_name
                                       v
                                 OTHER FORMATS

Modify the API of the converter methods to make them uniform (pass value and
record), and adapt their documentation.
2016-04-25 13:37:11 +02:00
Raphael Collet cb8d432bb2 [IMP] fields: do not validate values when not necessary 2016-04-25 13:37:10 +02:00
Raphael Collet d3cfb47285 [IMP] fields: simple code improvements (add blank lines, remove unused imports) 2016-04-25 13:37:10 +02:00
Aaron Bohy 3241415a0c [FIX] mail: utils.send_native_notification doesn't exist 2016-04-25 11:31:08 +02:00
Aaron Bohy 83081cd435 [FIX] mail: chat_manager: unnecessary lookup in messages 2016-04-25 11:31:08 +02:00
Aaron Bohy f069815980 [FIX] mail: chatter: dialog's form view not ready
Since rev. 002660a9, form views are instantiated with their fields_view. This
had an impact in FormViewDialog as the inner form view instantiation was made
asynchronous. Unfortunately, an event handler was set on this form view in the
chatter, and it produced a traceback as the form view wasn't instantiated yet.
2016-04-25 11:30:51 +02:00
Aaron Bohy 69cb6088be [FIX] web: form_view: unnecessary jumping Edit button
When opening a record from a list view, the Edit button in the control panel
sometimes bounced. This was because we listened to event 'mouseup', and
astonishingly, the 'mouseup' event of the click in the list view was catched
by the form view.

The reason why we listened to 'mouseup' instead of 'click' is that some
widgets need the event to be propagated to the body. So this fix simply makes
the form view listen to 'click' instead of 'mouseup', but removes the call to
stopPropagation() on the catched event.
2016-04-25 11:29:59 +02:00
Goffin Simon 6719df5988 [FIX] product: pricelist items
With the pricelist, it is possible to define a pricelist just for
a variant. But in the product.product.form, only the pricelist items
linked to the product template could be displayed.
The field item_ids has been created in product.product model to display
all the pricelist applied on a product.

opw:674700
2016-04-25 09:50:59 +02:00
Jérome Maes 0fcbff389c [FIX] hr_recruitment, website_hr_recruitment : compatibility method
Duringthe migration, backward v7 compatibility were removed, but
there were still used in inherited modules.

This commit fix this problem by using the new method names.
2016-04-22 14:49:44 +02:00
Jérome Maes d0459de338 [FIX] google_calendar : sync with google button not bound
Commit 002660a9b0 remove 'view_loading' method, but doesn't adapt this code.
2016-04-22 14:49:35 +02:00
Levent Karakas f5b7d2ef4f [IMP] base: remove old Turkish lira
No longer in usage since 2005, replaced by TRY.
Closes #10424
2016-04-22 14:16:59 +02:00
Ranjit Pillai 989bccca45 [MIG] crm_project_issue: migrate into new api
Part of the code was refactor by applying `self.ensure_one()`,
and removing the loop 'for'.
2016-04-22 13:31:12 +02:00
Ranjit Pillai ee566f6042 [MOV] crm_project_issue: split files according to models 2016-04-22 13:31:12 +02:00
Ranjit Pillai c804a61ac0 [MOV] crm_project_issue: reoganize module directories 2016-04-22 13:31:12 +02:00
Aaron Bohy 5b5100b3da [FIX] web_kanban: many2many tags only displayed the first time
This bug was a consequence of commit 6c57935 which introduced a JS cache of
stuff like actions, fields_view... The fields_view being modified in place by
the kanban_view (which is obviously not a good practice), it was able to
identify its many2many fields only the first time the view was displayed, as
from the second time, it received an already processed version of the
fields_view in which is wasn't able to identify many2many fields. Thus, those
fields were only displayed the first time the view kanban view was displayed.
2016-04-22 12:07:07 +02:00
Géry Debongnie d65d251c57 [IMP] base, web: add type=fullscreen to ir_actions
With this commit, actions can have a type=fullscreen.  This means that
the navbar will be hidden, for the action and for all subsequent actions
open in the breadcrumb

There is no real security behind this, this is just a feature for
convenience, so users can bookmark an url an open some action in a way
that they are not distracted by anything.  In short, this is some kind of
light 'kiosk' mode.
2016-04-22 11:03:21 +02:00
Aaron Bohy 0e46d35bf6 [FIX] web: hide translate button of invisible fields 2016-04-22 10:27:20 +02:00
Aaron Bohy b871e3adbb [FIX] point_of_sale,website_sale: form view layout (avatar)
Classname 'oe_right' was overriden by 'oe_avatar' before rev. 6768bbf, and thus
the images were displayed on the left of the sheet. Since rev. 6768bbf, the
'oe_right' takes the priority over 'oe_avatar' as it should. This commit
restores the layout of these two form views as it was before 6768bbf.
2016-04-22 10:17:38 +02:00
Aaron Bohy b0f3146d5e [REM] web: forgotten base.sass/css
base.css is unused since rev. 6768bbfcc0
2016-04-22 08:31:48 +02:00
Aaron Bohy 6768bbfcc0 [MERGE] *: stop duplicating web
Avoid duplicating web addon in enterprise by extracting a common basis.
Enterprise features stay in enterprise, but use that common basis.

In web, mainly:
 - JS refactoring and linting
 - Conversion of .sass into .less split into multiple files
 - Templates cleaning and DOM simplification
 - Re-generation of web.pot, and update of .po files

Minor tweaks in some other addons to make them work with this new structure.
2016-04-21 15:21:42 +02:00
Aaron Bohy 8e440b173e [FIX] point_of_sale: /web/pos layout
The POS interface instantiates a web_client and mimics its layout for the
action manager to correctly append the action. This needed to be changed due
to preceeding large refactoring of web, as the actions are now appended in
a div with classname 'o_main_content'.
2016-04-21 15:21:41 +02:00
Aaron Bohy 9217fef09e [FIX] im_livechat: wrong path to variables.less in enterprise
File variables.less is located in web/ in the community edition, but in
web_enterprise/ in the enterprise one.

This fix uses the template 'web.less_helpers' containing the correct version of
variables.less instead of directly include variables.less and utils.less.
2016-04-21 15:21:41 +02:00
Aaron Bohy ffb4b670e8 [FIX] pad: display oe_pad field even if empty
as it prints the helper saying that the pad will be initialized
on first edit.
2016-04-21 15:21:41 +02:00
Aaron Bohy aebc17f22a [FIX] addons: .less compatibility between both web clients 2016-04-21 15:21:40 +02:00
Aaron Bohy 977db823c7 [REF] web: stop duplicating web
Avoid duplicating web addon in enterprise by extracting a common basis.
Enterprise features stay in enterprise, but use that common basis.

Mainly:
 - JS refactoring and linting
 - Conversion of .sass into .less split into multiple files
 - Templates cleaning and DOM simplification
 - Re-generation of web.pot, and update of .po files
2016-04-21 15:21:39 +02:00
vbh-odoo e1bfd3fbda [MIG] base_action_rule: Test cases improved with messages 2016-04-21 14:52:50 +02:00
vbh-odoo e658fd6e1d [MIG] base_action_rule: Migrated to new API
This commit provides some code simplifications, the complete
migration into new api.

Thanks to rco-odoo for the review, and code improvements.
2016-04-21 14:52:50 +02:00
vbh-odoo 245f2f9101 [REF] base_action_rule: reorganized module directory
We keep tests models in tests/ directory because
these models are not pertinents for business.
The rest of the directory follows the guidelines.
2016-04-21 14:52:49 +02:00
Thibault Delavallée 8ddb6c23a9 [FIX][IMP] stock: product: product_available
When computing the domain to find the product available data, a special case
is currently managed when doing a child_of in locations. Indeed computing
product available data requires to check its related quants. It is possible
through the context to limitate the search to a given set of locations.

The location_id field on stock_quant model is set as auto_join. However the
use of auto_join with the child_of operator is currently not supported by
the ORM. Those parts are converted into (id, in, ids) equivalent domain leaf
that can be costly due to quants table being quite large. The existing code
in product.py therefore tries to manually optimize the quant computation
by computing manually domain with child_of, using parent_left and parent_right.

However there are some cases when parent_left and parent_right can be 0
notably in update mode. However the current code does not correctly take
into account some location not having parent left / right and other having
a parent left / right being still 0 because still not computed. This commit
fixes that, allowing the correct computation of available product data in
update mode.

This limitation has been spotted when migrating stock to the new API. Indeed
unit tests have been added. In those tests product available info was not
correctly computed. Those tests will come when merging the new API version of
stock.
2016-04-21 14:12:39 +02:00
Fabrice Henrion 313a461eaa [IMP] sale: wording
Closes #11766
2016-04-21 08:56:59 +02:00
Joren Van Onder bbaf956328 [IMP] point_of_sale: make pos.config use active instead of custom state
pos.config had a special state field that mimiced what we usually do
with an 'active' field. The concepts of 'inactive' and 'deprecated' seem
to have never been fully worked out, as both of them resulted in the
same behaviour.
2016-04-20 15:46:04 +02:00
Joren Van Onder f1598883ab [IMP] pos_restaurant: make floor editing more touchscreen friendly
Before this the table edit handles where quite small. This was no
problem when editing a floor layout with a mouse or perhaps with a
stylus on a touchscreen. It was however very difficult to do with your
finger on a touchscreen.

This increases the size of the handles by a factor of 3. To make room
for this the 4 handles on the sides (non-corner ones) have been removed
on square tables since you can technically do any operation you want
with just the corner handles. The only functionality we lose is resizing
a table while constraining it's width/height, but if such fine grained
control is needed then the tables can still be edited in the backend.
2016-04-20 15:26:59 +02:00
Mansi Gandhi 9d5b09fc09 [IMP] auth_signup: connection state label
Change the label of active state label from Activated to Confirmed. Indeed
it indicates the user logged itself at least once. Active / Inactive is
controlled through the active field. An user that logged once is non labelled
as confirmed.
2016-04-20 14:45:59 +02:00
Shivam Dudhat 8466081792 [MIG] base_vat: new API 2016-04-20 14:45:04 +02:00
Shivam Dudhat a7250766dc [REF] base_vat: rearrange files
Also split views into two files, one for res.partner and one for res.company.
2016-04-20 14:45:04 +02:00
Xavier Morel e23a879e57 [IMP] read_group: better version of ec12e529c8
Simpler fix for handling of grouping on an empty date/datetime, adds a
few tests.
2016-04-20 12:54:54 +02:00
Goffin Simon e113ba6599 [FIX] account, l10n_generic_coa, l10n_th: U.S. CoA Misconfigured
Translation.

opw:674632
2016-04-20 12:26:58 +02:00
Goffin Simon 33c58a351f [FIX] l10n_generic_coa:
The Cost of Good Sold should be of type "Direct Costs

opw:674632
2016-04-20 12:26:57 +02:00
Fabien Pinckaers 4b2091e8c9 [FIX] account: demo data invoice line without required name
[IMP] account: d'ont create journal items for invoice lines with quantity 0 (not amount because of tax)
[IMP] crm: usability kanban view and schedule an activity
[FIX] crm: schedule an activity bug when no activity yet
[IMP] website: app for website (not a menu in website admin)
2016-04-20 00:17:17 -07:00
Virbhadrasinh Gohil 9205a143ed [MIG] stock_picking_wave: new API
New API yey ! Otherwise, no change. Only migration.
2016-04-19 16:01:39 +02:00
Virbhadrasinh Gohil 030d25f0de [MOV] stock_picking_wave: rearrange files
Files are renamed and moved according to the guidelines. No change has been
performed in this commit. No bug has been harmed.
2016-04-19 16:01:06 +02:00
Ravi Gohil 09c5c241be [REM] stock_picking_wave: Removed unused controller 2016-04-19 16:01:05 +02:00
Mansi Gandhi be232e69da [REM] mail: subtype dropdown in chatter
The possibility to choose a subtype when logging a note was added with the
activities mechanism in CRM. However as the user should not use the chatter
but a dedicated wizard in order to do this, the dropdown is removed.

The internal subtype mechanism is kept. Only the possibility to log something
else than a note through the chatter UI has been removed.
2016-04-19 15:25:51 +02:00
rmu-odoo 83569f9b32 [IMP] website_slide: subject of publish emails
When publishing a slide, a message is posted using a template defined on the
channel. This commit uses the template subject to form the message
subject instead of having a generic 'Re: <slide>' as subject.
2016-04-19 14:46:38 +02:00
Fabien Pinckaers 0613ed4451 [iMP] account: better terminology, related button in two lines instead of 3 2016-04-18 21:27:09 -07:00
Martin Geubelle 5a3f23e07d [IMP] website_sale: use website product categories 2016-04-18 11:56:13 +02:00
Nicolas Martinelli 41759e8e40 [FIX] purchase: store date_planned
This field should be stored, since `minimum_planned_date` was stored as
well.

opw-674567
2016-04-15 15:16:20 +02:00
Nicolas Martinelli ac265d0ef1 [FIX] stock: remove automatic option
The option is simply not implemented, and won't be implemented.

opw-674572 (and others...)
2016-04-15 15:16:20 +02:00