Merge lp:~savoirfairelinux-openerp/knowledge-addons/7.0-document_page_approval into lp:knowledge-addons/7.0

Status: Merged
Merged at revision: 13
Proposed branch: lp:~savoirfairelinux-openerp/knowledge-addons/7.0-document_page_approval
Merge into: lp:knowledge-addons/7.0
Diff against target: 709 lines (+661/-0)
9 files modified
document_page_approval/__init__.py (+24/-0)
document_page_approval/__openerp__.py (+57/-0)
document_page_approval/document_page_approval.py (+212/-0)
document_page_approval/document_page_view.xml (+51/-0)
document_page_approval/document_page_wkfl.xml (+77/-0)
document_page_approval/i18n/document_page_approval.pot (+110/-0)
document_page_approval/i18n/fr.po (+119/-0)
document_page_approval/security/document_page_security.xml (+9/-0)
document_page_approval/security/ir.model.access.csv (+2/-0)
To merge this branch: bzr merge lp:~savoirfairelinux-openerp/knowledge-addons/7.0-document_page_approval
Reviewer Review Type Date Requested Status
Joao Alfredo Gama Batista code review, no tests Approve
Joël Grand-Guillaume @ camptocamp code review, no tests Approve
Maxime Chambreuil (http://www.savoirfairelinux.com) test and review Approve
Review via email: mp+175604@code.launchpad.net

Commit message

[ADD] document_page_approval

To post a comment you must log in.
12. By Maxime Chambreuil (http://www.savoirfairelinux.com)

[IMP] Documentation
[ADD] Translation file + french
[FIX] employee_id field does not exist
[FIX] user_email field deprecated

Revision history for this message
Maxime Chambreuil (http://www.savoirfairelinux.com) (max3903) :
review: Approve (test and review)
Revision history for this message
Joël Grand-Guillaume @ camptocamp (jgrandguillaume-c2c) wrote :

Thanks, it LGTM.

Coding: some lines may be a bit too long, would be good to split them while merging.

review: Approve (code review, no tests)
13. By Maxime Chambreuil (http://www.savoirfairelinux.com)

[IMP] Split long lines

Revision history for this message
Joao Alfredo Gama Batista (joao-gama) wrote :

lgtm.

review: Approve (code review, no tests)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== added directory 'document_page_approval'
2=== added file 'document_page_approval/__init__.py'
3--- document_page_approval/__init__.py 1970-01-01 00:00:00 +0000
4+++ document_page_approval/__init__.py 2013-07-19 12:07:29 +0000
5@@ -0,0 +1,24 @@
6+# -*- encoding: utf-8 -*-
7+##############################################################################
8+#
9+# OpenERP, Open Source Management Solution
10+# Copyright (C) 2013 Savoir-faire Linux (<http://www.savoirfairelinux.com>).
11+#
12+# This program is free software: you can redistribute it and/or modify
13+# it under the terms of the GNU Affero General Public License as
14+# published by the Free Software Foundation, either version 3 of the
15+# License, or (at your option) any later version.
16+#
17+# This program is distributed in the hope that it will be useful,
18+# but WITHOUT ANY WARRANTY; without even the implied warranty of
19+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20+# GNU Affero General Public License for more details.
21+#
22+# You should have received a copy of the GNU Affero General Public License
23+# along with this program. If not, see <http://www.gnu.org/licenses/>.
24+#
25+##############################################################################
26+
27+import document_page_approval
28+
29+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
30
31=== added file 'document_page_approval/__openerp__.py'
32--- document_page_approval/__openerp__.py 1970-01-01 00:00:00 +0000
33+++ document_page_approval/__openerp__.py 2013-07-19 12:07:29 +0000
34@@ -0,0 +1,57 @@
35+# -*- encoding: utf-8 -*-
36+##############################################################################
37+#
38+# OpenERP, Open Source Management Solution
39+# Copyright (C) 2013 Savoir-faire Linux (<http://www.savoirfairelinux.com>).
40+#
41+# This program is free software: you can redistribute it and/or modify
42+# it under the terms of the GNU Affero General Public License as
43+# published by the Free Software Foundation, either version 3 of the
44+# License, or (at your option) any later version.
45+#
46+# This program is distributed in the hope that it will be useful,
47+# but WITHOUT ANY WARRANTY; without even the implied warranty of
48+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
49+# GNU Affero General Public License for more details.
50+#
51+# You should have received a copy of the GNU Affero General Public License
52+# along with this program. If not, see <http://www.gnu.org/licenses/>.
53+#
54+##############################################################################
55+
56+{
57+ 'name': 'Document Page Approval',
58+ 'version': '1.0',
59+ "author" : "Savoir-faire Linux",
60+ "website" : "http://www.savoirfairelinux.com",
61+ "license" : "AGPL-3",
62+ 'category': 'Knowledge Management',
63+ 'description': """
64+This module adds a workflow to approve page modification and show the approved version by default.
65+
66+Scenario
67+========
68+
69+* Set a valid email address on the company settings.
70+* Create a new page category and set an approver group. Make sure users belonging to that group
71+ have valid email addresses.
72+* Create a new page and choose the previously created category.
73+* A notification is sent to the group with a link to the page history to review.
74+* Depending on the review, the page history is approved or not.
75+* Users reading the page see the last approved version.
76+ """,
77+ 'depends': [
78+ 'document_page',
79+ 'email_template',
80+ ],
81+ 'data': [
82+ 'document_page_wkfl.xml',
83+ 'document_page_view.xml',
84+ 'security/document_page_security.xml',
85+ 'security/ir.model.access.csv',
86+ ],
87+ 'installable': True,
88+ 'auto_install': False,
89+ 'images': [],
90+}
91+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
92
93=== added file 'document_page_approval/document_page_approval.py'
94--- document_page_approval/document_page_approval.py 1970-01-01 00:00:00 +0000
95+++ document_page_approval/document_page_approval.py 2013-07-19 12:07:29 +0000
96@@ -0,0 +1,212 @@
97+# -*- encoding: utf-8 -*-
98+##############################################################################
99+#
100+# OpenERP, Open Source Management Solution
101+# Copyright (C) 2013 Savoir-faire Linux (<http://www.savoirfairelinux.com>).
102+#
103+# This program is free software: you can redistribute it and/or modify
104+# it under the terms of the GNU Affero General Public License as
105+# published by the Free Software Foundation, either version 3 of the
106+# License, or (at your option) any later version.
107+#
108+# This program is distributed in the hope that it will be useful,
109+# but WITHOUT ANY WARRANTY; without even the implied warranty of
110+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
111+# GNU Affero General Public License for more details.
112+#
113+# You should have received a copy of the GNU Affero General Public License
114+# along with this program. If not, see <http://www.gnu.org/licenses/>.
115+#
116+##############################################################################
117+from openerp.osv import fields, orm
118+from datetime import *
119+
120+class document_page_history_wkfl(orm.Model):
121+ _inherit = 'document.page.history'
122+
123+ def page_approval_draft(self, cr, uid, ids):
124+ self.write(cr, uid, ids, { 'state' : 'draft' })
125+
126+ template_id = self.pool.get('ir.model.data').get_object_reference(cr, uid,
127+ 'document_page_approval', 'email_template_new_draft_need_approval')[1]
128+ for page in self.browse(cr, uid, ids):
129+ if page.is_parent_approval_required:
130+ self.pool.get('email.template').send_mail(cr, uid, template_id,
131+ page.id, force_send=True)
132+
133+ return True
134+
135+ def page_approval_approved(self, cr, uid, ids):
136+ self.write(cr, uid, ids, { 'state' : 'approved',
137+ 'approved_date' : datetime.now().strftime('%Y-%m-%d %H:%M:%S'),
138+ 'approved_uid': uid
139+ })
140+ return True
141+
142+ def can_user_approve_page(self, cr, uid, ids, name, args, context=None):
143+ user = self.pool.get('res.users').browse(cr,uid,uid)
144+ res = {}
145+ for page in self.browse(cr, uid, ids, context=context):
146+ res[page.id]= self.can_user_approve_this_page(page.page_id, user)
147+
148+ return res
149+
150+ def can_user_approve_this_page(self, page, user):
151+ if page:
152+ res = page.approver_gid in user.groups_id
153+ res = res or self.can_user_approve_this_page(page.parent_id, user)
154+ else:
155+ res=False
156+
157+ return res
158+
159+ def get_approvers_guids(self, cr, uid, ids, name, args, context=None):
160+ res = {}
161+ for page in self.browse(cr, uid, ids, context=context):
162+ res[page.id]= self.get_approvers_guids_for_page(page.page_id)
163+
164+ return res
165+
166+ def get_approvers_guids_for_page(self, page):
167+ if page:
168+ if page.approver_gid:
169+ res = [page.approver_gid.id]
170+ else:
171+ res=[]
172+ res.extend(self.get_approvers_guids_for_page(page.parent_id))
173+ else:
174+ res=[]
175+
176+ return res
177+
178+ def get_approvers_email(self, cr, uid, ids, name, args, context):
179+ res = {}
180+ for id in ids:
181+ emails = ''
182+ guids = self.get_approvers_guids(cr, uid, ids, name, args, context=context)
183+ uids = self.pool.get('res.users').search(cr, uid, [('groups_id','in',guids[id])])
184+ users = self.pool.get('res.users').browse(cr, uid, uids)
185+
186+ for user in users:
187+ if user.email:
188+ emails += user.email
189+ emails += ','
190+ else:
191+ empl_id = self.pool.get('hr.employee').search(cr, uid,
192+ [('login','=',user.login)])[0]
193+ empl = self.pool.get('hr.employee').browse(cr, uid, empl_id)
194+ if empl.work_email:
195+ emails += empl.work_email
196+ emails += ','
197+
198+ emails = emails[:-1]
199+ res[id] = emails
200+ return res
201+
202+ def get_page_url(self, cr, uid, ids, name, args, context):
203+ res = {}
204+ for id in ids:
205+ base_url = self.pool.get('ir.config_parameter').get_param(cr, uid,
206+ 'web.base.url', default='http://localhost:8069', context=context)
207+
208+ res[id] = base_url + '/#db=%s&id=%s&view_type=form&model=document.page.history' % (cr.dbname, id);
209+
210+ return res
211+
212+ _columns = {
213+ 'state': fields.selection([
214+ ('draft','Draft'),
215+ ('approved','Approved')], 'Status', readonly=True),
216+ 'approved_date': fields.datetime("Approved Date"),
217+ 'approved_uid': fields.many2one('res.users', "Approved By"),
218+ 'is_parent_approval_required': fields.related('page_id', 'is_parent_approval_required',
219+ string="parent approval", type='boolean', store=False),
220+ 'can_user_approve_page': fields.function(can_user_approve_page,
221+ string="can user approve this page", type='boolean', store=False),
222+ 'get_approvers_email': fields.function(get_approvers_email,
223+ string="get all approvers email", type='text', store=False),
224+ 'get_page_url': fields.function(get_page_url, string="URL", type='text',
225+ store=False),
226+ }
227+
228+class document_page_approval(orm.Model):
229+ _inherit = 'document.page'
230+ def _get_display_content(self, cr, uid, ids, name, args, context=None):
231+ res = {}
232+ for page in self.browse(cr, uid, ids, context=context):
233+ content=""
234+ if page.type == "category":
235+ content = self._get_page_index(cr, uid, page, link=False)
236+ else:
237+ history = self.pool.get('document.page.history')
238+ if self.is_approval_required(page):
239+ history_ids = history.search(cr, uid,[('page_id', '=', page.id),
240+ ('state', '=', 'approved')], limit=1, order='create_date DESC')
241+ for h in history.browse(cr, uid, history_ids):
242+ content = h.content
243+ else:
244+ content = page.content
245+ res[page.id] = content
246+ return res
247+
248+ def _get_approved_date(self, cr, uid, ids, name, args, context=None):
249+ res = {}
250+ for page in self.browse(cr, uid, ids, context=context):
251+ if self.is_approval_required(page):
252+ history = self.pool.get('document.page.history')
253+ history_ids = history.search(cr, uid,[('page_id', '=', page.id),
254+ ('state', '=', 'approved')], limit=1, order='create_date DESC')
255+ approved_date = False
256+ for h in history.browse(cr, uid, history_ids):
257+ approved_date = h.approved_date
258+ res[page.id] = approved_date
259+ else:
260+ res[page.id] = ""
261+
262+ return res
263+
264+ def _get_approved_uid(self, cr, uid, ids, name, args, context=None):
265+ res = {}
266+ for page in self.browse(cr, uid, ids, context=context):
267+ if self.is_approval_required(page):
268+ history = self.pool.get('document.page.history')
269+ history_ids = history.search(cr, uid,[('page_id', '=', page.id),
270+ ('state', '=', 'approved')], limit=1, order='create_date DESC')
271+ approved_uid = False
272+ for h in history.browse(cr, uid, history_ids):
273+ approved_uid = h.approved_uid.id
274+ res[page.id] = approved_uid
275+ else:
276+ res[page.id] = ""
277+
278+ return res
279+
280+ def _is_parent_approval_required(self, cr, uid, ids, name, args, context=None):
281+ res = {}
282+ for page in self.browse(cr, uid, ids, context=context):
283+ res[page.id]= self.is_approval_required(page)
284+
285+ return res
286+
287+ def is_approval_required(self, page):
288+ if page:
289+ res = page.approval_required
290+ res = res or self.is_approval_required(page.parent_id)
291+ else:
292+ res=False
293+
294+ return res
295+
296+ _columns = {
297+ 'display_content': fields.function(_get_display_content,
298+ string='Displayed Content', type='text'),
299+ 'approved_date': fields.function(_get_approved_date, string="Approved Date",
300+ type='datetime'),
301+ 'approved_uid': fields.function(_get_approved_uid, string="Approved By",
302+ type='many2one', obj='res.users'),
303+ 'approval_required': fields.boolean("Require approval"),
304+ 'is_parent_approval_required': fields.function(_is_parent_approval_required,
305+ string="parent approval", type='boolean'),
306+ 'approver_gid': fields.many2one("res.groups", "Approver group"),
307+ }
308+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
309
310=== added file 'document_page_approval/document_page_view.xml'
311--- document_page_approval/document_page_view.xml 1970-01-01 00:00:00 +0000
312+++ document_page_approval/document_page_view.xml 2013-07-19 12:07:29 +0000
313@@ -0,0 +1,51 @@
314+<?xml version="1.0"?>
315+<openerp>
316+ <data>
317+ <record id="wiki_history_form_inherit" model="ir.ui.view">
318+ <field name="name">document.page.history.form</field>
319+ <field name="model">document.page.history</field>
320+ <field name="inherit_id" ref="document_page.wiki_history_form"/>
321+ <field name="arch" type="xml">
322+ <xpath expr="//form/label[@for='page_id']" position="before">
323+ <header attrs="{'invisible':[('is_parent_approval_required','=',False)]}">
324+ <span attrs="{'invisible':[('can_user_approve_page','=',False)]}">
325+ <button name="page_approval_approve" string="Approve" states="draft"/>
326+ </span>
327+ <field name="state" widget="statusbar" statusbar_visible="draft,approved"/>
328+ <field name="is_parent_approval_required" invisible="1"/>
329+ <field name="can_user_approve_page" invisible="1"/>
330+ </header>
331+ </xpath>
332+ </field>
333+ </record>
334+
335+ <record id="wiki_form_inherit" model="ir.ui.view">
336+ <field name="name">document.page.form</field>
337+ <field name="model">document.page</field>
338+ <field name="inherit_id" ref="document_page.view_wiki_form"/>
339+ <field name="arch" type="xml">
340+ <field name="display_content" position="before">
341+ <field name="approved_date" class="oe_view_only"/>
342+ <field name="approved_uid" class="oe_view_only"/>
343+ </field>
344+ <field name="parent_id" position="after">
345+ <field name="approval_required" attrs="{'invisible':[('type','=','content')]}"/>
346+ <field name="approver_gid" attrs="{'invisible':['|',('type','=','content'),
347+ ('approval_required','!=', True)], 'required':[('approval_required','=', True)]}"/>
348+ </field>
349+ </field>
350+ </record>
351+
352+ <record id="view_wiki_history_tree_inherit" model="ir.ui.view">
353+ <field name="name">document.page.history.tree</field>
354+ <field name="model">document.page.history</field>
355+ <field name="inherit_id" ref="document_page.view_wiki_history_tree"/>
356+ <field name="arch" type="xml">
357+ <field name="page_id" position="after">
358+ <field name="state" attrs="{'invisible':[('is_parent_approval_required','=',False)]}"/>
359+ <field name="is_parent_approval_required" invisible="1"/>
360+ </field>
361+ </field>
362+ </record>
363+ </data>
364+</openerp>
365
366=== added file 'document_page_approval/document_page_wkfl.xml'
367--- document_page_approval/document_page_wkfl.xml 1970-01-01 00:00:00 +0000
368+++ document_page_approval/document_page_wkfl.xml 2013-07-19 12:07:29 +0000
369@@ -0,0 +1,77 @@
370+<?xml version="1.0"?>
371+<openerp>
372+ <data>
373+
374+ <record model="workflow" id="wkf_document_page_history_aproval">
375+ <field name="name">document.page.history.aproval.wkf</field>
376+ <field name="osv">document.page.history</field>
377+ <field name="on_create">True</field>
378+ </record>
379+
380+ <record model="workflow.activity" id="act_draft">
381+ <field name="wkf_id" ref="wkf_document_page_history_aproval" />
382+ <field name="flow_start">True</field>
383+ <field name="name">draft</field>
384+ <field name="kind">function</field>
385+ <field name="action">page_approval_draft()</field>
386+ </record>
387+
388+ <record model="workflow.activity" id="act_approved">
389+ <field name="wkf_id" ref="wkf_document_page_history_aproval" />
390+ <field name="name">approved</field>
391+ <field name="kind">function</field>
392+ <field name="action">page_approval_approved()</field>
393+ <field name="flow_stop">True</field>
394+ </record>
395+
396+ <record model="workflow.transition" id="tda">
397+ <field name="act_from" ref="act_draft" />
398+ <field name="act_to" ref="act_approved" />
399+ <field name="signal">page_approval_approve</field>
400+ </record>
401+
402+ <record model="workflow.transition" id="tad">
403+ <field name="act_from" ref="act_approved" />
404+ <field name="act_to" ref="act_draft" />
405+ <field name="signal">edit</field>
406+ </record>
407+
408+ </data>
409+
410+ <!-- Allow user to make upgrade-proof customizations to email template -->
411+
412+ <data noupdate="1">
413+
414+ <record id="email_template_new_draft_need_approval" model="email.template">
415+ <field name="name">Automated new draft need approval Notification Mail</field>
416+ <field name="email_from">${object.create_uid.company_id.email or 'noreply@localhost.com'}</field>
417+ <field name="subject">New version of "${object.page_id.name}" to approve</field>
418+ <field name="email_to">${object.get_approvers_email}</field>
419+ <field name="model_id" ref="model_document_page_history"/>
420+ <field name="auto_delete" eval="True"/>
421+ <field name="lang">${object.create_uid.partner_id.lang}</field>
422+ <field name="body_html"><![CDATA[
423+<p>Hello,</p>
424+
425+<p>The page "${object.page_id.name}" has been modified and need your approval.</p>
426+
427+<p>You can review the new version here : <a href="${object.get_page_url}">${object.get_page_url}</a></p>
428+
429+<p>Have a great day.<br/>
430+--<br/>
431+OpenERP</p>]]>
432+ </field>
433+ <field name="body_text"><![CDATA[
434+Hello,
435+
436+The page "${object.page_id.name}" has been modified and need your approval.
437+
438+You can review the new version here: ${object.get_page_url}
439+
440+Have a great day.
441+--
442+OpenERP]]></field>
443+ </record>
444+
445+ </data>
446+</openerp>
447
448=== added directory 'document_page_approval/i18n'
449=== added file 'document_page_approval/i18n/document_page_approval.pot'
450--- document_page_approval/i18n/document_page_approval.pot 1970-01-01 00:00:00 +0000
451+++ document_page_approval/i18n/document_page_approval.pot 2013-07-19 12:07:29 +0000
452@@ -0,0 +1,110 @@
453+# Translation of OpenERP Server.
454+# This file contains the translation of the following modules:
455+# * document_page_approval
456+#
457+msgid ""
458+msgstr ""
459+"Project-Id-Version: OpenERP Server 7.0\n"
460+"Report-Msgid-Bugs-To: \n"
461+"POT-Creation-Date: 2013-07-19 03:58+0000\n"
462+"PO-Revision-Date: 2013-07-19 03:58+0000\n"
463+"Last-Translator: <>\n"
464+"Language-Team: \n"
465+"MIME-Version: 1.0\n"
466+"Content-Type: text/plain; charset=UTF-8\n"
467+"Content-Transfer-Encoding: \n"
468+"Plural-Forms: \n"
469+
470+#. module: document_page_approval
471+#: field:document.page.history,state:0
472+msgid "Status"
473+msgstr ""
474+
475+#. module: document_page_approval
476+#: field:document.page,approval_required:0
477+msgid "Require approval"
478+msgstr ""
479+
480+#. module: document_page_approval
481+#: field:document.page,is_parent_approval_required:0
482+#: field:document.page.history,is_parent_approval_required:0
483+msgid "parent approval"
484+msgstr ""
485+
486+#. module: document_page_approval
487+#: model:email.template,body_html:document_page_approval.email_template_new_draft_need_approval
488+msgid "\n"
489+"<p>Hello,</p>\n"
490+"\n"
491+"<p>The page \"${object.page_id.name}\" has been modified and need your approval.</p>\n"
492+"\n"
493+"<p>You can review the new version here : <a href=\"${object.get_page_url}\">${object.get_page_url}</a></p>\n"
494+" \n"
495+"<p>Have a great day.<br/>\n"
496+"--<br/>\n"
497+"OpenERP</p>\n"
498+" "
499+msgstr ""
500+
501+#. module: document_page_approval
502+#: model:ir.model,name:document_page_approval.model_document_page
503+msgid "Document Page"
504+msgstr ""
505+
506+#. module: document_page_approval
507+#: field:document.page,approved_uid:0
508+#: field:document.page.history,approved_uid:0
509+msgid "Approved By"
510+msgstr ""
511+
512+#. module: document_page_approval
513+#: model:email.template,subject:document_page_approval.email_template_new_draft_need_approval
514+msgid "New version of \"${object.page_id.name}\" to approve"
515+msgstr ""
516+
517+#. module: document_page_approval
518+#: selection:document.page.history,state:0
519+msgid "Draft"
520+msgstr ""
521+
522+#. module: document_page_approval
523+#: field:document.page.history,get_page_url:0
524+msgid "URL"
525+msgstr ""
526+
527+#. module: document_page_approval
528+#: field:document.page,approved_date:0
529+#: field:document.page.history,approved_date:0
530+msgid "Approved Date"
531+msgstr ""
532+
533+#. module: document_page_approval
534+#: field:document.page.history,can_user_approve_page:0
535+msgid "can user approve this page"
536+msgstr ""
537+
538+#. module: document_page_approval
539+#: field:document.page,approver_gid:0
540+msgid "Approver group"
541+msgstr ""
542+
543+#. module: document_page_approval
544+#: model:ir.model,name:document_page_approval.model_document_page_history
545+msgid "Document Page History"
546+msgstr ""
547+
548+#. module: document_page_approval
549+#: view:document.page.history:0
550+msgid "Approve"
551+msgstr ""
552+
553+#. module: document_page_approval
554+#: selection:document.page.history,state:0
555+msgid "Approved"
556+msgstr ""
557+
558+#. module: document_page_approval
559+#: field:document.page.history,get_approvers_email:0
560+msgid "get all approvers email"
561+msgstr ""
562+
563
564=== added file 'document_page_approval/i18n/fr.po'
565--- document_page_approval/i18n/fr.po 1970-01-01 00:00:00 +0000
566+++ document_page_approval/i18n/fr.po 2013-07-19 12:07:29 +0000
567@@ -0,0 +1,119 @@
568+# Translation of OpenERP Server.
569+# This file contains the translation of the following modules:
570+# * document_page_approval
571+#
572+msgid ""
573+msgstr ""
574+"Project-Id-Version: OpenERP Server 7.0\n"
575+"Report-Msgid-Bugs-To: \n"
576+"POT-Creation-Date: 2013-07-19 03:58+0000\n"
577+"PO-Revision-Date: 2013-07-19 03:58+0000\n"
578+"Last-Translator: <>\n"
579+"Language-Team: \n"
580+"MIME-Version: 1.0\n"
581+"Content-Type: text/plain; charset=UTF-8\n"
582+"Content-Transfer-Encoding: \n"
583+"Plural-Forms: \n"
584+
585+#. module: document_page_approval
586+#: field:document.page.history,state:0
587+msgid "Status"
588+msgstr "Statut"
589+
590+#. module: document_page_approval
591+#: field:document.page,approval_required:0
592+msgid "Require approval"
593+msgstr "Nécessite une approbation"
594+
595+#. module: document_page_approval
596+#: field:document.page,is_parent_approval_required:0
597+#: field:document.page.history,is_parent_approval_required:0
598+msgid "parent approval"
599+msgstr "Approbation parente"
600+
601+#. module: document_page_approval
602+#: model:email.template,body_html:document_page_approval.email_template_new_draft_need_approval
603+msgid "\n"
604+"<p>Hello,</p>\n"
605+"\n"
606+"<p>The page \"${object.page_id.name}\" has been modified and need your approval.</p>\n"
607+"\n"
608+"<p>You can review the new version here : <a href=\"${object.get_page_url}\">${object.get_page_url}</a></p>\n"
609+" \n"
610+"<p>Have a great day.<br/>\n"
611+"--<br/>\n"
612+"OpenERP</p>\n"
613+" "
614+msgstr "\n"
615+"<p>Bonjour,</p>\n"
616+"\n"
617+"<p>La page \"${object.page_id.name}\" a été modifié et demande votre approbation.</p>\n"
618+"\n"
619+"<p>Vous pouvez réviser la nouvelle version ici : <a href=\"${object.get_page_url}\">${object.get_page_url}</a></p>\n"
620+" \n"
621+"<p>Bonne journée.<br/>\n"
622+"--<br/>\n"
623+"OpenERP</p>\n"
624+" "
625+
626+#. module: document_page_approval
627+#: model:ir.model,name:document_page_approval.model_document_page
628+msgid "Document Page"
629+msgstr "Page"
630+
631+#. module: document_page_approval
632+#: field:document.page,approved_uid:0
633+#: field:document.page.history,approved_uid:0
634+msgid "Approved By"
635+msgstr "Approuvée par"
636+
637+#. module: document_page_approval
638+#: model:email.template,subject:document_page_approval.email_template_new_draft_need_approval
639+msgid "New version of \"${object.page_id.name}\" to approve"
640+msgstr "Nouvelle version de \"${object.page_id.name}\" à approuver"
641+
642+#. module: document_page_approval
643+#: selection:document.page.history,state:0
644+msgid "Draft"
645+msgstr "Brouillon"
646+
647+#. module: document_page_approval
648+#: field:document.page.history,get_page_url:0
649+msgid "URL"
650+msgstr "URL"
651+
652+#. module: document_page_approval
653+#: field:document.page,approved_date:0
654+#: field:document.page.history,approved_date:0
655+msgid "Approved Date"
656+msgstr "Date d'approbation"
657+
658+#. module: document_page_approval
659+#: field:document.page.history,can_user_approve_page:0
660+msgid "can user approve this page"
661+msgstr "Est-ce que l'usager peut approuver cette page ?"
662+
663+#. module: document_page_approval
664+#: field:document.page,approver_gid:0
665+msgid "Approver group"
666+msgstr "Groupe approbateur"
667+
668+#. module: document_page_approval
669+#: model:ir.model,name:document_page_approval.model_document_page_history
670+msgid "Document Page History"
671+msgstr "Historique de la page"
672+
673+#. module: document_page_approval
674+#: view:document.page.history:0
675+msgid "Approve"
676+msgstr "Approuver"
677+
678+#. module: document_page_approval
679+#: selection:document.page.history,state:0
680+msgid "Approved"
681+msgstr "Approuvée"
682+
683+#. module: document_page_approval
684+#: field:document.page.history,get_approvers_email:0
685+msgid "get all approvers email"
686+msgstr "Récupérer toutes les adresses courriels des approbateurs"
687
688=== added directory 'document_page_approval/security'
689=== added file 'document_page_approval/security/document_page_security.xml'
690--- document_page_approval/security/document_page_security.xml 1970-01-01 00:00:00 +0000
691+++ document_page_approval/security/document_page_security.xml 2013-07-19 12:07:29 +0000
692@@ -0,0 +1,9 @@
693+<?xml version="1.0" encoding="utf-8"?>
694+<openerp>
695+<data noupdate="0">
696+ <record id="base.group_document_approver_user" model="res.groups">
697+ <field name="name">Document approver</field>
698+ <field name="users" eval="[(4, ref('base.user_root'))]"/>
699+ </record>
700+</data>
701+</openerp>
702
703=== added file 'document_page_approval/security/ir.model.access.csv'
704--- document_page_approval/security/ir.model.access.csv 1970-01-01 00:00:00 +0000
705+++ document_page_approval/security/ir.model.access.csv 2013-07-19 12:07:29 +0000
706@@ -0,0 +1,2 @@
707+id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink
708+document_page_history,document.page.history,model_document_page_history,base.group_document_approver_user,1,1,1,0
709\ No newline at end of file

Subscribers

People subscribed via source and target branches

to status/vote changes: