Commit Graph
97050 Commits
Author SHA1 Message Date
Jitendra Prajapati 31fc8fdab3 [FIX]account_voucher: move_line_id field is no more available in the Voucher Lines. so i have removed related code on if condition. 2015-08-13 11:10:11 +02:00
qdp-odoo 2ffdbae30e [FIX] l10n_eu_service made compliant with the new accounting design 2015-08-13 10:59:04 +02:00
Raphael Collet d4bf5a2efc Merge pull request #7576 from odoo-dev/master-optimize_setup_models-rco
Optimize registry.setup_models() such that some fields can be reused between registries. This happens when a model has the same base classes as another model.

This reduces the registry setup time.
On the runbot, this reduces the total execution time by ~20%.
2015-08-13 10:49:15 +02:00
Raphael Collet 69f7f1c9ee [IMP] models: share fields across registries when possible
When a model is set up, it can retrieve fields from a similar model (with the
same base classes).  Only proper (not inherited), regular (non-related) fields
can be shared that way, since other fields may depend on other models.
2015-08-13 10:45:00 +02:00
Raphael Collet 7d6abb6f31 [IMP] fields: simplify implementation of method setup_triggers 2015-08-13 10:45:00 +02:00
Raphael Collet de363ce909 [IMP] fields: move computed_fields, inverse_fields and _triggers to models
This removes an obstacle for sharing fields across registries: regular fields
no longer contain metadata referring to other models/fields.
2015-08-13 10:45:00 +02:00
Raphael Collet ec0636a289 [IMP] fields: do not use methods bound to model classes
Avoid this reference from a field to a model class; this will allow the sharing
of fields across model classes.  Use `getattr` on class instances instead.
2015-08-13 10:45:00 +02:00
Raphael Collet 6161c85d55 [IMP] fields: optimize setup_base() for regular (non-related) fields
Split the methods `_setup_regular` and `_setup_related` in `base` and `full`
parts, such that the `base` part is done in `setup_base()`, and the `full` part
is done in `setup_full()`.

This optimizes the setup of models during the installation of modules: regular
fields are not set up again from scratch.  Only related fields (which are less
common) are always set up from scratch.
2015-08-13 10:45:00 +02:00
Raphael Collet 9fa4c2d1d8 [IMP] models: optimize _setup_base() by not retrieving proper fields
The method uses the costly `inspect.getmembers` to retrieve the fields defined
on a model's classes.  If the model is not modified by a module installation,
we simply reuse the fields retrieved in a former model setup.
2015-08-13 10:44:59 +02:00
Raphael Collet c6c1824b7a [IMP] fields: rename methods set_class_name and setup, and change their API
The API of those method has been modified to take a recordset instead of a class
as parameter:

    field.set_class_name(cls, name)   ->   field.setup_base(model, name)
    field.setup(env)                  ->   field.setup_full(model)

The recordset gives access to an environment, and will ease code reorganization
in the field's setup methods.
2015-08-13 10:44:59 +02:00
Raphael Collet d46e9f4433 [IMP] models: convert some class methods to @api.model methods
Converting the following class methods to model methods will make them more
flexible for changes, in particular by making the environment available:
 - `_add_field`
 - `_pop_field`
 - `_add_magic_fields`
 - `_init_manual_fields` (renamed to `_add_manual_fields`)
 - `_inherits_check`
 - `_init_inherited_fields` (renamed to `_add_inherited_fields`)
2015-08-13 10:44:59 +02:00
Raphael Collet a4eaa86e44 [IMP] fields: split attribute _attrs into args and _attrs
Make an explicit distinction between both semantics of `_attrs`:
 - the parameters given to `__init__` in `args`
 - the non-slot attributes (memory optimization) in `_attrs`
2015-08-13 10:44:59 +02:00
Raphael Collet e6d4a63561 [IMP] fields: add attribute origin to avoid confusion with column
Making a distinction between the column from which the field was created, and
the one created from the field, allows to keep the second one from a registry
setup to the next one.  This opens a door for optimizations: the column may not
need to be recomputed.
2015-08-13 10:44:59 +02:00
Jay Patel c9dbc73faf [IMP] base,project: project attachments views
- Add nocontent tip in kanban view of project documents and remove create button.
- Hide a lot of noisy fields from attachment form view in technical group.
2015-08-13 10:43:31 +02:00
qdp-odoo 7a9f4ad991 [FIX] l10n_eu_service: parent_id doesn't exist anymore on account.account. 2015-08-13 10:32:04 +02:00
cod-odoo bd3fbd282d [FIX]Fixed tax sequnce issue on result of computed tax. 2015-08-13 08:59:40 +02:00
xmo-odoo 37868748ca [FIX] web: serialize debug_jobs
Otherwise the display in the server log (when spammed by phantomjs) is completely useless
2015-08-12 17:54:00 +02:00
Aaron Bohy 72e94beeb5 [FIX] board: don't use ir_values to get dashboard action id
Former implementation used ir_values to retrieve the dashboard action id from
its menu id. Using ir_values to do that doesn't work anymore since the
cleaning up of rev. e7e452f.

We now retrieve the action id from its xmlid directly in the controller.
2015-08-12 15:39:16 +02:00
Aaron Bohy 512f19c9c4 [IMP] board: My Dashboard layout 2015-08-12 15:39:15 +02:00
Aaron Bohy 40971b1b4f [FIX] calendar,web_calendar: calendar.event: start field readonly
The start field is a computed field but it doesn't have any inverse function
(write() is overridden in calendar.event to, among other things, play the
role of the missing inverse function). It is thus automatically set as
readonly, and the events can't be dragged and dropped in the calendar view,
since rev. d6d3d098 in which we start checking if the start_date is readonly
or not before allowing the drag and drop.

This rev. simply adds a "do_nothing" inverse function so that the date field
is not readonly.

In web_calendar, the date_start attribute is mandatory so fallbacking on
date_end and date_delay is unnecessary.
2015-08-12 15:39:15 +02:00
Aaron Bohy 1c8ca666c7 [REF] *: tree: use semantics decoration-{class} attributes
instead of deprecated colors and fonts attributes
2015-08-12 15:06:39 +02:00
Yannick Tivisse 8fb1446203 [FIX] hr_payroll: access_right issue on employees form view. 2015-08-12 14:54:30 +02:00
Thibault Delavallée 7fc8577238 [IMP][TEST] membership: tests updates
- update yml tests, crashing because of changes in the accounting
+ some light cleaning
- add python unittests, because those are way cooler than yml
2015-08-12 14:42:31 +02:00
Thibault Delavallée 0deef9b7f5 [FIX] membership: fix function fields computation
- correctly compute the invoice and its lines, in order to trigger the
computation of the membership_state on the partner
- correctly compute, using a true multi returning correct values, the
various dates of membership
- use the sequence of function field to ensure that the dates and state
are computed in the correct order; otherwise some states are not
reachable
- various fixes in the computation
2015-08-12 14:42:31 +02:00
Thibault Delavallée e9411b70b0 [FIX][TEST] membership: fixed tests. It is now clear that
tests crash and that there is a mismatch between the tests and
the module. However as the tests were badly written the asserts
did not fire.

Now the tests crash as they should be doing since a long time.

[CLEAN] membership: dead code / tests cleaning

Removed dead code, unnecessary comments in membership.py. Also added the
use of server datetime format instead of custom one.

Also slightly cleaned the tests. No change, but use data created for the
tests instead of relying on existing demo data, probably modified by
the user and difficult to track.
2015-08-12 14:42:31 +02:00
Yannick Tivisse f15af09976 [FIX] stock_landed_costs: Wrong value returned in onchange 2015-08-12 14:36:55 +02:00
Yannick Tivisse 587b960ed0 [FIX] project: wrong value set in data for generate_project_alias 2015-08-12 14:36:55 +02:00
Yannick Tivisse 310d93cb1a [REM] hr_recruitment: Remaining old api res_config.py file
Update new_api one also
2015-08-12 14:36:55 +02:00
Yannick Tivisse e523ea022b [FIX] stock : module name and summary typo 2015-08-12 14:18:22 +02:00
Yannick Tivisse cccd11d9e2 [IMP] website_crm_score: app fix
- website_crm_score should not be an app, it is technical and not targetting
a broad range of users
- move menuitem below Report in Sales menu root
2015-08-12 14:10:34 +02:00
Yannick Tivisse f48744763c [IMP] stock: fix Procurement Exceptions menuitem
Move it under Report section without group_no_one influence.
Indeed it is the only place to see the exceptions.
2015-08-12 14:07:10 +02:00
Yannick Tivisse 23ac1b5422 [FIX] stock: typo in settings + wrong group on a menuitem 2015-08-12 14:03:48 +02:00
Yannick Tivisse 8f7252f54b [FIX] hr_recruitment : The root menuitem should be visible only for hr employees and managers 2015-08-12 13:31:11 +02:00
Yannick Tivisse 745f33b35c [FIX] test_new_api : Discussions > Configuration > Categories: traceback 2015-08-12 13:27:59 +02:00
Cedric Snauwaert ef7c171847 [FIX] invoices analysis: in case currency rate is null or non existant, we should still be able to show invoices analysis report 2015-08-12 11:56:35 +02:00
Thibault Delavallée 3d8b329889 [IMP] base: module categories ordering
Just reordering the final sequences, until next iteration.
2015-08-12 11:42:28 +02:00
Gaurav Panchal 6375a4bcf4 [IMP] marketing: groups and config update
Removed marketing_user and marketing_manager groups, replaced by more
specific groups. Those are lead_automation_user and manager groups.
Previous commits have removed the use of marketing groups in other
modules (event, mass mailing, utm, ...). Those groups can now be
safely used in lead automation modules.
2015-08-12 11:41:58 +02:00
Gaurav Panchal b600075d86 [IMP] stock: groups and config update
Set the single location management group into hidden category, like the
multiple location related group.
2015-08-12 11:41:58 +02:00
Gaurav Panchal de9d5827ec [IMP] website, website_version: groups and config update
Update the name of the website groups, be less technical in the group name.

Use designer group instead of marketing groups in the versionning module.
2015-08-12 11:41:58 +02:00
Gaurav Panchal 8dd1d0481e [IMP] survey: groups and settings update
Link survey user and manager group to the survey module category and update
their label to match the labels used in the various Odoo groups.
2015-08-12 11:41:58 +02:00
Gaurav Panchal 16fc43f31d [IMP] mass_mailing: groups and config update
Define a new mass_mailing_user group that is used in the mass mailing module
instead of using the marketing user group.
2015-08-12 11:41:58 +02:00
Gaurav Panchal e473cd5614 [IMP] utm, link_tracker: groups and config update
Remove link to marketing groups on access rights and main menu. UTM being a
technical module it is now linked to the configuration group. Link tracking has
also been updated to use the configuration group.

Access rights and main menu display have been udpated.
2015-08-12 11:41:58 +02:00
Gaurav Panchal aed7afe1d1 [IMP] purchase_requisition: groups and config update
Remove custom Purchase Requisition category, as well as purchase_requisition
user and manager groups. Those groups are not used except in one view as
purchase groups are already used for access rights. We now use purchase user
and manager groups instead of the purchase requisition groups.
2015-08-12 11:41:58 +02:00
Gaurav Panchal ede13fd43b [IMP] gamification: groups and config udpate
Clean access, groups and categories in gamification. Remove custom
goal_category aka Gamification category. As gamification is mostly
integrated in HR, use HR categories. Remove custom group_goal_manager
group, replaced by HR manager. Gamification groups and configuration is
therefore linked to HR now.

Updated access rights accordingly.
2015-08-12 11:41:58 +02:00
Gaurav Panchal 4898d3a598 [IMP] event: groups and config update
Move the module category declaration in base to fit the other categories
declaration. Use event groups instead of marketing groups.
2015-08-12 11:41:58 +02:00
Gaurav Panchal d510ea50ce [IMP] base, subscription: groups and config update
Subscription: moved access rights from tools to sales groups. As this was the
last module to use the tools module category, it has been removed. This
category was used like a misc group. However now we try to better classify
modules.
2015-08-12 11:41:58 +02:00
Thibault Delavallée ecef9ebff1 [IMP] base: config: module category cleaning
- removed unused categories, aka report designer, CRM and knowledge management
- renamed Warehouse to Inventory
- defined all user groups in base_security, instead of having most of them in
base_security and 3 others defined in other files. Portal, public and
partner_manager groups are now present in base_security. This uniformize
the declaration of groups and module categories.
- define a new Extra / Other category, holding those 3 groups, to ease the
classification and display
- rename Usability ot Extra Rights[IMP] base: config: module category cleaning

- removed unused categories, aka report designer, CRM and knowledge management
- renamed Warehouse to Inventory
- defined all user groups in base_security, instead of having most of them in
base_security and 3 others defined in other files. Portal, public and
partner_manager groups are now present in base_security. This uniformize
the declaration of groups and module categories.
- define a new Extra / Other category, holding those 3 groups, to ease the
classification and display
- rename Usability ot Extra Rights
2015-08-12 11:41:58 +02:00
Cedric Snauwaert 2338dd8327 [FIX] currency: missing default context in action to open currency rate 2015-08-12 09:32:32 +02:00
Aaron Bohy c00b16d874 [FIX] account: dashboard: classList and phantomjs
When running the test_menu tour with phantomjs, there was an error when
calling customize_chart because classList is not supported on phantomjs.
The workaround is to use addClass() of jQuery instead.

Also add missing call to _super() in start(), and remove ignored arguments
passed to customize_chart().
2015-08-11 16:28:47 +02:00
Aaron Bohy 2fad641c41 [IMP] web(_kanban): grouped: column background
Before this rev., lighter columns seemed larger than the other ones as
their background-color is the same as the webclient background-color.
This rev. removes the gaps between columns (margin is replaced by padding).
2015-08-11 16:28:46 +02:00