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
=== added directory 'document_page_approval'
=== added file 'document_page_approval/__init__.py'
--- document_page_approval/__init__.py 1970-01-01 00:00:00 +0000
+++ document_page_approval/__init__.py 2013-07-19 12:07:29 +0000
@@ -0,0 +1,24 @@
1# -*- encoding: utf-8 -*-
2##############################################################################
3#
4# OpenERP, Open Source Management Solution
5# Copyright (C) 2013 Savoir-faire Linux (<http://www.savoirfairelinux.com>).
6#
7# This program is free software: you can redistribute it and/or modify
8# it under the terms of the GNU Affero General Public License as
9# published by the Free Software Foundation, either version 3 of the
10# License, or (at your option) any later version.
11#
12# This program is distributed in the hope that it will be useful,
13# but WITHOUT ANY WARRANTY; without even the implied warranty of
14# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15# GNU Affero General Public License for more details.
16#
17# You should have received a copy of the GNU Affero General Public License
18# along with this program. If not, see <http://www.gnu.org/licenses/>.
19#
20##############################################################################
21
22import document_page_approval
23
24# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
025
=== added file 'document_page_approval/__openerp__.py'
--- document_page_approval/__openerp__.py 1970-01-01 00:00:00 +0000
+++ document_page_approval/__openerp__.py 2013-07-19 12:07:29 +0000
@@ -0,0 +1,57 @@
1# -*- encoding: utf-8 -*-
2##############################################################################
3#
4# OpenERP, Open Source Management Solution
5# Copyright (C) 2013 Savoir-faire Linux (<http://www.savoirfairelinux.com>).
6#
7# This program is free software: you can redistribute it and/or modify
8# it under the terms of the GNU Affero General Public License as
9# published by the Free Software Foundation, either version 3 of the
10# License, or (at your option) any later version.
11#
12# This program is distributed in the hope that it will be useful,
13# but WITHOUT ANY WARRANTY; without even the implied warranty of
14# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15# GNU Affero General Public License for more details.
16#
17# You should have received a copy of the GNU Affero General Public License
18# along with this program. If not, see <http://www.gnu.org/licenses/>.
19#
20##############################################################################
21
22{
23 'name': 'Document Page Approval',
24 'version': '1.0',
25 "author" : "Savoir-faire Linux",
26 "website" : "http://www.savoirfairelinux.com",
27 "license" : "AGPL-3",
28 'category': 'Knowledge Management',
29 'description': """
30This module adds a workflow to approve page modification and show the approved version by default.
31
32Scenario
33========
34
35* Set a valid email address on the company settings.
36* Create a new page category and set an approver group. Make sure users belonging to that group
37 have valid email addresses.
38* Create a new page and choose the previously created category.
39* A notification is sent to the group with a link to the page history to review.
40* Depending on the review, the page history is approved or not.
41* Users reading the page see the last approved version.
42 """,
43 'depends': [
44 'document_page',
45 'email_template',
46 ],
47 'data': [
48 'document_page_wkfl.xml',
49 'document_page_view.xml',
50 'security/document_page_security.xml',
51 'security/ir.model.access.csv',
52 ],
53 'installable': True,
54 'auto_install': False,
55 'images': [],
56}
57# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
058
=== added file 'document_page_approval/document_page_approval.py'
--- document_page_approval/document_page_approval.py 1970-01-01 00:00:00 +0000
+++ document_page_approval/document_page_approval.py 2013-07-19 12:07:29 +0000
@@ -0,0 +1,212 @@
1# -*- encoding: utf-8 -*-
2##############################################################################
3#
4# OpenERP, Open Source Management Solution
5# Copyright (C) 2013 Savoir-faire Linux (<http://www.savoirfairelinux.com>).
6#
7# This program is free software: you can redistribute it and/or modify
8# it under the terms of the GNU Affero General Public License as
9# published by the Free Software Foundation, either version 3 of the
10# License, or (at your option) any later version.
11#
12# This program is distributed in the hope that it will be useful,
13# but WITHOUT ANY WARRANTY; without even the implied warranty of
14# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15# GNU Affero General Public License for more details.
16#
17# You should have received a copy of the GNU Affero General Public License
18# along with this program. If not, see <http://www.gnu.org/licenses/>.
19#
20##############################################################################
21from openerp.osv import fields, orm
22from datetime import *
23
24class document_page_history_wkfl(orm.Model):
25 _inherit = 'document.page.history'
26
27 def page_approval_draft(self, cr, uid, ids):
28 self.write(cr, uid, ids, { 'state' : 'draft' })
29
30 template_id = self.pool.get('ir.model.data').get_object_reference(cr, uid,
31 'document_page_approval', 'email_template_new_draft_need_approval')[1]
32 for page in self.browse(cr, uid, ids):
33 if page.is_parent_approval_required:
34 self.pool.get('email.template').send_mail(cr, uid, template_id,
35 page.id, force_send=True)
36
37 return True
38
39 def page_approval_approved(self, cr, uid, ids):
40 self.write(cr, uid, ids, { 'state' : 'approved',
41 'approved_date' : datetime.now().strftime('%Y-%m-%d %H:%M:%S'),
42 'approved_uid': uid
43 })
44 return True
45
46 def can_user_approve_page(self, cr, uid, ids, name, args, context=None):
47 user = self.pool.get('res.users').browse(cr,uid,uid)
48 res = {}
49 for page in self.browse(cr, uid, ids, context=context):
50 res[page.id]= self.can_user_approve_this_page(page.page_id, user)
51
52 return res
53
54 def can_user_approve_this_page(self, page, user):
55 if page:
56 res = page.approver_gid in user.groups_id
57 res = res or self.can_user_approve_this_page(page.parent_id, user)
58 else:
59 res=False
60
61 return res
62
63 def get_approvers_guids(self, cr, uid, ids, name, args, context=None):
64 res = {}
65 for page in self.browse(cr, uid, ids, context=context):
66 res[page.id]= self.get_approvers_guids_for_page(page.page_id)
67
68 return res
69
70 def get_approvers_guids_for_page(self, page):
71 if page:
72 if page.approver_gid:
73 res = [page.approver_gid.id]
74 else:
75 res=[]
76 res.extend(self.get_approvers_guids_for_page(page.parent_id))
77 else:
78 res=[]
79
80 return res
81
82 def get_approvers_email(self, cr, uid, ids, name, args, context):
83 res = {}
84 for id in ids:
85 emails = ''
86 guids = self.get_approvers_guids(cr, uid, ids, name, args, context=context)
87 uids = self.pool.get('res.users').search(cr, uid, [('groups_id','in',guids[id])])
88 users = self.pool.get('res.users').browse(cr, uid, uids)
89
90 for user in users:
91 if user.email:
92 emails += user.email
93 emails += ','
94 else:
95 empl_id = self.pool.get('hr.employee').search(cr, uid,
96 [('login','=',user.login)])[0]
97 empl = self.pool.get('hr.employee').browse(cr, uid, empl_id)
98 if empl.work_email:
99 emails += empl.work_email
100 emails += ','
101
102 emails = emails[:-1]
103 res[id] = emails
104 return res
105
106 def get_page_url(self, cr, uid, ids, name, args, context):
107 res = {}
108 for id in ids:
109 base_url = self.pool.get('ir.config_parameter').get_param(cr, uid,
110 'web.base.url', default='http://localhost:8069', context=context)
111
112 res[id] = base_url + '/#db=%s&id=%s&view_type=form&model=document.page.history' % (cr.dbname, id);
113
114 return res
115
116 _columns = {
117 'state': fields.selection([
118 ('draft','Draft'),
119 ('approved','Approved')], 'Status', readonly=True),
120 'approved_date': fields.datetime("Approved Date"),
121 'approved_uid': fields.many2one('res.users', "Approved By"),
122 'is_parent_approval_required': fields.related('page_id', 'is_parent_approval_required',
123 string="parent approval", type='boolean', store=False),
124 'can_user_approve_page': fields.function(can_user_approve_page,
125 string="can user approve this page", type='boolean', store=False),
126 'get_approvers_email': fields.function(get_approvers_email,
127 string="get all approvers email", type='text', store=False),
128 'get_page_url': fields.function(get_page_url, string="URL", type='text',
129 store=False),
130 }
131
132class document_page_approval(orm.Model):
133 _inherit = 'document.page'
134 def _get_display_content(self, cr, uid, ids, name, args, context=None):
135 res = {}
136 for page in self.browse(cr, uid, ids, context=context):
137 content=""
138 if page.type == "category":
139 content = self._get_page_index(cr, uid, page, link=False)
140 else:
141 history = self.pool.get('document.page.history')
142 if self.is_approval_required(page):
143 history_ids = history.search(cr, uid,[('page_id', '=', page.id),
144 ('state', '=', 'approved')], limit=1, order='create_date DESC')
145 for h in history.browse(cr, uid, history_ids):
146 content = h.content
147 else:
148 content = page.content
149 res[page.id] = content
150 return res
151
152 def _get_approved_date(self, cr, uid, ids, name, args, context=None):
153 res = {}
154 for page in self.browse(cr, uid, ids, context=context):
155 if self.is_approval_required(page):
156 history = self.pool.get('document.page.history')
157 history_ids = history.search(cr, uid,[('page_id', '=', page.id),
158 ('state', '=', 'approved')], limit=1, order='create_date DESC')
159 approved_date = False
160 for h in history.browse(cr, uid, history_ids):
161 approved_date = h.approved_date
162 res[page.id] = approved_date
163 else:
164 res[page.id] = ""
165
166 return res
167
168 def _get_approved_uid(self, cr, uid, ids, name, args, context=None):
169 res = {}
170 for page in self.browse(cr, uid, ids, context=context):
171 if self.is_approval_required(page):
172 history = self.pool.get('document.page.history')
173 history_ids = history.search(cr, uid,[('page_id', '=', page.id),
174 ('state', '=', 'approved')], limit=1, order='create_date DESC')
175 approved_uid = False
176 for h in history.browse(cr, uid, history_ids):
177 approved_uid = h.approved_uid.id
178 res[page.id] = approved_uid
179 else:
180 res[page.id] = ""
181
182 return res
183
184 def _is_parent_approval_required(self, cr, uid, ids, name, args, context=None):
185 res = {}
186 for page in self.browse(cr, uid, ids, context=context):
187 res[page.id]= self.is_approval_required(page)
188
189 return res
190
191 def is_approval_required(self, page):
192 if page:
193 res = page.approval_required
194 res = res or self.is_approval_required(page.parent_id)
195 else:
196 res=False
197
198 return res
199
200 _columns = {
201 'display_content': fields.function(_get_display_content,
202 string='Displayed Content', type='text'),
203 'approved_date': fields.function(_get_approved_date, string="Approved Date",
204 type='datetime'),
205 'approved_uid': fields.function(_get_approved_uid, string="Approved By",
206 type='many2one', obj='res.users'),
207 'approval_required': fields.boolean("Require approval"),
208 'is_parent_approval_required': fields.function(_is_parent_approval_required,
209 string="parent approval", type='boolean'),
210 'approver_gid': fields.many2one("res.groups", "Approver group"),
211 }
212# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
0213
=== added file 'document_page_approval/document_page_view.xml'
--- document_page_approval/document_page_view.xml 1970-01-01 00:00:00 +0000
+++ document_page_approval/document_page_view.xml 2013-07-19 12:07:29 +0000
@@ -0,0 +1,51 @@
1<?xml version="1.0"?>
2<openerp>
3 <data>
4 <record id="wiki_history_form_inherit" model="ir.ui.view">
5 <field name="name">document.page.history.form</field>
6 <field name="model">document.page.history</field>
7 <field name="inherit_id" ref="document_page.wiki_history_form"/>
8 <field name="arch" type="xml">
9 <xpath expr="//form/label[@for='page_id']" position="before">
10 <header attrs="{'invisible':[('is_parent_approval_required','=',False)]}">
11 <span attrs="{'invisible':[('can_user_approve_page','=',False)]}">
12 <button name="page_approval_approve" string="Approve" states="draft"/>
13 </span>
14 <field name="state" widget="statusbar" statusbar_visible="draft,approved"/>
15 <field name="is_parent_approval_required" invisible="1"/>
16 <field name="can_user_approve_page" invisible="1"/>
17 </header>
18 </xpath>
19 </field>
20 </record>
21
22 <record id="wiki_form_inherit" model="ir.ui.view">
23 <field name="name">document.page.form</field>
24 <field name="model">document.page</field>
25 <field name="inherit_id" ref="document_page.view_wiki_form"/>
26 <field name="arch" type="xml">
27 <field name="display_content" position="before">
28 <field name="approved_date" class="oe_view_only"/>
29 <field name="approved_uid" class="oe_view_only"/>
30 </field>
31 <field name="parent_id" position="after">
32 <field name="approval_required" attrs="{'invisible':[('type','=','content')]}"/>
33 <field name="approver_gid" attrs="{'invisible':['|',('type','=','content'),
34 ('approval_required','!=', True)], 'required':[('approval_required','=', True)]}"/>
35 </field>
36 </field>
37 </record>
38
39 <record id="view_wiki_history_tree_inherit" model="ir.ui.view">
40 <field name="name">document.page.history.tree</field>
41 <field name="model">document.page.history</field>
42 <field name="inherit_id" ref="document_page.view_wiki_history_tree"/>
43 <field name="arch" type="xml">
44 <field name="page_id" position="after">
45 <field name="state" attrs="{'invisible':[('is_parent_approval_required','=',False)]}"/>
46 <field name="is_parent_approval_required" invisible="1"/>
47 </field>
48 </field>
49 </record>
50 </data>
51</openerp>
052
=== added file 'document_page_approval/document_page_wkfl.xml'
--- document_page_approval/document_page_wkfl.xml 1970-01-01 00:00:00 +0000
+++ document_page_approval/document_page_wkfl.xml 2013-07-19 12:07:29 +0000
@@ -0,0 +1,77 @@
1<?xml version="1.0"?>
2<openerp>
3 <data>
4
5 <record model="workflow" id="wkf_document_page_history_aproval">
6 <field name="name">document.page.history.aproval.wkf</field>
7 <field name="osv">document.page.history</field>
8 <field name="on_create">True</field>
9 </record>
10
11 <record model="workflow.activity" id="act_draft">
12 <field name="wkf_id" ref="wkf_document_page_history_aproval" />
13 <field name="flow_start">True</field>
14 <field name="name">draft</field>
15 <field name="kind">function</field>
16 <field name="action">page_approval_draft()</field>
17 </record>
18
19 <record model="workflow.activity" id="act_approved">
20 <field name="wkf_id" ref="wkf_document_page_history_aproval" />
21 <field name="name">approved</field>
22 <field name="kind">function</field>
23 <field name="action">page_approval_approved()</field>
24 <field name="flow_stop">True</field>
25 </record>
26
27 <record model="workflow.transition" id="tda">
28 <field name="act_from" ref="act_draft" />
29 <field name="act_to" ref="act_approved" />
30 <field name="signal">page_approval_approve</field>
31 </record>
32
33 <record model="workflow.transition" id="tad">
34 <field name="act_from" ref="act_approved" />
35 <field name="act_to" ref="act_draft" />
36 <field name="signal">edit</field>
37 </record>
38
39 </data>
40
41 <!-- Allow user to make upgrade-proof customizations to email template -->
42
43 <data noupdate="1">
44
45 <record id="email_template_new_draft_need_approval" model="email.template">
46 <field name="name">Automated new draft need approval Notification Mail</field>
47 <field name="email_from">${object.create_uid.company_id.email or 'noreply@localhost.com'}</field>
48 <field name="subject">New version of "${object.page_id.name}" to approve</field>
49 <field name="email_to">${object.get_approvers_email}</field>
50 <field name="model_id" ref="model_document_page_history"/>
51 <field name="auto_delete" eval="True"/>
52 <field name="lang">${object.create_uid.partner_id.lang}</field>
53 <field name="body_html"><![CDATA[
54<p>Hello,</p>
55
56<p>The page "${object.page_id.name}" has been modified and need your approval.</p>
57
58<p>You can review the new version here : <a href="${object.get_page_url}">${object.get_page_url}</a></p>
59
60<p>Have a great day.<br/>
61--<br/>
62OpenERP</p>]]>
63 </field>
64 <field name="body_text"><![CDATA[
65Hello,
66
67The page "${object.page_id.name}" has been modified and need your approval.
68
69You can review the new version here: ${object.get_page_url}
70
71Have a great day.
72--
73OpenERP]]></field>
74 </record>
75
76 </data>
77</openerp>
078
=== added directory 'document_page_approval/i18n'
=== added file 'document_page_approval/i18n/document_page_approval.pot'
--- document_page_approval/i18n/document_page_approval.pot 1970-01-01 00:00:00 +0000
+++ document_page_approval/i18n/document_page_approval.pot 2013-07-19 12:07:29 +0000
@@ -0,0 +1,110 @@
1# Translation of OpenERP Server.
2# This file contains the translation of the following modules:
3# * document_page_approval
4#
5msgid ""
6msgstr ""
7"Project-Id-Version: OpenERP Server 7.0\n"
8"Report-Msgid-Bugs-To: \n"
9"POT-Creation-Date: 2013-07-19 03:58+0000\n"
10"PO-Revision-Date: 2013-07-19 03:58+0000\n"
11"Last-Translator: <>\n"
12"Language-Team: \n"
13"MIME-Version: 1.0\n"
14"Content-Type: text/plain; charset=UTF-8\n"
15"Content-Transfer-Encoding: \n"
16"Plural-Forms: \n"
17
18#. module: document_page_approval
19#: field:document.page.history,state:0
20msgid "Status"
21msgstr ""
22
23#. module: document_page_approval
24#: field:document.page,approval_required:0
25msgid "Require approval"
26msgstr ""
27
28#. module: document_page_approval
29#: field:document.page,is_parent_approval_required:0
30#: field:document.page.history,is_parent_approval_required:0
31msgid "parent approval"
32msgstr ""
33
34#. module: document_page_approval
35#: model:email.template,body_html:document_page_approval.email_template_new_draft_need_approval
36msgid "\n"
37"<p>Hello,</p>\n"
38"\n"
39"<p>The page \"${object.page_id.name}\" has been modified and need your approval.</p>\n"
40"\n"
41"<p>You can review the new version here : <a href=\"${object.get_page_url}\">${object.get_page_url}</a></p>\n"
42" \n"
43"<p>Have a great day.<br/>\n"
44"--<br/>\n"
45"OpenERP</p>\n"
46" "
47msgstr ""
48
49#. module: document_page_approval
50#: model:ir.model,name:document_page_approval.model_document_page
51msgid "Document Page"
52msgstr ""
53
54#. module: document_page_approval
55#: field:document.page,approved_uid:0
56#: field:document.page.history,approved_uid:0
57msgid "Approved By"
58msgstr ""
59
60#. module: document_page_approval
61#: model:email.template,subject:document_page_approval.email_template_new_draft_need_approval
62msgid "New version of \"${object.page_id.name}\" to approve"
63msgstr ""
64
65#. module: document_page_approval
66#: selection:document.page.history,state:0
67msgid "Draft"
68msgstr ""
69
70#. module: document_page_approval
71#: field:document.page.history,get_page_url:0
72msgid "URL"
73msgstr ""
74
75#. module: document_page_approval
76#: field:document.page,approved_date:0
77#: field:document.page.history,approved_date:0
78msgid "Approved Date"
79msgstr ""
80
81#. module: document_page_approval
82#: field:document.page.history,can_user_approve_page:0
83msgid "can user approve this page"
84msgstr ""
85
86#. module: document_page_approval
87#: field:document.page,approver_gid:0
88msgid "Approver group"
89msgstr ""
90
91#. module: document_page_approval
92#: model:ir.model,name:document_page_approval.model_document_page_history
93msgid "Document Page History"
94msgstr ""
95
96#. module: document_page_approval
97#: view:document.page.history:0
98msgid "Approve"
99msgstr ""
100
101#. module: document_page_approval
102#: selection:document.page.history,state:0
103msgid "Approved"
104msgstr ""
105
106#. module: document_page_approval
107#: field:document.page.history,get_approvers_email:0
108msgid "get all approvers email"
109msgstr ""
110
0111
=== added file 'document_page_approval/i18n/fr.po'
--- document_page_approval/i18n/fr.po 1970-01-01 00:00:00 +0000
+++ document_page_approval/i18n/fr.po 2013-07-19 12:07:29 +0000
@@ -0,0 +1,119 @@
1# Translation of OpenERP Server.
2# This file contains the translation of the following modules:
3# * document_page_approval
4#
5msgid ""
6msgstr ""
7"Project-Id-Version: OpenERP Server 7.0\n"
8"Report-Msgid-Bugs-To: \n"
9"POT-Creation-Date: 2013-07-19 03:58+0000\n"
10"PO-Revision-Date: 2013-07-19 03:58+0000\n"
11"Last-Translator: <>\n"
12"Language-Team: \n"
13"MIME-Version: 1.0\n"
14"Content-Type: text/plain; charset=UTF-8\n"
15"Content-Transfer-Encoding: \n"
16"Plural-Forms: \n"
17
18#. module: document_page_approval
19#: field:document.page.history,state:0
20msgid "Status"
21msgstr "Statut"
22
23#. module: document_page_approval
24#: field:document.page,approval_required:0
25msgid "Require approval"
26msgstr "Nécessite une approbation"
27
28#. module: document_page_approval
29#: field:document.page,is_parent_approval_required:0
30#: field:document.page.history,is_parent_approval_required:0
31msgid "parent approval"
32msgstr "Approbation parente"
33
34#. module: document_page_approval
35#: model:email.template,body_html:document_page_approval.email_template_new_draft_need_approval
36msgid "\n"
37"<p>Hello,</p>\n"
38"\n"
39"<p>The page \"${object.page_id.name}\" has been modified and need your approval.</p>\n"
40"\n"
41"<p>You can review the new version here : <a href=\"${object.get_page_url}\">${object.get_page_url}</a></p>\n"
42" \n"
43"<p>Have a great day.<br/>\n"
44"--<br/>\n"
45"OpenERP</p>\n"
46" "
47msgstr "\n"
48"<p>Bonjour,</p>\n"
49"\n"
50"<p>La page \"${object.page_id.name}\" a été modifié et demande votre approbation.</p>\n"
51"\n"
52"<p>Vous pouvez réviser la nouvelle version ici : <a href=\"${object.get_page_url}\">${object.get_page_url}</a></p>\n"
53" \n"
54"<p>Bonne journée.<br/>\n"
55"--<br/>\n"
56"OpenERP</p>\n"
57" "
58
59#. module: document_page_approval
60#: model:ir.model,name:document_page_approval.model_document_page
61msgid "Document Page"
62msgstr "Page"
63
64#. module: document_page_approval
65#: field:document.page,approved_uid:0
66#: field:document.page.history,approved_uid:0
67msgid "Approved By"
68msgstr "Approuvée par"
69
70#. module: document_page_approval
71#: model:email.template,subject:document_page_approval.email_template_new_draft_need_approval
72msgid "New version of \"${object.page_id.name}\" to approve"
73msgstr "Nouvelle version de \"${object.page_id.name}\" à approuver"
74
75#. module: document_page_approval
76#: selection:document.page.history,state:0
77msgid "Draft"
78msgstr "Brouillon"
79
80#. module: document_page_approval
81#: field:document.page.history,get_page_url:0
82msgid "URL"
83msgstr "URL"
84
85#. module: document_page_approval
86#: field:document.page,approved_date:0
87#: field:document.page.history,approved_date:0
88msgid "Approved Date"
89msgstr "Date d'approbation"
90
91#. module: document_page_approval
92#: field:document.page.history,can_user_approve_page:0
93msgid "can user approve this page"
94msgstr "Est-ce que l'usager peut approuver cette page ?"
95
96#. module: document_page_approval
97#: field:document.page,approver_gid:0
98msgid "Approver group"
99msgstr "Groupe approbateur"
100
101#. module: document_page_approval
102#: model:ir.model,name:document_page_approval.model_document_page_history
103msgid "Document Page History"
104msgstr "Historique de la page"
105
106#. module: document_page_approval
107#: view:document.page.history:0
108msgid "Approve"
109msgstr "Approuver"
110
111#. module: document_page_approval
112#: selection:document.page.history,state:0
113msgid "Approved"
114msgstr "Approuvée"
115
116#. module: document_page_approval
117#: field:document.page.history,get_approvers_email:0
118msgid "get all approvers email"
119msgstr "Récupérer toutes les adresses courriels des approbateurs"
0120
=== added directory 'document_page_approval/security'
=== added file 'document_page_approval/security/document_page_security.xml'
--- document_page_approval/security/document_page_security.xml 1970-01-01 00:00:00 +0000
+++ document_page_approval/security/document_page_security.xml 2013-07-19 12:07:29 +0000
@@ -0,0 +1,9 @@
1<?xml version="1.0" encoding="utf-8"?>
2<openerp>
3<data noupdate="0">
4 <record id="base.group_document_approver_user" model="res.groups">
5 <field name="name">Document approver</field>
6 <field name="users" eval="[(4, ref('base.user_root'))]"/>
7 </record>
8</data>
9</openerp>
010
=== added file 'document_page_approval/security/ir.model.access.csv'
--- document_page_approval/security/ir.model.access.csv 1970-01-01 00:00:00 +0000
+++ document_page_approval/security/ir.model.access.csv 2013-07-19 12:07:29 +0000
@@ -0,0 +1,2 @@
1id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink
2document_page_history,document.page.history,model_document_page_history,base.group_document_approver_user,1,1,1,0
0\ No newline at end of file3\ No newline at end of file

Subscribers

People subscribed via source and target branches

to status/vote changes: