Merge lp:~cpueyo/eficent-openerp-project-management/nerviaconsultores-openerp-7.0 into lp:eficent-openerp-project-management

Proposed by Carlos Pueyo
Status: Needs review
Proposed branch: lp:~cpueyo/eficent-openerp-project-management/nerviaconsultores-openerp-7.0
Merge into: lp:eficent-openerp-project-management
Diff against target: 28017 lines (+26477/-0) (has conflicts)
266 files modified
account_analytic_lob/__init__.py (+27/-0)
account_analytic_lob/__openerp__.py (+48/-0)
account_analytic_lob/account_analytic_lob.py (+39/-0)
account_analytic_lob/account_analytic_lob_view.xml (+66/-0)
account_analytic_lob/i18n/account_analytic_lob.pot (+57/-0)
account_analytic_lob/i18n/es.po (+57/-0)
account_analytic_lob/project.py (+34/-0)
account_analytic_lob/project_view.xml (+42/-0)
account_analytic_lob/security/ir.model.access.csv (+5/-0)
project_category/__init__.py (+24/-0)
project_category/__openerp__.py (+56/-0)
project_category/account_analytic_account.py (+67/-0)
project_category/analytic_account_category.py (+80/-0)
project_category/analytic_account_category.xml (+80/-0)
project_category/analytic_account_view.xml (+68/-0)
project_category/i18n/es.po (+134/-0)
project_category/i18n/project_category.pot (+134/-0)
project_category/project_view.xml (+53/-0)
project_category/security/ir.model.access.csv (+5/-0)
project_communications_mailgate/__init__.py (+25/-0)
project_communications_mailgate/__openerp__.py (+46/-0)
project_communications_mailgate/i18n/es.po (+102/-0)
project_communications_mailgate/i18n/project_communications_mailgate.pot (+101/-0)
project_communications_mailgate/project.py (+223/-0)
project_communications_mailgate/project_communications_mailgate.py (+52/-0)
project_communications_mailgate/project_communications_mailgate_view.xml (+31/-0)
project_communications_mailgate_note/__init__.py (+28/-0)
project_communications_mailgate_note/__openerp__.py (+57/-0)
project_communications_mailgate_note/i18n/es.po (+286/-0)
project_communications_mailgate_note/i18n/project_communications_mailgate_note.pot (+286/-0)
project_communications_mailgate_note/project_communications_mailgate_note_view.xml (+37/-0)
project_communications_mailgate_note/security/ir.model.access.csv (+1/-0)
project_communications_mailgate_note/wizard/__init__.py (+29/-0)
project_communications_mailgate_note/wizard/project_communications_add_note.py (+59/-0)
project_communications_mailgate_note/wizard/project_communications_add_note_view.xml (+54/-0)
project_communications_mailgate_note/wizard/project_communications_send_email.py (+292/-0)
project_communications_mailgate_note/wizard/project_communications_send_email_view.xml (+105/-0)
project_communications_mailgate_note/wizard/wizard.xml (+29/-0)
project_communications_meetings/__init__.py (+24/-0)
project_communications_meetings/__openerp__.py (+55/-0)
project_communications_meetings/i18n/es.po (+74/-0)
project_communications_meetings/i18n/project_communications_meetings.pot (+73/-0)
project_communications_meetings/project_communications_meetings.py (+46/-0)
project_communications_meetings/project_communications_meetings_view.xml (+47/-0)
project_communications_meetings/project_view.xml (+65/-0)
project_communications_meetings/security/ir.model.access.csv (+9/-0)
project_communications_meetings/security/project_communications_meetings_security.xml (+16/-0)
project_cost/__init__.py (+31/-0)
project_cost/__openerp__.py (+70/-0)
project_cost/account_analytic_account.py (+220/-0)
project_cost/account_analytic_account_view.xml (+153/-0)
project_cost/account_analytic_journal_commit.py (+53/-0)
project_cost/account_analytic_journal_commit_data.xml (+21/-0)
project_cost/account_analytic_journal_commit_report.xml (+8/-0)
project_cost/account_analytic_journal_commit_view.xml (+86/-0)
project_cost/account_analytic_journal_plan.py (+55/-0)
project_cost/account_analytic_journal_plan_data.xml (+21/-0)
project_cost/account_analytic_journal_plan_report.xml (+8/-0)
project_cost/account_analytic_journal_plan_view.xml (+86/-0)
project_cost/account_analytic_line.py (+50/-0)
project_cost/account_analytic_line_commit.py (+184/-0)
project_cost/account_analytic_line_commit_view.xml (+110/-0)
project_cost/account_analytic_line_plan.py (+191/-0)
project_cost/account_analytic_line_plan_view.xml (+120/-0)
project_cost/account_analytic_line_view.xml (+29/-0)
project_cost/i18n/es.po (+613/-0)
project_cost/i18n/project_cost.pot (+598/-0)
project_cost/project_view.xml (+119/-0)
project_cost/report/__init__.py (+27/-0)
project_cost/report/account_analytic_journal_commit.py (+64/-0)
project_cost/report/account_analytic_journal_commit.rml (+331/-0)
project_cost/report/account_analytic_journal_plan.py (+64/-0)
project_cost/report/account_analytic_journal_plan.rml (+340/-0)
project_cost/security/avg_project_security.xml (+21/-0)
project_cost/security/ir.model.access.csv (+24/-0)
project_cost/security/project_cost_security.xml (+6/-0)
project_cost/wizard/__init__.py (+27/-0)
project_cost/wizard/account_analytic_journal_commit_report.py (+56/-0)
project_cost/wizard/account_analytic_journal_commit_report_view.xml (+45/-0)
project_cost/wizard/account_analytic_journal_plan_report.py (+56/-0)
project_cost/wizard/account_analytic_journal_plan_report_view.xml (+45/-0)
project_cost_analysis/__init__.py (+24/-0)
project_cost_analysis/__openerp__.py (+61/-0)
project_cost_analysis/account_analytic_balance_plan_report.xml (+9/-0)
project_cost_analysis/i18n/es.po (+558/-0)
project_cost_analysis/i18n/project_cost_analysis.pot (+558/-0)
project_cost_analysis/report/__init__.py (+27/-0)
project_cost_analysis/report/account_analytic_resource_usage.py (+137/-0)
project_cost_analysis/report/account_analytic_resource_usage_product.py (+207/-0)
project_cost_analysis/report/account_analytic_resource_usage_product_view.xml (+162/-0)
project_cost_analysis/report/account_analytic_resource_usage_view.xml (+169/-0)
project_cost_analysis/report/analytic_balance_plan.py (+352/-0)
project_cost_analysis/report/analytic_balance_plan.rml (+431/-0)
project_cost_analysis/security/ir.model.access.csv (+9/-0)
project_cost_analysis/wizard/__init__.py (+25/-0)
project_cost_analysis/wizard/account_analytic_balance_plan_report.py (+60/-0)
project_cost_analysis/wizard/account_analytic_balance_plan_report_view.xml (+49/-0)
project_cost_commit_hr_timesheet/__init__.py (+25/-0)
project_cost_commit_hr_timesheet/__openerp__.py (+48/-0)
project_cost_commit_hr_timesheet/account_analytic_line_commit.py (+38/-0)
project_cost_commit_hr_timesheet/account_analytic_line_commit_view.xml (+21/-0)
project_cost_commit_hr_timesheet/hr_timesheet.py (+133/-0)
project_cost_commit_hr_timesheet/hr_timesheet_data.xml (+11/-0)
project_cost_commit_hr_timesheet/hr_timesheet_view.xml (+18/-0)
project_cost_commit_hr_timesheet/hr_timesheet_workflow.xml (+23/-0)
project_cost_commit_hr_timesheet/i18n/es.po (+57/-0)
project_cost_commit_hr_timesheet/i18n/project_cost_commit_hr_timesheet.pot (+57/-0)
project_cost_commit_purchase/__init__.py (+25/-0)
project_cost_commit_purchase/__openerp__.py (+45/-0)
project_cost_commit_purchase/account_analytic_line_commit.py (+37/-0)
project_cost_commit_purchase/account_analytic_line_commit_view.xml (+21/-0)
project_cost_commit_purchase/i18n/es.po (+43/-0)
project_cost_commit_purchase/i18n/project_cost_commit_purchase.pot (+43/-0)
project_cost_commit_purchase/purchase.py (+126/-0)
project_cost_commit_purchase/purchase_workflow.xml (+13/-0)
project_cost_commit_sale/__init__.py (+25/-0)
project_cost_commit_sale/__openerp__.py (+44/-0)
project_cost_commit_sale/account_analytic_line_commit.py (+37/-0)
project_cost_commit_sale/account_analytic_line_commit_view.xml (+21/-0)
project_cost_commit_sale/i18n/es.po (+47/-0)
project_cost_commit_sale/i18n/project_cost_commit_sale.pot (+47/-0)
project_cost_commit_sale/sale.py (+109/-0)
project_cost_plan_purchase/__init__.py (+26/-0)
project_cost_plan_purchase/__openerp__.py (+48/-0)
project_cost_plan_purchase/account_analytic_line_plan.py (+223/-0)
project_cost_plan_purchase/i18n/es.po (+243/-0)
project_cost_plan_purchase/i18n/project_cost_plan_purchase.pot (+242/-0)
project_cost_plan_purchase/project_purchase_line_plan_view.xml (+135/-0)
project_cost_plan_purchase/project_view.xml (+14/-0)
project_cost_plan_purchase/security/ir.model.access.csv (+1/-0)
project_cost_plan_purchase/wizard/__init__.py (+25/-0)
project_cost_plan_purchase/wizard/project_purchase_plan_make_purchase.py (+190/-0)
project_cost_plan_purchase/wizard/project_purchase_plan_make_purchase.xml (+38/-0)
project_cost_plan_sale/__init__.py (+26/-0)
project_cost_plan_sale/__openerp__.py (+48/-0)
project_cost_plan_sale/account_analytic_line_plan.py (+213/-0)
project_cost_plan_sale/i18n/es.po (+205/-0)
project_cost_plan_sale/i18n/project_cost_plan_sale.pot (+205/-0)
project_cost_plan_sale/project_sale_line_plan_view.xml (+143/-0)
project_cost_plan_sale/project_view.xml (+14/-0)
project_cost_plan_sale/security/ir.model.access.csv (+1/-0)
project_cost_plan_sale/wizard/__init__.py (+25/-0)
project_cost_plan_sale/wizard/project_sale_plan_make_sale.py (+164/-0)
project_cost_plan_sale/wizard/project_sale_plan_make_sale.xml (+38/-0)
project_cost_plan_time/__init__.py (+24/-0)
project_cost_plan_time/__openerp__.py (+47/-0)
project_cost_plan_time/account_analytic_line_plan.py (+201/-0)
project_cost_plan_time/i18n/es.po (+120/-0)
project_cost_plan_time/i18n/project_cost_plan_time.pot (+120/-0)
project_cost_plan_time/project_time_line_plan_view.xml (+116/-0)
project_cost_plan_time/project_view.xml (+14/-0)
project_cost_plan_time/security/ir.model.access.csv (+1/-0)
project_hr_stakeholder/__init__.py (+30/-0)
project_hr_stakeholder/__openerp__.py (+59/-0)
project_hr_stakeholder/i18n/es.po (+265/-0)
project_hr_stakeholder/i18n/project_hr_stakeholder.pot (+254/-0)
project_hr_stakeholder/project.py (+36/-0)
project_hr_stakeholder/project_hr_responsibility.py (+40/-0)
project_hr_stakeholder/project_hr_responsibility.xml (+57/-0)
project_hr_stakeholder/project_hr_role.py (+40/-0)
project_hr_stakeholder/project_hr_role.xml (+57/-0)
project_hr_stakeholder/project_hr_stakeholder.py (+121/-0)
project_hr_stakeholder/project_hr_stakeholder.xml (+103/-0)
project_hr_stakeholder/project_hr_stakeholder_data.xml (+75/-0)
project_hr_stakeholder/project_view.xml (+88/-0)
project_hr_stakeholder/security/ir.model.access.csv (+7/-0)
project_hr_stakeholder/security/project_security.xml (+5/-0)
project_integration/__init__.py (+26/-0)
project_integration/__openerp__.py (+62/-0)
project_integration/email_template_view.xml (+51/-0)
project_integration/i18n/es.po (+279/-0)
project_integration/i18n/project_integration.pot (+258/-0)
project_integration/process/project_task_process.xml (+66/-0)
project_integration/project.py (+157/-0)
project_integration/project_integration_view.xml (+240/-0)
project_integration/project_task.py (+165/-0)
project_integration/security/ir.model.access.csv (+1/-0)
project_integration_analysis/__init__.py (+24/-0)
project_integration_analysis/__openerp__.py (+59/-0)
project_integration_analysis/i18n/es.po (+214/-0)
project_integration_analysis/i18n/project_integration_analysis.pot (+214/-0)
project_integration_analysis/project_progress_report.xml (+10/-0)
project_integration_analysis/report/__init__.py (+25/-0)
project_integration_analysis/report/project_progress.py (+261/-0)
project_integration_analysis/report/project_progress.rml (+459/-0)
project_integration_analysis/security/ir.model.access.csv (+3/-0)
project_integration_analysis/wizard/__init__.py (+25/-0)
project_integration_analysis/wizard/project_progress_report.py (+62/-0)
project_integration_analysis/wizard/project_progress_report_view.xml (+51/-0)
project_invoice/__init__.py (+24/-0)
project_invoice/__openerp__.py (+46/-0)
project_invoice/account_invoice_view.xml (+41/-0)
project_invoice/i18n/es.po (+27/-0)
project_invoice/i18n/project_invoice.pot (+27/-0)
project_invoice/invoice.py (+102/-0)
project_procurement/__init__.py (+30/-0)
project_procurement/__openerp__.py (+55/-0)
project_procurement/i18n/es.po (+154/-0)
project_procurement/i18n/project_procurement.pot (+153/-0)
project_procurement/project.py (+36/-0)
project_procurement/project_view.xml (+66/-0)
project_procurement/purchase_order.py (+54/-0)
project_procurement/purchase_order_line.py (+80/-0)
project_procurement/purchase_order_view.xml (+50/-0)
project_procurement/purchase_requisition.py (+65/-0)
project_procurement/purchase_requisition_line.py (+52/-0)
project_procurement/purchase_requisition_view.xml (+29/-0)
project_procurement/security/ir.model.access.csv (+15/-0)
project_procurement/security/project_procurement_security.xml (+31/-0)
project_procurement/wizard/__init__.py (+25/-0)
project_procurement/wizard/purchase_requisition_partner.py (+138/-0)
project_sale/__init__.py (+25/-0)
project_sale/__openerp__.py (+52/-0)
project_sale/account_invoice_view.xml (+274/-0)
project_sale/i18n/es.po (+145/-0)
project_sale/i18n/project_sale.pot (+143/-0)
project_sale/project_view.xml (+39/-0)
project_sale/sale.py (+154/-0)
project_sale/sale_order_view.xml (+183/-0)
project_sale/wizard/__init__.py (+24/-0)
project_sale/wizard/sale_line_invoice.py (+119/-0)
project_scope_wbs/__init__.py (+27/-0)
project_scope_wbs/__openerp__.py (+59/-0)
project_scope_wbs/i18n/es.po (+234/-0)
project_scope_wbs/i18n/project_scope_wbs.pot (+233/-0)
project_scope_wbs/project_lifecycle.py (+44/-0)
project_scope_wbs/project_lifecycle_view.xml (+54/-0)
project_scope_wbs/project_scope_wbs.py (+359/-0)
project_scope_wbs/project_scope_wbs_view.xml (+186/-0)
project_scope_wbs/security/ir.model.access.csv (+3/-0)
project_time_easy_scheduling/__init__.py (+24/-0)
project_time_easy_scheduling/__openerp__.py (+52/-0)
project_time_easy_scheduling/i18n/es.po (+138/-0)
project_time_easy_scheduling/i18n/project_time_easy_scheduling.pot (+134/-0)
project_time_easy_scheduling/project_task_view.xml (+270/-0)
project_time_milestone/__init__.py (+25/-0)
project_time_milestone/__openerp__.py (+50/-0)
project_time_milestone/i18n/es.po (+173/-0)
project_time_milestone/i18n/project_time_milestone.pot (+168/-0)
project_time_milestone/project_time_milestone.py (+64/-0)
project_time_milestone/project_time_milestone_view.xml (+93/-0)
project_time_schedule/__init__.py (+25/-0)
project_time_schedule/__openerp__.py (+61/-0)
project_time_schedule/dijkstra.py (+88/-0)
project_time_schedule/i18n/es.po (+187/-0)
project_time_schedule/i18n/project_time_schedule.pot (+153/-0)
project_time_schedule/priodict.py (+72/-0)
project_time_schedule/project_class.py (+234/-0)
project_time_schedule/project_class_view.xml (+69/-0)
project_time_schedule/project_time_schedule.py (+918/-0)
project_time_schedule/project_time_schedule_view.xml (+377/-0)
project_time_schedule_images/__init__.py (+22/-0)
project_time_schedule_images/__openerp__.py (+40/-0)
project_time_sequence/__init__.py (+25/-0)
project_time_sequence/__openerp__.py (+51/-0)
project_time_sequence/i18n/es.po (+170/-0)
project_time_sequence/i18n/project_time_sequence.pot (+152/-0)
project_time_sequence/project_time_sequence.py (+185/-0)
project_time_sequence/project_time_sequence_view.xml (+45/-0)
project_time_sequence/wizard/__init__.py (+25/-0)
project_time_sequence/wizard/project_task_link_predecessors.py (+142/-0)
project_time_sequence/wizard/project_task_link_predecessors.xml (+58/-0)
project_wbs/__init__.py (+26/-0)
project_wbs/__openerp__.py (+39/-0)
project_wbs/project.py (+234/-0)
project_wbs/project_view.xml (+160/-0)
Conflict adding file account_analytic_lob.  Moved existing file to account_analytic_lob.moved.
Conflict adding file project_category.  Moved existing file to project_category.moved.
Conflict adding file project_communications_mailgate.  Moved existing file to project_communications_mailgate.moved.
Conflict adding file project_communications_mailgate_note.  Moved existing file to project_communications_mailgate_note.moved.
Conflict adding file project_communications_meetings.  Moved existing file to project_communications_meetings.moved.
Conflict adding file project_cost.  Moved existing file to project_cost.moved.
Conflict adding file project_cost_analysis.  Moved existing file to project_cost_analysis.moved.
Conflict adding file project_cost_commit_hr_timesheet.  Moved existing file to project_cost_commit_hr_timesheet.moved.
Conflict adding file project_cost_commit_purchase.  Moved existing file to project_cost_commit_purchase.moved.
Conflict adding file project_cost_commit_sale.  Moved existing file to project_cost_commit_sale.moved.
Conflict adding file project_cost_plan_purchase.  Moved existing file to project_cost_plan_purchase.moved.
Conflict adding file project_cost_plan_sale.  Moved existing file to project_cost_plan_sale.moved.
Conflict adding file project_cost_plan_time.  Moved existing file to project_cost_plan_time.moved.
Conflict adding file project_hr_stakeholder.  Moved existing file to project_hr_stakeholder.moved.
Conflict adding file project_integration.  Moved existing file to project_integration.moved.
Conflict adding file project_integration_analysis.  Moved existing file to project_integration_analysis.moved.
Conflict adding file project_invoice.  Moved existing file to project_invoice.moved.
Conflict adding file project_procurement.  Moved existing file to project_procurement.moved.
Conflict adding file project_sale.  Moved existing file to project_sale.moved.
Conflict adding file project_scope_wbs.  Moved existing file to project_scope_wbs.moved.
Conflict adding file project_time_easy_scheduling.  Moved existing file to project_time_easy_scheduling.moved.
Conflict adding file project_time_milestone.  Moved existing file to project_time_milestone.moved.
Conflict adding file project_time_schedule.  Moved existing file to project_time_schedule.moved.
Conflict adding file project_time_sequence.  Moved existing file to project_time_sequence.moved.
To merge this branch: bzr merge lp:~cpueyo/eficent-openerp-project-management/nerviaconsultores-openerp-7.0
Reviewer Review Type Date Requested Status
Stefan Rijnhart (Opener) (community) Disapprove
Eficent Pending
Review via email: mp+144256@code.launchpad.net

Description of the change

Adaptados los módulos a la versión 7.0

To post a comment you must log in.
2. By Carlos Pueyo

Update

3. By Carlos Pueyo

Test

4. By Carlos Pueyo

Arreglados ciertos problemas

5. By Carlos Pueyo

Actualizados.

Revision history for this message
Stefan Rijnhart (Opener) (stefan-opener) wrote :

Hi Carlos,

there seems to be something wrong with your branch. I took the liberty of rebasing your changes to the trunk series of this project, so that we can review the changes. See here: https://code.launchpad.net/~openerp-community/eficent-openerp-project-management/nerviaconsultores-openerp-7.0/+merge/150892

Thanks for your work!

Cheers,
Stefan.

review: Disapprove

Unmerged revisions

5. By Carlos Pueyo

Actualizados.

4. By Carlos Pueyo

Arreglados ciertos problemas

3. By Carlos Pueyo

Test

2. By Carlos Pueyo

Update

1. By Carlos Pueyo

Adaptados modulos Eficent a la 7.0

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== added directory 'account_analytic_lob'
2=== renamed directory 'account_analytic_lob' => 'account_analytic_lob.moved'
3=== added file 'account_analytic_lob/__init__.py'
4--- account_analytic_lob/__init__.py 1970-01-01 00:00:00 +0000
5+++ account_analytic_lob/__init__.py 2013-02-19 14:36:22 +0000
6@@ -0,0 +1,27 @@
7+# -*- coding: utf-8 -*-
8+##############################################################################
9+#
10+# Copyright (C) 2011 Eficent (<http://www.eficent.com/>)
11+# Jordi Ballester Alomar <jordi.ballester@eficent.com>
12+#
13+# This program is free software: you can redistribute it and/or modify
14+# it under the terms of the GNU Affero General Public License as
15+# published by the Free Software Foundation, either version 3 of the
16+# License, or (at your option) any later version.
17+#
18+# This program is distributed in the hope that it will be useful,
19+# but WITHOUT ANY WARRANTY; without even the implied warranty of
20+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21+# GNU Affero General Public License for more details.
22+#
23+# You should have received a copy of the GNU Affero General Public License
24+# along with this program. If not, see <http://www.gnu.org/licenses/>.
25+#
26+##############################################################################
27+
28+import account_analytic_lob
29+import project
30+
31+
32+
33+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
34
35=== added file 'account_analytic_lob/__openerp__.py'
36--- account_analytic_lob/__openerp__.py 1970-01-01 00:00:00 +0000
37+++ account_analytic_lob/__openerp__.py 2013-02-19 14:36:22 +0000
38@@ -0,0 +1,48 @@
39+# -*- coding: utf-8 -*-
40+##############################################################################
41+#
42+# Copyright (C) 2011 Eficent (<http://www.eficent.com/>)
43+# Jordi Ballester Alomar <jordi.ballester@eficent.com>
44+#
45+# This program is free software: you can redistribute it and/or modify
46+# it under the terms of the GNU Affero General Public License as
47+# published by the Free Software Foundation, either version 3 of the
48+# License, or (at your option) any later version.
49+#
50+# This program is distributed in the hope that it will be useful,
51+# but WITHOUT ANY WARRANTY; without even the implied warranty of
52+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
53+# GNU Affero General Public License for more details.
54+#
55+# You should have received a copy of the GNU Affero General Public License
56+# along with this program. If not, see <http://www.gnu.org/licenses/>.
57+#
58+##############################################################################
59+
60+
61+{
62+ "name": "Project Management",
63+ "version": "1.0",
64+ "author": "Eficent, Nervia Consultores",
65+ "website": "",
66+ "category": "Generic Modules/Projects & Services",
67+ "depends": ["account","analytic","project"],
68+ "description": """Introduce business segments in analytic accounts.
69+ Provides the possibility to perform economic analysis by business segment.
70+ """,
71+ "init_xml": [],
72+ "update_xml": [
73+ "security/ir.model.access.csv",
74+ "account_analytic_lob_view.xml",
75+ "project_view.xml",
76+ ],
77+ 'demo_xml': [
78+
79+ ],
80+ 'test':[
81+ ],
82+ 'installable': True,
83+ 'active': False,
84+ 'certificate': '',
85+}
86+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
87
88=== added file 'account_analytic_lob/account_analytic_lob.py'
89--- account_analytic_lob/account_analytic_lob.py 1970-01-01 00:00:00 +0000
90+++ account_analytic_lob/account_analytic_lob.py 2013-02-19 14:36:22 +0000
91@@ -0,0 +1,39 @@
92+# -*- coding: utf-8 -*-
93+##############################################################################
94+#
95+# Copyright (C) 2011 Eficent (<http://www.eficent.com/>)
96+# Jordi Ballester Alomar <jordi.ballester@eficent.com>
97+#
98+# This program is free software: you can redistribute it and/or modify
99+# it under the terms of the GNU Affero General Public License as
100+# published by the Free Software Foundation, either version 3 of the
101+# License, or (at your option) any later version.
102+#
103+# This program is distributed in the hope that it will be useful,
104+# but WITHOUT ANY WARRANTY; without even the implied warranty of
105+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
106+# GNU Affero General Public License for more details.
107+#
108+# You should have received a copy of the GNU Affero General Public License
109+# along with this program. If not, see <http://www.gnu.org/licenses/>.
110+#
111+##############################################################################
112+
113+import tools
114+from osv import fields, osv
115+from tools.translate import _
116+
117+
118+class account_analytic_lob(osv.osv):
119+
120+ _name = "account.analytic.lob"
121+ _description = 'Line of Business'
122+ _order = 'name'
123+
124+ _columns = {
125+ 'code': fields.char('Code', size=4, required=True, translate=True),
126+ 'name': fields.char('Name', size=32, required=True, translate=True),
127+ }
128+
129+account_analytic_lob()
130+
131
132=== added file 'account_analytic_lob/account_analytic_lob_view.xml'
133--- account_analytic_lob/account_analytic_lob_view.xml 1970-01-01 00:00:00 +0000
134+++ account_analytic_lob/account_analytic_lob_view.xml 2013-02-19 14:36:22 +0000
135@@ -0,0 +1,66 @@
136+<?xml version="1.0" encoding="utf-8"?>
137+<openerp>
138+ <data>
139+
140+ <!-- Analytic Account Line of Business -->
141+
142+ <record id="view_account_analytic_lob_search" model="ir.ui.view">
143+ <field name="name">account.analytic.lob.search</field>
144+ <field name="model">account.analytic.lob</field>
145+ <field name="type">search</field>
146+ <field name="arch" type="xml">
147+ <search string="Line of Business">
148+ <field name="code"/>
149+ <field name="name"/>
150+ </search>
151+ </field>
152+ </record>
153+
154+ <record id="view_account_analytic_lob_edit" model="ir.ui.view">
155+ <field name="name">account.analytic.lob.form</field>
156+ <field name="model">account.analytic.lob</field>
157+ <field name="type">form</field>
158+ <field name="arch" type="xml">
159+ <form string="Line of Business">
160+ <field name="code" select="1"/>
161+ <field name="name" select="1"/>
162+ </form>
163+ </field>
164+ </record>
165+
166+ <record id="view_account_analytic_lob_tree" model="ir.ui.view">
167+ <field name="name">account.analytic.lob.tree</field>
168+ <field name="model">account.analytic.lob</field>
169+ <field name="type">tree</field>
170+ <field name="arch" type="xml">
171+ <tree string="Line of Business">
172+ <field name="code"/>
173+ <field name="name"/>
174+ </tree>
175+ </field>
176+ </record>
177+
178+ <record id="action_account_analytic_lob_tree" model="ir.actions.act_window">
179+ <field name="name">Line of Business</field>
180+ <field name="res_model">account.analytic.lob</field>
181+ <field name="view_id" ref="view_account_analytic_lob_tree"/>
182+ <field name="view_mode">tree,form</field>
183+ <field name="search_view_id" ref="view_account_analytic_lob_search"/>
184+ <field name="help">Define the Lines of Business.</field>
185+ </record>
186+
187+ <menuitem id="menu_account_analytic_lob_config"
188+ name="Line of Business"
189+ parent="account.menu_analytic_accounting"
190+ sequence="1"
191+ />
192+
193+ <menuitem
194+ action="action_account_analytic_lob_tree"
195+ id="menu_account_analytic_lob_view"
196+ parent="menu_account_analytic_lob_config"
197+ sequence="1"
198+ groups="analytic.group_analytic_accounting"
199+ />
200+ </data>
201+</openerp>
202
203=== added directory 'account_analytic_lob/i18n'
204=== added file 'account_analytic_lob/i18n/account_analytic_lob.pot'
205--- account_analytic_lob/i18n/account_analytic_lob.pot 1970-01-01 00:00:00 +0000
206+++ account_analytic_lob/i18n/account_analytic_lob.pot 2013-02-19 14:36:22 +0000
207@@ -0,0 +1,57 @@
208+# Translation of OpenERP Server.
209+# This file contains the translation of the following modules:
210+# * account_analytic_lob
211+#
212+msgid ""
213+msgstr ""
214+"Project-Id-Version: OpenERP Server 6.0.3\n"
215+"Report-Msgid-Bugs-To: support@openerp.com\n"
216+"POT-Creation-Date: 2011-12-18 08:17+0000\n"
217+"PO-Revision-Date: 2011-12-18 08:17+0000\n"
218+"Last-Translator: <>\n"
219+"Language-Team: \n"
220+"MIME-Version: 1.0\n"
221+"Content-Type: text/plain; charset=UTF-8\n"
222+"Content-Transfer-Encoding: \n"
223+"Plural-Forms: \n"
224+
225+#. module: account_analytic_lob
226+#: field:account.analytic.account,lob:0
227+#: view:account.analytic.lob:0
228+#: model:ir.actions.act_window,name:account_analytic_lob.action_account_analytic_lob_tree
229+#: model:ir.model,name:account_analytic_lob.model_account_analytic_lob
230+#: model:ir.ui.menu,name:account_analytic_lob.menu_account_analytic_lob_config
231+#: model:ir.ui.menu,name:account_analytic_lob.menu_account_analytic_lob_view
232+msgid "Line of Business"
233+msgstr ""
234+
235+#. module: account_analytic_lob
236+#: field:account.analytic.lob,code:0
237+msgid "Code"
238+msgstr ""
239+
240+#. module: account_analytic_lob
241+#: field:account.analytic.lob,name:0
242+msgid "Name"
243+msgstr ""
244+
245+#. module: account_analytic_lob
246+#: model:ir.actions.act_window,help:account_analytic_lob.action_account_analytic_lob_tree
247+msgid "Define the Lines of Business."
248+msgstr ""
249+
250+#. module: account_analytic_lob
251+#: model:ir.model,name:account_analytic_lob.model_account_analytic_account
252+msgid "Analytic Account"
253+msgstr ""
254+
255+#. module: account_analytic_lob
256+#: constraint:account.analytic.account:0
257+msgid "Error! The currency has to be the same as the currency of the selected company"
258+msgstr ""
259+
260+#. module: account_analytic_lob
261+#: constraint:account.analytic.account:0
262+msgid "Error! You can not create recursive analytic accounts."
263+msgstr ""
264+
265
266=== added file 'account_analytic_lob/i18n/es.po'
267--- account_analytic_lob/i18n/es.po 1970-01-01 00:00:00 +0000
268+++ account_analytic_lob/i18n/es.po 2013-02-19 14:36:22 +0000
269@@ -0,0 +1,57 @@
270+# Translation of OpenERP Server.
271+# This file contains the translation of the following modules:
272+# * account_analytic_lob
273+#
274+msgid ""
275+msgstr ""
276+"Project-Id-Version: OpenERP Server 6.0.3\n"
277+"Report-Msgid-Bugs-To: support@openerp.com\n"
278+"POT-Creation-Date: 2011-12-18 08:17+0000\n"
279+"PO-Revision-Date: 2011-12-18 09:18+0100\n"
280+"Last-Translator: Jordi Ballester <jordi.ballester@eficent.com>\n"
281+"Language-Team: \n"
282+"MIME-Version: 1.0\n"
283+"Content-Type: text/plain; charset=UTF-8\n"
284+"Content-Transfer-Encoding: 8bit\n"
285+"Plural-Forms: \n"
286+
287+#. module: account_analytic_lob
288+#: field:account.analytic.account,lob:0
289+#: view:account.analytic.lob:0
290+#: model:ir.actions.act_window,name:account_analytic_lob.action_account_analytic_lob_tree
291+#: model:ir.model,name:account_analytic_lob.model_account_analytic_lob
292+#: model:ir.ui.menu,name:account_analytic_lob.menu_account_analytic_lob_config
293+#: model:ir.ui.menu,name:account_analytic_lob.menu_account_analytic_lob_view
294+msgid "Line of Business"
295+msgstr "Línea de Negocio"
296+
297+#. module: account_analytic_lob
298+#: field:account.analytic.lob,code:0
299+msgid "Code"
300+msgstr "Código"
301+
302+#. module: account_analytic_lob
303+#: field:account.analytic.lob,name:0
304+msgid "Name"
305+msgstr "Nombre"
306+
307+#. module: account_analytic_lob
308+#: model:ir.actions.act_window,help:account_analytic_lob.action_account_analytic_lob_tree
309+msgid "Define the Lines of Business."
310+msgstr "Define las Líneas de Negocio."
311+
312+#. module: account_analytic_lob
313+#: model:ir.model,name:account_analytic_lob.model_account_analytic_account
314+msgid "Analytic Account"
315+msgstr "Cuenta analítica"
316+
317+#. module: account_analytic_lob
318+#: constraint:account.analytic.account:0
319+msgid "Error! The currency has to be the same as the currency of the selected company"
320+msgstr "¡Error! La divisa tiene que ser la misma que la establecida en la compañía seleccionada"
321+
322+#. module: account_analytic_lob
323+#: constraint:account.analytic.account:0
324+msgid "Error! You can not create recursive analytic accounts."
325+msgstr "¡Error! No puede crear cuentas analíticas recursivas."
326+
327
328=== added file 'account_analytic_lob/project.py'
329--- account_analytic_lob/project.py 1970-01-01 00:00:00 +0000
330+++ account_analytic_lob/project.py 2013-02-19 14:36:22 +0000
331@@ -0,0 +1,34 @@
332+# -*- coding: utf-8 -*-
333+##############################################################################
334+#
335+# Copyright (C) 2011 Eficent (<http://www.eficent.com/>)
336+# Jordi Ballester Alomar <jordi.ballester@eficent.com>
337+#
338+# This program is free software: you can redistribute it and/or modify
339+# it under the terms of the GNU Affero General Public License as
340+# published by the Free Software Foundation, either version 3 of the
341+# License, or (at your option) any later version.
342+#
343+# This program is distributed in the hope that it will be useful,
344+# but WITHOUT ANY WARRANTY; without even the implied warranty of
345+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
346+# GNU Affero General Public License for more details.
347+#
348+# You should have received a copy of the GNU Affero General Public License
349+# along with this program. If not, see <http://www.gnu.org/licenses/>.
350+#
351+##############################################################################
352+
353+from osv import fields, osv
354+
355+
356+class account_analytic_account(osv.osv):
357+
358+ _inherit = 'account.analytic.account'
359+
360+
361+ _columns = {
362+ 'lob': fields.many2one('account.analytic.lob','Line of Business'),
363+ }
364+
365+account_analytic_account()
366
367=== added file 'account_analytic_lob/project_view.xml'
368--- account_analytic_lob/project_view.xml 1970-01-01 00:00:00 +0000
369+++ account_analytic_lob/project_view.xml 2013-02-19 14:36:22 +0000
370@@ -0,0 +1,42 @@
371+<?xml version="1.0" encoding="utf-8"?>
372+<openerp>
373+ <data>
374+
375+
376+
377+#---------------------------------------------------------------------------------------------------------
378+# Extend the project
379+#---------------------------------------------------------------------------------------------------------
380+ <record id="edit_project" model="ir.ui.view">
381+ <field name="name">project.project.form</field>
382+ <field name="model">project.project</field>
383+ <field name="type">form</field>
384+ <field name="inherit_id" ref="project.edit_project"/>
385+ <field name="arch" type="xml">
386+ <xpath expr="//form/sheet/notebook/page[@string='Other Info']/group/group[@string='Miscellaneous']/field[@name='parent_id']" position="after">
387+ <field name="lob"/>
388+ </xpath>
389+ </field>
390+ </record>
391+
392+
393+
394+#---------------------------------------------------------------------------------------------------------
395+# Extend the analytic account
396+#---------------------------------------------------------------------------------------------------------
397+
398+
399+ <record id="view_account_analytic_account_form" model="ir.ui.view">
400+ <field name="name">account.analytic.account.form</field>
401+ <field name="model">account.analytic.account</field>
402+ <field name="type">form</field>
403+ <field name="inherit_id" ref="analytic.view_account_analytic_account_form"/>
404+ <field name="arch" type="xml">
405+ <xpath expr="//form/sheet/notebook/page[@string='Contract Information']/field[@name='description']" position="after">
406+ <field name="lob"/>
407+ </xpath>
408+ </field>
409+ </record>
410+
411+ </data>
412+</openerp>
413
414=== added directory 'account_analytic_lob/security'
415=== added file 'account_analytic_lob/security/ir.model.access.csv'
416--- account_analytic_lob/security/ir.model.access.csv 1970-01-01 00:00:00 +0000
417+++ account_analytic_lob/security/ir.model.access.csv 2013-02-19 14:36:22 +0000
418@@ -0,0 +1,5 @@
419+"id","name","model_id:id","group_id:id","perm_read","perm_write","perm_create","perm_unlink"
420+"access_account_analytic_lob_project_user","account.analytic.lob project user","model_account_analytic_lob","project.group_project_user",1,0,0,0
421+"access_account_analytic_lob_account_user","account.analytic.lob account user","model_account_analytic_lob","account.group_account_user",1,0,0,0
422+"access_account_analytic_lob_project_manager","account.analytic.lob project manager","model_account_analytic_lob","project.group_project_manager",1,1,1,1
423+"access_account_analytic_lob_account_manager","account.analytic.lob account manager","model_account_analytic_lob","account.group_account_manager",1,1,1,1
424\ No newline at end of file
425
426=== added directory 'project_category'
427=== renamed directory 'project_category' => 'project_category.moved'
428=== added file 'project_category/__init__.py'
429--- project_category/__init__.py 1970-01-01 00:00:00 +0000
430+++ project_category/__init__.py 2013-02-19 14:36:22 +0000
431@@ -0,0 +1,24 @@
432+# -*- coding: utf-8 -*-
433+##############################################################################
434+#
435+# OpenERP, Open Source Management Solution
436+# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
437+#
438+# This program is free software: you can redistribute it and/or modify
439+# it under the terms of the GNU Affero General Public License as
440+# published by the Free Software Foundation, either version 3 of the
441+# License, or (at your option) any later version.
442+#
443+# This program is distributed in the hope that it will be useful,
444+# but WITHOUT ANY WARRANTY; without even the implied warranty of
445+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
446+# GNU Affero General Public License for more details.
447+#
448+# You should have received a copy of the GNU Affero General Public License
449+# along with this program. If not, see <http://www.gnu.org/licenses/>.
450+#
451+##############################################################################
452+import analytic_account_category
453+import account_analytic_account
454+
455+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
456
457=== added file 'project_category/__openerp__.py'
458--- project_category/__openerp__.py 1970-01-01 00:00:00 +0000
459+++ project_category/__openerp__.py 2013-02-19 14:36:22 +0000
460@@ -0,0 +1,56 @@
461+# -*- coding: utf-8 -*-
462+##############################################################################
463+#
464+# Copyright (C) 2011 Eficent (<http://www.eficent.com/>)
465+# <contact@eficent.com>
466+#
467+# This program is free software: you can redistribute it and/or modify
468+# it under the terms of the GNU Affero General Public License as
469+# published by the Free Software Foundation, either version 3 of the
470+# License, or (at your option) any later version.
471+#
472+# This program is distributed in the hope that it will be useful,
473+# but WITHOUT ANY WARRANTY; without even the implied warranty of
474+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
475+# GNU Affero General Public License for more details.
476+#
477+# You should have received a copy of the GNU Affero General Public License
478+# along with this program. If not, see <http://www.gnu.org/licenses/>.
479+#
480+##############################################################################
481+
482+
483+{
484+ "name": "Project Management",
485+ "version": "1.0",
486+ "author": "Eficent, Nervia Consultores",
487+ "website": "",
488+ "category": "Generic Modules/Projects & Services",
489+ "depends": [
490+ "base",
491+ "account",
492+ "analytic",
493+ "project",
494+ ],
495+ "description": """ This module intrododuces the possibility to associate categories to analytic accounts and projects.
496+ Manage the analytic account categories in order to better classify them for tracking and analysis purposes.
497+ An analytic account may belong to several categories and categories have a hierarchy structure: an analytic account belonging to a category also belong to her parent category.
498+ """,
499+ "init_xml": [
500+ ],
501+ "update_xml": [
502+ "analytic_account_category.xml",
503+ "analytic_account_view.xml",
504+ "project_view.xml",
505+ "security/ir.model.access.csv",
506+ ],
507+ 'demo_xml': [
508+
509+ ],
510+ 'test':[
511+ ],
512+ 'installable': True,
513+ 'active': False,
514+ 'certificate': '',
515+}
516+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
517
518=== added file 'project_category/account_analytic_account.py'
519--- project_category/account_analytic_account.py 1970-01-01 00:00:00 +0000
520+++ project_category/account_analytic_account.py 2013-02-19 14:36:22 +0000
521@@ -0,0 +1,67 @@
522+# -*- coding: utf-8 -*-
523+##############################################################################
524+#
525+# Copyright (C) 2011 Eficent (<http://www.eficent.com/>)
526+# <contact@eficent.com>
527+#
528+# This program is free software: you can redistribute it and/or modify
529+# it under the terms of the GNU Affero General Public License as
530+# published by the Free Software Foundation, either version 3 of the
531+# License, or (at your option) any later version.
532+#
533+# This program is distributed in the hope that it will be useful,
534+# but WITHOUT ANY WARRANTY; without even the implied warranty of
535+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
536+# GNU Affero General Public License for more details.
537+#
538+# You should have received a copy of the GNU Affero General Public License
539+# along with this program. If not, see <http://www.gnu.org/licenses/>.
540+#
541+##############################################################################
542+
543+from lxml import etree
544+import time
545+from datetime import datetime, date, timedelta
546+import decimal_precision as dp
547+from tools.translate import _
548+from osv import fields, osv
549+import netsvc
550+import tools
551+
552+class account_analytic_account(osv.osv):
553+
554+ def _categories_name_calc(self, cr, uid, ids, name, args, context=None):
555+
556+ if not ids:
557+ return []
558+ res = []
559+
560+ accounts_br = self.browse(cr, uid, ids, context=context)
561+
562+ for account in accounts_br:
563+ data =[]
564+ categories_br = account.category_id
565+ if categories_br:
566+ for category_br in categories_br:
567+ cat_name = category_br.complete_name or ''
568+ data.insert(0, cat_name)
569+ data.sort(cmp=None, key=None, reverse=False)
570+ data_str = ', '.join(map(tools.ustr,data))
571+
572+ else:
573+ data_str = ''
574+
575+
576+ res.append((account.id, data_str))
577+
578+ return dict(res)
579+
580+ _inherit = 'account.analytic.account'
581+ _columns = {
582+
583+ 'category_id': fields.many2many('analytic.account.category', 'analytic_account_category_rel', 'account_id', 'category_id', 'Categories'),
584+ 'categories_name_str': fields.function(_categories_name_calc, method=True, type='text', string='Categories', help='Analytic account categories'),
585+
586+ }
587+
588+account_analytic_account()
589\ No newline at end of file
590
591=== added file 'project_category/analytic_account_category.py'
592--- project_category/analytic_account_category.py 1970-01-01 00:00:00 +0000
593+++ project_category/analytic_account_category.py 2013-02-19 14:36:22 +0000
594@@ -0,0 +1,80 @@
595+# -*- coding: utf-8 -*-
596+##############################################################################
597+#
598+# Copyright (C) 2011 Eficent (<http://www.eficent.com/>)
599+# <contact@eficent.com>
600+#
601+# This program is free software: you can redistribute it and/or modify
602+# it under the terms of the GNU Affero General Public License as
603+# published by the Free Software Foundation, either version 3 of the
604+# License, or (at your option) any later version.
605+#
606+# This program is distributed in the hope that it will be useful,
607+# but WITHOUT ANY WARRANTY; without even the implied warranty of
608+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
609+# GNU Affero General Public License for more details.
610+#
611+# You should have received a copy of the GNU Affero General Public License
612+# along with this program. If not, see <http://www.gnu.org/licenses/>.
613+#
614+##############################################################################
615+
616+import tools
617+from osv import fields, osv
618+from tools.translate import _
619+
620+
621+class analytic_account_category(osv.osv):
622+ def name_get(self, cr, uid, ids, context=None):
623+ if not len(ids):
624+ return []
625+ reads = self.read(cr, uid, ids, ['name','parent_id'], context=context)
626+ res = []
627+ for record in reads:
628+ name = record['name']
629+ if record['parent_id']:
630+ name = record['parent_id'][1]+' / '+name
631+ res.append((record['id'], name))
632+ return res
633+
634+ def name_search(self, cr, uid, name, args=None, operator='ilike', context=None, limit=100):
635+ if not args:
636+ args=[]
637+ if context is None:
638+ context={}
639+ if name:
640+ # Be sure name_search is symetric to name_get
641+ name = name.split(' / ')[-1]
642+ ids = self.search(cr, uid, [('name', operator, name)] + args, limit=limit, context=context)
643+ else:
644+ ids = self.search(cr, uid, args, limit=limit, context=context)
645+ return self.name_get(cr, uid, ids, context)
646+
647+
648+ def _name_get_fnc(self, cr, uid, ids, prop, unknow_none, context=None):
649+ res = self.name_get(cr, uid, ids, context=context)
650+ return dict(res)
651+
652+ _description='Analytic account & project Categories'
653+ _name = 'analytic.account.category'
654+ _columns = {
655+ 'name': fields.char('Category Name', required=True, size=64, translate=True),
656+ 'parent_id': fields.many2one('analytic.account.category', 'Parent Category', select=True, ondelete='cascade'),
657+ 'complete_name': fields.function(_name_get_fnc, method=True, type="char", string='Full Name'),
658+ 'child_ids': fields.one2many('analytic.account.category', 'parent_id', 'Child Categories'),
659+ 'active' : fields.boolean('Active', help="The active field allows you to hide the category without removing it."),
660+ 'parent_left' : fields.integer('Left parent', select=True),
661+ 'parent_right' : fields.integer('Right parent', select=True),
662+ 'account_ids': fields.many2many('account.analytic.account', 'analytic_account_category_rel', 'category_id', 'account_id', 'Categories'),
663+ }
664+ _constraints = [
665+ (osv.osv._check_recursion, 'Error ! You can not create recursive categories.', ['parent_id'])
666+ ]
667+ _defaults = {
668+ 'active' : lambda *a: 1,
669+ }
670+ _parent_store = True
671+ _parent_order = 'name'
672+ _order = 'parent_left'
673+
674+analytic_account_category()
675\ No newline at end of file
676
677=== added file 'project_category/analytic_account_category.xml'
678--- project_category/analytic_account_category.xml 1970-01-01 00:00:00 +0000
679+++ project_category/analytic_account_category.xml 2013-02-19 14:36:22 +0000
680@@ -0,0 +1,80 @@
681+<?xml version="1.0" encoding="utf-8"?>
682+<openerp>
683+ <data>
684+
685+ <!--
686+ ======================
687+ Categories
688+ ======================
689+ -->
690+ <record id="view_analytic_account_category_form" model="ir.ui.view">
691+ <field name="name">Analytic Account Categories</field>
692+ <field name="model">analytic.account.category</field>
693+ <field name="type">form</field>
694+ <field name="arch" type="xml">
695+ <form string="Analytic Account Category">
696+ <field name="name" select="1"/>
697+ <field name="active" groups="base.group_erp_manager"/>
698+ <field name="parent_id"/>
699+ <separator colspan="4" string="Analytic Accounts"/>
700+ <field colspan="4" name="account_ids" nolabel="1"/>
701+ </form>
702+ </field>
703+ </record>
704+ <record id="view_analytic_account_category_list" model="ir.ui.view">
705+ <field name="name">Analytic Account Categories</field>
706+ <field name="model">analytic.account.category</field>
707+ <field name="type">tree</field>
708+ <field eval="6" name="priority"/>
709+ <field name="arch" type="xml">
710+ <tree string="Analytic Account Categories">
711+ <field name="complete_name"/>
712+ </tree>
713+ </field>
714+ </record>
715+ <record id="view_analytic_account_category_tree" model="ir.ui.view">
716+ <field name="name">analytic.account.category.tree</field>
717+ <field name="model">analytic.account.category</field>
718+ <field name="type">tree</field>
719+ <field name="field_parent">child_ids</field>
720+ <field name="arch" type="xml">
721+ <tree toolbar="1" string="Analytic Account Categories">
722+ <field name="name"/>
723+ </tree>
724+ </field>
725+ </record>
726+
727+
728+ <record id="action_analytic_account_by_category" model="ir.actions.act_window">
729+ <field name="name">Analytic Account Categories</field>
730+ <field name="res_model">account.analytic.account</field>
731+ <field name="view_type">form</field>
732+ <field name="view_mode">tree,form</field>
733+ <field name="domain">[('category_id','child_of', [active_id])]</field>
734+ <field name="context">{'category_id':active_id}</field>
735+ <field name="search_view_id" ref="account.view_account_analytic_account_search"/>
736+ </record>
737+
738+
739+ <record id="ir_action_analytic_account_by_category" model="ir.values">
740+ <field eval="'tree_but_open'" name="key2"/>
741+ <field eval="'analytic.account.category'" name="model"/>
742+ <field name="name">Open analytic accounts</field>
743+ <field eval="'ir.actions.act_window,%d'%action_analytic_account_by_category" name="value"/>
744+ <field eval="True" name="object"/>
745+ </record>
746+
747+ <record id="action_analytic_account_category_form" model="ir.actions.act_window">
748+ <field name="name">Analytic Account Categories</field>
749+ <field name="type">ir.actions.act_window</field>
750+ <field name="res_model">analytic.account.category</field>
751+ <field name="view_type">form</field>
752+ <field name="help">Manage the analytic account categories in order to better classify them for tracking and analysis purposes. An analytic account may belong to several categories and categories have a hierarchy structure: an analytic account belonging to a category also belong to her parent category.</field>
753+ </record>
754+
755+ <menuitem action="action_analytic_account_category_form" id="menu_analytic_account_category_form" name="Analytic Account Categories" sequence="4" parent="account.menu_analytic_accounting"/>
756+ <menuitem action="action_analytic_account_category_form" id="menu_project_category_form" name="Project Categories" sequence="4" parent="base.menu_definitions"/>
757+
758+
759+ </data>
760+</openerp>
761
762=== added file 'project_category/analytic_account_view.xml'
763--- project_category/analytic_account_view.xml 1970-01-01 00:00:00 +0000
764+++ project_category/analytic_account_view.xml 2013-02-19 14:36:22 +0000
765@@ -0,0 +1,68 @@
766+<?xml version="1.0" encoding="utf-8"?>
767+<openerp>
768+ <data>
769+
770+
771+#---------------------------------------------------------------------------------------------------------
772+# Extend the analytic account
773+#---------------------------------------------------------------------------------------------------------
774+ <record id="view_account_analytic_account_list" model="ir.ui.view">
775+ <field name="name">account.analytic.account.list</field>
776+ <field name="model">account.analytic.account</field>
777+ <field name="type">tree</field>
778+ <field eval="8" name="priority"/>
779+ <field name="inherit_id" ref="account.view_account_analytic_account_list"/>
780+ <field name="arch" type="xml">
781+ <field name="code" position="after">
782+ <field name="category_id"/>
783+ </field>
784+ </field>
785+ </record>
786+
787+ <record id="view_account_analytic_account_search" model="ir.ui.view">
788+ <field name="name">account.analytic.account.search</field>
789+ <field name="model">account.analytic.account</field>
790+ <field name="type">search</field>
791+ <field name="inherit_id" ref="account.view_account_analytic_account_search"/>
792+ <field name="arch" type="xml">
793+ <field name="name" position="after">
794+ <field name="category_id" select="1"/>
795+ </field>
796+ </field>
797+ </record>
798+
799+ <record id="view_account_analytic_account_tree" model="ir.ui.view">
800+ <field name="name">account.analytic.account.tree</field>
801+ <field name="model">account.analytic.account</field>
802+ <field name="type">tree</field>
803+ <field name="field_parent">child_complete_ids</field>
804+ <field name="inherit_id" ref="account.view_account_analytic_account_tree"/>
805+ <field name="arch" type="xml">
806+ <field name="name" position="after">
807+ <field name="categories_name_str"/>
808+ </field>
809+ </field>
810+ </record>
811+
812+ <record id="view_account_analytic_account_form" model="ir.ui.view">
813+ <field name="name">account.analytic.account.form</field>
814+ <field name="model">account.analytic.account</field>
815+ <field name="type">form</field>
816+ <field name="inherit_id" ref="analytic.view_account_analytic_account_form"/>
817+ <field name="arch" type="xml">
818+ <form string="Analytic Account" version="7.0">
819+ <sheet string="Analytic Account">
820+ <notebook>
821+ <page string="Account Data" position="after">
822+ <page string="Categories">
823+ <field colspan="4" name="category_id" nolabel="1"/>
824+ </page>
825+ </page>
826+ </notebook>
827+ </sheet>
828+ </form>
829+ </field>
830+ </record>
831+
832+ </data>
833+</openerp>
834
835=== added directory 'project_category/i18n'
836=== added file 'project_category/i18n/es.po'
837--- project_category/i18n/es.po 1970-01-01 00:00:00 +0000
838+++ project_category/i18n/es.po 2013-02-19 14:36:22 +0000
839@@ -0,0 +1,134 @@
840+# Translation of OpenERP Server.
841+# This file contains the translation of the following modules:
842+# * project_category
843+#
844+msgid ""
845+msgstr ""
846+"Project-Id-Version: OpenERP Server 6.0.3\n"
847+"Report-Msgid-Bugs-To: support@openerp.com\n"
848+"POT-Creation-Date: 2012-10-18 22:49+0000\n"
849+"PO-Revision-Date: 2012-10-19 01:04+0100\n"
850+"Last-Translator: Jordi Ballester <jordi.ballester@eficent.com>\n"
851+"Language-Team: \n"
852+"MIME-Version: 1.0\n"
853+"Content-Type: text/plain; charset=UTF-8\n"
854+"Content-Transfer-Encoding: 8bit\n"
855+"Plural-Forms: \n"
856+
857+#. module: project_category
858+#: field:analytic.account.category,parent_left:0
859+msgid "Left parent"
860+msgstr "Padre izquierdo"
861+
862+#. module: project_category
863+#: view:project.project:0
864+msgid "Administration"
865+msgstr "Administración"
866+
867+#. module: project_category
868+#: field:analytic.account.category,child_ids:0
869+msgid "Child Categories"
870+msgstr "Categorías hijas"
871+
872+#. module: project_category
873+#: view:analytic.account.category:0
874+msgid "Analytic Account Category"
875+msgstr "Categoría Cuenta Analítica"
876+
877+#. module: project_category
878+#: field:analytic.account.category,name:0
879+msgid "Category Name"
880+msgstr "Nombre Categoría"
881+
882+#. module: project_category
883+#: model:ir.actions.act_window,help:project_category.action_analytic_account_category_form
884+msgid "Manage the analytic account categories in order to better classify them for tracking and analysis purposes. An analytic account may belong to several categories and categories have a hierarchy structure: an analytic account belonging to a category also belong to her parent category."
885+msgstr "Gestione las categorías de cuentas analíticas para clasificarlas mejor con el objetivo de realizar su seguimiento y análisis. Una cuenta analítica puede pertenecer a varias categorías. Éstas conforman una estructura jerárquica, de modo que si una cuenta analítica o proyecto pertenece a una categoría también pertenecerá a la categoría padre."
886+
887+#. module: project_category
888+#: model:ir.ui.menu,name:project_category.menu_project_category_form
889+msgid "Project Categories"
890+msgstr "Categorías de Proyecto"
891+
892+#. module: project_category
893+#: model:ir.model,name:project_category.model_analytic_account_category
894+msgid "Analytic account & project Categories"
895+msgstr "Categorías de cuenta analítica y proyecto"
896+
897+#. module: project_category
898+#: view:analytic.account.category:0
899+#: model:ir.actions.act_window,name:project_category.action_analytic_account_by_category
900+#: model:ir.actions.act_window,name:project_category.action_analytic_account_category_form
901+#: model:ir.ui.menu,name:project_category.menu_analytic_account_category_form
902+msgid "Analytic Account Categories"
903+msgstr "Categorías Cuenta Analítica"
904+
905+#. module: project_category
906+#: field:analytic.account.category,active:0
907+msgid "Active"
908+msgstr "Activa"
909+
910+#. module: project_category
911+#: view:account.analytic.account:0
912+#: field:account.analytic.account,categories_name_str:0
913+#: field:account.analytic.account,category_id:0
914+#: field:analytic.account.category,account_ids:0
915+#: view:project.project:0
916+msgid "Categories"
917+msgstr "Categorías"
918+
919+#. module: project_category
920+#: view:analytic.account.category:0
921+msgid "Analytic Accounts"
922+msgstr "Cuentas Analíticas"
923+
924+#. module: project_category
925+#: field:analytic.account.category,parent_id:0
926+msgid "Parent Category"
927+msgstr "Categoría Padre"
928+
929+#. module: project_category
930+#: constraint:account.analytic.account:0
931+msgid "Error! The currency has to be the same as the currency of the selected company"
932+msgstr "¡Error! La divisa tiene que ser la misma que la establecida en la compañía seleccionada"
933+
934+#. module: project_category
935+#: field:analytic.account.category,complete_name:0
936+msgid "Full Name"
937+msgstr "Nombre Completo"
938+
939+#. module: project_category
940+#: view:account.analytic.account:0
941+msgid "Account Data"
942+msgstr "Datos de la cuenta"
943+
944+#. module: project_category
945+#: constraint:analytic.account.category:0
946+msgid "Error ! You can not create recursive categories."
947+msgstr "¡Error! No puede crear categorías recursivas."
948+
949+#. module: project_category
950+#: help:account.analytic.account,categories_name_str:0
951+msgid "Analytic account categories"
952+msgstr "Categorías de cuenta analítica"
953+
954+#. module: project_category
955+#: model:ir.model,name:project_category.model_account_analytic_account
956+msgid "Analytic Account"
957+msgstr "Cuenta analítica"
958+
959+#. module: project_category
960+#: help:analytic.account.category,active:0
961+msgid "The active field allows you to hide the category without removing it."
962+msgstr "El campo activo le permite ocultar la categoría sin tener que eliminarla."
963+
964+#. module: project_category
965+#: constraint:account.analytic.account:0
966+msgid "Error! You can not create recursive analytic accounts."
967+msgstr "¡Error! No puede crear cuentas analíticas recursivas."
968+
969+#. module: project_category
970+#: field:analytic.account.category,parent_right:0
971+msgid "Right parent"
972+msgstr "Padre derecho"
973+
974
975=== added file 'project_category/i18n/project_category.pot'
976--- project_category/i18n/project_category.pot 1970-01-01 00:00:00 +0000
977+++ project_category/i18n/project_category.pot 2013-02-19 14:36:22 +0000
978@@ -0,0 +1,134 @@
979+# Translation of OpenERP Server.
980+# This file contains the translation of the following modules:
981+# * project_category
982+#
983+msgid ""
984+msgstr ""
985+"Project-Id-Version: OpenERP Server 6.0.3\n"
986+"Report-Msgid-Bugs-To: support@openerp.com\n"
987+"POT-Creation-Date: 2012-10-18 22:49+0000\n"
988+"PO-Revision-Date: 2012-10-18 22:49+0000\n"
989+"Last-Translator: <>\n"
990+"Language-Team: \n"
991+"MIME-Version: 1.0\n"
992+"Content-Type: text/plain; charset=UTF-8\n"
993+"Content-Transfer-Encoding: \n"
994+"Plural-Forms: \n"
995+
996+#. module: project_category
997+#: field:analytic.account.category,parent_left:0
998+msgid "Left parent"
999+msgstr ""
1000+
1001+#. module: project_category
1002+#: view:project.project:0
1003+msgid "Administration"
1004+msgstr ""
1005+
1006+#. module: project_category
1007+#: field:analytic.account.category,child_ids:0
1008+msgid "Child Categories"
1009+msgstr ""
1010+
1011+#. module: project_category
1012+#: view:analytic.account.category:0
1013+msgid "Analytic Account Category"
1014+msgstr ""
1015+
1016+#. module: project_category
1017+#: field:analytic.account.category,name:0
1018+msgid "Category Name"
1019+msgstr ""
1020+
1021+#. module: project_category
1022+#: model:ir.actions.act_window,help:project_category.action_analytic_account_category_form
1023+msgid "Manage the analytic account categories in order to better classify them for tracking and analysis purposes. An analytic account may belong to several categories and categories have a hierarchy structure: an analytic account belonging to a category also belong to her parent category."
1024+msgstr ""
1025+
1026+#. module: project_category
1027+#: model:ir.ui.menu,name:project_category.menu_project_category_form
1028+msgid "Project Categories"
1029+msgstr ""
1030+
1031+#. module: project_category
1032+#: model:ir.model,name:project_category.model_analytic_account_category
1033+msgid "Analytic account & project Categories"
1034+msgstr ""
1035+
1036+#. module: project_category
1037+#: view:analytic.account.category:0
1038+#: model:ir.actions.act_window,name:project_category.action_analytic_account_by_category
1039+#: model:ir.actions.act_window,name:project_category.action_analytic_account_category_form
1040+#: model:ir.ui.menu,name:project_category.menu_analytic_account_category_form
1041+msgid "Analytic Account Categories"
1042+msgstr ""
1043+
1044+#. module: project_category
1045+#: field:analytic.account.category,active:0
1046+msgid "Active"
1047+msgstr ""
1048+
1049+#. module: project_category
1050+#: view:account.analytic.account:0
1051+#: field:account.analytic.account,categories_name_str:0
1052+#: field:account.analytic.account,category_id:0
1053+#: field:analytic.account.category,account_ids:0
1054+#: view:project.project:0
1055+msgid "Categories"
1056+msgstr ""
1057+
1058+#. module: project_category
1059+#: view:analytic.account.category:0
1060+msgid "Analytic Accounts"
1061+msgstr ""
1062+
1063+#. module: project_category
1064+#: field:analytic.account.category,parent_id:0
1065+msgid "Parent Category"
1066+msgstr ""
1067+
1068+#. module: project_category
1069+#: constraint:account.analytic.account:0
1070+msgid "Error! The currency has to be the same as the currency of the selected company"
1071+msgstr ""
1072+
1073+#. module: project_category
1074+#: field:analytic.account.category,complete_name:0
1075+msgid "Full Name"
1076+msgstr ""
1077+
1078+#. module: project_category
1079+#: view:account.analytic.account:0
1080+msgid "Account Data"
1081+msgstr ""
1082+
1083+#. module: project_category
1084+#: constraint:analytic.account.category:0
1085+msgid "Error ! You can not create recursive categories."
1086+msgstr ""
1087+
1088+#. module: project_category
1089+#: help:account.analytic.account,categories_name_str:0
1090+msgid "Analytic account categories"
1091+msgstr ""
1092+
1093+#. module: project_category
1094+#: model:ir.model,name:project_category.model_account_analytic_account
1095+msgid "Analytic Account"
1096+msgstr ""
1097+
1098+#. module: project_category
1099+#: help:analytic.account.category,active:0
1100+msgid "The active field allows you to hide the category without removing it."
1101+msgstr ""
1102+
1103+#. module: project_category
1104+#: constraint:account.analytic.account:0
1105+msgid "Error! You can not create recursive analytic accounts."
1106+msgstr ""
1107+
1108+#. module: project_category
1109+#: field:analytic.account.category,parent_right:0
1110+msgid "Right parent"
1111+msgstr ""
1112+
1113
1114=== added file 'project_category/project_view.xml'
1115--- project_category/project_view.xml 1970-01-01 00:00:00 +0000
1116+++ project_category/project_view.xml 2013-02-19 14:36:22 +0000
1117@@ -0,0 +1,53 @@
1118+<?xml version="1.0" encoding="utf-8"?>
1119+<openerp>
1120+ <data>
1121+
1122+
1123+
1124+#---------------------------------------------------------------------------------------------------------
1125+# Extend the project
1126+#---------------------------------------------------------------------------------------------------------
1127+
1128+ <record id="view_project_project_filter" model="ir.ui.view">
1129+ <field name="name">project.project.select</field>
1130+ <field name="model">project.project</field>
1131+ <field name="type">search</field>
1132+ <field name="inherit_id" ref="project.view_project_project_filter"/>
1133+ <field name="arch" type="xml">
1134+ <field name="name" position="after">
1135+ <field name="category_id" select="1"/>
1136+ </field>
1137+ </field>
1138+ </record>
1139+
1140+
1141+ <record id="view_project" model="ir.ui.view">
1142+ <field name="name">project.project.tree</field>
1143+ <field name="model">project.project</field>
1144+ <field name="type">tree</field>
1145+ <field name="inherit_id" ref="project.view_project"/>
1146+ <field name="field_parent">child_ids</field>
1147+ <field name="arch" type="xml">
1148+ <field name="name" position="after">
1149+ <field name="categories_name_str"/>
1150+ </field>
1151+ </field>
1152+ </record>
1153+
1154+
1155+ <record id="edit_project" model="ir.ui.view">
1156+ <field name="name">project.project.form</field>
1157+ <field name="model">project.project</field>
1158+ <field name="type">form</field>
1159+ <field name="inherit_id" ref="project.edit_project"/>
1160+ <field name="arch" type="xml">
1161+ <page string="Other Info" position="after">
1162+ <page string="Categories">
1163+ <field colspan="4" name="category_id" nolabel="1"/>
1164+ </page>
1165+ </page>
1166+ </field>
1167+ </record>
1168+
1169+ </data>
1170+</openerp>
1171
1172=== added directory 'project_category/security'
1173=== added file 'project_category/security/ir.model.access.csv'
1174--- project_category/security/ir.model.access.csv 1970-01-01 00:00:00 +0000
1175+++ project_category/security/ir.model.access.csv 2013-02-19 14:36:22 +0000
1176@@ -0,0 +1,5 @@
1177+"id","name","model_id:id","group_id:id","perm_read","perm_write","perm_create","perm_unlink"
1178+"access_analytic_account_category_project_user","analytic_account_category project user","model_analytic_account_category","project.group_project_user",1,0,0,0
1179+"access_analytic_account_category_project_manager","analytic_account_category project manager","model_analytic_account_category","project.group_project_manager",1,1,1,1
1180+"access_analytic_account_category_account_user","analytic_account_category account user","model_analytic_account_category","account.group_account_user",1,0,0,0
1181+"access_analytic_account_category_account_manager","analytic_account_category account manager","model_analytic_account_category","account.group_account_manager",1,1,1,1
1182
1183=== added directory 'project_communications_mailgate'
1184=== renamed directory 'project_communications_mailgate' => 'project_communications_mailgate.moved'
1185=== added file 'project_communications_mailgate/__init__.py'
1186--- project_communications_mailgate/__init__.py 1970-01-01 00:00:00 +0000
1187+++ project_communications_mailgate/__init__.py 2013-02-19 14:36:22 +0000
1188@@ -0,0 +1,25 @@
1189+# -*- coding: utf-8 -*-
1190+##############################################################################
1191+#
1192+# OpenERP, Open Source Management Solution
1193+# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
1194+#
1195+# This program is free software: you can redistribute it and/or modify
1196+# it under the terms of the GNU Affero General Public License as
1197+# published by the Free Software Foundation, either version 3 of the
1198+# License, or (at your option) any later version.
1199+#
1200+# This program is distributed in the hope that it will be useful,
1201+# but WITHOUT ANY WARRANTY; without even the implied warranty of
1202+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1203+# GNU Affero General Public License for more details.
1204+#
1205+# You should have received a copy of the GNU Affero General Public License
1206+# along with this program. If not, see <http://www.gnu.org/licenses/>.
1207+#
1208+##############################################################################
1209+
1210+import project_communications_mailgate
1211+import project
1212+
1213+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
1214
1215=== added file 'project_communications_mailgate/__openerp__.py'
1216--- project_communications_mailgate/__openerp__.py 1970-01-01 00:00:00 +0000
1217+++ project_communications_mailgate/__openerp__.py 2013-02-19 14:36:22 +0000
1218@@ -0,0 +1,46 @@
1219+# -*- coding: utf-8 -*-
1220+##############################################################################
1221+#
1222+# Copyright (C) 2011 Eficent (<http://www.eficent.com/>)
1223+# Jordi Ballester Alomar <jordi.ballester@eficent.com>
1224+#
1225+# This program is free software: you can redistribute it and/or modify
1226+# it under the terms of the GNU Affero General Public License as
1227+# published by the Free Software Foundation, either version 3 of the
1228+# License, or (at your option) any later version.
1229+#
1230+# This program is distributed in the hope that it will be useful,
1231+# but WITHOUT ANY WARRANTY; without even the implied warranty of
1232+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1233+# GNU Affero General Public License for more details.
1234+#
1235+# You should have received a copy of the GNU Affero General Public License
1236+# along with this program. If not, see <http://www.gnu.org/licenses/>.
1237+#
1238+##############################################################################
1239+
1240+
1241+{
1242+ "name": "Project MailGateWay for Projects",
1243+ "version": "1.0",
1244+ "author": "Eficent, Nervia Consultores",
1245+ "website": "",
1246+ "category": "Generic Modules/Projects & Services",
1247+ "depends": ["project", "mail"],
1248+ "description": """This module is an interface that synchronises mails with OpenERP Project.
1249+
1250+It allows updating projects as soon as a new mail arrives in our configured mail server.
1251+Moreover, it keeps track of all further communications and project states.
1252+ """,
1253+ "init_xml": [],
1254+ "update_xml": [
1255+ "project_communications_mailgate_view.xml",
1256+ ],
1257+ 'demo_xml': [
1258+ ],
1259+ 'installable': True,
1260+ 'active': False,
1261+ 'certificate': '',
1262+}
1263+
1264+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
1265
1266=== added directory 'project_communications_mailgate/i18n'
1267=== added file 'project_communications_mailgate/i18n/es.po'
1268--- project_communications_mailgate/i18n/es.po 1970-01-01 00:00:00 +0000
1269+++ project_communications_mailgate/i18n/es.po 2013-02-19 14:36:22 +0000
1270@@ -0,0 +1,102 @@
1271+# Translation of OpenERP Server.
1272+# This file contains the translation of the following modules:
1273+# * project_communications_mailgate
1274+#
1275+msgid ""
1276+msgstr ""
1277+"Project-Id-Version: OpenERP Server 6.0.3\n"
1278+"Report-Msgid-Bugs-To: support@openerp.com\n"
1279+"POT-Creation-Date: 2012-01-26 13:31+0000\n"
1280+"PO-Revision-Date: 2012-01-26 14:34+0100\n"
1281+"Last-Translator: Jordi Ballester <jordi.ballester@eficent.com>\n"
1282+"Language-Team: \n"
1283+"MIME-Version: 1.0\n"
1284+"Content-Type: text/plain; charset=UTF-8\n"
1285+"Content-Transfer-Encoding: 8bit\n"
1286+"Plural-Forms: \n"
1287+
1288+#. module: project_communications_mailgate
1289+#: view:project.project:0
1290+msgid "History Information"
1291+msgstr "Información histórica"
1292+
1293+#. module: project_communications_mailgate
1294+#: model:ir.module.module,description:project_communications_mailgate.module_meta_information
1295+msgid ""
1296+"This module is an interface that synchronises mails with OpenERP Project.\n"
1297+"\n"
1298+"It allows updating projects as soon as a new mail arrives in our configured mail server.\n"
1299+"Moreover, it keeps track of all further communications and project states.\n"
1300+" "
1301+msgstr "Este módulo es una interfaz que sincroniza los correos con un proyecto en OpenERP.Permite la actualización de los proyectos al llegar un nuevo correo en nuestro servidor de correo configurado.Además, realiza un seguimiento de todas las comunicaciones y los estados del proyecto."
1302+
1303+#. module: project_communications_mailgate
1304+#: view:project.project:0
1305+msgid "Attachments"
1306+msgstr "Archivos adjuntos"
1307+
1308+#. module: project_communications_mailgate
1309+#: field:project.project,message_ids:0
1310+msgid "Messages"
1311+msgstr "Mensajes"
1312+
1313+#. module: project_communications_mailgate
1314+#: model:ir.model,name:project_communications_mailgate.model_project_project
1315+msgid "Project"
1316+msgstr "Proyecto"
1317+
1318+#. module: project_communications_mailgate
1319+#: code:addons/project_communications_mailgate/project.py:46
1320+#, python-format
1321+msgid "Pending"
1322+msgstr "Pendiente"
1323+
1324+#. module: project_communications_mailgate
1325+#: model:ir.module.module,shortdesc:project_communications_mailgate.module_meta_information
1326+msgid "Project MailGateWay for Projects"
1327+msgstr "Pasarela de correos para proyectos"
1328+
1329+#. module: project_communications_mailgate
1330+#: code:addons/project_communications_mailgate/project.py:34
1331+#, python-format
1332+msgid "Draft"
1333+msgstr "Borrador"
1334+
1335+#. module: project_communications_mailgate
1336+#: view:project.project:0
1337+msgid "Details"
1338+msgstr "Detalles"
1339+
1340+#. module: project_communications_mailgate
1341+#: constraint:project.project:0
1342+msgid "Error! You cannot assign escalation to the same project!"
1343+msgstr "¡Error! No puede asignar un escalado al mismo proyecto."
1344+
1345+#. module: project_communications_mailgate
1346+#: code:addons/project_communications_mailgate/project.py:58
1347+#, python-format
1348+msgid "Cancel"
1349+msgstr "Cancelado"
1350+
1351+#. module: project_communications_mailgate
1352+#: code:addons/project_communications_mailgate/project.py:52
1353+#, python-format
1354+msgid "Done"
1355+msgstr "Realizado"
1356+
1357+#. module: project_communications_mailgate
1358+#: code:addons/project_communications_mailgate/project.py:40
1359+#, python-format
1360+msgid "Open"
1361+msgstr "Abierto"
1362+
1363+#. module: project_communications_mailgate
1364+#: constraint:project.project:0
1365+msgid "Error! project start-date must be lower then project end-date."
1366+msgstr "¡Error! La fecha de inicio del proyecto debe ser anterior a la fecha final del proyecto."
1367+
1368+#. module: project_communications_mailgate
1369+#: view:project.project:0
1370+msgid "History"
1371+msgstr "Historial"
1372+
1373
1374=== added file 'project_communications_mailgate/i18n/project_communications_mailgate.pot'
1375--- project_communications_mailgate/i18n/project_communications_mailgate.pot 1970-01-01 00:00:00 +0000
1376+++ project_communications_mailgate/i18n/project_communications_mailgate.pot 2013-02-19 14:36:22 +0000
1377@@ -0,0 +1,101 @@
1378+# Translation of OpenERP Server.
1379+# This file contains the translation of the following modules:
1380+# * project_communications_mailgate
1381+#
1382+msgid ""
1383+msgstr ""
1384+"Project-Id-Version: OpenERP Server 6.0.3\n"
1385+"Report-Msgid-Bugs-To: support@openerp.com\n"
1386+"POT-Creation-Date: 2012-01-26 13:31+0000\n"
1387+"PO-Revision-Date: 2012-01-26 13:31+0000\n"
1388+"Last-Translator: <>\n"
1389+"Language-Team: \n"
1390+"MIME-Version: 1.0\n"
1391+"Content-Type: text/plain; charset=UTF-8\n"
1392+"Content-Transfer-Encoding: \n"
1393+"Plural-Forms: \n"
1394+
1395+#. module: project_communications_mailgate
1396+#: view:project.project:0
1397+msgid "History Information"
1398+msgstr ""
1399+
1400+#. module: project_communications_mailgate
1401+#: model:ir.module.module,description:project_communications_mailgate.module_meta_information
1402+msgid "This module is an interface that synchronises mails with OpenERP Project.\n"
1403+"\n"
1404+"It allows updating projects as soon as a new mail arrives in our configured mail server.\n"
1405+"Moreover, it keeps track of all further communications and project states.\n"
1406+" "
1407+msgstr ""
1408+
1409+#. module: project_communications_mailgate
1410+#: view:project.project:0
1411+msgid "Attachments"
1412+msgstr ""
1413+
1414+#. module: project_communications_mailgate
1415+#: field:project.project,message_ids:0
1416+msgid "Messages"
1417+msgstr ""
1418+
1419+#. module: project_communications_mailgate
1420+#: model:ir.model,name:project_communications_mailgate.model_project_project
1421+msgid "Project"
1422+msgstr ""
1423+
1424+#. module: project_communications_mailgate
1425+#: code:addons/project_communications_mailgate/project.py:46
1426+#, python-format
1427+msgid "Pending"
1428+msgstr ""
1429+
1430+#. module: project_communications_mailgate
1431+#: model:ir.module.module,shortdesc:project_communications_mailgate.module_meta_information
1432+msgid "Project MailGateWay for Projects"
1433+msgstr ""
1434+
1435+#. module: project_communications_mailgate
1436+#: code:addons/project_communications_mailgate/project.py:34
1437+#, python-format
1438+msgid "Draft"
1439+msgstr ""
1440+
1441+#. module: project_communications_mailgate
1442+#: view:project.project:0
1443+msgid "Details"
1444+msgstr ""
1445+
1446+#. module: project_communications_mailgate
1447+#: constraint:project.project:0
1448+msgid "Error! You cannot assign escalation to the same project!"
1449+msgstr ""
1450+
1451+#. module: project_communications_mailgate
1452+#: code:addons/project_communications_mailgate/project.py:58
1453+#, python-format
1454+msgid "Cancel"
1455+msgstr ""
1456+
1457+#. module: project_communications_mailgate
1458+#: code:addons/project_communications_mailgate/project.py:52
1459+#, python-format
1460+msgid "Done"
1461+msgstr ""
1462+
1463+#. module: project_communications_mailgate
1464+#: code:addons/project_communications_mailgate/project.py:40
1465+#, python-format
1466+msgid "Open"
1467+msgstr ""
1468+
1469+#. module: project_communications_mailgate
1470+#: constraint:project.project:0
1471+msgid "Error! project start-date must be lower then project end-date."
1472+msgstr ""
1473+
1474+#. module: project_communications_mailgate
1475+#: view:project.project:0
1476+msgid "History"
1477+msgstr ""
1478+
1479
1480=== added file 'project_communications_mailgate/project.py'
1481--- project_communications_mailgate/project.py 1970-01-01 00:00:00 +0000
1482+++ project_communications_mailgate/project.py 2013-02-19 14:36:22 +0000
1483@@ -0,0 +1,223 @@
1484+# -*- coding: utf-8 -*-
1485+##############################################################################
1486+#
1487+# Copyright (C) 2011 Eficent (<http://www.eficent.com/>)
1488+# Jordi Ballester Alomar <jordi.ballester@eficent.com>
1489+#
1490+# This program is free software: you can redistribute it and/or modify
1491+# it under the terms of the GNU Affero General Public License as
1492+# published by the Free Software Foundation, either version 3 of the
1493+# License, or (at your option) any later version.
1494+#
1495+# This program is distributed in the hope that it will be useful,
1496+# but WITHOUT ANY WARRANTY; without even the implied warranty of
1497+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1498+# GNU Affero General Public License for more details.
1499+#
1500+# You should have received a copy of the GNU Affero General Public License
1501+# along with this program. If not, see <http://www.gnu.org/licenses/>.
1502+#
1503+##############################################################################
1504+
1505+from openerp.osv import orm
1506+from openerp.tools.translate import _
1507+
1508+import base64
1509+import datetime
1510+import dateutil
1511+import email
1512+import logging
1513+import pytz
1514+import re
1515+import time
1516+import xmlrpclib
1517+
1518+
1519+class project(orm.Model):
1520+
1521+ _inherit = "project.project"
1522+
1523+ def set_draft(self, cr, uid, ids, context=None):
1524+ res = super(project, self).set_draft(cr, uid, ids, context=context)
1525+ projects = self.browse(cr, uid, ids, context=context)
1526+ self.message_append(cr, uid, projects, _('Draft'), context=context)
1527+ return res
1528+
1529+ def set_open(self, cr, uid, ids, context=None):
1530+ res = super(project, self).set_open(cr, uid, ids, context=context)
1531+ projects = self.browse(cr, uid, ids, context=context)
1532+ self.message_append(cr, uid, projects, _('Open'), context=context)
1533+ return res
1534+
1535+ def set_pending(self, cr, uid, ids, context=None):
1536+ res = super(project, self).set_pending(cr, uid, ids, context=context)
1537+ projects = self.browse(cr, uid, ids, context=context)
1538+ self.message_append(cr, uid, projects, _('Pending'), context=context)
1539+ return res
1540+
1541+ def set_done(self, cr, uid, ids, context=None):
1542+ res = super(project, self).set_done(cr, uid, ids, context=context)
1543+ projects = self.browse(cr, uid, ids, context=context)
1544+ self.message_append(cr, uid, projects, _('Done'), context=context)
1545+ return res
1546+
1547+ def set_cancel(self, cr, uid, ids, context=None):
1548+ res = super(project, self).set_cancel(cr, uid, ids, context=context)
1549+ projects = self.browse(cr, uid, ids, context=context)
1550+ self.message_append(cr, uid, projects, _('Cancel'), context=context)
1551+ return res
1552+
1553+ def message_append(self, cr, uid, threads, subject, body_text=None, email_to=False,
1554+ email_from=False, email_cc=None, email_bcc=None, reply_to=None,
1555+ email_date=None, message_id=False, references=None,
1556+ attachments=None, body_html=None, subtype=None, headers=None,
1557+ original=None, context=None):
1558+ """Creates a new mail.message attached to the current mail.thread,
1559+ containing all the details passed as parameters. All attachments
1560+ will be attached to the thread record as well as to the actual
1561+ message.
1562+ If only the ``threads`` and ``subject`` parameters are provided,
1563+ a *event log* message is created, without the usual envelope
1564+ attributes (sender, recipients, etc.).
1565+
1566+ :param threads: list of thread ids, or list of browse_records representing
1567+ threads to which a new message should be attached
1568+ :param subject: subject of the message, or description of the event if this
1569+ is an *event log* entry.
1570+ :param email_to: Email-To / Recipient address
1571+ :param email_from: Email From / Sender address if any
1572+ :param email_cc: Comma-Separated list of Carbon Copy Emails To addresse if any
1573+ :param email_bcc: Comma-Separated list of Blind Carbon Copy Emails To addresses if any
1574+ :param reply_to: reply_to header
1575+ :param email_date: email date string if different from now, in server timezone
1576+ :param message_id: optional email identifier
1577+ :param references: optional email references
1578+ :param body_text: plaintext contents of the mail or log message
1579+ :param body_html: html contents of the mail or log message
1580+ :param subtype: optional type of message: 'plain' or 'html', corresponding to the main
1581+ body contents (body_text or body_html).
1582+ :param headers: mail headers to store
1583+ :param dict attachments: map of attachment filenames to binary contents, if any.
1584+ :param str original: optional full source of the RFC2822 email, for reference
1585+ :param dict context: if a ``thread_model`` value is present
1586+ in the context, its value will be used
1587+ to determine the model of the thread to
1588+ update (instead of the current model).
1589+ """
1590+ if context is None:
1591+ context = {}
1592+ if attachments is None:
1593+ attachments = {}
1594+
1595+ if email_date:
1596+ edate = parsedate(email_date)
1597+ if edate is not None:
1598+ email_date = time.strftime('%Y-%m-%d %H:%M:%S', edate)
1599+
1600+ if all(isinstance(thread_id, (int, long)) for thread_id in threads):
1601+ model = context.get('thread_model') or self._name
1602+ model_pool = self.pool.get(model)
1603+ threads = model_pool.browse(cr, uid, threads, context=context)
1604+
1605+ ir_attachment = self.pool.get('ir.attachment')
1606+ mail_message = self.pool.get('mail.message')
1607+
1608+ for thread in threads:
1609+ to_attach = []
1610+ for attachment in attachments:
1611+ fname, fcontent = attachment
1612+ if isinstance(fcontent, unicode):
1613+ fcontent = fcontent.encode('utf-8')
1614+ data_attach = {
1615+ 'name': fname,
1616+ 'datas': base64.b64encode(str(fcontent)),
1617+ 'datas_fname': fname,
1618+ 'description': _('Mail attachment'),
1619+ 'res_model': thread._name,
1620+ 'res_id': thread.id,
1621+ }
1622+ to_attach.append(ir_attachment.create(cr, uid, data_attach, context=context))
1623+
1624+ partner_id = hasattr(thread, 'partner_id') and (thread.partner_id and thread.partner_id.id or False) or False
1625+ if not partner_id and thread._name == 'res.partner':
1626+ partner_id = thread.id
1627+ data = {
1628+ 'subject': subject,
1629+ 'user_id': uid,
1630+ 'model' : thread._name,
1631+ 'partner_id': partner_id,
1632+ 'res_id': thread.id,
1633+ 'date': time.strftime('%Y-%m-%d %H:%M:%S'),
1634+ 'message_id': message_id,
1635+ 'body_text': body_text or (hasattr(thread, 'description') and thread.description or False),
1636+ 'attachment_ids': [(6, 0, to_attach)],
1637+ 'state' : 'received',
1638+ }
1639+
1640+ if email_from:
1641+ for param in (email_to, email_cc, email_bcc):
1642+ if isinstance(param, list):
1643+ param = ", ".join(param)
1644+ data = {
1645+ 'subject': subject or _('History'),
1646+ 'user_id': uid,
1647+ 'model' : thread._name,
1648+ 'res_id': thread.id,
1649+ 'date': email_date or time.strftime('%Y-%m-%d %H:%M:%S'),
1650+ 'body_text': body_text,
1651+ 'email_to': email_to,
1652+ 'email_from': email_from or \
1653+ (hasattr(thread, 'user_id') and thread.user_id and thread.user_id.user_email),
1654+ 'email_cc': email_cc,
1655+ 'email_bcc': email_bcc,
1656+ 'partner_id': partner_id,
1657+ 'references': references,
1658+ 'message_id': message_id,
1659+ 'attachment_ids': [(6, 0, to_attach)],
1660+ 'state' : 'received',
1661+ 'body_html': body_html,
1662+ 'subtype': subtype,
1663+ 'headers': headers,
1664+ 'reply_to': reply_to,
1665+ 'original': original,
1666+ }
1667+ mail_message.create(cr, uid, data, context=context)
1668+ return True
1669+
1670+ def message_append_dict(self, cr, uid, ids, msg_dict, context=None):
1671+ """Creates a new mail.message attached to the given threads (``ids``),
1672+ with the contents of ``msg_dict``, by calling ``message_append``
1673+ with the mail details. All attachments in msg_dict will be
1674+ attached to the object record as well as to the actual
1675+ mail message.
1676+
1677+ :param dict msg_dict: a map containing the email details and
1678+ attachments. See ``message_process()`` and
1679+ ``mail.message.parse()`` for details on
1680+ the dict structure.
1681+ :param dict context: if a ``thread_model`` value is present
1682+ in the context, its value will be used
1683+ to determine the model of the thread to
1684+ update (instead of the current model).
1685+ """
1686+ return self.message_append(cr, uid, ids,
1687+ subject = msg_dict.get('subject'),
1688+ body_text = msg_dict.get('body_text'),
1689+ email_to = msg_dict.get('to'),
1690+ email_from = msg_dict.get('from'),
1691+ email_cc = msg_dict.get('cc'),
1692+ email_bcc = msg_dict.get('bcc'),
1693+ reply_to = msg_dict.get('reply'),
1694+ email_date = msg_dict.get('date'),
1695+ message_id = msg_dict.get('message-id'),
1696+ references = msg_dict.get('references')\
1697+ or msg_dict.get('in-reply-to'),
1698+ attachments = msg_dict.get('attachments'),
1699+ body_html= msg_dict.get('body_html'),
1700+ subtype = msg_dict.get('subtype'),
1701+ headers = msg_dict.get('headers'),
1702+ original = msg_dict.get('original'),
1703+ context = context)
1704+
1705+#project()
1706+
1707
1708=== added file 'project_communications_mailgate/project_communications_mailgate.py'
1709--- project_communications_mailgate/project_communications_mailgate.py 1970-01-01 00:00:00 +0000
1710+++ project_communications_mailgate/project_communications_mailgate.py 2013-02-19 14:36:22 +0000
1711@@ -0,0 +1,52 @@
1712+# -*- coding: utf-8 -*-
1713+##############################################################################
1714+#
1715+# Copyright (C) 2011 Eficent (<http://www.eficent.com/>)
1716+# Jordi Ballester Alomar <jordi.ballester@eficent.com>
1717+#
1718+# This program is free software: you can redistribute it and/or modify
1719+# it under the terms of the GNU Affero General Public License as
1720+# published by the Free Software Foundation, either version 3 of the
1721+# License, or (at your option) any later version.
1722+#
1723+# This program is distributed in the hope that it will be useful,
1724+# but WITHOUT ANY WARRANTY; without even the implied warranty of
1725+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1726+# GNU Affero General Public License for more details.
1727+#
1728+# You should have received a copy of the GNU Affero General Public License
1729+# along with this program. If not, see <http://www.gnu.org/licenses/>.
1730+#
1731+##############################################################################
1732+
1733+from openerp.osv import fields, orm
1734+
1735+
1736+class project_communications_mail(orm.Model):
1737+ _name = "project.project"
1738+ _inherit = ['mail.thread','project.project']
1739+
1740+ _columns= {
1741+ 'message_ids': fields.one2many(
1742+ 'mail.message', 'res_id', 'Messages',
1743+ domain=[('model','=',_name)], readonly=True
1744+ ),
1745+ }
1746+
1747+ def message_thread_followers(self, cr, uid, ids, context=None):
1748+ if not ids:
1749+ return {}
1750+ if isinstance(ids, (int, long)):
1751+ ids= [ids]
1752+
1753+ res = {}
1754+
1755+ for project in self.browse(cr, uid, select, context=context):
1756+ user_email = (project.user_id and project.user_id.address_id
1757+ and project.user_id.address_id.email) or False
1758+ if user_email:
1759+ res.setdefault(project.id, []).append(user_email)
1760+
1761+ return res
1762+
1763+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
1764
1765=== added file 'project_communications_mailgate/project_communications_mailgate_view.xml'
1766--- project_communications_mailgate/project_communications_mailgate_view.xml 1970-01-01 00:00:00 +0000
1767+++ project_communications_mailgate/project_communications_mailgate_view.xml 2013-02-19 14:36:22 +0000
1768@@ -0,0 +1,31 @@
1769+<?xml version="1.0" encoding="utf-8"?>
1770+ <openerp>
1771+ <data>
1772+ <record id="edit_project" model="ir.ui.view">
1773+ <field name="name">project.project.form</field>
1774+ <field name="model">project.project</field>
1775+ <field name="type">form</field>
1776+ <field name="inherit_id" ref="project.edit_project"/>
1777+ <field name="arch" type="xml">
1778+ <!-- #Repetido en project_communications_mailgate_note_view 25/01/2013 -->
1779+ <xpath expr="/form/sheet/notebook/page[@string='Other Info']" position="after">
1780+ <page string="History">
1781+ <field name="message_ids" colspan="4" nolabel="1" mode="tree">
1782+ <tree string="History">
1783+ <field name="email_from" invisible="1"/>
1784+ </tree>
1785+ </field>
1786+ </page>
1787+ </xpath>
1788+ <xpath expr="/form/header/button[@name='set_cancel']" position="after">
1789+ <!-- attrs="{'invisible': [('email_from', '=', False)]}" -->
1790+ <button
1791+ string="Reply"
1792+ name="%(mail.action_email_compose_message_wizard)d"
1793+ context="{'mail.compose.message.mode':'reply', 'message_id':active_id}"
1794+ icon="terp-mail-replied" type="action" />
1795+ </xpath>
1796+ </field>
1797+ </record>
1798+ </data>
1799+</openerp>
1800\ No newline at end of file
1801
1802=== added directory 'project_communications_mailgate/security'
1803=== added file 'project_communications_mailgate/security/ir.model.access.csv'
1804=== added directory 'project_communications_mailgate_note'
1805=== renamed directory 'project_communications_mailgate_note' => 'project_communications_mailgate_note.moved'
1806=== added file 'project_communications_mailgate_note/__init__.py'
1807--- project_communications_mailgate_note/__init__.py 1970-01-01 00:00:00 +0000
1808+++ project_communications_mailgate_note/__init__.py 2013-02-19 14:36:22 +0000
1809@@ -0,0 +1,28 @@
1810+# -*- coding: utf-8 -*-
1811+##############################################################################
1812+#
1813+# project_mailgate_note module for OpenERP, Add buttons to add notes and send mail into history tab
1814+# Copyright (C) 2011 SYLEAM Info Services (<http://www.Syleam.fr/>)
1815+# Sylvain Garancher <sylvain.garancher@syleam.fr>
1816+#
1817+# This file is a part of project_mailgate_note
1818+#
1819+# project_mailgate_note is free software: you can redistribute it and/or modify
1820+# it under the terms of the GNU Affero General Public License as published by
1821+# the Free Software Foundation, either version 3 of the License, or
1822+# (at your option) any later version.
1823+#
1824+# project_mailgate_note is distributed in the hope that it will be useful,
1825+# but WITHOUT ANY WARRANTY; without even the implied warranty of
1826+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1827+# GNU Affero General Public License for more details.
1828+#
1829+# You should have received a copy of the GNU Affero General Public License
1830+# along with this program. If not, see <http://www.gnu.org/licenses/>.
1831+#
1832+##############################################################################
1833+
1834+
1835+import wizard
1836+
1837+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
1838
1839=== added file 'project_communications_mailgate_note/__openerp__.py'
1840--- project_communications_mailgate_note/__openerp__.py 1970-01-01 00:00:00 +0000
1841+++ project_communications_mailgate_note/__openerp__.py 2013-02-19 14:36:22 +0000
1842@@ -0,0 +1,57 @@
1843+# -*- coding: utf-8 -*-
1844+##############################################################################
1845+#
1846+# Copyright (C) 2011 Eficent (<http://www.eficent.com/>)
1847+# Jordi Ballester Alomar <jordi.ballester@eficent.com>
1848+#
1849+# This program is free software: you can redistribute it and/or modify
1850+# it under the terms of the GNU Affero General Public License as
1851+# published by the Free Software Foundation, either version 3 of the
1852+# License, or (at your option) any later version.
1853+#
1854+# This program is distributed in the hope that it will be useful,
1855+# but WITHOUT ANY WARRANTY; without even the implied warranty of
1856+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1857+# GNU Affero General Public License for more details.
1858+#
1859+# You should have received a copy of the GNU Affero General Public License
1860+# along with this program. If not, see <http://www.gnu.org/licenses/>.
1861+#
1862+##############################################################################
1863+
1864+
1865+{
1866+ 'name': 'Project Mailgate Note for Projects',
1867+ 'version': '1.0',
1868+ 'category': 'Generic Modules/Projects & Services',
1869+ 'description': """This module allows to add a note or send an email from the history tab in the project form view.""",
1870+ "author": "Eficent, Nervia Consultores",
1871+ "website": "",
1872+ 'depends': [
1873+ 'base',
1874+ 'crm',
1875+ 'project_communications_mailgate',
1876+ ],
1877+ 'init_xml': [],
1878+ 'images': [
1879+ 'images/accueil.png',
1880+ 'images/send_mail.png',
1881+ 'images/history.png',
1882+ ],
1883+ 'update_xml': [
1884+ #'security/ir.model.access.csv',
1885+ #'wizard/wizard.xml',
1886+ 'wizard/project_communications_add_note_view.xml',
1887+ 'wizard/project_communications_send_email_view.xml',
1888+ 'project_communications_mailgate_note_view.xml',
1889+ ],
1890+ 'demo_xml': [],
1891+ 'test': [],
1892+ #'external_dependancies': {'python': ['kombu'], 'bin': ['which']},
1893+ #SIN ADAPTAR
1894+ 'installable': False,
1895+ 'active': False,
1896+ 'license': 'AGPL-3',
1897+}
1898+
1899+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
1900
1901=== added directory 'project_communications_mailgate_note/i18n'
1902=== added file 'project_communications_mailgate_note/i18n/es.po'
1903--- project_communications_mailgate_note/i18n/es.po 1970-01-01 00:00:00 +0000
1904+++ project_communications_mailgate_note/i18n/es.po 2013-02-19 14:36:22 +0000
1905@@ -0,0 +1,286 @@
1906+# Translation of OpenERP Server.
1907+# This file contains the translation of the following modules:
1908+# * project_communications_mailgate_note
1909+#
1910+msgid ""
1911+msgstr ""
1912+"Project-Id-Version: OpenERP Server 6.0.3\n"
1913+"Report-Msgid-Bugs-To: support@openerp.com\n"
1914+"POT-Creation-Date: 2011-09-03 11:48+0000\n"
1915+"PO-Revision-Date: 2011-09-03 20:03+0100\n"
1916+"Last-Translator: Jordi Ballester Alomar (Avangard Enterprise Information Systems) <jordi.ballester@avangard-eis.com>\n"
1917+"Language-Team: \n"
1918+"MIME-Version: 1.0\n"
1919+"Content-Type: text/plain; charset=UTF-8\n"
1920+"Content-Transfer-Encoding: 8bit\n"
1921+"Plural-Forms: \n"
1922+
1923+#. module: project_communications_mailgate_note
1924+#: selection:project.add.note,state:0
1925+#: selection:project.send.mail,state:0
1926+msgid "In Progress"
1927+msgstr "En curso"
1928+
1929+#. module: project_communications_mailgate_note
1930+#: help:project.send.mail,email_cc:0
1931+msgid "These addresses will receive a copy of this email. To modify the permanent CC list, edit the global CC field of this case"
1932+msgstr "Estas direcciones recibirán una copia de este correo electrónico. Para modificar la lista de CC permanente, edite el campo CC global de este caso"
1933+
1934+#. module: project_communications_mailgate_note
1935+#: field:project.send.mail,email_from:0
1936+msgid "From"
1937+msgstr "De"
1938+
1939+#. module: project_communications_mailgate_note
1940+#: view:project.project:0
1941+msgid "History Information"
1942+msgstr "Información de la Historia"
1943+
1944+#. module: project_communications_mailgate_note
1945+#: help:project.send.mail,html:0
1946+msgid "Select this if you want to send email with HTML formatting."
1947+msgstr "Seleccione esta opción si desea enviar correo electrónico con formato HTML."
1948+
1949+#. module: project_communications_mailgate_note
1950+#: field:project.send.mail.attachment,wizard_id:0
1951+msgid "Wizard"
1952+msgstr "Asistente"
1953+
1954+#. module: project_communications_mailgate_note
1955+#: code:addons/project_communications_mailgate_note/wizard/project_communications_add_note.py:38
1956+#: view:project.add.note:0
1957+#, python-format
1958+msgid "Note"
1959+msgstr "Nota"
1960+
1961+#. module: project_communications_mailgate_note
1962+#: field:project.send.mail,email_to:0
1963+msgid "To"
1964+msgstr "Para"
1965+
1966+#. module: project_communications_mailgate_note
1967+#: view:project.project:0
1968+msgid "Send New Email"
1969+msgstr "Enviar nuevo mensaje"
1970+
1971+#. module: project_communications_mailgate_note
1972+#: model:ir.actions.act_window,name:project_communications_mailgate_note.action_project_add_note
1973+#: view:project.add.note:0
1974+msgid "Add Note"
1975+msgstr "Añadir nota"
1976+
1977+#. module: project_communications_mailgate_note
1978+#: selection:project.add.note,state:0
1979+#: selection:project.send.mail,state:0
1980+msgid "Draft"
1981+msgstr "Borrador"
1982+
1983+#. module: project_communications_mailgate_note
1984+#: view:project.add.note:0
1985+#: view:project.send.mail:0
1986+#: field:project.send.mail.attachment,binary:0
1987+msgid "Attachment"
1988+msgstr "Fichero adjunto"
1989+
1990+#. module: project_communications_mailgate_note
1991+#: view:project.project:0
1992+msgid "Reply"
1993+msgstr "Respuesta"
1994+
1995+#. module: project_communications_mailgate_note
1996+#: field:project.send.mail,html:0
1997+msgid "HTML formatting?"
1998+msgstr "Formato HTML?"
1999+
2000+#. module: project_communications_mailgate_note
2001+#: selection:project.add.note,state:0
2002+#: selection:project.send.mail,state:0
2003+msgid "Pending"
2004+msgstr "Pendiente"
2005+
2006+#. module: project_communications_mailgate_note
2007+#: view:project.send.mail:0
2008+msgid " "
2009+msgstr " "
2010+
2011+#. module: project_communications_mailgate_note
2012+#: field:project.add.note,attachment_ids:0
2013+#: field:project.send.mail,attachment_ids:0
2014+msgid "unknown"
2015+msgstr "desconocido"
2016+
2017+#. module: project_communications_mailgate_note
2018+#: code:addons/project_communications_mailgate_note/wizard/project_communications_add_note.py:24
2019+#, python-format
2020+msgid "Can not add note!"
2021+msgstr "No se puede agregar la nota!"
2022+
2023+#. module: project_communications_mailgate_note
2024+#: model:ir.actions.act_window,name:project_communications_mailgate_note.action_project_reply_mail
2025+#: view:project.send.mail:0
2026+msgid "Reply to last Mail"
2027+msgstr "Responder al último e-mail"
2028+
2029+#. module: project_communications_mailgate_note
2030+#: model:ir.module.module,description:project_communications_mailgate_note.module_meta_information
2031+msgid "This module allows to add a note or send an email from the history tab in the task form view."
2032+msgstr "Este módulo permite agregar una nota o enviar un correo electrónico de la ficha de la historia en la vista Formulario de tareas."
2033+
2034+#. module: project_communications_mailgate_note
2035+#: help:project.send.mail,reply_to:0
2036+msgid "Reply-to of the Sales team defined on this case"
2037+msgstr "Responder al equipo de ventas que se define en este caso"
2038+
2039+#. module: project_communications_mailgate_note
2040+#: code:addons/project_communications_mailgate_note/wizard/project_communications_send_email.py:143
2041+#, python-format
2042+msgid "Unable to send mail. Please check SMTP is configured properly."
2043+msgstr "No se puede enviar por correo. Por favor, compruebe que el SMTP está configurado correctamente."
2044+
2045+#. module: project_communications_mailgate_note
2046+#: field:project.send.mail,subject:0
2047+msgid "Subject"
2048+msgstr "Asunto"
2049+
2050+#. module: project_communications_mailgate_note
2051+#: model:ir.model,name:project_communications_mailgate_note.model_project_add_note
2052+#: view:project.project:0
2053+msgid "Add Internal Note"
2054+msgstr "Añadir nota interna"
2055+
2056+#. module: project_communications_mailgate_note
2057+#: field:project.send.mail.attachment,name:0
2058+msgid "Name"
2059+msgstr "Nombre"
2060+
2061+#. module: project_communications_mailgate_note
2062+#: field:project.send.mail,email_cc:0
2063+msgid "CC"
2064+msgstr "CC"
2065+
2066+#. module: project_communications_mailgate_note
2067+#: model:ir.actions.act_window,name:project_communications_mailgate_note.action_project_send_mail
2068+#: view:project.send.mail:0
2069+msgid "Send Mail"
2070+msgstr "Enviar correo"
2071+
2072+#. module: project_communications_mailgate_note
2073+#: code:addons/project_communications_mailgate_note/wizard/project_communications_send_email.py:143
2074+#, python-format
2075+msgid "Error!"
2076+msgstr "Error!"
2077+
2078+#. module: project_communications_mailgate_note
2079+#: code:addons/project_communications_mailgate_note/wizard/project_communications_add_note.py:24
2080+#: code:addons/project_communications_mailgate_note/wizard/project_communications_send_email.py:74
2081+#: code:addons/project_communications_mailgate_note/wizard/project_communications_send_email.py:169
2082+#: code:addons/project_communications_mailgate_note/wizard/project_communications_send_email.py:288
2083+#, python-format
2084+msgid "Error"
2085+msgstr "Error"
2086+
2087+#. module: project_communications_mailgate_note
2088+#: selection:project.add.note,state:0
2089+#: selection:project.send.mail,state:0
2090+msgid "Cancelled"
2091+msgstr "Cancelado"
2092+
2093+#. module: project_communications_mailgate_note
2094+#: field:project.add.note,body:0
2095+msgid "Note Body"
2096+msgstr "Cuerpo de la Nota"
2097+
2098+#. module: project_communications_mailgate_note
2099+#: view:project.send.mail:0
2100+msgid "_Send Reply"
2101+msgstr "_Enviar Respuesta"
2102+
2103+#. module: project_communications_mailgate_note
2104+#: model:ir.module.module,shortdesc:project_communications_mailgate_note.module_meta_information
2105+msgid "Project Mailgate Note for Projects"
2106+msgstr "Project Mailgate Note for Projects"
2107+
2108+#. module: project_communications_mailgate_note
2109+#: view:project.project:0
2110+msgid "History"
2111+msgstr "Historia"
2112+
2113+#. module: project_communications_mailgate_note
2114+#: view:project.add.note:0
2115+#: view:project.project:0
2116+#: view:project.send.mail:0
2117+msgid "Attachments"
2118+msgstr "Ficheros Adjuntos"
2119+
2120+#. module: project_communications_mailgate_note
2121+#: model:ir.model,name:project_communications_mailgate_note.model_project_send_mail_attachment
2122+msgid "project.send.mail.attachment"
2123+msgstr "project.send.mail.attachment"
2124+
2125+#. module: project_communications_mailgate_note
2126+#: view:project.send.mail:0
2127+msgid "_Send"
2128+msgstr "_Enviar"
2129+
2130+#. module: project_communications_mailgate_note
2131+#: code:addons/project_communications_mailgate_note/wizard/project_communications_send_email.py:74
2132+#: code:addons/project_communications_mailgate_note/wizard/project_communications_send_email.py:169
2133+#: code:addons/project_communications_mailgate_note/wizard/project_communications_send_email.py:288
2134+#, python-format
2135+msgid "Can not send mail!"
2136+msgstr "No se puede enviar el correo!"
2137+
2138+#. module: project_communications_mailgate_note
2139+#: selection:project.add.note,state:0
2140+#: selection:project.send.mail,state:0
2141+msgid "Unchanged"
2142+msgstr "Sin cambios"
2143+
2144+#. module: project_communications_mailgate_note
2145+#: field:project.send.mail,body:0
2146+msgid "Message Body"
2147+msgstr "Cuerpo del Mensaje"
2148+
2149+#. module: project_communications_mailgate_note
2150+#: model:ir.model,name:project_communications_mailgate_note.model_project_send_mail
2151+msgid "Send new email"
2152+msgstr "Enviar nuevo email"
2153+
2154+#. module: project_communications_mailgate_note
2155+#: view:project.add.note:0
2156+msgid "_Add"
2157+msgstr "_Añadir"
2158+
2159+#. module: project_communications_mailgate_note
2160+#: field:project.add.note,state:0
2161+#: field:project.send.mail,state:0
2162+msgid "Set New State To"
2163+msgstr "Fijar Nuevo Estado A"
2164+
2165+#. module: project_communications_mailgate_note
2166+#: view:project.add.note:0
2167+#: view:project.send.mail:0
2168+msgid "_Cancel"
2169+msgstr "_Cancelar"
2170+
2171+#. module: project_communications_mailgate_note
2172+#: selection:project.add.note,state:0
2173+#: selection:project.send.mail,state:0
2174+msgid "Close"
2175+msgstr "Cerrar"
2176+
2177+#. module: project_communications_mailgate_note
2178+#: view:project.send.mail:0
2179+msgid "Message"
2180+msgstr "Mensaje"
2181+
2182+#. module: project_communications_mailgate_note
2183+#: field:project.send.mail,reply_to:0
2184+msgid "Reply To"
2185+msgstr "Responder A"
2186+
2187+#. module: project_communications_mailgate_note
2188+#: view:project.project:0
2189+msgid "Details"
2190+msgstr "Detalles"
2191+
2192
2193=== added file 'project_communications_mailgate_note/i18n/project_communications_mailgate_note.pot'
2194--- project_communications_mailgate_note/i18n/project_communications_mailgate_note.pot 1970-01-01 00:00:00 +0000
2195+++ project_communications_mailgate_note/i18n/project_communications_mailgate_note.pot 2013-02-19 14:36:22 +0000
2196@@ -0,0 +1,286 @@
2197+# Translation of OpenERP Server.
2198+# This file contains the translation of the following modules:
2199+# * project_communications_mailgate_note
2200+#
2201+msgid ""
2202+msgstr ""
2203+"Project-Id-Version: OpenERP Server 6.0.3\n"
2204+"Report-Msgid-Bugs-To: support@openerp.com\n"
2205+"POT-Creation-Date: 2011-09-03 11:48+0000\n"
2206+"PO-Revision-Date: 2011-09-03 11:48+0000\n"
2207+"Last-Translator: <>\n"
2208+"Language-Team: \n"
2209+"MIME-Version: 1.0\n"
2210+"Content-Type: text/plain; charset=UTF-8\n"
2211+"Content-Transfer-Encoding: \n"
2212+"Plural-Forms: \n"
2213+
2214+#. module: project_communications_mailgate_note
2215+#: selection:project.add.note,state:0
2216+#: selection:project.send.mail,state:0
2217+msgid "In Progress"
2218+msgstr ""
2219+
2220+#. module: project_communications_mailgate_note
2221+#: help:project.send.mail,email_cc:0
2222+msgid "These addresses will receive a copy of this email. To modify the permanent CC list, edit the global CC field of this case"
2223+msgstr ""
2224+
2225+#. module: project_communications_mailgate_note
2226+#: field:project.send.mail,email_from:0
2227+msgid "From"
2228+msgstr ""
2229+
2230+#. module: project_communications_mailgate_note
2231+#: view:project.project:0
2232+msgid "History Information"
2233+msgstr ""
2234+
2235+#. module: project_communications_mailgate_note
2236+#: help:project.send.mail,html:0
2237+msgid "Select this if you want to send email with HTML formatting."
2238+msgstr ""
2239+
2240+#. module: project_communications_mailgate_note
2241+#: field:project.send.mail.attachment,wizard_id:0
2242+msgid "Wizard"
2243+msgstr ""
2244+
2245+#. module: project_communications_mailgate_note
2246+#: code:addons/project_communications_mailgate_note/wizard/project_communications_add_note.py:38
2247+#: view:project.add.note:0
2248+#, python-format
2249+msgid "Note"
2250+msgstr ""
2251+
2252+#. module: project_communications_mailgate_note
2253+#: field:project.send.mail,email_to:0
2254+msgid "To"
2255+msgstr ""
2256+
2257+#. module: project_communications_mailgate_note
2258+#: view:project.project:0
2259+msgid "Send New Email"
2260+msgstr ""
2261+
2262+#. module: project_communications_mailgate_note
2263+#: model:ir.actions.act_window,name:project_communications_mailgate_note.action_project_add_note
2264+#: view:project.add.note:0
2265+msgid "Add Note"
2266+msgstr ""
2267+
2268+#. module: project_communications_mailgate_note
2269+#: selection:project.add.note,state:0
2270+#: selection:project.send.mail,state:0
2271+msgid "Draft"
2272+msgstr ""
2273+
2274+#. module: project_communications_mailgate_note
2275+#: view:project.add.note:0
2276+#: view:project.send.mail:0
2277+#: field:project.send.mail.attachment,binary:0
2278+msgid "Attachment"
2279+msgstr ""
2280+
2281+#. module: project_communications_mailgate_note
2282+#: view:project.project:0
2283+msgid "Reply"
2284+msgstr ""
2285+
2286+#. module: project_communications_mailgate_note
2287+#: field:project.send.mail,html:0
2288+msgid "HTML formatting?"
2289+msgstr ""
2290+
2291+#. module: project_communications_mailgate_note
2292+#: selection:project.add.note,state:0
2293+#: selection:project.send.mail,state:0
2294+msgid "Pending"
2295+msgstr ""
2296+
2297+#. module: project_communications_mailgate_note
2298+#: view:project.send.mail:0
2299+msgid " "
2300+msgstr ""
2301+
2302+#. module: project_communications_mailgate_note
2303+#: field:project.add.note,attachment_ids:0
2304+#: field:project.send.mail,attachment_ids:0
2305+msgid "unknown"
2306+msgstr ""
2307+
2308+#. module: project_communications_mailgate_note
2309+#: code:addons/project_communications_mailgate_note/wizard/project_communications_add_note.py:24
2310+#, python-format
2311+msgid "Can not add note!"
2312+msgstr ""
2313+
2314+#. module: project_communications_mailgate_note
2315+#: model:ir.actions.act_window,name:project_communications_mailgate_note.action_project_reply_mail
2316+#: view:project.send.mail:0
2317+msgid "Reply to last Mail"
2318+msgstr ""
2319+
2320+#. module: project_communications_mailgate_note
2321+#: model:ir.module.module,description:project_communications_mailgate_note.module_meta_information
2322+msgid "This module allows to add a note or send an email from the history tab in the task form view."
2323+msgstr ""
2324+
2325+#. module: project_communications_mailgate_note
2326+#: help:project.send.mail,reply_to:0
2327+msgid "Reply-to of the Sales team defined on this case"
2328+msgstr ""
2329+
2330+#. module: project_communications_mailgate_note
2331+#: code:addons/project_communications_mailgate_note/wizard/project_communications_send_email.py:143
2332+#, python-format
2333+msgid "Unable to send mail. Please check SMTP is configured properly."
2334+msgstr ""
2335+
2336+#. module: project_communications_mailgate_note
2337+#: field:project.send.mail,subject:0
2338+msgid "Subject"
2339+msgstr ""
2340+
2341+#. module: project_communications_mailgate_note
2342+#: model:ir.model,name:project_communications_mailgate_note.model_project_add_note
2343+#: view:project.project:0
2344+msgid "Add Internal Note"
2345+msgstr ""
2346+
2347+#. module: project_communications_mailgate_note
2348+#: field:project.send.mail.attachment,name:0
2349+msgid "Name"
2350+msgstr ""
2351+
2352+#. module: project_communications_mailgate_note
2353+#: field:project.send.mail,email_cc:0
2354+msgid "CC"
2355+msgstr ""
2356+
2357+#. module: project_communications_mailgate_note
2358+#: model:ir.actions.act_window,name:project_communications_mailgate_note.action_project_send_mail
2359+#: view:project.send.mail:0
2360+msgid "Send Mail"
2361+msgstr ""
2362+
2363+#. module: project_communications_mailgate_note
2364+#: code:addons/project_communications_mailgate_note/wizard/project_communications_send_email.py:143
2365+#, python-format
2366+msgid "Error!"
2367+msgstr ""
2368+
2369+#. module: project_communications_mailgate_note
2370+#: code:addons/project_communications_mailgate_note/wizard/project_communications_add_note.py:24
2371+#: code:addons/project_communications_mailgate_note/wizard/project_communications_send_email.py:74
2372+#: code:addons/project_communications_mailgate_note/wizard/project_communications_send_email.py:169
2373+#: code:addons/project_communications_mailgate_note/wizard/project_communications_send_email.py:288
2374+#, python-format
2375+msgid "Error"
2376+msgstr ""
2377+
2378+#. module: project_communications_mailgate_note
2379+#: selection:project.add.note,state:0
2380+#: selection:project.send.mail,state:0
2381+msgid "Cancelled"
2382+msgstr ""
2383+
2384+#. module: project_communications_mailgate_note
2385+#: field:project.add.note,body:0
2386+msgid "Note Body"
2387+msgstr ""
2388+
2389+#. module: project_communications_mailgate_note
2390+#: view:project.send.mail:0
2391+msgid "_Send Reply"
2392+msgstr ""
2393+
2394+#. module: project_communications_mailgate_note
2395+#: model:ir.module.module,shortdesc:project_communications_mailgate_note.module_meta_information
2396+msgid "Project Mailgate Note for Projects"
2397+msgstr ""
2398+
2399+#. module: project_communications_mailgate_note
2400+#: view:project.project:0
2401+msgid "History"
2402+msgstr ""
2403+
2404+#. module: project_communications_mailgate_note
2405+#: view:project.add.note:0
2406+#: view:project.project:0
2407+#: view:project.send.mail:0
2408+msgid "Attachments"
2409+msgstr ""
2410+
2411+#. module: project_communications_mailgate_note
2412+#: model:ir.model,name:project_communications_mailgate_note.model_project_send_mail_attachment
2413+msgid "project.send.mail.attachment"
2414+msgstr ""
2415+
2416+#. module: project_communications_mailgate_note
2417+#: view:project.send.mail:0
2418+msgid "_Send"
2419+msgstr ""
2420+
2421+#. module: project_communications_mailgate_note
2422+#: code:addons/project_communications_mailgate_note/wizard/project_communications_send_email.py:74
2423+#: code:addons/project_communications_mailgate_note/wizard/project_communications_send_email.py:169
2424+#: code:addons/project_communications_mailgate_note/wizard/project_communications_send_email.py:288
2425+#, python-format
2426+msgid "Can not send mail!"
2427+msgstr ""
2428+
2429+#. module: project_communications_mailgate_note
2430+#: selection:project.add.note,state:0
2431+#: selection:project.send.mail,state:0
2432+msgid "Unchanged"
2433+msgstr ""
2434+
2435+#. module: project_communications_mailgate_note
2436+#: field:project.send.mail,body:0
2437+msgid "Message Body"
2438+msgstr ""
2439+
2440+#. module: project_communications_mailgate_note
2441+#: model:ir.model,name:project_communications_mailgate_note.model_project_send_mail
2442+msgid "Send new email"
2443+msgstr ""
2444+
2445+#. module: project_communications_mailgate_note
2446+#: view:project.add.note:0
2447+msgid "_Add"
2448+msgstr ""
2449+
2450+#. module: project_communications_mailgate_note
2451+#: field:project.add.note,state:0
2452+#: field:project.send.mail,state:0
2453+msgid "Set New State To"
2454+msgstr ""
2455+
2456+#. module: project_communications_mailgate_note
2457+#: view:project.add.note:0
2458+#: view:project.send.mail:0
2459+msgid "_Cancel"
2460+msgstr ""
2461+
2462+#. module: project_communications_mailgate_note
2463+#: selection:project.add.note,state:0
2464+#: selection:project.send.mail,state:0
2465+msgid "Close"
2466+msgstr ""
2467+
2468+#. module: project_communications_mailgate_note
2469+#: view:project.send.mail:0
2470+msgid "Message"
2471+msgstr ""
2472+
2473+#. module: project_communications_mailgate_note
2474+#: field:project.send.mail,reply_to:0
2475+msgid "Reply To"
2476+msgstr ""
2477+
2478+#. module: project_communications_mailgate_note
2479+#: view:project.project:0
2480+msgid "Details"
2481+msgstr ""
2482+
2483
2484=== added directory 'project_communications_mailgate_note/images'
2485=== added file 'project_communications_mailgate_note/images/accueil.png'
2486Binary files project_communications_mailgate_note/images/accueil.png 1970-01-01 00:00:00 +0000 and project_communications_mailgate_note/images/accueil.png 2013-02-19 14:36:22 +0000 differ
2487=== added file 'project_communications_mailgate_note/images/history.png'
2488Binary files project_communications_mailgate_note/images/history.png 1970-01-01 00:00:00 +0000 and project_communications_mailgate_note/images/history.png 2013-02-19 14:36:22 +0000 differ
2489=== added file 'project_communications_mailgate_note/images/send_mail.png'
2490Binary files project_communications_mailgate_note/images/send_mail.png 1970-01-01 00:00:00 +0000 and project_communications_mailgate_note/images/send_mail.png 2013-02-19 14:36:22 +0000 differ
2491=== added file 'project_communications_mailgate_note/project_communications_mailgate_note_view.xml'
2492--- project_communications_mailgate_note/project_communications_mailgate_note_view.xml 1970-01-01 00:00:00 +0000
2493+++ project_communications_mailgate_note/project_communications_mailgate_note_view.xml 2013-02-19 14:36:22 +0000
2494@@ -0,0 +1,37 @@
2495+<?xml version="1.0" encoding="UTF-8"?>
2496+<openerp>
2497+ <data>
2498+
2499+ <record id="view_project_mailgate_form2" model="ir.ui.view">
2500+ <field name="name">project.mailgate.form</field>
2501+ <field name="model">project.project</field>
2502+ <field name="type">form</field>
2503+ <field eval="40" name="priority"/>
2504+ <field name="inherit_id" ref="project.edit_project"/>
2505+ <field name="arch" type="xml">
2506+ <xpath expr="/form/sheet/notebook/page[@string='Other Info']" position="replace">
2507+ <page string="History">
2508+ <field name="message_ids" colspan="4" nolabel="1" mode="tree">
2509+ <tree string="History">
2510+ <field name="email_from" invisible="1"/>
2511+ <field name="attachment_ids" colspan="4" readonly="1" nolabel="1"/>
2512+ </tree>
2513+ </field>
2514+ </page>
2515+ </xpath>
2516+ <xpath expr="/form/header/button[@name='set_cancel']" position="after">
2517+ <button string="Add Internal Note"
2518+ name="%(action_project_add_note)d"
2519+ context="{'model': 'project.project' }"
2520+ icon="terp-document-new" type="action" />
2521+ <button string="Send New Email"
2522+ name="%(mail.action_email_compose_message_wizard)d"
2523+ context="{'default_composition_mode':'new', 'default_parent_id': active_id}"
2524+ states='received,sent,exception,cancel'
2525+ type="action" icon="terp-mail-replied"/>
2526+ </xpath>
2527+ </field>
2528+ </record>
2529+
2530+ </data>
2531+</openerp>
2532
2533=== added directory 'project_communications_mailgate_note/security'
2534=== added file 'project_communications_mailgate_note/security/ir.model.access.csv'
2535--- project_communications_mailgate_note/security/ir.model.access.csv 1970-01-01 00:00:00 +0000
2536+++ project_communications_mailgate_note/security/ir.model.access.csv 2013-02-19 14:36:22 +0000
2537@@ -0,0 +1,1 @@
2538+"id","name","model_id:id","group_id:id","perm_read","perm_write","perm_create","perm_unlink"
2539
2540=== added directory 'project_communications_mailgate_note/wizard'
2541=== added file 'project_communications_mailgate_note/wizard/__init__.py'
2542--- project_communications_mailgate_note/wizard/__init__.py 1970-01-01 00:00:00 +0000
2543+++ project_communications_mailgate_note/wizard/__init__.py 2013-02-19 14:36:22 +0000
2544@@ -0,0 +1,29 @@
2545+# -*- coding: utf-8 -*-
2546+##############################################################################
2547+#
2548+# project_mailgate_note module for OpenERP, Add buttons to add notes and send mail into history tab
2549+# Copyright (C) 2011 SYLEAM Info Services (<http://www.Syleam.fr/>)
2550+# Sylvain Garancher <sylvain.garancher@syleam.fr>
2551+#
2552+# This file is a part of project_mailgate_note
2553+#
2554+# project_mailgate_note is free software: you can redistribute it and/or modify
2555+# it under the terms of the GNU Affero General Public License as published by
2556+# the Free Software Foundation, either version 3 of the License, or
2557+# (at your option) any later version.
2558+#
2559+# project_mailgate_note is distributed in the hope that it will be useful,
2560+# but WITHOUT ANY WARRANTY; without even the implied warranty of
2561+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
2562+# GNU Affero General Public License for more details.
2563+#
2564+# You should have received a copy of the GNU Affero General Public License
2565+# along with this program. If not, see <http://www.gnu.org/licenses/>.
2566+#
2567+##############################################################################
2568+
2569+
2570+import project_communications_add_note
2571+import project_communications_send_email
2572+
2573+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
2574
2575=== added file 'project_communications_mailgate_note/wizard/project_communications_add_note.py'
2576--- project_communications_mailgate_note/wizard/project_communications_add_note.py 1970-01-01 00:00:00 +0000
2577+++ project_communications_mailgate_note/wizard/project_communications_add_note.py 2013-02-19 14:36:22 +0000
2578@@ -0,0 +1,59 @@
2579+from osv import fields, osv
2580+from tools.translate import _
2581+import base64
2582+
2583+AVAILABLE_STATES = [('draft', 'Draft'),('open', 'In Progress'),('pending', 'Pending'), ('cancelled', 'Cancelled'), ('close', 'Close'), ('unchanged', 'Unchanged')]
2584+
2585+class project_add_note(osv.osv_memory):
2586+ """Adds a new note to the case."""
2587+ _name = 'project.add.note'
2588+ _description = "Add Internal Note"
2589+
2590+ _columns = {
2591+ 'body': fields.text('Note Body', required=True),
2592+ 'state': fields.selection(AVAILABLE_STATES, string='Set New State To',
2593+ required=True),
2594+ 'attachment_ids' : fields.one2many('project.send.mail.attachment', 'wizard_id'),
2595+ }
2596+
2597+ def action_add(self, cr, uid, ids, context=None):
2598+ if context is None:
2599+ context = {}
2600+
2601+ if not context.get('active_model'):
2602+ raise osv.except_osv(_('Error'), _('Can not add note!'))
2603+
2604+ model = context.get('active_model')
2605+ case_pool = self.pool.get(model)
2606+
2607+ for obj in self.browse(cr, uid, ids, context=context):
2608+ case_list = case_pool.browse(cr, uid, context['active_ids'],
2609+ context=context)
2610+ case = case_list[0]
2611+ user_obj = self.pool.get('res.users')
2612+ user_name = user_obj.browse(cr, uid, [uid], context=context)[0].name
2613+ attach = [
2614+ (x.name, base64.decodestring(x.binary)) for x in obj.attachment_ids
2615+ ]
2616+# case_pool.history(cr, uid, [case], _("Note"), history=False,
2617+# details=obj.body, email_from=user_name, attach=attach)
2618+
2619+ if obj.state == 'unchanged':
2620+ pass
2621+ elif obj.state == 'close':
2622+ case_pool.do_close(cr, uid, [case.id])
2623+ elif obj.state in ['draft', 'cancel', 'open', 'pending']:
2624+ act = 'do_' + obj.state
2625+ getattr(case_pool, act)(cr, uid, [case.id])
2626+
2627+ return {'type': 'ir.actions.act_window_close'}
2628+
2629+ def default_get(self, cr, uid, fields, context=None):
2630+ """
2631+ This function gets default values
2632+ """
2633+ return {'state': u'unchanged'}
2634+
2635+
2636+project_add_note()
2637+
2638
2639=== added file 'project_communications_mailgate_note/wizard/project_communications_add_note_view.xml'
2640--- project_communications_mailgate_note/wizard/project_communications_add_note_view.xml 1970-01-01 00:00:00 +0000
2641+++ project_communications_mailgate_note/wizard/project_communications_add_note_view.xml 2013-02-19 14:36:22 +0000
2642@@ -0,0 +1,54 @@
2643+<?xml version="1.0"?>
2644+<openerp>
2645+ <data>
2646+
2647+<!-- Add New Note view -->
2648+
2649+ <record model="ir.ui.view" id="project_add_new_note_view">
2650+ <field name="name">project.new.add.note.form</field>
2651+ <field name="model">project.add.note</field>
2652+ <field name="type">form</field>
2653+ <field name="arch" type="xml">
2654+ <form string="Add Note" col="4">
2655+ <separator string="Add Note" colspan="6"/>
2656+ <notebook colspan="6">
2657+ <page string="Note">
2658+ <field name="body" nolabel="1" colspan="4" default_focus="1"/>
2659+ </page>
2660+ <page string="Attachments">
2661+ <field name="attachment_ids" colspan="4" nolabel="1">
2662+ <form string="Attachment">
2663+ <field name="binary" filename="name" />
2664+ <field name="name" />
2665+ </form>
2666+ <tree string="Attachments">
2667+ <field name="name" />
2668+ </tree>
2669+ </field>
2670+ </page>
2671+ </notebook>
2672+ <separator string="" colspan="6"/>
2673+ <group colspan="6" col="4" >
2674+ <field name="state" />
2675+ <button string="_Cancel" icon="gtk-cancel" special="cancel" />
2676+ <button name="action_add" type="object" string="_Add" icon="gtk-ok" />
2677+ </group>
2678+ </form>
2679+ </field>
2680+ </record>
2681+
2682+<!-- Add New Note action -->
2683+
2684+ <record model="ir.actions.act_window" id="action_project_add_note">
2685+ <field name="name">Add Note</field>
2686+ <field name="res_model">project.add.note</field>
2687+ <field name="domain">[('state','=','unchanged')]</field>
2688+ <field name="view_type">form</field>
2689+ <field name="view_mode">form</field>
2690+ <field name="view_id" ref="project_add_new_note_view"/>
2691+ <field name="target">new</field>
2692+ </record>
2693+
2694+ </data>
2695+</openerp>
2696+
2697
2698=== added file 'project_communications_mailgate_note/wizard/project_communications_send_email.py'
2699--- project_communications_mailgate_note/wizard/project_communications_send_email.py 1970-01-01 00:00:00 +0000
2700+++ project_communications_mailgate_note/wizard/project_communications_send_email.py 2013-02-19 14:36:22 +0000
2701@@ -0,0 +1,292 @@
2702+# -*- coding: utf-8 -*-
2703+##############################################################################
2704+#
2705+# OpenERP, Open Source Management Solution
2706+# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>). All Rights Reserved
2707+# $Id$
2708+#
2709+# This program is free software: you can redistribute it and/or modify
2710+# it under the terms of the GNU Affero General Public License as published by
2711+# the Free Software Foundation, either version 3 of the License, or
2712+# (at your option) any later version.
2713+#
2714+# This program is distributed in the hope that it will be useful,
2715+# but WITHOUT ANY WARRANTY; without even the implied warranty of
2716+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
2717+# GNU Affero General Public License for more details.
2718+#
2719+# You should have received a copy of the GNU Affero General Public License
2720+# along with this program. If not, see <http://www.gnu.org/licenses/>.
2721+#
2722+##############################################################################
2723+
2724+from osv import osv, fields
2725+from tools.translate import _
2726+import base64
2727+import itertools
2728+import tools
2729+import re
2730+
2731+
2732+AVAILABLE_STATES = [('unchanged', 'Unchanged'),('draft', 'Draft'),('open', 'In Progress'),('pending', 'Pending'), ('cancelled', 'Cancelled'), ('close', 'Close')]
2733+
2734+
2735+class project_send_new_email_attachment(osv.osv_memory):
2736+ _name = 'project.send.mail.attachment'
2737+
2738+ _columns = {
2739+ 'binary' : fields.binary('Attachment', required=True),
2740+ 'name' : fields.char('Name', size=128, required=True),
2741+ 'wizard_id' : fields.many2one('project.send.mail', 'Wizard', required=True),
2742+ }
2743+
2744+
2745+
2746+project_send_new_email_attachment()
2747+
2748+class project_send_new_email(osv.osv_memory):
2749+ """ Sends new email for the case"""
2750+ _name = "project.send.mail"
2751+ _description = "Send new email"
2752+
2753+ _columns = {
2754+ 'email_to' : fields.char('To', size=512, required=True),
2755+ 'email_from' : fields.char('From', size=128, required=True),
2756+ 'reply_to' : fields.char('Reply To', size=128, required=True, help="Reply-to of the Sales team defined on this case"),
2757+ 'email_cc' : fields.char('CC', size=512, help="These addresses will receive a copy of this email. To modify the permanent CC list, edit the global CC field of this case"),
2758+ 'subject': fields.char('Subject', size=512, required=True),
2759+ 'body': fields.text('Message Body', required=True),
2760+ 'state': fields.selection(AVAILABLE_STATES, string='Set New State To', required=True),
2761+ 'attachment_ids' : fields.one2many('project.send.mail.attachment', 'wizard_id'),
2762+ 'html': fields.boolean('HTML formatting?', help="Select this if you want to send email with HTML formatting."),
2763+ }
2764+
2765+
2766+ def action_send(self, cr, uid, ids, context=None):
2767+ """ This sends an email to ALL the addresses of the selected partners.
2768+ """
2769+ hist_obj = self.pool.get('mailgate.message')
2770+
2771+ if context is None:
2772+ context = {}
2773+
2774+ if not context.get('active_model'):
2775+ raise osv.except_osv(_('Error'), _('Can not send mail!'))
2776+
2777+ model = context.get('active_model')
2778+ case_pool = self.pool.get(model)
2779+ res_id = context and context.get('active_id', False) or False
2780+
2781+ for obj in self.browse(cr, uid, ids, context=context):
2782+ attach = [
2783+ (x.name, base64.decodestring(x.binary)) for x in obj.attachment_ids
2784+ ]
2785+
2786+ subtype = 'plain'
2787+ message_id = None
2788+ ref_id = None
2789+
2790+ case = case_pool.browse(cr, uid, res_id, context=context)
2791+ if context.get('mail', 'new') == 'new':
2792+ if case.message_ids:
2793+ message_id = case.message_ids[0].message_id
2794+ elif context.get('mail') == 'forward':
2795+ # extract attachements from case and emails according to mode
2796+ attachments = []
2797+ attach_pool = self.pool.get('ir.attachment')
2798+ direct_attachments = attach_pool.search(cr, uid, [('res_model', '=', 'crm.lead'), ('res_id', '=', res_id)], context=context)
2799+ attachments += attach_pool.browse(cr, uid, direct_attachments, context=context)
2800+ if obj.history in ['latest', 'whole'] and case.message_ids:
2801+ msgs = case.message_ids
2802+ if obj.history == 'latest':
2803+ msgs = msgs[:1]
2804+ attachments.extend(itertools.chain(*[m.attachment_ids for m in msgs]))
2805+ attach_all = [(a.datas_fname or a.name, base64.decodestring(a.datas)) for a in attachments if a.datas]
2806+ attach += attach_all
2807+
2808+ else:
2809+ hist = hist_obj.browse(cr, uid, res_id, context=context)
2810+ message_id = hist.message_id
2811+ model = hist.model
2812+ case_pool = self.pool.get(model)
2813+ res_id = hist.res_id
2814+ ref_id = hist.ref_id
2815+ case = case_pool.browse(cr, uid, res_id, context=context)
2816+ emails = re.findall(r'([^ ,<@]+@[^> ,]+)', obj.email_to or '')
2817+ email_cc = re.findall(r'([^ ,<@]+@[^> ,]+)', obj.email_cc or '')
2818+ emails = filter(None, emails)
2819+ body = obj.body
2820+
2821+ body = body and tools.ustr(body) or ''
2822+ email_from = getattr(obj, 'email_from', False)
2823+ x_headers = {}
2824+ if message_id:
2825+ x_headers['References'] = "%s" % (message_id)
2826+
2827+ if obj.html:
2828+ subtype = 'html'
2829+
2830+ flag = tools.email_send(
2831+ email_from,
2832+ emails,
2833+ obj.subject,
2834+ body,
2835+ email_cc=email_cc,
2836+ attach=attach,
2837+ subtype=subtype,
2838+ reply_to=obj.reply_to,
2839+ openobject_id=str(case.id),
2840+ x_headers=x_headers
2841+ )
2842+
2843+ if not flag:
2844+ raise osv.except_osv(_('Error!'), _('Unable to send mail. Please check SMTP is configured properly.'))
2845+
2846+ msg_dict = {'new': 'Send', 'reply': 'Reply', 'forward': 'Forward'}
2847+ case_pool.history(cr, uid, [case], _(msg_dict[context.get('mail', 'new')]), history=True, \
2848+ email=obj.email_to, details=body, \
2849+ subject=obj.subject, email_from=email_from, \
2850+ email_cc=', '.join(email_cc), message_id=message_id, \
2851+ references=ref_id or message_id, attach=attach)
2852+ if obj.state == 'unchanged':
2853+ pass
2854+ elif obj.state == 'done':
2855+ case_pool.do_close(cr, uid, [case.id])
2856+ elif obj.state in ['draft', 'cancel', 'open', 'pending']:
2857+ act = 'do_' + obj.state
2858+ getattr(case_pool, act)(cr, uid, [case.id])
2859+
2860+ return {'type': 'ir.actions.act_window_close'}
2861+
2862+ def default_get(self, cr, uid, fields, context=None):
2863+ """
2864+ This function gets default values
2865+ """
2866+ if context is None:
2867+ context = {}
2868+
2869+ if not context.get('active_model'):
2870+ raise osv.except_osv(_('Error'), _('Can not send mail!'))
2871+
2872+ res = super(project_send_new_email, self).default_get(cr, uid, fields, context=context)
2873+
2874+ if context.get('mail') == 'reply':
2875+ res.update(self.get_reply_defaults(cr, uid, fields, context=context))
2876+ return res
2877+
2878+ model = context.get('active_model')
2879+ mod_obj = self.pool.get(model)
2880+ res_id = context and context.get('active_ids', []) or []
2881+
2882+ user_obj = self.pool.get('res.users')
2883+ user_mail_from = user_obj._get_email_from(cr, uid, [uid], context=context)[uid]
2884+
2885+
2886+ for case in mod_obj.browse(cr, uid, res_id, context=context):
2887+ if 'email_to' in fields:
2888+ user_mail_to = ''
2889+ if case.members:
2890+ for member in case.members:
2891+ if not user_mail_to :
2892+ user_mail_to = user_obj._get_email_from(cr, uid, [member.id], context=context)[member.id]
2893+ else:
2894+ user_mail_to += ', ' + user_obj._get_email_from(cr, uid, [member.id], context=context)[member.id]
2895+ res.update({'email_to': user_mail_to and tools.ustr(user_mail_to) or ''})
2896+ if 'email_from' in fields:
2897+ res.update({'email_from': user_mail_from and tools.ustr(user_mail_from) or ''})
2898+ if 'subject' in fields:
2899+ if case:
2900+ subject = '[' + case.complete_name + '] '
2901+ else:
2902+ subject = case.name
2903+ res.update({'subject': tools.ustr(context.get('subject', subject) or '')})
2904+ if 'email_cc' in fields:
2905+ user_mail_cc = ''
2906+ if case:
2907+ user_mail_cc = user_obj._get_email_from(cr, uid, [case.user_id.id], context=context)[case.user_id.id]
2908+ res.update({'email_cc': user_mail_cc and tools.ustr(user_mail_cc) or ''})
2909+ if 'body' in fields:
2910+ res.update({'body': u'\n'+(tools.ustr(case.user_id.signature or ''))})
2911+ if 'state' in fields:
2912+ res.update({'state': u'pending'})
2913+
2914+ return res
2915+
2916+ def get_reply_defaults(self, cr, uid, fields, context=None):
2917+ """
2918+ This function gets default values for reply mail
2919+ """
2920+ hist_obj = self.pool.get('mailgate.message')
2921+ res_ids = context and context.get('active_ids', []) or []
2922+
2923+ user_obj = self.pool.get('res.users')
2924+ user_mail_from = user_obj._get_email_from(cr, uid, [uid], context=context)[uid]
2925+
2926+ include_original = context and context.get('include_original', False) or False
2927+ res = {}
2928+ for hist in hist_obj.browse(cr, uid, res_ids, context=context):
2929+ model = hist.model
2930+
2931+ # In the case where the project does not exist in the database
2932+ if not model:
2933+ return {'type': 'ir.actions.act_window_close'}
2934+
2935+ model_pool = self.pool.get(model)
2936+ res_id = hist.res_id
2937+ case = model_pool.browse(cr, uid, res_id)
2938+ if 'email_to' in fields:
2939+ user_mail_to = ''
2940+ if case and case.members:
2941+ for member in case.members:
2942+ if not user_mail_to :
2943+ user_mail_to = user_obj._get_email_from(cr, uid, [member.id], context=context)[member.id]
2944+ else:
2945+ user_mail_to += ', ' + user_obj._get_email_from(cr, uid, [member.id], context=context)[member.id]
2946+ res.update({'email_to': user_mail_to and tools.ustr(user_mail_to) or ''})
2947+ if 'email_from' in fields:
2948+ res.update({'email_from': user_mail_from and tools.ustr(user_mail_from) or False})
2949+
2950+ signature = u'\n' + (tools.ustr(case.user_id.signature or '')) + u'\n'
2951+ original = [signature]
2952+
2953+ if include_original == True and 'body' in fields:
2954+ header = u'-------- Original Message --------'
2955+ sender = u'From: %s' %(tools.ustr(hist.email_from or ''))
2956+ to = u'To: %s' % (tools.ustr(hist.email_to or ''))
2957+ sentdate = u'Date: %s' % (tools.ustr(hist.date))
2958+ desc = u'\n%s'%(tools.ustr(hist.description))
2959+
2960+ original = [signature, header, sender, to, sentdate, desc]
2961+
2962+ res['body']= u'\n' + u'\n'.join(original)
2963+
2964+ if 'subject' in fields:
2965+ res.update({u'subject': u'Re: %s' %(tools.ustr(hist.name or ''))})
2966+ if 'email_cc' in fields:
2967+ user_mail_cc = ''
2968+ if case:
2969+ user_mail_cc = user_obj._get_email_from(cr, uid, [case.user_id.id], context=context)[case.user_id.id]
2970+ res.update({'email_cc': user_mail_cc and tools.ustr(user_mail_cc) or ''})
2971+ if 'state' in fields:
2972+ res['state'] = u'pending'
2973+ return res
2974+
2975+ def view_init(self, cr, uid, fields_list, context=None):
2976+ """
2977+ This function checks for precondition before wizard executes
2978+ @param self: The object pointer
2979+ @param cr: the current row, from the database cursor,
2980+ @param uid: the current user’s ID for security checks,
2981+ @param fields: List of fields for default value
2982+ @param context: A standard dictionary for contextual values
2983+
2984+ """
2985+ if context is None:
2986+ context = {}
2987+
2988+ if not context.get('active_model'):
2989+ raise osv.except_osv(_('Error'), _('Can not send mail!'))
2990+ return True
2991+
2992+project_send_new_email()
2993+
2994
2995=== added file 'project_communications_mailgate_note/wizard/project_communications_send_email_view.xml'
2996--- project_communications_mailgate_note/wizard/project_communications_send_email_view.xml 1970-01-01 00:00:00 +0000
2997+++ project_communications_mailgate_note/wizard/project_communications_send_email_view.xml 2013-02-19 14:36:22 +0000
2998@@ -0,0 +1,105 @@
2999+<?xml version="1.0"?>
3000+<openerp>
3001+ <data>
3002+
3003+<!-- Send New Mail view -->
3004+
3005+ <record model="ir.ui.view" id="project_send_new_mail_view">
3006+ <field name="name">project.new.send.mail.form</field>
3007+ <field name="model">project.send.mail</field>
3008+ <field name="type">form</field>
3009+ <field name="arch" type="xml">
3010+ <form string="Send Mail" col="4">
3011+ <group colspan="4" col="2">
3012+ <field name="email_from"/>
3013+ <field name="reply_to"/>
3014+ <field name="email_to" />
3015+ <field name="email_cc"/>
3016+ <field name="subject"/>
3017+ <field name="html"/>
3018+ </group>
3019+ <notebook colspan="6">
3020+ <page string="Message">
3021+ <field name="body" nolabel="1" colspan="4" default_focus="1"/>
3022+ </page>
3023+ <page string="Attachments">
3024+ <field name="attachment_ids" colspan="4" nolabel="1">
3025+ <form string="Attachment">
3026+ <field name="binary" filename="name" />
3027+ <field name="name" />
3028+ </form>
3029+ <tree string="Attachments">
3030+ <field name="name" />
3031+ </tree>
3032+ </field>
3033+ </page>
3034+ </notebook>
3035+ <separator string="" colspan="6"/>
3036+ <group colspan="6" col="4" >
3037+ <field name="state" />
3038+ <button string="_Cancel" icon="gtk-cancel" special="cancel" />
3039+ <button name="action_send" type="object" string="_Send" icon="gtk-go-forward" />
3040+ </group>
3041+ </form>
3042+ </field>
3043+ </record>
3044+
3045+<!-- Send New Mail action -->
3046+
3047+ <record model="ir.actions.act_window" id="action_project_send_mail">
3048+ <field name="name">Send Mail</field>
3049+ <field name="res_model">project.send.mail</field>
3050+ <field name="domain">[('state','=','unchanged')]</field>
3051+ <field name="view_type">form</field>
3052+ <field name="view_mode">form</field>
3053+ <field name="view_id" ref="project_send_new_mail_view"/>
3054+ <field name="target">new</field>
3055+ </record>
3056+
3057+
3058+ <!-- Reply to Mail view -->
3059+
3060+ <record model="ir.ui.view" id="project_reply_mail_view">
3061+ <field name="name">project.mail.reply.form</field>
3062+ <field name="model">project.send.mail</field>
3063+ <field name="type">form</field>
3064+ <field name="arch" type="xml">
3065+ <form string="Reply to last Mail" col="2">
3066+ <field name="email_from" />
3067+ <field name="email_to" />
3068+ <field name="email_cc" />
3069+ <field name="subject" />
3070+ <field name="attachment_ids" colspan="4" nolabel="1">
3071+ <form string="Attachment">
3072+ <field name="binary" filename="name" />
3073+ <field name="name" />
3074+ </form>
3075+ <tree string="Attachments">
3076+ <field name="name" />
3077+ </tree>
3078+ </field>
3079+ <separator string="" colspan="4"/>
3080+ <field name="body" nolabel="1" colspan="4"/>
3081+ <separator string=" " colspan="4"/>
3082+ <group colspan="4" col="3" >
3083+ <label string=" " />
3084+ <button string="_Cancel" icon="gtk-cancel" special="cancel" />
3085+ <button name="action_send" type="object" string="_Send Reply" icon="gtk-go-forward" />
3086+ </group>
3087+ </form>
3088+ </field>
3089+ </record>
3090+
3091+<!-- Reply to Mail action -->
3092+
3093+ <record model="ir.actions.act_window" id="action_project_reply_mail">
3094+ <field name="name">Reply to last Mail</field>
3095+ <field name="res_model">project.send.mail</field>
3096+ <field name="view_type">form</field>
3097+ <field name="view_mode">form</field>
3098+ <field name="view_id" ref="project_reply_mail_view"/>
3099+ <field name="target">new</field>
3100+ </record>
3101+
3102+ </data>
3103+</openerp>
3104
3105=== added file 'project_communications_mailgate_note/wizard/wizard.xml'
3106--- project_communications_mailgate_note/wizard/wizard.xml 1970-01-01 00:00:00 +0000
3107+++ project_communications_mailgate_note/wizard/wizard.xml 2013-02-19 14:36:22 +0000
3108@@ -0,0 +1,29 @@
3109+<?xml version="1.0" encoding="UTF-8"?>
3110+<openerp>
3111+ <data>
3112+##############################################################################
3113+#
3114+# project_mailgate_note module for OpenERP, Add buttons to add notes and send mail into history tab
3115+# Copyright (C) 2011 SYLEAM Info Services ([http://www.Syleam.fr/])
3116+# Sylvain Garancher [sylvain.garancher@syleam.fr]
3117+#
3118+# This file is a part of project_mailgate_note
3119+#
3120+# project_mailgate_note is free software: you can redistribute it and/or modify
3121+# it under the terms of the GNU Affero General Public License as published by
3122+# the Free Software Foundation, either version 3 of the License, or
3123+# (at your option) any later version.
3124+#
3125+# project_mailgate_note is distributed in the hope that it will be useful,
3126+# but WITHOUT ANY WARRANTY; without even the implied warranty of
3127+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
3128+# GNU Affero General Public License for more details.
3129+#
3130+# You should have received a copy of the GNU Affero General Public License
3131+# along with this program. If not, see [http://www.gnu.org/licenses/].
3132+#
3133+##############################################################################
3134+
3135+
3136+ </data>
3137+</openerp>
3138\ No newline at end of file
3139
3140=== added directory 'project_communications_meetings'
3141=== renamed directory 'project_communications_meetings' => 'project_communications_meetings.moved'
3142=== added file 'project_communications_meetings/__init__.py'
3143--- project_communications_meetings/__init__.py 1970-01-01 00:00:00 +0000
3144+++ project_communications_meetings/__init__.py 2013-02-19 14:36:22 +0000
3145@@ -0,0 +1,24 @@
3146+# -*- coding: utf-8 -*-
3147+##############################################################################
3148+#
3149+# OpenERP, Open Source Management Solution
3150+# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
3151+#
3152+# This program is free software: you can redistribute it and/or modify
3153+# it under the terms of the GNU Affero General Public License as
3154+# published by the Free Software Foundation, either version 3 of the
3155+# License, or (at your option) any later version.
3156+#
3157+# This program is distributed in the hope that it will be useful,
3158+# but WITHOUT ANY WARRANTY; without even the implied warranty of
3159+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
3160+# GNU Affero General Public License for more details.
3161+#
3162+# You should have received a copy of the GNU Affero General Public License
3163+# along with this program. If not, see <http://www.gnu.org/licenses/>.
3164+#
3165+##############################################################################
3166+
3167+import project_communications_meetings
3168+
3169+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
3170
3171=== added file 'project_communications_meetings/__openerp__.py'
3172--- project_communications_meetings/__openerp__.py 1970-01-01 00:00:00 +0000
3173+++ project_communications_meetings/__openerp__.py 2013-02-19 14:36:22 +0000
3174@@ -0,0 +1,55 @@
3175+# -*- coding: utf-8 -*-
3176+##############################################################################
3177+#
3178+# Copyright (C) 2011 Avangard Enterprise Information Systems (<http://www.avangard-eis.com/>)
3179+# Jordi Ballester <jordi.ballester@avangard-eis.com>
3180+#
3181+# This program is free software: you can redistribute it and/or modify
3182+# it under the terms of the GNU Affero General Public License as
3183+# published by the Free Software Foundation, either version 3 of the
3184+# License, or (at your option) any later version.
3185+#
3186+# This program is distributed in the hope that it will be useful,
3187+# but WITHOUT ANY WARRANTY; without even the implied warranty of
3188+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
3189+# GNU Affero General Public License for more details.
3190+#
3191+# You should have received a copy of the GNU Affero General Public License
3192+# along with this program. If not, see <http://www.gnu.org/licenses/>.
3193+#
3194+##############################################################################
3195+
3196+
3197+{
3198+ "name": "Project Management",
3199+ "version": "1.0",
3200+ "author": "Eficent, Nervia Consultores",
3201+ "website": "http://www.eficent.com",
3202+ "category": "Generic Modules/Projects & Services",
3203+ "depends": ["project","crm", "google_calendar"],
3204+ "description": """
3205+ - This module helps you better manage the meetings related to your projects.
3206+ - The 'Meetings' tab in the project form, and a link to meetings view helps you to create new meetings from the project, and
3207+ to better track the status of existing meetings.
3208+
3209+ """,
3210+ "init_xml": [
3211+ ],
3212+ "update_xml": [
3213+ "security/ir.model.access.csv",
3214+ "security/project_communications_meetings_security.xml",
3215+ "project_communications_meetings_view.xml",
3216+ "project_view.xml",
3217+
3218+ ],
3219+ 'demo_xml': [
3220+
3221+ ],
3222+ 'test':[
3223+ ],
3224+ #SIN ADAPTAR
3225+ 'installable': False,
3226+ 'active': False,
3227+ 'certificate': '',
3228+}
3229+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
3230
3231=== added directory 'project_communications_meetings/i18n'
3232=== added file 'project_communications_meetings/i18n/es.mo'
3233Binary files project_communications_meetings/i18n/es.mo 1970-01-01 00:00:00 +0000 and project_communications_meetings/i18n/es.mo 2013-02-19 14:36:22 +0000 differ
3234=== added file 'project_communications_meetings/i18n/es.po'
3235--- project_communications_meetings/i18n/es.po 1970-01-01 00:00:00 +0000
3236+++ project_communications_meetings/i18n/es.po 2013-02-19 14:36:22 +0000
3237@@ -0,0 +1,74 @@
3238+# Translation of OpenERP Server.
3239+# This file contains the translation of the following modules:
3240+# * project_communications_meetings
3241+#
3242+msgid ""
3243+msgstr ""
3244+"Project-Id-Version: OpenERP Server 6.0.3\n"
3245+"Report-Msgid-Bugs-To: support@openerp.com\n"
3246+"POT-Creation-Date: 2011-09-30 00:39+0000\n"
3247+"PO-Revision-Date: 2011-09-30 02:40+0100\n"
3248+"Last-Translator: Jordi Ballester Alomar (Avangard Enterprise Information Systems) <jordi.ballester@avangard-eis.com>\n"
3249+"Language-Team: \n"
3250+"MIME-Version: 1.0\n"
3251+"Content-Type: text/plain; charset=UTF-8\n"
3252+"Content-Transfer-Encoding: 8bit\n"
3253+"Plural-Forms: \n"
3254+
3255+#. module: project_communications_meetings
3256+#: model:ir.ui.menu,name:project_communications_meetings.menu_project_meeting_categories_def_act
3257+msgid "Meeting Categories"
3258+msgstr "Categorías de reuniones"
3259+
3260+#. module: project_communications_meetings
3261+#: model:ir.actions.act_window,name:project_communications_meetings.act_project_2_meeting
3262+#: model:ir.ui.menu,name:project_communications_meetings.menu_project_meeting
3263+#: model:ir.ui.menu,name:project_communications_meetings.menu_project_meeting_categories_act
3264+#: view:project.project:0
3265+#: field:project.project,crm_meetings:0
3266+msgid "Meetings"
3267+msgstr "Reuniones"
3268+
3269+#. module: project_communications_meetings
3270+#: field:crm.meeting,project_id:0
3271+#: model:ir.model,name:project_communications_meetings.model_project_project
3272+msgid "Project"
3273+msgstr "Proyecto"
3274+
3275+#. module: project_communications_meetings
3276+#: model:ir.ui.menu,name:project_communications_meetings.menu_project_attendee_invitations_act
3277+msgid "Meeting Invitations"
3278+msgstr "Invitaciones a reunión"
3279+
3280+#. module: project_communications_meetings
3281+#: model:ir.module.module,description:project_communications_meetings.module_meta_information
3282+msgid ""
3283+"Extensions for the Project management module. \n"
3284+" "
3285+msgstr "Extensiones para el módulo de gestión de proyectos."
3286+
3287+#. module: project_communications_meetings
3288+#: view:project.project:0
3289+msgid "Members"
3290+msgstr "Miembros"
3291+
3292+#. module: project_communications_meetings
3293+#: constraint:project.project:0
3294+msgid "Error! You cannot assign escalation to the same project!"
3295+msgstr "¡Error! No puede asignar un escalado al mismo proyecto."
3296+
3297+#. module: project_communications_meetings
3298+#: model:ir.model,name:project_communications_meetings.model_crm_meeting
3299+msgid "Meeting"
3300+msgstr "Reunión"
3301+
3302+#. module: project_communications_meetings
3303+#: model:ir.module.module,shortdesc:project_communications_meetings.module_meta_information
3304+msgid "Project Management"
3305+msgstr "Proyectos"
3306+
3307+#. module: project_communications_meetings
3308+#: constraint:project.project:0
3309+msgid "Error! project start-date must be lower then project end-date."
3310+msgstr "¡Error! La fecha de inicio del proyecto debe ser anterior a la fecha final del proyecto."
3311+
3312
3313=== added file 'project_communications_meetings/i18n/project_communications_meetings.pot'
3314--- project_communications_meetings/i18n/project_communications_meetings.pot 1970-01-01 00:00:00 +0000
3315+++ project_communications_meetings/i18n/project_communications_meetings.pot 2013-02-19 14:36:22 +0000
3316@@ -0,0 +1,73 @@
3317+# Translation of OpenERP Server.
3318+# This file contains the translation of the following modules:
3319+# * project_communications_meetings
3320+#
3321+msgid ""
3322+msgstr ""
3323+"Project-Id-Version: OpenERP Server 6.0.3\n"
3324+"Report-Msgid-Bugs-To: support@openerp.com\n"
3325+"POT-Creation-Date: 2011-09-30 00:39+0000\n"
3326+"PO-Revision-Date: 2011-09-30 00:39+0000\n"
3327+"Last-Translator: <>\n"
3328+"Language-Team: \n"
3329+"MIME-Version: 1.0\n"
3330+"Content-Type: text/plain; charset=UTF-8\n"
3331+"Content-Transfer-Encoding: \n"
3332+"Plural-Forms: \n"
3333+
3334+#. module: project_communications_meetings
3335+#: model:ir.ui.menu,name:project_communications_meetings.menu_project_meeting_categories_def_act
3336+msgid "Meeting Categories"
3337+msgstr ""
3338+
3339+#. module: project_communications_meetings
3340+#: model:ir.actions.act_window,name:project_communications_meetings.act_project_2_meeting
3341+#: model:ir.ui.menu,name:project_communications_meetings.menu_project_meeting
3342+#: model:ir.ui.menu,name:project_communications_meetings.menu_project_meeting_categories_act
3343+#: view:project.project:0
3344+#: field:project.project,crm_meetings:0
3345+msgid "Meetings"
3346+msgstr ""
3347+
3348+#. module: project_communications_meetings
3349+#: field:crm.meeting,project_id:0
3350+#: model:ir.model,name:project_communications_meetings.model_project_project
3351+msgid "Project"
3352+msgstr ""
3353+
3354+#. module: project_communications_meetings
3355+#: model:ir.ui.menu,name:project_communications_meetings.menu_project_attendee_invitations_act
3356+msgid "Meeting Invitations"
3357+msgstr ""
3358+
3359+#. module: project_communications_meetings
3360+#: model:ir.module.module,description:project_communications_meetings.module_meta_information
3361+msgid "Extensions for the Project management module. \n"
3362+" "
3363+msgstr ""
3364+
3365+#. module: project_communications_meetings
3366+#: view:project.project:0
3367+msgid "Members"
3368+msgstr ""
3369+
3370+#. module: project_communications_meetings
3371+#: constraint:project.project:0
3372+msgid "Error! You cannot assign escalation to the same project!"
3373+msgstr ""
3374+
3375+#. module: project_communications_meetings
3376+#: model:ir.model,name:project_communications_meetings.model_crm_meeting
3377+msgid "Meeting"
3378+msgstr ""
3379+
3380+#. module: project_communications_meetings
3381+#: model:ir.module.module,shortdesc:project_communications_meetings.module_meta_information
3382+msgid "Project Management"
3383+msgstr ""
3384+
3385+#. module: project_communications_meetings
3386+#: constraint:project.project:0
3387+msgid "Error! project start-date must be lower then project end-date."
3388+msgstr ""
3389+
3390
3391=== added file 'project_communications_meetings/project_communications_meetings.py'
3392--- project_communications_meetings/project_communications_meetings.py 1970-01-01 00:00:00 +0000
3393+++ project_communications_meetings/project_communications_meetings.py 2013-02-19 14:36:22 +0000
3394@@ -0,0 +1,46 @@
3395+# -*- coding: utf-8 -*-
3396+##############################################################################
3397+#
3398+# Copyright (C) 2011 Eficent (<http://www.eficent.com/>)
3399+# Jordi Ballester Alomar <jordi.ballester@eficent.com>
3400+#
3401+# This program is free software: you can redistribute it and/or modify
3402+# it under the terms of the GNU Affero General Public License as
3403+# published by the Free Software Foundation, either version 3 of the
3404+# License, or (at your option) any later version.
3405+#
3406+# This program is distributed in the hope that it will be useful,
3407+# but WITHOUT ANY WARRANTY; without even the implied warranty of
3408+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
3409+# GNU Affero General Public License for more details.
3410+#
3411+# You should have received a copy of the GNU Affero General Public License
3412+# along with this program. If not, see <http://www.gnu.org/licenses/>.
3413+#
3414+##############################################################################
3415+
3416+from osv import fields, osv
3417+
3418+
3419+
3420+class project(osv.osv):
3421+
3422+ _inherit = "project.project"
3423+
3424+ _columns = {
3425+ 'crm_meetings': fields.one2many('crm.meeting','project_id','Meetings'),
3426+ }
3427+
3428+
3429+project()
3430+
3431+class crm_meeting(osv.osv):
3432+ """ CRM Meeting Cases """
3433+
3434+ _inherit = 'crm.meeting'
3435+
3436+ _columns = {
3437+ 'project_id':fields.many2one('project.project', 'Project'),
3438+ }
3439+
3440+crm_meeting()
3441
3442=== added file 'project_communications_meetings/project_communications_meetings_view.xml'
3443--- project_communications_meetings/project_communications_meetings_view.xml 1970-01-01 00:00:00 +0000
3444+++ project_communications_meetings/project_communications_meetings_view.xml 2013-02-19 14:36:22 +0000
3445@@ -0,0 +1,47 @@
3446+<?xml version="1.0" encoding="utf-8"?>
3447+<openerp>
3448+ <data>
3449+
3450+
3451+#---------------------------------------------------------------------------------------------------------
3452+# Add meetings from project
3453+#---------------------------------------------------------------------------------------------------------
3454+ <act_window
3455+ domain="[('project_id', '=', active_id)]"
3456+ id="act_project_2_meeting"
3457+ name="Meetings"
3458+ res_model="crm.meeting"
3459+ src_model="project.project"
3460+ groups="project.group_project_manager,project.group_project_user" />
3461+
3462+ <!-- CRM Meetings Form View -->
3463+
3464+ <record model="ir.ui.view" id="crm_case_form_view_meet_avg">
3465+ <field name="name">CRM - Meetings Form</field>
3466+ <field name="model">crm.meeting</field>
3467+ <field name="inherit_id" ref="crm.crm_case_form_view_meet" />
3468+ <field name="type">form</field>
3469+ <field name="arch" type="xml">
3470+ <field name="categ_id" position="after">
3471+ <field name="project_id"/>
3472+ </field>
3473+ </field>
3474+ </record>
3475+
3476+ <!-- CRM Meeting Search View -->
3477+
3478+ <record id="view_crm_case_meetings_filter_avg" model="ir.ui.view">
3479+ <field name="name">CRM - Meetings Search</field>
3480+ <field name="model">crm.meeting</field>
3481+ <field name="type">search</field>
3482+ <field name="inherit_id" ref="crm.view_crm_case_meetings_filter" />
3483+ <field name="arch" type="xml">
3484+ <field name="categ_id" position="after">
3485+ <field name="project_id" select="2"/>
3486+ </field>
3487+ </field>
3488+ </record>
3489+
3490+
3491+ </data>
3492+</openerp>
3493
3494=== added file 'project_communications_meetings/project_view.xml'
3495--- project_communications_meetings/project_view.xml 1970-01-01 00:00:00 +0000
3496+++ project_communications_meetings/project_view.xml 2013-02-19 14:36:22 +0000
3497@@ -0,0 +1,65 @@
3498+<?xml version="1.0" encoding="utf-8"?>
3499+<openerp>
3500+ <data>
3501+
3502+#---------------------------------------------------------------------------------------------------------
3503+# Extend the menus
3504+#---------------------------------------------------------------------------------------------------------
3505+
3506+ <menuitem name="Meetings" id="menu_project_meeting"
3507+ parent="project.menu_project_management" sequence="3"/>
3508+
3509+ <menuitem id="menu_project_meeting_categories_act"
3510+ name="Meetings"
3511+ parent="menu_project_meeting"
3512+ sequence="10" action="crm.crm_case_categ_meet"
3513+ groups="project.group_project_manager,project.group_project_user"/>
3514+
3515+
3516+ <menuitem id="menu_project_attendee_invitations_act"
3517+ name="Meeting Invitations" parent="menu_project_meeting"
3518+ sequence="20" action="crm.action_view_attendee_form"
3519+ groups="project.group_project_manager,project.group_project_user" />
3520+
3521+
3522+
3523+ <menuitem id="menu_project_meeting_categories_def_act"
3524+ name="Meeting Categories" parent="base.menu_definitions"
3525+ sequence="10" action="crm.crm_meeting_categ_action"
3526+ groups="project.group_project_manager" />
3527+
3528+
3529+ <menuitem id="project_menu_google"
3530+ name="Google Import-Export"
3531+ parent="project.menu_project_management"/>
3532+
3533+ <menuitem name="Synchronize Events"
3534+ id="project_menu_tools_google_calendar_synch"
3535+ parent="project_menu_google"
3536+ action="google_calendar.wizard_google_calendar_synch"
3537+ type="wizard"/>
3538+
3539+
3540+
3541+#---------------------------------------------------------------------------------------------------------
3542+# Extend the project
3543+#---------------------------------------------------------------------------------------------------------
3544+ <record id="edit_project" model="ir.ui.view">
3545+ <field name="name">project.project.form</field>
3546+ <field name="model">project.project</field>
3547+ <field name="type">form</field>
3548+ <field name="inherit_id" ref="project.edit_project"/>
3549+ <field name="arch" type="xml">
3550+ <page string='Other Info' position="after">
3551+ <page string="Meetings">
3552+ <field colspan="4" name="crm_meetings" nolabel="1" mode="tree,form" context="{'default_project_id': active_id}"/>
3553+ </page>
3554+ </page>
3555+
3556+
3557+ </field>
3558+ </record>
3559+
3560+
3561+ </data>
3562+</openerp>
3563
3564=== added directory 'project_communications_meetings/security'
3565=== added file 'project_communications_meetings/security/ir.model.access.csv'
3566--- project_communications_meetings/security/ir.model.access.csv 1970-01-01 00:00:00 +0000
3567+++ project_communications_meetings/security/ir.model.access.csv 2013-02-19 14:36:22 +0000
3568@@ -0,0 +1,9 @@
3569+"id","name","model_id:id","group_id:id","perm_read","perm_write","perm_create","perm_unlink"
3570+"access_crm_meetings_project_manager","crm.meeting.manager","crm.model_crm_meeting","project.group_project_manager",1,1,1,1
3571+"access_crm_meetings_project_user","crm.meeting.user","crm.model_crm_meeting","project.group_project_user",1,1,1,1
3572+"access_calendar_attendee_crm_project_user","calendar.attendee.crm.user","crm.model_calendar_attendee","project.group_project_user",1,1,1,1
3573+"access_calendar_attendee_crm_project_manager","calendar.attendee.crm.manager","crm.model_calendar_attendee","project.group_project_manager",1,1,1,1
3574+"access_res_partner_project_user","res.partner.crm.user","base.model_res_partner","project.group_project_user",1,1,1,1
3575+"access_res_partner_address_project_user","res.partner.address.crm.user","base.model_res_partner_address","project.group_project_user",1,1,1,1
3576+"access_res_partner_category_project_user","res.partner.category.crm.user","base.model_res_partner_category","project.group_project_user",1,1,1,1
3577+
3578
3579=== added file 'project_communications_meetings/security/project_communications_meetings_security.xml'
3580--- project_communications_meetings/security/project_communications_meetings_security.xml 1970-01-01 00:00:00 +0000
3581+++ project_communications_meetings/security/project_communications_meetings_security.xml 2013-02-19 14:36:22 +0000
3582@@ -0,0 +1,16 @@
3583+<?xml version="1.0" ?>
3584+<openerp>
3585+<data>
3586+
3587+<!--
3588+ <record model="ir.rule" id="project_meeting_visibility_rule_project_user">
3589+ <field name="name" >Project Meetings According to User</field>
3590+ <field name="model_id" ref="crm.model_crm_meeting"/>
3591+ <field name="global" eval="True"/>
3592+ <field name="domain_force">['|','|','|',('user_id','=',False),('project_id.members','in', [user.id]),('user_id','=',user.id),('project_id.user_id','=',user.id)]</field>
3593+ <field name="groups" eval="[(4,ref('project.group_project_user'))]"/>
3594+ </record>
3595+-->
3596+
3597+</data>
3598+</openerp>
3599
3600=== added directory 'project_cost'
3601=== renamed directory 'project_cost' => 'project_cost.moved'
3602=== added file 'project_cost/__init__.py'
3603--- project_cost/__init__.py 1970-01-01 00:00:00 +0000
3604+++ project_cost/__init__.py 2013-02-19 14:36:22 +0000
3605@@ -0,0 +1,31 @@
3606+# -*- coding: utf-8 -*-
3607+##############################################################################
3608+#
3609+# OpenERP, Open Source Management Solution
3610+# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
3611+#
3612+# This program is free software: you can redistribute it and/or modify
3613+# it under the terms of the GNU Affero General Public License as
3614+# published by the Free Software Foundation, either version 3 of the
3615+# License, or (at your option) any later version.
3616+#
3617+# This program is distributed in the hope that it will be useful,
3618+# but WITHOUT ANY WARRANTY; without even the implied warranty of
3619+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
3620+# GNU Affero General Public License for more details.
3621+#
3622+# You should have received a copy of the GNU Affero General Public License
3623+# along with this program. If not, see <http://www.gnu.org/licenses/>.
3624+#
3625+##############################################################################
3626+
3627+import account_analytic_account
3628+import account_analytic_journal_plan
3629+import account_analytic_journal_commit
3630+import account_analytic_line
3631+import account_analytic_line_plan
3632+import account_analytic_line_commit
3633+import report
3634+import wizard
3635+
3636+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
3637
3638=== added file 'project_cost/__openerp__.py'
3639--- project_cost/__openerp__.py 1970-01-01 00:00:00 +0000
3640+++ project_cost/__openerp__.py 2013-02-19 14:36:22 +0000
3641@@ -0,0 +1,70 @@
3642+# -*- coding: utf-8 -*-
3643+##############################################################################
3644+#
3645+# Copyright (C) 2011 Eficent (<http://www.eficent.com/>)
3646+# Jordi Ballester Alomar <jordi.ballester@eficent.com>
3647+#
3648+# This program is free software: you can redistribute it and/or modify
3649+# it under the terms of the GNU Affero General Public License as
3650+# published by the Free Software Foundation, either version 3 of the
3651+# License, or (at your option) any later version.
3652+#
3653+# This program is distributed in the hope that it will be useful,
3654+# but WITHOUT ANY WARRANTY; without even the implied warranty of
3655+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
3656+# GNU Affero General Public License for more details.
3657+#
3658+# You should have received a copy of the GNU Affero General Public License
3659+# along with this program. If not, see <http://www.gnu.org/licenses/>.
3660+#
3661+##############################################################################
3662+
3663+{
3664+ "name": "Project Management",
3665+ "version": "1.0",
3666+ "author": "Eficent, Nervia Consultores",
3667+ "website": "",
3668+ "category": "Generic Modules/Projects & Services",
3669+ "depends": ["account","product", "analytic", "board", "project", "purchase","hr_timesheet", "sale"],
3670+ "description": """Eficent Project Management. Project Cost Planning
3671+ - A planning analytic journal object is created. It is similar to the analytic journal, but used for planning purposes
3672+ - The planning analytic journals can be configured
3673+ - A planning analytic journal lines object is created, with the exceptions of referencing
3674+ to the planning analytic journal instead of the analytic journal, and considering
3675+ that the general account is not a required entry.
3676+ - The new object is visible as a separate entity, accesible from the Accounting area, with the corresponding search, tree, form views.
3677+ - New analytic account attributes: cumulated planned costs, cummulated planned earnings and cumulated balance.
3678+ The attributes are calculated based on the planning analytic journal lines.
3679+ The new attributes are visible on the following views:
3680+ − Analytic account forms: cumulated planned costs, cumulated planned earnings and cumulated balance
3681+ − Budget positions: cumulated planned costs
3682+
3683+ """,
3684+ "init_xml": [],
3685+ "update_xml": [
3686+ "account_analytic_journal_plan_view.xml",
3687+ "account_analytic_journal_commit_view.xml",
3688+ "account_analytic_journal_plan_report.xml",
3689+ "account_analytic_journal_commit_report.xml",
3690+ "account_analytic_line_view.xml",
3691+ "account_analytic_line_plan_view.xml",
3692+ "account_analytic_line_commit_view.xml",
3693+ "account_analytic_account_view.xml",
3694+ "wizard/account_analytic_journal_plan_report_view.xml",
3695+ "wizard/account_analytic_journal_commit_report_view.xml",
3696+ "project_view.xml",
3697+ "security/ir.model.access.csv",
3698+ "security/project_cost_security.xml",
3699+ "account_analytic_journal_plan_data.xml",
3700+ "account_analytic_journal_commit_data.xml",
3701+ ],
3702+ 'demo_xml': [
3703+
3704+ ],
3705+ 'test':[
3706+ ],
3707+ 'installable': True,
3708+ 'active': False,
3709+ 'certificate': '',
3710+}
3711+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
3712
3713=== added file 'project_cost/account_analytic_account.py'
3714--- project_cost/account_analytic_account.py 1970-01-01 00:00:00 +0000
3715+++ project_cost/account_analytic_account.py 2013-02-19 14:36:22 +0000
3716@@ -0,0 +1,220 @@
3717+# -*- coding: utf-8 -*-
3718+##############################################################################
3719+#
3720+# Copyright (C) 2011 Eficent (<http://www.eficent.com/>)
3721+# Jordi Ballester Alomar <jordi.ballester@eficent.com>
3722+#
3723+# This program is free software: you can redistribute it and/or modify
3724+# it under the terms of the GNU Affero General Public License as
3725+# published by the Free Software Foundation, either version 3 of the
3726+# License, or (at your option) any later version.
3727+#
3728+# This program is distributed in the hope that it will be useful,
3729+# but WITHOUT ANY WARRANTY; without even the implied warranty of
3730+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
3731+# GNU Affero General Public License for more details.
3732+#
3733+# You should have received a copy of the GNU Affero General Public License
3734+# along with this program. If not, see <http://www.gnu.org/licenses/>.
3735+#
3736+##############################################################################
3737+
3738+from lxml import etree
3739+import time
3740+from datetime import datetime, date, timedelta
3741+import decimal_precision as dp
3742+from tools.translate import _
3743+from osv import fields, osv
3744+import netsvc
3745+import tools
3746+
3747+class account_analytic_account(osv.osv):
3748+
3749+ _inherit = 'account.analytic.account'
3750+
3751+ def _compute_level_tree_plan(self, cr, uid, ids, child_ids, res, field_names, context=None):
3752+ osv.logging.log(100, "36:project_cost/account_analytic_account:_compute_level_tree_plan")
3753+ def recursive_computation(account_id, res, repeated_account_ids=None):
3754+ if repeated_account_ids is None:
3755+ repeated_account_ids = []
3756+ currency_obj = self.pool.get('res.currency')
3757+ account = self.browse(cr, uid, account_id)
3758+ for son in account.child_ids:
3759+ if son.id in repeated_account_ids:
3760+ continue
3761+ res = recursive_computation(son.id, res)
3762+ repeated_account_ids.append(son.id)
3763+ for field in field_names:
3764+ if account.currency_id.id == son.currency_id.id or field=='quantity_plan':
3765+ res[account.id][field] += res[son.id][field]
3766+ else:
3767+ res[account.id][field] += currency_obj.compute(cr, uid, son.currency_id.id, account.currency_id.id, res[son.id][field], context=context)
3768+ return res
3769+ for account in self.browse(cr, uid, ids, context=context):
3770+ if account.id not in child_ids:
3771+ continue
3772+ res = recursive_computation(account.id, res)
3773+ return res
3774+
3775+ def _compute_level_tree_commit(self, cr, uid, ids, child_ids, res, field_names, context=None):
3776+ osv.logging.log(100, "60:project_cost/account_analytic_account:_compute_level_tree_commit")
3777+ def recursive_computation(account_id, res, repeated_account_ids=[]):
3778+ currency_obj = self.pool.get('res.currency')
3779+ account = self.browse(cr, uid, account_id)
3780+ for son in account.child_ids:
3781+ if son.id in repeated_account_ids:
3782+ continue
3783+ res = recursive_computation(son.id, res)
3784+ repeated_account_ids.append(son.id)
3785+ for field in field_names:
3786+ if account.currency_id.id == son.currency_id.id or field=='quantity_commit':
3787+ res[account.id][field] += res[son.id][field]
3788+ else:
3789+ res[account.id][field] += currency_obj.compute(cr, uid, son.currency_id.id, account.currency_id.id, res[son.id][field], context=context)
3790+ return res
3791+ for account in self.browse(cr, uid, ids, context=context):
3792+ if account.id not in child_ids:
3793+ continue
3794+ res = recursive_computation(account.id, res)
3795+ return res
3796+
3797+ def _debit_credit_bal_qtty_plan(self, cr, uid, ids, name, arg, context=None):
3798+ osv.logging.log(100, "82:project_cost/account_analytic_account:_debit_credit_bal_qtty_plan")
3799+ res = {}
3800+ if context is None:
3801+ context = {}
3802+ child_ids = tuple(self.search(cr, uid, [('parent_id', 'child_of', ids)]))
3803+ for i in child_ids:
3804+ res[i] = {}
3805+ for n in name:
3806+ res[i][n] = 0.0
3807+
3808+ if not child_ids:
3809+ return res
3810+
3811+ where_date = ''
3812+ where_clause_args = [tuple(child_ids)]
3813+ if context.get('from_date', False):
3814+ where_date += " AND l.date >= %s"
3815+ where_clause_args += [context['from_date']]
3816+ if context.get('to_date', False):
3817+ where_date += " AND l.date <= %s"
3818+ where_clause_args += [context['to_date']]
3819+ cr.execute("""
3820+ SELECT a.id,
3821+ sum(
3822+ CASE WHEN l.amount > 0
3823+ THEN l.amount
3824+ ELSE 0.0
3825+ END
3826+ ) as debit,
3827+ sum(
3828+ CASE WHEN l.amount < 0
3829+ THEN -l.amount
3830+ ELSE 0.0
3831+ END
3832+ ) as credit,
3833+ COALESCE(SUM(l.amount),0) AS balance,
3834+ COALESCE(SUM(l.unit_amount),0) AS quantity
3835+ FROM account_analytic_account a
3836+ LEFT JOIN account_analytic_line_plan l ON (a.id = l.account_id)
3837+ WHERE a.id IN %s
3838+ """ + where_date + """
3839+ GROUP BY a.id""", where_clause_args)
3840+ for ac_id, debit, credit, balance, quantity in cr.fetchall():
3841+ res[ac_id] = {'debit_plan': debit, 'credit_plan': credit, 'balance_plan': balance, 'quantity_plan': quantity}
3842+ return self._compute_level_tree_plan(cr, uid, ids, child_ids, res, ['debit_plan', 'credit_plan', 'balance_plan', 'quantity_plan'], context)
3843+
3844+ def _debit_credit_bal_qtty_commit(self, cr, uid, ids, name, arg, context=None):
3845+ osv.logging.log(100, "129:project_cost/account_analytic_account:_debit_credit_bal_qtty_commit")
3846+ res = {}
3847+ if context is None:
3848+ context = {}
3849+ child_ids = tuple(self.search(cr, uid, [('parent_id', 'child_of', ids)]))
3850+ for i in child_ids:
3851+ res[i] = {}
3852+ for n in name:
3853+ res[i][n] = 0.0
3854+
3855+ if not child_ids:
3856+ return res
3857+
3858+ where_date = ''
3859+ where_clause_args = [tuple(child_ids)]
3860+ if context.get('from_date', False):
3861+ where_date += " AND l.date >= %s"
3862+ where_clause_args += [context['from_date']]
3863+ if context.get('to_date', False):
3864+ where_date += " AND l.date <= %s"
3865+ where_clause_args += [context['to_date']]
3866+ cr.execute("""
3867+ SELECT a.id,
3868+ sum(
3869+ CASE WHEN l.amount > 0
3870+ THEN l.amount
3871+ ELSE 0.0
3872+ END
3873+ ) as debit,
3874+ sum(
3875+ CASE WHEN l.amount < 0
3876+ THEN -l.amount
3877+ ELSE 0.0
3878+ END
3879+ ) as credit,
3880+ COALESCE(SUM(l.amount),0) AS balance,
3881+ COALESCE(SUM(l.unit_amount),0) AS quantity
3882+ FROM account_analytic_account a
3883+ LEFT JOIN account_analytic_line_commit l ON (a.id = l.account_id)
3884+ WHERE a.id IN %s
3885+ """ + where_date + """
3886+ GROUP BY a.id""", where_clause_args)
3887+ for ac_id, debit, credit, balance, quantity in cr.fetchall():
3888+ res[ac_id] = {'debit_commit': debit, 'credit_commit': credit, 'balance_commit': balance, 'quantity_commit': quantity}
3889+ return self._compute_level_tree_commit(cr, uid, ids, child_ids, res, ['debit_commit', 'credit_commit', 'balance_commit', 'quantity_commit'], context)
3890+
3891+
3892+ _columns = {
3893+
3894+ #In case that the parent is deleted, we also delete this entity
3895+ 'parent_id': fields.many2one('account.analytic.account', 'Parent Analytic Account', select=2, ondelete='cascade'),
3896+
3897+ 'balance_plan': fields.function(_debit_credit_bal_qtty_plan, method=True, type='float', string='Planned Balance', multi='debit_credit_bal_qtty_plan', digits_compute=dp.get_precision('Account')),
3898+ 'balance_commit': fields.function(_debit_credit_bal_qtty_commit, method=True, type='float', string='Commitment Balance', multi='debit_credit_bal_qtty_commit', digits_compute=dp.get_precision('Account')),
3899+ 'debit_plan': fields.function(_debit_credit_bal_qtty_plan, method=True, type='float', string='Planned Debit', multi='debit_credit_bal_qtty_plan', digits_compute=dp.get_precision('Account')),
3900+ 'debit_commit': fields.function(_debit_credit_bal_qtty_commit, method=True, type='float', string='Planned Commitments', multi='debit_credit_bal_qtty_commit', digits_compute=dp.get_precision('Account')),
3901+ 'credit_plan': fields.function(_debit_credit_bal_qtty_plan, method=True, type='float', string='Planned Credit', multi='debit_credit_bal_qtty_plan', digits_compute=dp.get_precision('Account')),
3902+ 'credit_commit': fields.function(_debit_credit_bal_qtty_commit, method=True, type='float', string='Commitments Credit', multi='debit_credit_bal_qtty_commit', digits_compute=dp.get_precision('Account')),
3903+ 'quantity_plan': fields.function(_debit_credit_bal_qtty_plan, method=True, type='float', string='Quantity Debit', multi='debit_credit_bal_qtty_plan', digits_compute=dp.get_precision('Account')),
3904+ 'quantity_commit': fields.function(_debit_credit_bal_qtty_commit, method=True, type='float', string='Quantity Commitments', multi='debit_credit_bal_qtty_commit', digits_compute=dp.get_precision('Account')),
3905+ 'state': fields.selection([('draft','Draft'),('ready','Ready'),('open','Open'), ('pending','Pending'),('cancelled', 'Cancelled'),('close','Closed'),('template', 'Template')], 'State', required=True,
3906+ help='* When an account is created its in \'Draft\' state.\
3907+ \n* When is ready to be used, it can be in \'Ready\' state.\
3908+ \n* If any associated partner is there, it can be in \'Open\' state.\
3909+ \n* If any pending balance is there it can be in \'Pending\'. \
3910+ \n* And finally when all the transactions are over, it can be in \'Close\' state. \
3911+ \n* The project can be in either if the states \'Template\' and \'Running\'.\n If it is template then we can make projects based on the template projects. If its in \'Running\' state it is a normal project.\
3912+ \n If it is to be reviewed then the state is \'Pending\'.\n When the project is completed the state is set to \'Done\'.'),
3913+ 'plan_line_ids': fields.one2many('account.analytic.line.plan', 'account_id', 'Analytic Entries'),
3914+ 'commit_line_ids': fields.one2many('account.analytic.line.commit', 'account_id', 'Commitment Analytic Entries'),
3915+
3916+ }
3917+
3918+ _defaults = {
3919+ 'state': 'draft',
3920+ }
3921+
3922+ def set_ready(self, cr, uid, ids, context=None):
3923+ osv.logging.log(100, "205:project_cost/account_analytic_account:set_ready")
3924+ self.write(cr, uid, ids, {'state':'ready'}, context=context)
3925+ return True
3926+
3927+ def copy(self, cr, uid, id, default=None, context=None):
3928+ osv.logging.log(100, "210:project_cost/account_analytic_account:copy")
3929+ if default is None:
3930+ default = {}
3931+ default['plan_line_ids'] = []
3932+ default['commit_line_ids'] = []
3933+ return super(account_analytic_account, self).copy(cr, uid, id, default, context=context)
3934+
3935+
3936+account_analytic_account()
3937\ No newline at end of file
3938
3939=== added file 'project_cost/account_analytic_account_view.xml'
3940--- project_cost/account_analytic_account_view.xml 1970-01-01 00:00:00 +0000
3941+++ project_cost/account_analytic_account_view.xml 2013-02-19 14:36:22 +0000
3942@@ -0,0 +1,153 @@
3943+<?xml version="1.0" encoding="utf-8"?>
3944+<openerp>
3945+ <data>
3946+
3947+#---------------------------------------------------------------------------------------------------------
3948+# Extend the menus
3949+#---------------------------------------------------------------------------------------------------------
3950+ <menuitem id="project_cost_analytic_account_menu"
3951+ name="Analytic Accounting"
3952+ parent="project.menu_project_management"
3953+ sequence="2"
3954+ groups="analytic.group_analytic_accounting"/>
3955+
3956+ <menuitem action="account.action_account_analytic_account_form" id="account_analytic_def_account"
3957+ parent="project_cost_analytic_account_menu"
3958+ groups="analytic.group_analytic_accounting"/>
3959+
3960+ <menuitem groups="analytic.group_analytic_accounting"
3961+ action="action_account_analytic_journal_plan_open_form"
3962+ id="account_analytic_journal_plan_entries_2"
3963+ parent="project_cost_analytic_account_menu"/>
3964+
3965+---------------------------------------------------------------------------------------------------------
3966+# Extend the analytic account
3967+#---------------------------------------------------------------------------------------------------------
3968+
3969+
3970+ <record id="view_account_analytic_account_tree_inh" model="ir.ui.view">
3971+ <field name="name">account.analytic.account.tree</field>
3972+ <field name="model">account.analytic.account</field>
3973+ <field name="type">tree</field>
3974+ <field name="field_parent">child_complete_ids</field>
3975+ <field name="inherit_id" ref="account.view_account_analytic_account_tree"/>
3976+ <field name="arch" type="xml">
3977+ <field name="balance" position="after">
3978+ <field name="debit_plan"/>
3979+ <field name="credit_plan"/>
3980+ <field name="balance_plan"/>
3981+ <field name="debit_commit"/>
3982+ <field name="credit_commit"/>
3983+ <field name="balance_commit"/>
3984+ </field>
3985+ </field>
3986+ </record>
3987+
3988+ <record id="view_account_analytic_account_form" model="ir.ui.view">
3989+ <field name="name">account.analytic.account.form</field>
3990+ <field name="model">account.analytic.account</field>
3991+ <field name="type">form</field>
3992+ <field name="inherit_id" ref="analytic.view_account_analytic_account_form"/>
3993+ <field name="arch" type="xml">
3994+ <form string="Analytic Account" version="7.0">
3995+ <sheet string="Analytic Account">
3996+ <notebook>
3997+ <page string="Description" position="after">
3998+ <page string="Costs">
3999+ <field colspan="4" name="line_ids" nolabel="1" context="{'default_account_id': active_id}"/>
4000+ <field colspan="4" name="plan_line_ids" nolabel="1" context="{'default_account_id': active_id}">
4001+ <tree string="Planned analytic lines">
4002+ <field name="date"/>
4003+ <field name="period_id"/>
4004+ <field name="ref" />
4005+ <field name="name"/>
4006+ <field name="journal_id" invisible="False"/>
4007+ <field name="amount" sum="Total" />
4008+ <field name="product_id" on_change="on_change_unit_amount(product_id, unit_amount, company_id, product_uom_id, journal_id)" />
4009+ <field name="unit_amount" on_change="on_change_unit_amount(product_id, unit_amount, company_id, product_uom_id)" sum="Total Quantity" />
4010+ <field name="product_uom_id" on_change="on_change_unit_amount(product_id, unit_amount, company_id, product_uom_id)"/>
4011+ <field name="general_account_id" />
4012+ <field name="user_id" invisible="True"/>
4013+ </tree>
4014+ <form string="Planned analytic lines">
4015+ <group colspan="4" col="6">
4016+ <field name="name"/>
4017+ <field name="ref"/>
4018+ <field name="account_id" invisible="True"/>
4019+ <field name="journal_id"/>
4020+ <field name="date"/>
4021+ <field name="period_id"/>
4022+ <field name="company_id" groups="base.group_multi_company"/>
4023+ </group>
4024+ <group colspan="2" col="4">
4025+ <separator string="Amount" colspan="4"/>
4026+ <field name="amount" colspan="4"/>
4027+ <field name="amount_currency" colspan="2"/>
4028+ <field name="currency_id" colspan="2" nolabel="1"/>
4029+ </group>
4030+ <group colspan="2" col="4">
4031+ <separator string="Product Information" colspan="4"/>
4032+ <field name="product_id" colspan="4" on_change="on_change_unit_amount(product_id, unit_amount, company_id, product_uom_id, journal_id)"/>
4033+ <field name="unit_amount" colspan="2" on_change="on_change_unit_amount(product_id, unit_amount, company_id, product_uom_id, journal_id)"/>
4034+ <field name="product_uom_id" colspan="2" nolabel="1" on_change="on_change_unit_amount(product_id, unit_amount, company_id, product_uom_id, journal_id)"/>
4035+ </group>
4036+ <group colspan="2" col="2" groups="base.group_erp_manager">
4037+ <separator string="General Accounting" colspan="2"/>
4038+ <field name="general_account_id"/>
4039+ <field name="move_id" readonly="1"/>
4040+ </group>
4041+ </form>
4042+ </field>
4043+ <field colspan="4" name="commit_line_ids" nolabel="1" context="{'default_account_id': active_id}">
4044+ <tree string="Commitment analytic lines">
4045+ <field name="date"/>
4046+ <field name="period_id"/>
4047+ <field name="ref" />
4048+ <field name="name"/>
4049+ <field name="journal_id" invisible="False"/>
4050+ <field name="amount" sum="Total" />
4051+ <field name="product_id" on_change="on_change_unit_amount(product_id, unit_amount, company_id, product_uom_id, journal_id)" />
4052+ <field name="unit_amount" on_change="on_change_unit_amount(product_id, unit_amount, company_id, product_uom_id)" sum="Total Quantity" />
4053+ <field name="product_uom_id" on_change="on_change_unit_amount(product_id, unit_amount, company_id, product_uom_id)"/>
4054+ <field name="general_account_id" />
4055+ <field name="user_id" invisible="True"/>
4056+ </tree>
4057+ <form string="Commitment analytic lines">
4058+ <group colspan="4" col="6">
4059+ <field name="name"/>
4060+ <field name="ref"/>
4061+ <field name="account_id" invisible="True"/>
4062+ <field name="journal_id"/>
4063+ <field name="date"/>
4064+ <field name="period_id"/>
4065+ <field name="company_id" groups="base.group_multi_company"/>
4066+ </group>
4067+ <group colspan="2" col="4">
4068+ <separator string="Amount" colspan="4"/>
4069+ <field name="amount" colspan="4"/>
4070+ <field name="amount_currency" colspan="2"/>
4071+ <field name="currency_id" colspan="2" nolabel="1"/>
4072+ </group>
4073+ <group colspan="2" col="4">
4074+ <separator string="Product Information" colspan="4"/>
4075+ <field name="product_id" colspan="4" on_change="on_change_unit_amount(product_id, unit_amount, company_id, product_uom_id, journal_id)"/>
4076+ <field name="unit_amount" colspan="2" on_change="on_change_unit_amount(product_id, unit_amount, company_id, product_uom_id, journal_id)"/>
4077+ <field name="product_uom_id" colspan="2" nolabel="1" on_change="on_change_unit_amount(product_id, unit_amount, company_id, product_uom_id, journal_id)"/>
4078+ </group>
4079+ <group colspan="2" col="2" groups="base.group_erp_manager">
4080+ <separator string="General Accounting" colspan="2"/>
4081+ <field name="general_account_id"/>
4082+ <field name="move_id" readonly="1"/>
4083+ </group>
4084+ </form>
4085+ </field>
4086+ </page>
4087+ </page>
4088+ </notebook>
4089+ </sheet>
4090+ </form>
4091+ </field>
4092+ </record>
4093+
4094+ </data>
4095+</openerp>
4096
4097=== added file 'project_cost/account_analytic_journal_commit.py'
4098--- project_cost/account_analytic_journal_commit.py 1970-01-01 00:00:00 +0000
4099+++ project_cost/account_analytic_journal_commit.py 2013-02-19 14:36:22 +0000
4100@@ -0,0 +1,53 @@
4101+# -*- coding: utf-8 -*-
4102+##############################################################################
4103+#
4104+# Copyright (C) 2011 Eficent (<http://www.eficent.com/>)
4105+# Jordi Ballester Alomar <jordi.ballester@eficent.com>
4106+#
4107+# This program is free software: you can redistribute it and/or modify
4108+# it under the terms of the GNU Affero General Public License as
4109+# published by the Free Software Foundation, either version 3 of the
4110+# License, or (at your option) any later version.
4111+#
4112+# This program is distributed in the hope that it will be useful,
4113+# but WITHOUT ANY WARRANTY; without even the implied warranty of
4114+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
4115+# GNU Affero General Public License for more details.
4116+#
4117+# You should have received a copy of the GNU Affero General Public License
4118+# along with this program. If not, see <http://www.gnu.org/licenses/>.
4119+#
4120+##############################################################################
4121+
4122+from lxml import etree
4123+import time
4124+from datetime import datetime, date, timedelta
4125+import decimal_precision as dp
4126+from tools.translate import _
4127+from osv import fields, osv
4128+import netsvc
4129+import tools
4130+
4131+
4132+
4133+class account_analytic_journal_commit(osv.osv):
4134+
4135+ _name = 'account.analytic.journal.commit'
4136+ _description = 'Analytic Journal Commitments'
4137+ _columns = {
4138+ 'name': fields.char('Commitments Journal Name', size=64, required=True),
4139+ 'code': fields.char('Commitments Journal Code', size=8),
4140+ 'active': fields.boolean('Active', help="If the active field is set to False, it will allow you to hide the analytic journal without removing it."),
4141+ 'type': fields.selection([('sale','Sale'), ('purchase','Purchase'), ('cash','Cash'), ('general','General'), ('situation','Situation')], 'Type', size=32, required=True, help="Gives the type of the analytic journal. When it needs for a document (eg: an invoice) to create analytic entries, OpenERP will look for a matching journal of the same type."),
4142+ 'line_ids': fields.one2many('account.analytic.line.commit', 'journal_id', 'Lines'),
4143+ 'company_id': fields.many2one('res.company', 'Company', required=True),
4144+ 'analytic_journal': fields.many2one('account.analytic.journal', 'Actual Analytic journal', required=False),
4145+ }
4146+ _defaults = {
4147+ 'active': True,
4148+ 'type': 'general',
4149+ 'company_id': lambda self,cr,uid,c: self.pool.get('res.users').browse(cr, uid, uid, c).company_id.id,
4150+ }
4151+
4152+
4153+account_analytic_journal_commit()
4154
4155=== added file 'project_cost/account_analytic_journal_commit_data.xml'
4156--- project_cost/account_analytic_journal_commit_data.xml 1970-01-01 00:00:00 +0000
4157+++ project_cost/account_analytic_journal_commit_data.xml 2013-02-19 14:36:22 +0000
4158@@ -0,0 +1,21 @@
4159+<?xml version="1.0" encoding="utf-8"?>
4160+<openerp>
4161+ <data noupdate="1">
4162+ <record id="analytic_journal_commit_sale" model="account.analytic.journal.commit">
4163+ <field name="code">SAL</field>
4164+ <field name="name">Sales</field>
4165+ <field name="type">sale</field>
4166+ </record>
4167+ <record id="analytic_journal_commit_purchase" model="account.analytic.journal.commit">
4168+ <field name="code">PUR</field>
4169+ <field name="name">Purchases</field>
4170+ <field name="type">purchase</field>
4171+ </record>
4172+ <record id="analytic_journal_commit_time" model="account.analytic.journal.commit">
4173+ <field name="code">TS</field>
4174+ <field name="name">Timesheet</field>
4175+ <field name="type">general</field>
4176+ </record>
4177+
4178+ </data>
4179+</openerp>
4180
4181=== added file 'project_cost/account_analytic_journal_commit_report.xml'
4182--- project_cost/account_analytic_journal_commit_report.xml 1970-01-01 00:00:00 +0000
4183+++ project_cost/account_analytic_journal_commit_report.xml 2013-02-19 14:36:22 +0000
4184@@ -0,0 +1,8 @@
4185+<?xml version="1.0" encoding="utf-8"?>
4186+<openerp>
4187+ <data>
4188+ <report auto="False" id="account_analytic_journal_commit_print1" menu="False"
4189+ model="account.analytic.journal.commit" name="account.analytic.account.journal.commit"
4190+ rml="project_cost/report/account_analytic_journal_commit.rml" string="Commitments Analytic Journal"/>
4191+ </data>
4192+</openerp>
4193\ No newline at end of file
4194
4195=== added file 'project_cost/account_analytic_journal_commit_view.xml'
4196--- project_cost/account_analytic_journal_commit_view.xml 1970-01-01 00:00:00 +0000
4197+++ project_cost/account_analytic_journal_commit_view.xml 2013-02-19 14:36:22 +0000
4198@@ -0,0 +1,86 @@
4199+<?xml version="1.0" encoding="utf-8"?>
4200+<openerp>
4201+ <data>
4202+
4203+#---------------------------------------------------------------------------------------------------------
4204+# Analytic Journal
4205+#---------------------------------------------------------------------------------------------------------
4206+ <record id="view_account_analytic_journal_commit_tree" model="ir.ui.view">
4207+ <field name="name">account.analytic.journal.commit.tree</field>
4208+ <field name="model">account.analytic.journal.commit</field>
4209+ <field name="type">tree</field>
4210+ <field name="arch" type="xml">
4211+ <tree string="Analytic Journal">
4212+ <field name="code"/>
4213+ <field name="name"/>
4214+ <field name="type"/>
4215+ <field name="analytic_journal"/>
4216+ </tree>
4217+ </field>
4218+ </record>
4219+
4220+ <record id="view_account_analytic_journal_commit_search" model="ir.ui.view">
4221+ <field name="name">account.analytic.journal.commit.search</field>
4222+ <field name="model">account.analytic.journal.commit</field>
4223+ <field name="type">search</field>
4224+ <field name="arch" type="xml">
4225+ <search string="Analytic Journals">
4226+ <group>
4227+ <field name="code"/>
4228+ <field name="name"/>
4229+ <field name="type"/>
4230+ <field name="analytic_journal"/>
4231+ </group>
4232+ <newline/>
4233+ <group expand="0" string="Group By...">
4234+ <filter string="Type" icon="terp-stock_symbol-selection" domain="[]" context="{'group_by':'type'}"/>
4235+ </group>
4236+ </search>
4237+ </field>
4238+ </record>
4239+
4240+ <record id="view_account_analytic_journal_commit_form" model="ir.ui.view">
4241+ <field name="name">account.analytic.journal.commit.form</field>
4242+ <field name="model">account.analytic.journal.commit</field>
4243+ <field name="type">form</field>
4244+ <field name="arch" type="xml">
4245+ <form string="Analytic Journal">
4246+ <field name="name" select="1"/>
4247+ <field name="code" select="1"/>
4248+ <field name="type" select="2"/>
4249+ <field name="active" select="2"/>
4250+ <field name="company_id" groups="base.group_multi_company" widget="selection"/>
4251+ <field name="analytic_journal"/>
4252+ </form>
4253+ </field>
4254+ </record>
4255+ <record id="action_account_analytic_journal_commit_form" model="ir.actions.act_window">
4256+ <field name="name">Commitment Analytic Journals</field>
4257+ <field name="res_model">account.analytic.journal.commit</field>
4258+ <field name="view_type">form</field>
4259+ <field name="view_mode">tree,form</field>
4260+ <field name="search_view_id" ref="view_account_analytic_journal_commit_search" />
4261+ </record>
4262+ <menuitem groups="analytic.group_analytic_accounting"
4263+ action="action_account_analytic_journal_commit_form"
4264+ id="account_def_analytic_journal_commit"
4265+ parent="account.menu_analytic_accounting" sequence="6"/>
4266+
4267+
4268+#---------------------------------------------------------------------------------------------------------
4269+# Reporting
4270+#---------------------------------------------------------------------------------------------------------
4271+
4272+ <record id="action_account_analytic_journal_commit_tree" model="ir.actions.act_window">
4273+ <field name="name">Print Commitment Analytic Journals</field>
4274+ <field name="res_model">account.analytic.journal.commit</field>
4275+ <field name="view_type">tree</field>
4276+ <field name="help">To print a commitments analytics (or costs) journal for a given period. The report give code, move name, account number, general amount and analytic amount.</field>
4277+ </record>
4278+ <menuitem groups="analytic.group_analytic_accounting"
4279+ action="action_account_analytic_journal_commit_tree"
4280+ id="account_analytic_journal_commit_print" parent="account.next_id_40"/>
4281+
4282+
4283+ </data>
4284+</openerp>
4285
4286=== added file 'project_cost/account_analytic_journal_plan.py'
4287--- project_cost/account_analytic_journal_plan.py 1970-01-01 00:00:00 +0000
4288+++ project_cost/account_analytic_journal_plan.py 2013-02-19 14:36:22 +0000
4289@@ -0,0 +1,55 @@
4290+# -*- coding: utf-8 -*-
4291+##############################################################################
4292+#
4293+# Copyright (C) 2011 Eficent (<http://www.eficent.com/>)
4294+# Jordi Ballester Alomar <jordi.ballester@eficent.com>
4295+#
4296+# This program is free software: you can redistribute it and/or modify
4297+# it under the terms of the GNU Affero General Public License as
4298+# published by the Free Software Foundation, either version 3 of the
4299+# License, or (at your option) any later version.
4300+#
4301+# This program is distributed in the hope that it will be useful,
4302+# but WITHOUT ANY WARRANTY; without even the implied warranty of
4303+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
4304+# GNU Affero General Public License for more details.
4305+#
4306+# You should have received a copy of the GNU Affero General Public License
4307+# along with this program. If not, see <http://www.gnu.org/licenses/>.
4308+#
4309+##############################################################################
4310+
4311+from lxml import etree
4312+import time
4313+from datetime import datetime, date, timedelta
4314+import decimal_precision as dp
4315+from tools.translate import _
4316+from osv import fields, osv
4317+import netsvc
4318+import tools
4319+
4320+
4321+
4322+class account_analytic_journal_plan(osv.osv):
4323+
4324+ _name = 'account.analytic.journal.plan'
4325+ _description = 'Analytic Journal Plan'
4326+ _columns = {
4327+ 'name': fields.char('Planning Journal Name', size=64, required=True),
4328+ 'code': fields.char('Planning Journal Code', size=8),
4329+ 'active': fields.boolean('Active', help="If the active field is set to False, it will allow you to hide the analytic journal without removing it."),
4330+ 'type': fields.selection([('sale','Sale'), ('purchase','Purchase'), ('cash','Cash'), ('general','General'), ('situation','Situation')], 'Type', size=32, required=True, help="Gives the type of the analytic journal. When it needs for a document (eg: an invoice) to create analytic entries, OpenERP will look for a matching journal of the same type."),
4331+ 'line_ids': fields.one2many('account.analytic.line.plan', 'journal_id', 'Lines'),
4332+ 'company_id': fields.many2one('res.company', 'Company', required=True),
4333+ 'analytic_journal': fields.many2one('account.analytic.journal', 'Actual Analytic journal', required=False),
4334+
4335+ }
4336+ _defaults = {
4337+ 'active': True,
4338+ 'type': 'general',
4339+ 'company_id': lambda self,cr,uid,c: self.pool.get('res.users').browse(cr, uid, uid, c).company_id.id,
4340+ }
4341+
4342+
4343+account_analytic_journal_plan()
4344+
4345
4346=== added file 'project_cost/account_analytic_journal_plan_data.xml'
4347--- project_cost/account_analytic_journal_plan_data.xml 1970-01-01 00:00:00 +0000
4348+++ project_cost/account_analytic_journal_plan_data.xml 2013-02-19 14:36:22 +0000
4349@@ -0,0 +1,21 @@
4350+<?xml version="1.0" encoding="utf-8"?>
4351+<openerp>
4352+ <data noupdate="1">
4353+ <record id="analytic_journal_plan_sale" model="account.analytic.journal.plan">
4354+ <field name="code">SAL</field>
4355+ <field name="name">Sales</field>
4356+ <field name="type">sale</field>
4357+ </record>
4358+ <record id="analytic_journal_plan_purchase" model="account.analytic.journal.plan">
4359+ <field name="code">PUR</field>
4360+ <field name="name">Purchases</field>
4361+ <field name="type">purchase</field>
4362+ </record>
4363+ <record id="analytic_journal_plan_time" model="account.analytic.journal.plan">
4364+ <field name="code">TS</field>
4365+ <field name="name">Timesheet</field>
4366+ <field name="type">general</field>
4367+ </record>
4368+
4369+ </data>
4370+</openerp>
4371
4372=== added file 'project_cost/account_analytic_journal_plan_report.xml'
4373--- project_cost/account_analytic_journal_plan_report.xml 1970-01-01 00:00:00 +0000
4374+++ project_cost/account_analytic_journal_plan_report.xml 2013-02-19 14:36:22 +0000
4375@@ -0,0 +1,8 @@
4376+<?xml version="1.0" encoding="utf-8"?>
4377+<openerp>
4378+ <data>
4379+ <report auto="False" id="account_analytic_journal_plan_print1" menu="False"
4380+ model="account.analytic.journal.plan" name="account.analytic.account.journal.plan"
4381+ rml="project_cost/report/account_analytic_journal_plan.rml" string="Planning Analytic Journal"/>
4382+ </data>
4383+</openerp>
4384\ No newline at end of file
4385
4386=== added file 'project_cost/account_analytic_journal_plan_view.xml'
4387--- project_cost/account_analytic_journal_plan_view.xml 1970-01-01 00:00:00 +0000
4388+++ project_cost/account_analytic_journal_plan_view.xml 2013-02-19 14:36:22 +0000
4389@@ -0,0 +1,86 @@
4390+<?xml version="1.0" encoding="utf-8"?>
4391+<openerp>
4392+ <data>
4393+
4394+#---------------------------------------------------------------------------------------------------------
4395+# Analytic Journal
4396+#---------------------------------------------------------------------------------------------------------
4397+ <record id="view_account_analytic_journal_plan_tree" model="ir.ui.view">
4398+ <field name="name">account.analytic.journal.plan.tree</field>
4399+ <field name="model">account.analytic.journal.plan</field>
4400+ <field name="type">tree</field>
4401+ <field name="arch" type="xml">
4402+ <tree string="Analytic Journal">
4403+ <field name="code"/>
4404+ <field name="name"/>
4405+ <field name="type"/>
4406+ <field name="analytic_journal"/>
4407+ </tree>
4408+ </field>
4409+ </record>
4410+
4411+ <record id="view_account_analytic_journal_plan_search" model="ir.ui.view">
4412+ <field name="name">account.analytic.journal.plan.search</field>
4413+ <field name="model">account.analytic.journal.plan</field>
4414+ <field name="type">search</field>
4415+ <field name="arch" type="xml">
4416+ <search string="Analytic Journals">
4417+ <group>
4418+ <field name="code"/>
4419+ <field name="name"/>
4420+ <field name="type"/>
4421+ <field name="analytic_journal"/>
4422+ </group>
4423+ <newline/>
4424+ <group expand="0" string="Group By...">
4425+ <filter string="Type" icon="terp-stock_symbol-selection" domain="[]" context="{'group_by':'type'}"/>
4426+ </group>
4427+ </search>
4428+ </field>
4429+ </record>
4430+
4431+ <record id="view_account_analytic_journal_plan_form" model="ir.ui.view">
4432+ <field name="name">account.analytic.journal.plan.form</field>
4433+ <field name="model">account.analytic.journal.plan</field>
4434+ <field name="type">form</field>
4435+ <field name="arch" type="xml">
4436+ <form string="Analytic Journal">
4437+ <field name="name" select="1"/>
4438+ <field name="code" select="1"/>
4439+ <field name="type" select="2"/>
4440+ <field name="active" select="2"/>
4441+ <field name="company_id" groups="base.group_multi_company" widget="selection"/>
4442+ <field name="analytic_journal"/>
4443+ </form>
4444+ </field>
4445+ </record>
4446+ <record id="action_account_analytic_journal_plan_form" model="ir.actions.act_window">
4447+ <field name="name">Planning Analytic Journals</field>
4448+ <field name="res_model">account.analytic.journal.plan</field>
4449+ <field name="view_type">form</field>
4450+ <field name="view_mode">tree,form</field>
4451+ <field name="search_view_id" ref="view_account_analytic_journal_plan_search" />
4452+ </record>
4453+ <menuitem groups="analytic.group_analytic_accounting"
4454+ action="action_account_analytic_journal_plan_form"
4455+ id="account_def_analytic_journal_plan"
4456+ parent="account.menu_analytic_accounting" sequence="6"/>
4457+
4458+
4459+#---------------------------------------------------------------------------------------------------------
4460+# Reporting
4461+#---------------------------------------------------------------------------------------------------------
4462+
4463+ <record id="action_account_analytic_journal_plan_tree" model="ir.actions.act_window">
4464+ <field name="name">Print Planning Analytic Journals</field>
4465+ <field name="res_model">account.analytic.journal.plan</field>
4466+ <field name="view_type">tree</field>
4467+ <field name="help">To print a planning analytics (or costs) journal for a given period. The report give code, move name, account number, general amount and analytic amount.</field>
4468+ </record>
4469+ <menuitem groups="analytic.group_analytic_accounting"
4470+ action="action_account_analytic_journal_plan_tree"
4471+ id="account_analytic_journal_plan_print" parent="account.next_id_40"/>
4472+
4473+
4474+ </data>
4475+</openerp>
4476
4477=== added file 'project_cost/account_analytic_line.py'
4478--- project_cost/account_analytic_line.py 1970-01-01 00:00:00 +0000
4479+++ project_cost/account_analytic_line.py 2013-02-19 14:36:22 +0000
4480@@ -0,0 +1,50 @@
4481+# -*- coding: utf-8 -*-
4482+##############################################################################
4483+#
4484+# Copyright (C) 2011 Eficent (<http://www.eficent.com/>)
4485+# Jordi Ballester Alomar <jordi.ballester@eficent.com>
4486+#
4487+# This program is free software: you can redistribute it and/or modify
4488+# it under the terms of the GNU Affero General Public License as
4489+# published by the Free Software Foundation, either version 3 of the
4490+# License, or (at your option) any later version.
4491+#
4492+# This program is distributed in the hope that it will be useful,
4493+# but WITHOUT ANY WARRANTY; without even the implied warranty of
4494+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
4495+# GNU Affero General Public License for more details.
4496+#
4497+# You should have received a copy of the GNU Affero General Public License
4498+# along with this program. If not, see <http://www.gnu.org/licenses/>.
4499+#
4500+##############################################################################
4501+
4502+
4503+import time
4504+
4505+from osv import fields
4506+from osv import osv
4507+from tools.translate import _
4508+
4509+
4510+
4511+class account_analytic_line(osv.osv):
4512+
4513+ _inherit = 'account.analytic.line'
4514+
4515+ def _get_period(self, cr, uid, context=None):
4516+ periods = self.pool.get('account.period').find(cr, uid)
4517+ if periods:
4518+ return periods[0]
4519+ return False
4520+
4521+ _columns = {
4522+ 'period_id': fields.many2one('account.period', 'Period', required=True, select=2),
4523+ }
4524+
4525+ _defaults = {
4526+ 'period_id': _get_period,
4527+ }
4528+
4529+
4530+account_analytic_line()
4531\ No newline at end of file
4532
4533=== added file 'project_cost/account_analytic_line_commit.py'
4534--- project_cost/account_analytic_line_commit.py 1970-01-01 00:00:00 +0000
4535+++ project_cost/account_analytic_line_commit.py 2013-02-19 14:36:22 +0000
4536@@ -0,0 +1,184 @@
4537+# -*- coding: utf-8 -*-
4538+##############################################################################
4539+#
4540+# Copyright (C) 2011 Eficent (<http://www.eficent.com/>)
4541+# Jordi Ballester Alomar <jordi.ballester@eficent.com>
4542+#
4543+# This program is free software: you can redistribute it and/or modify
4544+# it under the terms of the GNU Affero General Public License as
4545+# published by the Free Software Foundation, either version 3 of the
4546+# License, or (at your option) any later version.
4547+#
4548+# This program is distributed in the hope that it will be useful,
4549+# but WITHOUT ANY WARRANTY; without even the implied warranty of
4550+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
4551+# GNU Affero General Public License for more details.
4552+#
4553+# You should have received a copy of the GNU Affero General Public License
4554+# along with this program. If not, see <http://www.gnu.org/licenses/>.
4555+#
4556+##############################################################################
4557+
4558+from lxml import etree
4559+import time
4560+from datetime import datetime, date, timedelta
4561+import decimal_precision as dp
4562+from tools.translate import _
4563+from osv import fields, osv
4564+import netsvc
4565+import tools
4566+
4567+class account_analytic_line_commit(osv.osv):
4568+ _name = 'account.analytic.line.commit'
4569+ _description = 'Analytic Line Commitment'
4570+
4571+
4572+
4573+ def _get_period(self, cr, uid, context=None):
4574+ periods = self.pool.get('account.period').find(cr, uid)
4575+ if periods:
4576+ return periods[0]
4577+ return False
4578+
4579+ _columns = {
4580+ 'name': fields.char('Description', size=256, required=True),
4581+ 'date': fields.date('Date', required=True, select=True),
4582+ 'amount': fields.float('Amount', required=True, help='Calculated by multiplying the quantity and the price given in the Product\'s cost price. Always expressed in the company main currency.', digits_compute=dp.get_precision('Account')),
4583+ 'unit_amount': fields.float('Quantity', help='Specifies the amount of quantity to count.'),
4584+ 'account_id': fields.many2one('account.analytic.account', 'Analytic Account', required=True, ondelete='cascade', select=True, domain=[('type','<>','view')]),
4585+ 'user_id': fields.many2one('res.users', 'User'),
4586+ 'company_id': fields.related('account_id', 'company_id', type='many2one', relation='res.company', string='Company', store=True, readonly=True),
4587+ 'product_uom_id': fields.many2one('product.uom', 'UoM'),
4588+ 'product_id': fields.many2one('product.product', 'Product'),
4589+ 'general_account_id': fields.many2one('account.account', 'General Account', required=False, ondelete='restrict'),
4590+ 'move_id': fields.many2one('account.move.line', 'Move Line', ondelete='restrict', select=True),
4591+ 'journal_id': fields.many2one('account.analytic.journal.commit', 'Commitment Analytic Journal', required=True, ondelete='restrict', select=True),
4592+ 'code': fields.char('Code', size=8),
4593+ 'ref': fields.char('Ref.', size=64),
4594+ 'currency_id': fields.many2one('res.currency', 'Currency'),
4595+ 'amount_currency': fields.float('Amount Currency', help="The amount expressed in an optional other currency if it is a multi-currency entry.", digits_compute=dp.get_precision('Account')),
4596+ 'period_id': fields.many2one('account.period', 'Period', required=True, select=2),
4597+
4598+ }
4599+
4600+ _defaults = {
4601+ 'date': lambda *a: time.strftime('%Y-%m-%d'),
4602+ 'company_id': lambda self,cr,uid,c: self.pool.get('res.company')._company_default_get(cr, uid, 'account.analytic.line', context=c),
4603+ 'amount': 0.00,
4604+ 'period_id': _get_period,
4605+ }
4606+ _order = 'date desc'
4607+
4608+ def search(self, cr, uid, args, offset=0, limit=None, order=None, context=None, count=False):
4609+ if context is None:
4610+ context = {}
4611+ if context.get('from_date',False):
4612+ args.append(['date', '>=', context['from_date']])
4613+ if context.get('to_date',False):
4614+ args.append(['date','<=', context['to_date']])
4615+ return super(account_analytic_line_commit, self).search(cr, uid, args, offset, limit,
4616+ order, context=context, count=count)
4617+
4618+ def _check_company(self, cr, uid, ids, context=None):
4619+ lines = self.browse(cr, uid, ids, context=context)
4620+ for l in lines:
4621+ if l.move_id and not l.account_id.company_id.id == l.move_id.account_id.company_id.id:
4622+ return False
4623+ return True
4624+
4625+ # Compute the cost based on the price type define into company
4626+ # property_valuation_price_type property
4627+ def on_change_unit_amount(self, cr, uid, id, prod_id, quantity, company_id,
4628+ unit=False, journal_id=False, context=None):
4629+
4630+ res={}
4631+
4632+ if context==None:
4633+ context={}
4634+
4635+ product_obj = self.pool.get('product.product')
4636+
4637+ if prod_id:
4638+ prod = product_obj.browse(cr, uid, prod_id, context=context)
4639+ res['value']={ }
4640+# 'product_uom_id': prod.uom_id.id,
4641+# 'unit_amount': quantity or 1.0
4642+# }
4643+
4644+ if not journal_id:
4645+ j_ids = self.pool.get('account.analytic.journal.commit').search(cr, uid, [('type','=','purchase')])
4646+ journal_id = j_ids and j_ids[0] or False
4647+ if not journal_id or not prod_id:
4648+ return res
4649+
4650+ analytic_journal_obj =self.pool.get('account.analytic.journal.commit')
4651+ product_price_type_obj = self.pool.get('product.price.type')
4652+ j_id = analytic_journal_obj.browse(cr, uid, journal_id, context=context)
4653+
4654+ result = 0.0
4655+
4656+ if j_id.type <> 'sale':
4657+ a = prod.product_tmpl_id.property_account_expense.id
4658+ if not a:
4659+ a = prod.categ_id.property_account_expense_categ.id
4660+ if not a:
4661+ raise osv.except_osv(_('Error !'),
4662+ _('There is no expense account defined ' \
4663+ 'for this product: "%s" (id:%d)') % \
4664+ (prod.name, prod.id,))
4665+ else:
4666+ a = prod.product_tmpl_id.property_account_income.id
4667+ if not a:
4668+ a = prod.categ_id.property_account_income_categ.id
4669+ if not a:
4670+ raise osv.except_osv(_('Error !'),
4671+ _('There is no income account defined ' \
4672+ 'for this product: "%s" (id:%d)') % \
4673+ (prod.name, prod_id,))
4674+
4675+ flag = False
4676+ # Compute based on pricetype
4677+ product_price_type_ids = product_price_type_obj.search(cr, uid, [('field','=','standard_price')], context=context)
4678+ pricetype = product_price_type_obj.browse(cr, uid, product_price_type_ids, context=context)[0]
4679+ if journal_id:
4680+ journal = analytic_journal_obj.browse(cr, uid, journal_id, context=context)
4681+ if journal.type == 'sale':
4682+ product_price_type_ids = product_price_type_obj.search(cr, uid, [('field','=','list_price')], context)
4683+ if product_price_type_ids:
4684+ pricetype = product_price_type_obj.browse(cr, uid, product_price_type_ids, context=context)[0]
4685+ # Take the company currency as the reference one
4686+ if pricetype.field == 'list_price':
4687+ flag = True
4688+ ctx = context.copy()
4689+ if unit:
4690+ # price_get() will respect a 'uom' in its context, in order
4691+ # to return a default price for those units
4692+ ctx['uom'] = unit
4693+ amount_unit = prod.price_get(pricetype.field, context=ctx)[prod.id]
4694+ prec = self.pool.get('decimal.precision').precision_get(cr, uid, 'Account')
4695+ amount = amount_unit * quantity or 1.0
4696+ result = round(amount, prec)
4697+
4698+ if not flag:
4699+ result *= -1
4700+
4701+ res['value'].update({
4702+ 'amount': result,
4703+ 'general_account_id': a,
4704+ })
4705+
4706+ return res
4707+
4708+ def view_header_get(self, cr, user, view_id, view_type, context=None):
4709+ if context is None:
4710+ context = {}
4711+ if context.get('account_id', False):
4712+ # account_id in context may also be pointing to an account.account.id
4713+ cr.execute('select name from account_analytic_account where id=%s', (context['account_id'],))
4714+ res = cr.fetchone()
4715+ if res:
4716+ res = _('Entries: ')+ (res[0] or '')
4717+ return res
4718+ return False
4719+
4720+account_analytic_line_commit()
4721\ No newline at end of file
4722
4723=== added file 'project_cost/account_analytic_line_commit_view.xml'
4724--- project_cost/account_analytic_line_commit_view.xml 1970-01-01 00:00:00 +0000
4725+++ project_cost/account_analytic_line_commit_view.xml 2013-02-19 14:36:22 +0000
4726@@ -0,0 +1,110 @@
4727+<?xml version="1.0" encoding="utf-8"?>
4728+<openerp>
4729+ <data>
4730+
4731+
4732+#---------------------------------------------------------------------------------------------------------
4733+# Add Commitment analytic account lines
4734+#---------------------------------------------------------------------------------------------------------
4735+ <record id="view_account_analytic_line_commit_form" model="ir.ui.view">
4736+ <field name="name">account.analytic.line.commit.form</field>
4737+ <field name="model">account.analytic.line.commit</field>
4738+ <field name="type">form</field>
4739+ <field name="arch" type="xml">
4740+ <form string="Analytic Entry">
4741+ <group colspan="4" col="6">
4742+ <field name="name"/>
4743+ <field name="ref"/>
4744+ <field name="account_id"/>
4745+ <field name="journal_id"/>
4746+ <field name="date"/>
4747+ <field name="period_id"/>
4748+ <field name="company_id" groups="base.group_multi_company"/>
4749+ </group>
4750+ <group colspan="2" col="4">
4751+ <separator string="Amount" colspan="4"/>
4752+ <field name="amount" colspan="4"/>
4753+ <field name="amount_currency" colspan="2"/>
4754+ <field name="currency_id" colspan="2" nolabel="1"/>
4755+ </group>
4756+ <group colspan="2" col="4">
4757+ <separator string="Product Information" colspan="4"/>
4758+ <field name="product_id" colspan="4"/>
4759+ <field name="unit_amount" colspan="2"/>
4760+ <field name="product_uom_id" colspan="2" nolabel="1"/>
4761+ <field name="user_id" colspan="2"/>
4762+ </group>
4763+ </form>
4764+ </field>
4765+ </record>
4766+ <record id="view_account_analytic_line_commit_tree" model="ir.ui.view">
4767+ <field name="name">account.analytic.line.commit.tree</field>
4768+ <field name="model">account.analytic.line.commit</field>
4769+ <field name="type">tree</field>
4770+ <field name="arch" type="xml">
4771+ <tree editable="top" string="Analytic Entries">
4772+ <field name="date"/>
4773+ <field name="ref" invisible="False"/>
4774+ <field name="name"/>
4775+ <field name="journal_id" invisible="False"/>
4776+ <field name="amount" sum="Total" invisible="False"/>
4777+ <field name="product_id" on_change="on_change_unit_amount(product_id, unit_amount, company_id, product_uom_id, journal_id)" invisible="False"/>
4778+ <field name="unit_amount" on_change="on_change_unit_amount(product_id, unit_amount, company_id, product_uom_id)" sum="Total Quantity" invisible="False"/>
4779+ <field name="product_uom_id" on_change="on_change_unit_amount(product_id, unit_amount, company_id, product_uom_id)" invisible="False"/>
4780+ <field domain="[('type','=','normal')]" name="account_id"/>
4781+ <field name="user_id" invisible="1"/>
4782+ </tree>
4783+ </field>
4784+ </record>
4785+ <record id="view_account_analytic_line_commit_filter" model="ir.ui.view">
4786+ <field name="name">account.analytic.line.commit.select</field>
4787+ <field name="model">account.analytic.line.commit</field>
4788+ <field name="type">search</field>
4789+ <field name="arch" type="xml">
4790+ <search string="Search Analytic Lines">
4791+ <group col='6' colspan='4'>
4792+ <field name="date"/>
4793+ <field name="name"/>
4794+ <field name="account_id"/>
4795+ <field name="user_id"/>
4796+ </group>
4797+ <newline/>
4798+ <group expand="0" string="Extended Filters...">
4799+ <field name="journal_id" widget="selection"/>
4800+ <field name="product_id" widget="selection"/>
4801+ <field name="amount" select="1"/>
4802+ </group>
4803+ <newline/>
4804+ </search>
4805+ </field>
4806+ </record>
4807+ <record id="action_account_analytic_line_commit_form" model="ir.actions.act_window">
4808+ <field name="name">Commitment Analytic Entries</field>
4809+ <field name="type">ir.actions.act_window</field>
4810+ <field name="res_model">account.analytic.line.commit</field>
4811+ <field name="view_type">form</field>
4812+ <field name="context">{"search_default_user_id":uid}</field>
4813+ <field name="view_id" ref="view_account_analytic_line_commit_tree"/>
4814+ </record>
4815+
4816+
4817+#---------------------------------------------------------------------------------------------------------
4818+# Open journal entries
4819+#---------------------------------------------------------------------------------------------------------
4820+
4821+ <record id="action_account_analytic_journal_commit_open_form" model="ir.actions.act_window">
4822+ <field name="name">Analytic Journal Commitment Items</field>
4823+ <field name="res_model">account.analytic.line.commit</field>
4824+ <field name="view_type">form</field>
4825+ <field name="view_mode">tree,form</field>
4826+ <field name="search_view_id" ref="view_account_analytic_line_commit_filter" />
4827+ </record>
4828+ <menuitem groups="analytic.group_analytic_accounting"
4829+ action="action_account_analytic_journal_commit_open_form"
4830+ id="account_analytic_journal_commit_entries"
4831+ parent="account.menu_finance_entries"
4832+ sequence="7"/>
4833+
4834+
4835+ </data>
4836+</openerp>
4837
4838=== added file 'project_cost/account_analytic_line_plan.py'
4839--- project_cost/account_analytic_line_plan.py 1970-01-01 00:00:00 +0000
4840+++ project_cost/account_analytic_line_plan.py 2013-02-19 14:36:22 +0000
4841@@ -0,0 +1,191 @@
4842+# -*- coding: utf-8 -*-
4843+##############################################################################
4844+#
4845+# Copyright (C) 2011 Eficent (<http://www.eficent.com/>)
4846+# Jordi Ballester Alomar <jordi.ballester@eficent.com>
4847+#
4848+# This program is free software: you can redistribute it and/or modify
4849+# it under the terms of the GNU Affero General Public License as
4850+# published by the Free Software Foundation, either version 3 of the
4851+# License, or (at your option) any later version.
4852+#
4853+# This program is distributed in the hope that it will be useful,
4854+# but WITHOUT ANY WARRANTY; without even the implied warranty of
4855+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
4856+# GNU Affero General Public License for more details.
4857+#
4858+# You should have received a copy of the GNU Affero General Public License
4859+# along with this program. If not, see <http://www.gnu.org/licenses/>.
4860+#
4861+##############################################################################
4862+
4863+from lxml import etree
4864+import time
4865+from datetime import datetime, date, timedelta
4866+import decimal_precision as dp
4867+from tools.translate import _
4868+from osv import fields, osv
4869+import netsvc
4870+import tools
4871+
4872+class account_analytic_line_plan(osv.osv):
4873+ _name = 'account.analytic.line.plan'
4874+ _description = 'Analytic Line Plan'
4875+
4876+
4877+
4878+ def _get_period(self, cr, uid, context=None):
4879+ osv.logging.log(100, "[Alca]: 38:project_cost/account_analytic_line_plan:_get_period")
4880+ periods = self.pool.get('account.period').find(cr, uid)
4881+ if periods:
4882+ return periods[0]
4883+ return False
4884+
4885+ _columns = {
4886+ 'name': fields.char('Description', size=256, required=True),
4887+ 'date': fields.date('Date', required=True, select=True),
4888+ 'amount': fields.float('Amount', required=True, help='Calculated by multiplying the quantity and the price given in the Product\'s cost price. Always expressed in the company main currency.', digits_compute=dp.get_precision('Account')),
4889+ 'unit_amount': fields.float('Quantity', help='Specifies the amount of quantity to count.'),
4890+ 'account_id': fields.many2one('account.analytic.account', 'Analytic Account', required=True, ondelete='cascade', select=True, domain=[('type','<>','view')]),
4891+ 'user_id': fields.many2one('res.users', 'User'),
4892+ 'company_id': fields.related('account_id', 'company_id', type='many2one', relation='res.company', string='Company', store=True, readonly=True),
4893+ 'product_uom_id': fields.many2one('product.uom', 'UoM'),
4894+ 'product_id': fields.many2one('product.product', 'Product'),
4895+ 'general_account_id': fields.many2one('account.account', 'General Account', required=False, ondelete='restrict'),
4896+ 'move_id': fields.many2one('account.move.line', 'Move Line', ondelete='restrict', select=True),
4897+ 'journal_id': fields.many2one('account.analytic.journal.plan', 'Planning Analytic Journal', required=True, ondelete='restrict', select=True),
4898+ 'code': fields.char('Code', size=8),
4899+ 'ref': fields.char('Ref.', size=64),
4900+ 'currency_id': fields.related('move_id', 'currency_id', type='many2one', relation='res.currency', string='Account currency', store=True, help="The related account currency if not equal to the company one.", readonly=True),
4901+ 'amount_currency': fields.related('move_id', 'amount_currency', type='float', string='Amount currency', store=True, help="The amount expressed in the related account currency if not equal to the company one.", readonly=True),
4902+ 'period_id': fields.many2one('account.period', 'Period', required=True, select=2),
4903+ 'notes': fields.text('Notes'),
4904+ }
4905+
4906+ _defaults = {
4907+ 'date': lambda *a: time.strftime('%Y-%m-%d'),
4908+ 'company_id': lambda self,cr,uid,c: self.pool.get('res.company')._company_default_get(cr, uid, 'account.analytic.line', context=c),
4909+ 'amount': 0.00,
4910+ 'period_id': _get_period,
4911+ 'journal_id': lambda self, cr, uid, context : context['journal_id'] if context and 'journal_id' in context else None,
4912+ }
4913+ _order = 'date desc'
4914+
4915+ def search(self, cr, uid, args, offset=0, limit=None, order=None, context=None, count=False):
4916+ osv.logging.log(100, "[Alca]: 75:project_cost/account_analytic_line_plan:search")
4917+ if context is None:
4918+ context = {}
4919+ if context.get('from_date',False):
4920+ args.append(['date', '>=', context['from_date']])
4921+ if context.get('to_date',False):
4922+ args.append(['date','<=', context['to_date']])
4923+ return super(account_analytic_line_plan, self).search(cr, uid, args, offset, limit,
4924+ order, context=context, count=count)
4925+
4926+ def _check_company(self, cr, uid, ids, context=None):
4927+ osv.logging.log(100, "[Alca]: 86:project_cost/account_analytic_line_plan:_check_company")
4928+ lines = self.browse(cr, uid, ids, context=context)
4929+ for l in lines:
4930+ if l.move_id and not l.account_id.company_id.id == l.move_id.account_id.company_id.id:
4931+ return False
4932+ return True
4933+
4934+ # Compute the cost based on the price type define into company
4935+ # property_valuation_price_type property
4936+ def on_change_unit_amount(self, cr, uid, id, prod_id, quantity, company_id,
4937+ unit=False, journal_id=False, context=None):
4938+ osv.logging.log(100, "[Alca]: 97:project_cost/account_analytic_line_plan:on_change_unit_amount")
4939+
4940+ res={}
4941+
4942+ if context==None:
4943+ context={}
4944+
4945+ product_obj = self.pool.get('product.product')
4946+
4947+ if prod_id:
4948+ prod = product_obj.browse(cr, uid, prod_id, context=context)
4949+ res['value']={ }
4950+# 'product_uom_id': prod.uom_id.id,
4951+# 'unit_amount': quantity or 1.0
4952+# }
4953+
4954+ if not journal_id:
4955+ j_ids = self.pool.get('account.analytic.journal.plan').search(cr, uid, [('type','=','purchase')])
4956+ journal_id = j_ids and j_ids[0] or False
4957+ if not journal_id or not prod_id:
4958+ return res
4959+
4960+ analytic_journal_obj =self.pool.get('account.analytic.journal.plan')
4961+ product_price_type_obj = self.pool.get('product.price.type')
4962+ j_id = analytic_journal_obj.browse(cr, uid, journal_id, context=context)
4963+
4964+ result = 0.0
4965+
4966+ if j_id.type <> 'sale':
4967+ a = prod.product_tmpl_id.property_account_expense.id
4968+ if not a:
4969+ a = prod.categ_id.property_account_expense_categ.id
4970+ if not a:
4971+ raise osv.except_osv(_('Error !'),
4972+ _('There is no expense account defined ' \
4973+ 'for this product: "%s" (id:%d)') % \
4974+ (prod.name, prod.id,))
4975+ else:
4976+ a = prod.product_tmpl_id.property_account_income.id
4977+ if not a:
4978+ a = prod.categ_id.property_account_income_categ.id
4979+ if not a:
4980+ raise osv.except_osv(_('Error !'),
4981+ _('There is no income account defined ' \
4982+ 'for this product: "%s" (id:%d)') % \
4983+ (prod.name, prod_id,))
4984+
4985+ flag = False
4986+ # Compute based on pricetype
4987+ product_price_type_ids = product_price_type_obj.search(cr, uid, [('field','=','standard_price')], context=context)
4988+ pricetype = product_price_type_obj.browse(cr, uid, product_price_type_ids, context=context)[0]
4989+ if journal_id:
4990+ journal = analytic_journal_obj.browse(cr, uid, journal_id, context=context)
4991+ if journal.type == 'sale':
4992+ product_price_type_ids = product_price_type_obj.search(cr, uid, [('field','=','list_price')], context)
4993+ if product_price_type_ids:
4994+ pricetype = product_price_type_obj.browse(cr, uid, product_price_type_ids, context=context)[0]
4995+ # Take the company currency as the reference one
4996+ if pricetype.field == 'list_price':
4997+ flag = True
4998+ ctx = context.copy()
4999+ if unit:
5000+ # price_get() will respect a 'uom' in its context, in order
The diff has been truncated for viewing.

Subscribers

People subscribed via source and target branches