Commit Graph

90138 Commits

Author SHA1 Message Date
Olivier Dony 935c476664 [IMP] orm.Field: doc for @copy attribute 2014-08-07 18:03:08 +02:00
Olivier Dony 4b2f2a1561 [IMP] calendar.event: _compute should be done in batch + consistent @multi attributes 2014-08-07 18:03:08 +02:00
Olivier Dony 6445ce7922 [FIX] calendar.read: do not re-compute `display_time` for virtual calendar ID if not requested 2014-08-07 18:03:08 +02:00
Olivier Dony 30ddb67299 [IMP] calendar: simplify/optimize `rrule` computed field
Avoid reading one record at a time, leading to multiple
calls to read() which is special-cased and even slower
than a normal one.
2014-08-07 18:03:08 +02:00
Olivier Dony d837d4b497 [IMP] ir.qweb: avoid repeatedly searching the registry for nonexistant widget models 2014-08-07 18:03:08 +02:00
Thibault Delavallée 2e5412fc1d [FIX] mail, BaseModel, portal_sale: fixes and improvements in the URL
management to access documents in notification emails, as well as for the
'view quotation' link in portal_sale module.

models: added a get_access_action method: basically, returns the action to
access a document. It uses the get_formview_action by default (form view
of the document). However for some documents we want to directly go to the
website, leading to an act_url action for some documents. This method allows
this behavior.

portal_sale: get_signup_url now uses the mail.action_mail_redirect method
instead of directly redirecting towards a portal menu. This allows to fall
back on a standard behavior.

portal_sale: get_formview_action updated, to match actions tailored for
portal users.

website_quote: get_access_action of sale order updated. If the sale order
has a template defined, the returned action is an act_url (website view
of the quotation), not the form action anymore.

mail: fixed signature + company signature in notification emails. Even without
user signature, the company signature + access link should be correct.

portal: signup url in notification emali was not using the mail redirection
as action. It is now the case.
2014-08-07 16:47:59 +02:00
Thibault Delavallée e9f9bb5802 [FIX] email_template: when generating body containing the user's signature, add it as html as it is now pure html, not plaintext anymore. 2014-08-07 16:47:59 +02:00
Thibault Delavallée f5688cd8fd [FIX] tools: html_sanitize: keep mako tags (<% ... %>), required for example in the portal sale quotation email. 2014-08-07 16:47:58 +02:00
Christophe Simonis eb3d81fcf9 [MERGE] pos improvements
manual fix of fp-style merge
2014-08-07 15:17:43 +02:00
Frederic van der Essen 43be035401 Merge branch '8.0' into 8.0-pos-imps2-fva 2014-08-07 14:59:26 +02:00
Frederic van der Essen 22676c7447 [IMP] pos_restaurant: update some paths due to module name change 2014-08-07 14:05:30 +02:00
Christophe Simonis 407c1be1e8 [FIX] fields.py: correct copy/paste error, use the right attribute 2014-08-07 13:50:27 +02:00
Frederic van der Essen 81304870ba [IMP] restaurant: renamed to pos_restaurant 2014-08-07 13:27:51 +02:00
Christophe Simonis 5bd3c02bec [FIX] fields.py: handle "change_default" and "deprecated" attributes in new fields 2014-08-07 13:04:26 +02:00
Christophe Simonis 50a67c8e9b [FIX] fields.py: fix old field to new field convertion 2014-08-07 13:01:03 +02:00
Richard Mathot a949b09c3e [FIX] website_sale_option: make options work 2014-08-07 09:51:27 +02:00
Thibault Delavallée 0c462a12b9 [FIX] mail: compose wizard: fixed default_get overrides not correctly managing the received field_list + improved custom call to default_get to correctly manage its in and out values. 2014-08-07 08:54:10 +02:00
Thibault Delavallée 2ca875572a [FIX] crm: fixed day_open and day_close computation (conditional store + be sure that date_open and date_closed fields are set) 2014-08-07 08:54:10 +02:00
Thibault Delavallée 622b52d262 [FIX] project_issue, resource: fixed computation of hours / days to open (assign) or close an issue. Those fields now have a conditional store, because they were not recomputed even when changing date_open and date_closed. Changing the stage now correctly changes the date_closed. Also added some fixes in resource module, the date was not correctly taken into account when computing the number of working hours between two dates. 2014-08-07 08:54:09 +02:00
Olivier Dony f062eec639 [FIX] orm: _compute_related: ensure prefetch is done in batch
Due to the use of a sudo env, the records
were being added to the sudo cache one by
one instead of all at once. This meant the
prefetching was not able to load all
records at once, leading to prohibitive
times when processing thousands of
records.
2014-08-06 18:48:35 +02:00
Christophe Simonis 135962184d [FIX] web: make search by `id` possible.
+ correct tests
2014-08-06 17:27:27 +02:00
Raphael Collet 068d4c487e [IMP] models: name_search() should call _name_search()
This avoids code duplication between methods, and keeps backward compatibility
with existing code overriding _name_search().
2014-08-06 15:21:58 +02:00
Raphael Collet e95fc488db [IMP] fields: add mechanism to extend a selection field
If a selection field is defined by a list as selection, such as:

    state = fields.Selection([('a', 'A'), ('b', 'B')])

one can extend it by inheritance by redefining the field, as:

    state = fields.Selection(selection_add=[('c', 'C')])

