Improve report and CSV for tree structure
issue10116 review341431002
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
* Add which records to use for actions
|
||||
* Add parent to group to inherit accesses
|
||||
* Add __access__ to Model
|
||||
* Add route wrapper to allow null origin
|
||||
|
||||
+10
-1
@@ -54,6 +54,11 @@ class Action(DeactivableMixin, ModelSQL, ModelView):
|
||||
__name__ = 'ir.action'
|
||||
name = fields.Char('Name', required=True, translate=True)
|
||||
type = fields.Char('Type', required=True, readonly=True)
|
||||
records = fields.Selection([
|
||||
('selected', "Selected"),
|
||||
('listed', "Listed"),
|
||||
], "Records",
|
||||
help="The records on which the action runs.")
|
||||
usage = fields.Char('Usage')
|
||||
keywords = fields.One2Many('ir.action.keyword', 'action',
|
||||
'Keywords')
|
||||
@@ -66,6 +71,10 @@ class Action(DeactivableMixin, ModelSQL, ModelView):
|
||||
'get_action_value': RPC(instantiate=0, cache=dict(days=1)),
|
||||
})
|
||||
|
||||
@classmethod
|
||||
def default_records(cls):
|
||||
return 'selected'
|
||||
|
||||
@staticmethod
|
||||
def default_usage():
|
||||
return None
|
||||
@@ -103,7 +112,7 @@ class Action(DeactivableMixin, ModelSQL, ModelView):
|
||||
Action = Pool().get(type_)
|
||||
if columns is None:
|
||||
columns = []
|
||||
columns += ['id', 'name', 'type', 'icon.rec_name']
|
||||
columns += ['id', 'name', 'type', 'records', 'icon.rec_name']
|
||||
if type_ == 'ir.action.report':
|
||||
columns += ['report_name', 'direct_print']
|
||||
elif type_ == 'ir.action.act_window':
|
||||
|
||||
@@ -8,6 +8,8 @@ this repository contains the full copyright notices and license terms. -->
|
||||
<field name="active" xexpand="0" width="100"/>
|
||||
<notebook colspan="4">
|
||||
<page string="General" id="general">
|
||||
<label name="records"/>
|
||||
<field name="records"/>
|
||||
<label name="usage"/>
|
||||
<field name="usage"/>
|
||||
<label name="icon"/>
|
||||
|
||||
Reference in New Issue
Block a user