Commit Graph

224 Commits

Author SHA1 Message Date
Martin Trigaux 0df7a1ca2f
[FIX] base: decode params_store content
The parameter bin_size=True will display the size of the binary field.

Fixes #12681
2016-07-06 16:24:50 +02:00
Christophe Simonis 393c14d31a [MERGE] forward port of branch 7.0 up to f4cb884 2016-05-17 13:16:50 +02:00
Sylvain GARANCHER f4cb884cdc [FIX] base: Add missing return values
The _auto_init method was overriden without keeping the return value of
the super on some models.
This break the new stored computed fields computation at field creation.

Closes #11985
opw-677232
2016-05-17 10:39:54 +02:00
Nicolas Lempereur 4309bd311f [FIX] base: don't unlink base.open_menu but reset it
The ir.actions.todo record base.open_menu is used to redirect the user
to a menu after installing a module.

To do so, a new module override the record changing its action (toward a
menu) and setting its state to "open".

But with f7fe753 when one such changed action is removed after
uninstalling a module (or removing the action by any other way) the
base.open_menu would also be removed. Thus thereafter the open_menu will
not work anymore (since type "automatic" is lost).

With this commit, when whenever base.open_menu is removed, instead its
action will be replaced by base.action_client_base_menu which is the
original action.

closes #11224
related to: #11216, opw-660269
2016-03-07 14:03:28 +01:00
Christophe Simonis afae197073 [IMP] base: timezone handling in server actions.
Give access to `pytz.timezone` (as `timezone`) in `ir.actions.server`
records. Usefull when dealing with date(time)s.
2015-11-12 12:23:27 +01:00
Denis Ledoux 90f998da0b [FIX] *: alias help message
When going to logged calls through opportunities,
and no logged calls were listed,
the mail alias of opportunities was displayed
within the placeholder help message,
wrongly, as we were in the logged calls list.

This was due to a context propagation, due
to have defined empty_list_help_* keys within
window actions. It was the case in several
modules.

Besides, we do not find the usefulness of the
custom_context passed to the get_empty_list_help
method: indeed, none of the methods get_empty_list_help
overriden in modules need any other keys than
'default_type', which do not require an evaluated
context.

We therefore remove the whole code regarding this
custom_context, and we therefore get rid of this
useless context evaluation thing within one of
the most accessed method of the web client.

opw-630673
2015-04-01 10:52:37 +02:00
Thomas Groutars 7e0ff24cca [FIX] base: delete cascade value mapping on server action deletion
When deleting a server action, its fields_lines were not deleted.
It causes an issue for example in this case:

Create a new custom field on any model
Create a server action with
Action To Do: Write on a Record
Base model: model of the custom field
Add a line in the value mapping,
using the custom field you just created

Delete the server action

Delete the custom field => Throws an error because
required field col1 is not defined
on the ir_server_object_lines object
2015-03-13 11:25:08 +01:00
Samus CTO 4ed38c2a92 [FIX] base: ambiguous @required for `name` of ir.actions subclasses
Column `name` is required in ir.actions, and thus
automatically required in subclasses such as `ir.actions.act_window`
and `ir.actions.act_url`, due to the specific PostgreSQL inheritance
mechanism. Mark it so in the model to make it explicit.
This does not change the database constraints, as they should already
be set though inheritance.

Closes #4861
2015-02-20 12:24:49 +01:00
Antony Lesuisse 06c681ba11 [FIX] base: add env to ir_action and ir_ui_view qweb context
To impel new api usage in server actions and qweb templates.
2015-01-28 23:48:23 +01:00
Xavier Morel 8c3d71ccb8 [CHG] Fix task 7536 / PR #499 differently
Issue was the propagation of contextual values across actions, more
precisely conserving the selected fiscal year when selecting an account
from the chart of accounts tree view: the chart of accounts tree view is
generally opened for a specific fiscal year, and it seemed sensible that
opening an account would show only the journal items for the previously
selected fiscal years rather than all items ever.

PR #649 altered action.read by tentatively evaluating the action's
context, however this has the side-effect of providing evaluated
contexts when creating or editing actions via the UI, usually breaking
them in the process (as the context at this point is basically
nonsensical for the action's purpose).

This backs out the previous fix, and creates a fix restricted to the
tree view's JS (thereby removing the feature for window actions not
invoked from a tree view).

closes #4677, closes #4690
2015-01-14 13:28:23 +01:00
Christophe Simonis 640e77eaa3 [FIX] base: deleting a view must not delete linked actions 2014-12-02 17:45:31 +01:00
Raphael Collet f2e4a10e1a [IMP] use model._fields instead of model._all_columns to cover all fields
The old-api model._all_columns contains information about model._columns and
inherited columns.  This dictionary is missing new-api computed non-stored
fields, and the new field objects provide a more readable api...

