diff --git a/doc/howtos/backend.rst b/doc/howtos/backend.rst index 0ac7ab8060d..10200f66268 100644 --- a/doc/howtos/backend.rst +++ b/doc/howtos/backend.rst @@ -764,6 +764,7 @@ method should simply set the value of the field to compute on every record in name = fields.Char(compute='_compute_name') + @api.multi def _compute_name(self): for record in self: record.name = str(random.randint(1, 1e6)) diff --git a/doc/howtos/backend/exercise-gantt b/doc/howtos/backend/exercise-gantt index dc4033e18de..273854b197d 100644 --- a/doc/howtos/backend/exercise-gantt +++ b/doc/howtos/backend/exercise-gantt @@ -35,7 +35,7 @@ Index: addons/openacademy/views/openacademy.xml =================================================================== --- addons.orig/openacademy/views/openacademy.xml 2014-08-28 14:21:46.543015785 +0200 +++ addons/openacademy/views/openacademy.xml 2014-08-28 14:21:46.539015785 +0200 -@@ -145,11 +145,24 @@ +@@ -145,11 +145,23 @@ @@ -44,10 +44,9 @@ Index: addons/openacademy/views/openacademy.xml + openacademy.session + + -+ -+ -+ ++ date_start="start_date" date_delay="hours" ++ default_group_by='instructor_id'> ++ + + + diff --git a/doc/howtos/backend/exercise-state-workflow-actions b/doc/howtos/backend/exercise-state-workflow-actions index 826ec5ce870..fe9a0c8a796 100644 --- a/doc/howtos/backend/exercise-state-workflow-actions +++ b/doc/howtos/backend/exercise-state-workflow-actions @@ -5,7 +5,7 @@ Index: addons/openacademy/views/session_workflow.xml =================================================================== --- addons.orig/openacademy/views/session_workflow.xml 2014-08-26 17:26:17.339783114 +0200 +++ addons/openacademy/views/session_workflow.xml 2014-08-26 17:26:17.331783114 +0200 -@@ -6,24 +6,53 @@ +@@ -6,24 +6,50 @@ True @@ -13,8 +13,7 @@ Index: addons/openacademy/views/session_workflow.xml + Set session to Draft + + -+recs = self.browse(cr, uid, context['active_ids'], context=context) -+recs.action_draft() ++model.search([('id', 'in', context['active_ids'])]).action_draft() + + @@ -32,8 +31,7 @@ Index: addons/openacademy/views/session_workflow.xml + Set session to Confirmed + + -+recs = self.browse(cr, uid, context['active_ids'], context=context) -+recs.action_confirm() ++model.search([('id', 'in', context['active_ids'])]).action_confirm() + @@ -50,8 +48,7 @@ Index: addons/openacademy/views/session_workflow.xml + Set session to Done + + -+recs = self.browse(cr, uid, context['active_ids'], context=context) -+recs.action_done() ++model.search([('id', 'in', context['active_ids'])]).action_done() +