The result is that the selection field will have the list
[('a', 'A'), ('b', 'B'), ('c', 'C')] as selection.
2014-08-06 15:20:07 +02:00
Christophe Simonis dc9bcf479d [FIX] Allow search on `_inherits` fields.
As `_inherits` fields are now handled via `related`
fields (not stored, obviously), a new descriptor
`searchable` has been added to `fields_get()` result
to indicated if the field is searchable or not.
2014-08-06 15:01:01 +02:00
Daniel Dico 6dc4676632 [FIX] website_livechat: reference of demo data was preventing to install the module
Added a record of im_livechat.channel in website_livechat data
2014-08-06 14:50:01 +02:00
Mohammed Shekha e106ef91ef [FIX] Exporting of res.partner works again
Singleton object was required while access model properties, but search returns multiple results and hence caused traceback while accessing record.property
2014-08-06 14:10:00 +02:00
Fekete Mihai 87a870ccbd [FIX] stock: typo when selecting inventory on single product 2014-08-06 11:37:22 +02:00
Raphael Collet 6a83425ba9 [FIX] base: fixes #1167, change password wizard (wrong default value)
The one2many field 'user_ids' was initialized with an incorrect value for the
inverse field 'wizard_id', using a res.users id. The latter was causing a
MissingError exception. The fix is simply to not define explicitly the inverse
field in the one2many.

Also did a small cleanup of the code of the wizard.
2014-08-06 11:24:37 +02:00
Richard Mathot 52a37be447 [FIX] project_issue: reviewer_id doesn(t exist
(partial revert of 44a5268c00)
2014-08-06 10:30:52 +02:00
Raphael Collet 4c18c5fb6e [FIX] fields: convert_to_cache() on *2many fields must take record's current value
The existing code was buggy when writing on *2many fields with a list of
commands: the value was converted for the cache, but taking an empty recordset
as the current value of the field.
2014-08-06 09:07:57 +02:00
Thibault Delavallée 836b0f864e [FIX] hr_contract: count the number of contracts of an employee as superuser_id as this field is required in the form view. However no data is displayed, and no data about the contracts are leaked, so no security holes. 2014-08-06 09:01:09 +02:00
Denis Ledoux 625aa7e75d [MERGE] forward port of branch saas-5 up to 7d7f6fe 2014-08-05 16:04:58 +02:00
Denis Ledoux 7d7f6fefb1 [FIX] purchase: now allow 'can be purchased' to be checked even if not variant
Before, the field purchase_ok was set as readonly on the product form if the product wasn't a variant, to avoid users to set all the products variants associated to the product template to be set as purchase able in one action.

We now consider that this can be done by the end user
2014-08-05 16:01:55 +02:00
Denis Ledoux 497883cc51 [FIX] web_kanban: parent can be undefined in some cases
opw-611106, when clicking quickly Sales > Opportunities than Sales > Leads.
2014-08-05 15:44:57 +02:00
Raphael Collet 54b901effd [IMP] models: turn _patch_method() and _revert_method() into class methods
This makes the patching mechanism more flexible, and enables patching BaseModel,
for instance. This should fix #1501.
2014-08-05 15:20:14 +02:00
cod-odoo 2d54afef9e [FIX] account: prevent crash onchange company_id
(rebase of #1534)
2014-08-05 15:09:32 +02:00
Samus CTO 5f6fc4735a [IMP] Do not create FK when destination model is _auto=False
It is not useful to try to create foreign keys when the destination model is
a PostgreSQL view for example.
We already do this kind of verifications but ir.actions and transient models
but did not for _auto.
2014-08-05 15:02:23 +02:00
Raphael Collet 56c54a52df [IMP] base/res_users: improve reading/writing of reified group fields
- simplify the code by removing unused cases
- do not modify input argument 'value' of create/write
- do not call BaseModel.read() with reified group fields (this causes warnings)
2014-08-05 14:17:11 +02:00
Frederic van der Essen dbc2d309b4 [FIX] point_of_sale: partner list rendering was not refreshing correctly. + limited display to 1000 partners for performance reasons 2014-08-05 14:10:59 +02:00
Frederic van der Essen d30dc934f6 [IMP] restaurant: discard kitchen order changes when splitting the bill. 2014-08-05 14:09:58 +02:00
Frederic van der Essen 09bf85ae02 [IMP] restaurant: a module that extends the point of sale with restaurant features 2014-08-05 14:09:48 +02:00
Frederic van der Essen bfd66f351b [FIX] point_of_sale: removed useless console.log() 2014-08-05 14:09:21 +02:00
Frederic van der Essen a27d1a7134 [IMP] point_of_sale: allow an order to remember what screen it was on, instead
of switching back to default screen.

This is used by the soon to be merged restaurant addon to create new orders
and display them at a particular screen.  However, this behaviour is more
confusing in the other cases, so I'll think of a better way to solve this.
2014-08-05 14:09:07 +02:00
Frederic van der Essen cb725a973d [IMP] pos_discount: a new pos extension that allows you to quickly give a global discount on the current order 2014-08-05 14:08:51 +02:00
Frederic van der Essen 28de2183ea [IMP] point_of_sale: report errors when loading the point of sale with a traceback and a nice popup 2014-08-05 14:08:38 +02:00
Frederic van der Essen eacd5329e3 [IMP] point_of_sale: made the server data loading more modular for easier development of point_of_sale extensions 2014-08-05 14:08:24 +02:00
Frederic van der Essen db9a06b842 [IMP] point_of_sale: tests work better when they are loaded and run by the unit test system! 2014-08-05 14:08:08 +02:00
Frederic van der Essen 59396b45f5 [IMP] point_of_sale: forgot changes in this file in the previous commit that introduced unit tests 2014-08-05 14:07:58 +02:00
Frederic van der Essen a70b286144 [IMP] point_of_sale: add a basic UI unit test based on the new 'Tour' module 2014-08-05 14:07:41 +02:00
Frederic van der Essen ad0f710fe7 [IMP] point_of_sale: add a debug option to delete all unsent orders 2014-08-05 14:07:23 +02:00