This commit contains the following changes:

 - adapt several methods of BaseModel to use fields instead of columns and
   _all_columns

 - copy all semantic-free attributes of related fields from their source

 - add attribute 'group_operator' on integer and float fields

 - base, base_action_rule, crm, edi, hr, mail, mass_mailing, pad,
   payment_acquirer, share, website, website_crm, website_mail: simply use
   _fields instead of _all_columns

 - base, decimal_precision, website: adapt qweb rendering methods to use fields
   instead of columns
2014-11-04 13:47:57 +01:00
Christophe Simonis 562272d9a0 [MERGE] forward port of branch saas-3 up to c89d1a0 2014-10-23 13:08:44 +02:00
Jeremy Kersten add28795fb [FIX] ir_action: update context to get the real binary, else we have a traceback when we edit/view an ir_action_client where param is a binary field. Because we do safe_eval from the length and not from the binary 2014-10-22 16:20:05 +02:00
Xavier Morel 99d740ad7d [IMP] new-api-ify 'trigger' server action 2014-10-08 17:30:16 +02:00
Xavier Morel 8cfe731f76 [FIX] actions: match the behavior of multi actions with its help text
also fix the corresponding text and add explicit sequence number because I
don't understand what the bloody hell it does without that, except that it's
not the right thing. At all.
2014-10-08 17:29:36 +02:00
Denis Ledoux c741d45ac1 [FIX] ir_actions: ids of unlink method can either be an ID list or one ID 2014-10-07 16:07:46 +02:00
Alexandre Fayolle 20267aa06c fix exception message in report seachr
when we get to the raise statement, `r` is `None`, so displaying it in the
exception message is useless. `name` is what we want to show.
2014-09-30 11:35:05 +02:00
Thibault Delavallée 4c6dcd7fcb [FIX] ir_actions: server action: when creating or writing value on a record
through a server action, try to correctly set the value to write on a given
fields according to its type. For example many2one fields should receive an
int, not a unique containing the id of the new value.
2014-08-21 11:03:15 +02:00
Thibault Delavallée 43fe825870 [FIX] ir_actions: server action: check the validity of write_expresison only if defined. Also check for the related model only if set in the onchange. 2014-08-21 11:03:15 +02:00
Olivier Dony 7b84dfb302 [FIX] ir.actions.server: ir.values ref (`More` menu entry) should not be copied 2014-07-30 18:56:56 +02:00
Raphael Collet 33eb3dffb2 [REM] models: remove the magic methods signal_XXX() 2014-07-07 11:50:30 +02:00
Raphael Collet cbe2dbb672 [MERGE] new v8 api by rco
A squashed merge is required as the conversion of the apiculture branch from
bzr to git was not correctly done. The git history contains irrelevant blobs
and commits. This branch brings a lot of changes and fixes, too many to list
exhaustively.

- New orm api, objects are now used instead of ids
- Environements to encapsulates cr uid context while maintaining backward compatibility
- Field compute attribute is a new object oriented way to define function fields
- Shared browse record cache
- New onchange protocol
- Optional copy flag on fields
- Documentation update
- Dead code cleanup
- Lots of fixes
2014-07-06 17:05:41 +02:00
Jaydeep Barot 026e38b48f [REM] Unnecessary `size` parameters on char fields 2014-06-25 17:13:43 +02:00
Christophe Simonis eef6330c55 [MERGE] forward port of branch saas-5 up to adf07a9 2014-06-19 16:23:32 +02:00
Christophe Simonis adf07a9490 [MERGE] forward port of branch saas-4 up to 5087612 2014-06-19 16:13:35 +02:00
Christophe Simonis 5087612d1d [MERGE] forward port of branch saas-3 up to bf53aed 2014-06-19 15:44:07 +02:00
Richard Mathot 6a4047f47b [REV] ir_actions: Partial revert of 7d4df0b6b2 2014-06-19 11:49:49 +02:00
Jeremy Kersten 481c64e077 [IMP] Ir Action Server - Fix the domain for the field 'Link Using field'. 2014-06-17 15:20:52 +02:00
Richard Mathot 7ad2eb354d [IMP] base: use current context when evaluation ir_actions' context 2014-06-17 11:59:14 +02:00
Thibault Delavallée 8dc02ebb6f Merge pull request #90 from odoo-dev/master-uninstall-module-tpa
[FIX] issues when uninstalling modules: unlink ir.action.todo which are related to actions which will be deleted (fix issues when uninstalling modules) + check for menu existence before displaying need action
2014-06-16 10:08:36 +02:00
Olivier Dony 04211015fc [MERGE] Forward-port of latest saas-4 fixes, up to 0452851 2014-05-27 20:49:49 +02:00
Simon Lejeune b50421e551 [FIX] ir_actions: adapt render_report when called in a tests/qweb report context to generate the pdf only if a directory has been provided 2014-05-21 13:11:27 +02:00
tpa-odoo f7fe753d07 [IMP] unlink ir.action.todo which are related to actions which will be deleted. 2014-05-20 17:00:15 +05:30
Jitendra Prajapati 9b15769a71 [MERGE] [IMP] Misc view improvements using better name_get / name_search.
bzr revid: tde@openerp.com-20140509094920-94z2i7hfao3xxu4n
2014-05-09 11:49:20 +02:00
Jitendra Prajapati (OpenERP) 49a7338b00 [IMP]improve code: call super method instead of manual search
bzr revid: jpr@tinyerp.com-20140508052730-5oztw3um6h42osvd
2014-05-08 10:57:30 +05:30
Jitendra Prajapati (OpenERP) 394a525e22 [IMP]override name_search method
bzr revid: jpr@tinyerp.com-20140506100853-80b45nx286hw1gfh
2014-05-06 15:38:53 +05:30
Jitendra Prajapati (OpenERP) d5e9847b0d [IMP]remove unnecessary check on ids
bzr revid: jpr@tinyerp.com-20140506083630-i1o5flr7p8apgrym
2014-05-06 14:06:30 +05:30
Jitendra Prajapati (OpenERP) 39312207d7 [MERGE]with main branch
bzr revid: jpr@tinyerp.com-20140415053250-r784vpfu9x8gnfll
bzr revid: jpr@tinyerp.com-20140424045737-h6pshjslqw8xqyvm
2014-04-24 10:27:37 +05:30
Simon Lejeune 2599ff5590 [MERGE] trunk
bzr revid: sle@openerp.com-20140407133627-36iijkx89552bwa0
bzr revid: sle@openerp.com-20140407174628-24wysrr3g8x0fijd
bzr revid: sle@openerp.com-20140408135137-0ficpzark3mjys9r
2014-04-08 15:51:37 +02:00
Christophe Simonis c1cc370d75 [FIX] ir_actions: add missing comma
bzr revid: chs@openerp.com-20140407165455-0zbsl1omgvw9e5ta
2014-04-07 18:54:55 +02:00
Christophe Simonis 0161666e8b [MERGE] forward port of branch saas-3 up to revid 5112 chs@openerp.com-20140407144238-3s38zadkh7yxpdy7
bzr revid: chs@openerp.com-20140407160548-ttuc877kknuycoqw
2014-04-07 18:05:48 +02:00
Olivier Dony effa87f794 [IMP] ir.actions: add Warning in eval context for server actions
This way one can do `raise Warning(Foo)` to abort
a transaction and show a user-friendly warning to
the user.

bzr revid: odo@openerp.com-20140403162650-m7zmmr9dba7jnzxp
2014-04-03 18:26:50 +02:00
Jitendra Prajapati (OpenERP) 911552c2e7 [IMP]optimized code for name_get method
bzr revid: jpr@tinyerp.com-20140403111445-lej57pocr2d0qokm
2014-04-03 16:44:45 +05:30
Simon Lejeune c8aa0cc7f1 [FIX] Adapted the render_report and try_report_action methods used in yml test to work with qweb reports
bzr revid: sle@openerp.com-20140401153339-3n0xw5whx82uu0pu
2014-04-01 17:33:39 +02:00
Jitendra Prajapati (OpenERP) 6e9c73de0d [MERGE]with main branch
bzr revid: jpr@tinyerp.com-20140327063821-n85232vzt06v8mo9
2014-03-27 12:08:21 +05:30
Simon Lejeune ab003bfea6 [IMP] ir_actions wording
bzr revid: sle@openerp.com-20140324150533-bs1lwvhd2z2jow8m
2014-03-24 16:05:33 +01:00
Simon Lejeune a3be66bb49 [IMP] ir.actions.report.xml views/models adapted for report_type controller
bzr revid: sle@openerp.com-20140321184739-0dmft3odaws85m7e
2014-03-21 19:47:39 +01:00
Jitendra Prajapati (OpenERP) bf605938b2 [MERGE]with main branch
bzr revid: jpr@tinyerp.com-20140319051226-05pee6q8ih606s1i
2014-03-19 10:42:26 +05:30
Antony Lesuisse 66988eefb5 [IMP] ir.actions.report.xml more view cleanup
bzr revid: al@openerp.com-20140307011305-sqfbr857ifczh6f1
2014-03-07 02:13:05 +01:00