@@ -1,71 +0,0 @@
|
||||
# Translation of OpenERP Server.
|
||||
# This file contains the translation of the following modules:
|
||||
# * board_association
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: OpenERP Server 5.0.0\n"
|
||||
"Report-Msgid-Bugs-To: support@openerp.com\n"
|
||||
"POT-Creation-Date: 2009-08-28 16:01+0000\n"
|
||||
"PO-Revision-Date: 2010-06-24 01:15+0000\n"
|
||||
"Last-Translator: Panayiotis Konstantinidis <Unknown>\n"
|
||||
"Language-Team: nls@hellug.gr <nls@hellug.gr>\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"X-Launchpad-Export-Date: 2010-06-25 03:46+0000\n"
|
||||
"X-Generator: Launchpad (build Unknown)\n"
|
||||
"X-Poedit-Country: GREECE\n"
|
||||
"X-Poedit-Language: Greek\n"
|
||||
"X-Poedit-SourceCharset: utf-8\n"
|
||||
|
||||
#. module: board_association
|
||||
#: model:ir.ui.menu,name:board_association.menu_board_associations_manager
|
||||
msgid "Associations"
|
||||
msgstr "Συνεταιρισμοί"
|
||||
|
||||
#. module: board_association
|
||||
#: model:ir.module.module,shortdesc:board_association.module_meta_information
|
||||
msgid "Dashboard for Associations"
|
||||
msgstr "Πίνακας για Συνεταιρισμούς"
|
||||
|
||||
#. module: board_association
|
||||
#: constraint:ir.ui.view:0
|
||||
msgid "Invalid XML for View Architecture!"
|
||||
msgstr "Άκυρο XML για Αρχιτεκτονική Όψης!"
|
||||
|
||||
#. module: board_association
|
||||
#: view:board.board:0
|
||||
#: model:ir.actions.act_window,name:board_association.open_board_associations_manager
|
||||
msgid "Association Dashboard"
|
||||
msgstr "Πίνακας Συνεταιρισμών"
|
||||
|
||||
#. module: board_association
|
||||
#: view:board.board:0
|
||||
msgid "My tasks"
|
||||
msgstr "Οι αναθέσεις μου"
|
||||
|
||||
#. module: board_association
|
||||
#: view:board.board:0
|
||||
msgid "New members"
|
||||
msgstr "Νέα μέλη"
|
||||
|
||||
#. module: board_association
|
||||
#: view:board.board:0
|
||||
msgid "Unpaid Invoices"
|
||||
msgstr "Απλήρωτα Τιμολόγια"
|
||||
|
||||
#. module: board_association
|
||||
#: constraint:ir.actions.act_window:0
|
||||
msgid "Invalid model name in the action definition."
|
||||
msgstr "Λανθασμένο όνομα μοντέλου στον ορισμό ενέργειας"
|
||||
|
||||
#. module: board_association
|
||||
#: view:board.board:0
|
||||
msgid "Next Events"
|
||||
msgstr "Επόμενα Συμβάντα"
|
||||
|
||||
#. module: board_association
|
||||
#: view:board.board:0
|
||||
msgid "Registrations by Events"
|
||||
msgstr "Καταχωρήσεις ανά Συμβάν"
|
||||
@@ -1,125 +0,0 @@
|
||||
# Translation of OpenERP Server.
|
||||
# This file contains the translation of the following modules:
|
||||
# * board_auction
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: OpenERP Server 5.0.0\n"
|
||||
"Report-Msgid-Bugs-To: support@openerp.com\n"
|
||||
"POT-Creation-Date: 2009-08-28 16:01+0000\n"
|
||||
"PO-Revision-Date: 2010-06-24 01:15+0000\n"
|
||||
"Last-Translator: Panayiotis Konstantinidis <Unknown>\n"
|
||||
"Language-Team: nls@hellug.gr <nls@hellug.gr>\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"X-Launchpad-Export-Date: 2010-06-25 03:46+0000\n"
|
||||
"X-Generator: Launchpad (build Unknown)\n"
|
||||
"X-Poedit-Country: GREECE\n"
|
||||
"X-Poedit-Language: Greek\n"
|
||||
"X-Poedit-SourceCharset: utf-8\n"
|
||||
|
||||
#. module: board_auction
|
||||
#: constraint:ir.ui.view:0
|
||||
msgid "Invalid XML for View Architecture!"
|
||||
msgstr "Invalid XML for View Architecture!"
|
||||
|
||||
#. module: board_auction
|
||||
#: view:board.board:0
|
||||
msgid "Objects by day"
|
||||
msgstr "Αντικείμενα ανά Ημέρα"
|
||||
|
||||
#. module: board_auction
|
||||
#: view:board.board:0
|
||||
msgid "Objects statistics"
|
||||
msgstr "Στατιστικά Αντικειμένων"
|
||||
|
||||
#. module: board_auction
|
||||
#: model:ir.ui.menu,name:board_auction.menu_board_auction_manager
|
||||
msgid "Auction Manager"
|
||||
msgstr "Υπεύθυνος Δημοπρασίας"
|
||||
|
||||
#. module: board_auction
|
||||
#: view:board.board:0
|
||||
msgid "Summary pointing by user"
|
||||
msgstr "Περίληψη χτυπημάτων ανά χρήστη"
|
||||
|
||||
#. module: board_auction
|
||||
#: model:ir.ui.menu,name:board_auction.menu_board_auction
|
||||
msgid "Auction Member"
|
||||
msgstr "Μέλος Δημοπρασίας"
|
||||
|
||||
#. module: board_auction
|
||||
#: view:board.board:0
|
||||
msgid "My Latest Deposits"
|
||||
msgstr "Οι Τελευταίες Καταθέσεις μου"
|
||||
|
||||
#. module: board_auction
|
||||
#: model:ir.actions.act_window,name:board_auction.open_board_auction
|
||||
msgid "Auction member board"
|
||||
msgstr "Πίνακας μέλους δημοπρασίας"
|
||||
|
||||
#. module: board_auction
|
||||
#: view:board.board:0
|
||||
msgid "Auction manager "
|
||||
msgstr "Υπεύθυνος Δημοπρασίας "
|
||||
|
||||
#. module: board_auction
|
||||
#: model:ir.module.module,shortdesc:board_auction.module_meta_information
|
||||
msgid "Board for Auction"
|
||||
msgstr "Πίνακας Δημοπρασίας"
|
||||
|
||||
#. module: board_auction
|
||||
#: view:board.board:0
|
||||
msgid "Estimations/Adjudication"
|
||||
msgstr "Εκτιμήσεις/Κατακυρώσεις"
|
||||
|
||||
#. module: board_auction
|
||||
#: view:board.board:0
|
||||
msgid "Total Adjudications"
|
||||
msgstr "Σύνολο Κατακυρώσεων"
|
||||
|
||||
#. module: board_auction
|
||||
#: view:board.board:0
|
||||
msgid "Latest objects"
|
||||
msgstr "Τελευταία αντικείμενα"
|
||||
|
||||
#. module: board_auction
|
||||
#: view:board.board:0
|
||||
msgid "Latest deposits"
|
||||
msgstr "Τελευταίες καταθέσεις"
|
||||
|
||||
#. module: board_auction
|
||||
#: constraint:ir.actions.act_window:0
|
||||
msgid "Invalid model name in the action definition."
|
||||
msgstr "Λανθασμένο όνομα μοντέλου στον ορισμό ενέργειας"
|
||||
|
||||
#. module: board_auction
|
||||
#: view:board.board:0
|
||||
msgid "Menu"
|
||||
msgstr "Μενού"
|
||||
|
||||
#. module: board_auction
|
||||
#: view:board.board:0
|
||||
msgid "My objects By Day"
|
||||
msgstr "Τα Ανικείμενά μου ανά Ημέρα"
|
||||
|
||||
#. module: board_auction
|
||||
#: view:board.board:0
|
||||
msgid "My board"
|
||||
msgstr "Ο Πίνακάς μου"
|
||||
|
||||
#. module: board_auction
|
||||
#: model:ir.actions.act_window,name:board_auction.open_board_auction_manager
|
||||
msgid "Auction manager board"
|
||||
msgstr "Πίνακας Υπεύθυνου Δημοπρασίας"
|
||||
|
||||
#. module: board_auction
|
||||
#: view:board.board:0
|
||||
msgid "Min/Adj/Max"
|
||||
msgstr "Ελαχ./Επικ./Μέγ."
|
||||
|
||||
#. module: board_auction
|
||||
#: view:board.board:0
|
||||
msgid "My Latest Objects"
|
||||
msgstr "Τα Τελευταία μου Αντικείμενα"
|
||||
@@ -1,122 +0,0 @@
|
||||
# Translation of OpenERP Server.
|
||||
# This file contains the translation of the following modules:
|
||||
# * board_crm_configuration
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: OpenERP Server 5.0.0\n"
|
||||
"Report-Msgid-Bugs-To: support@openerp.com\n"
|
||||
"POT-Creation-Date: 2009-08-28 16:01+0000\n"
|
||||
"PO-Revision-Date: 2010-06-24 01:16+0000\n"
|
||||
"Last-Translator: Panayiotis Konstantinidis <Unknown>\n"
|
||||
"Language-Team: nls@hellug.gr <nls@hellug.gr>\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"X-Launchpad-Export-Date: 2010-06-25 03:46+0000\n"
|
||||
"X-Generator: Launchpad (build Unknown)\n"
|
||||
"X-Poedit-Country: GREECE\n"
|
||||
"X-Poedit-Language: Greek\n"
|
||||
"X-Poedit-SourceCharset: utf-8\n"
|
||||
|
||||
#. module: board_crm_configuration
|
||||
#: model:ir.module.module,shortdesc:board_crm_configuration.module_meta_information
|
||||
msgid "Dashboard for CRM Configuration"
|
||||
msgstr "Πίνακας Ρυθμίσεων CRM"
|
||||
|
||||
#. module: board_crm_configuration
|
||||
#: view:board.board:0
|
||||
#: model:ir.ui.menu,name:board_crm_configuration.menu_board_statistics_dash
|
||||
msgid "Statistics Dashboard"
|
||||
msgstr "Πίνακας Στατιστικών Μεγεθών"
|
||||
|
||||
#. module: board_crm_configuration
|
||||
#: constraint:ir.ui.view:0
|
||||
msgid "Invalid XML for View Architecture!"
|
||||
msgstr "Άκυρο XML για Αρχιτεκτονική Όψης!"
|
||||
|
||||
#. module: board_crm_configuration
|
||||
#: view:board.board:0
|
||||
#: model:ir.actions.act_window,name:board_crm_configuration.act_oppor_categ
|
||||
msgid "Opportunities By Categories"
|
||||
msgstr "Ευκαιρίες ανά Κατηγορίες"
|
||||
|
||||
#. module: board_crm_configuration
|
||||
#: view:board.board:0
|
||||
#: model:ir.actions.act_window,name:board_crm_configuration.act_my_cases
|
||||
msgid "My Cases"
|
||||
msgstr "Τα Θέματά μου"
|
||||
|
||||
#. module: board_crm_configuration
|
||||
#: model:ir.actions.act_window,name:board_crm_configuration.open_board_crm
|
||||
msgid "CRM Dashboard"
|
||||
msgstr "Πίνακας Αναφορών CRM"
|
||||
|
||||
#. module: board_crm_configuration
|
||||
#: view:board.board:0
|
||||
#: model:ir.ui.menu,name:board_crm_configuration.menu_board_crm
|
||||
msgid "Connecting Dashboard"
|
||||
msgstr "Σύνδεση Πινάκων Αναφορών"
|
||||
|
||||
#. module: board_crm_configuration
|
||||
#: view:board.board:0
|
||||
#: model:ir.actions.act_window,name:board_crm_configuration.act_leads_month_user
|
||||
msgid "Leads Of The Month By User"
|
||||
msgstr "Σύνδεσμοι Μηνός ανά Χρήστη"
|
||||
|
||||
#. module: board_crm_configuration
|
||||
#: view:board.board:0
|
||||
#: view:report.crm.case.section.stage:0
|
||||
msgid "Leads By Stage"
|
||||
msgstr "Σύνδεσμοι ανά Στάδιο"
|
||||
|
||||
#. module: board_crm_configuration
|
||||
#: view:board.board:0
|
||||
msgid "My Meetings"
|
||||
msgstr "Οι Συσκέψεις μου"
|
||||
|
||||
#. module: board_crm_configuration
|
||||
#: model:ir.ui.menu,name:board_crm_configuration.menu_board_crm_config
|
||||
msgid "CRM Configuration"
|
||||
msgstr "Ρυθμίσεις CRM"
|
||||
|
||||
#. module: board_crm_configuration
|
||||
#: view:board.board:0
|
||||
#: model:ir.actions.act_window,name:board_crm_configuration.act_jobs_categ
|
||||
msgid "Jobs Requests Of The Month by Applied Job"
|
||||
msgstr "Αιτήσεις Εργασίας του Μήνα ανά Θέση Αίτησης"
|
||||
|
||||
#. module: board_crm_configuration
|
||||
#: constraint:ir.actions.act_window:0
|
||||
msgid "Invalid model name in the action definition."
|
||||
msgstr "Λανθασμένο όνομα μοντέλου στον ορισμό ενέργειας"
|
||||
|
||||
#. module: board_crm_configuration
|
||||
#: view:board.board:0
|
||||
msgid "My Sales Pipeline"
|
||||
msgstr "Το Κανάλι Πωλήσεών μου"
|
||||
|
||||
#. module: board_crm_configuration
|
||||
#: view:report.crm.case.user:0
|
||||
msgid "Cases by User and Section"
|
||||
msgstr "Θέματα ανά Χρήστη και Τμήμα"
|
||||
|
||||
#. module: board_crm_configuration
|
||||
#: view:board.board:0
|
||||
msgid "My Leads By Stage"
|
||||
msgstr "Οι Σύνδεσμοί μου ανά Στάδιο"
|
||||
|
||||
#. module: board_crm_configuration
|
||||
#: view:report.crm.case.categ:0
|
||||
msgid "Cases by Sections and Categories"
|
||||
msgstr "Θέματα ανά Τμήμα και Κατηγορίες"
|
||||
|
||||
#. module: board_crm_configuration
|
||||
#: model:ir.actions.act_window,name:board_crm_configuration.open_board_statistical_dash
|
||||
msgid "CRM - Statistics Dashboard"
|
||||
msgstr "CRM - Πίνακας Στατιστικών Μεγεθών"
|
||||
|
||||
#. module: board_crm_configuration
|
||||
#: view:board.board:0
|
||||
msgid "My Leads"
|
||||
msgstr "Οι Σύνδεσμοί μου"
|
||||
@@ -1,92 +0,0 @@
|
||||
# Translation of OpenERP Server.
|
||||
# This file contains the translation of the following modules:
|
||||
# * board_document
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: OpenERP Server 5.0.0\n"
|
||||
"Report-Msgid-Bugs-To: support@openerp.com\n"
|
||||
"POT-Creation-Date: 2009-08-28 16:01+0000\n"
|
||||
"PO-Revision-Date: 2010-06-24 01:21+0000\n"
|
||||
"Last-Translator: Panayiotis Konstantinidis <Unknown>\n"
|
||||
"Language-Team: nls@hellug.gr <nls@hellug.gr>\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"X-Launchpad-Export-Date: 2010-06-26 03:58+0000\n"
|
||||
"X-Generator: Launchpad (build Unknown)\n"
|
||||
"X-Poedit-Country: GREECE\n"
|
||||
"X-Poedit-Language: Greek\n"
|
||||
"X-Poedit-SourceCharset: utf-8\n"
|
||||
|
||||
#. module: board_document
|
||||
#: constraint:ir.ui.view:0
|
||||
msgid "Invalid XML for View Architecture!"
|
||||
msgstr "Άκυρο XML για Αρχιτεκτονική Όψης!"
|
||||
|
||||
#. module: board_document
|
||||
#: view:board.board:0
|
||||
msgid "New Files"
|
||||
msgstr "Νέα Αρχεία"
|
||||
|
||||
#. module: board_document
|
||||
#: model:ir.actions.act_window,name:board_document.open_board_document_manager
|
||||
#: model:ir.ui.menu,name:board_document.menu_board_document_manager
|
||||
msgid "Document Dashboard"
|
||||
msgstr "Πίνακας Εγγραφών"
|
||||
|
||||
#. module: board_document
|
||||
#: view:board.board:0
|
||||
msgid "Wall of Shame"
|
||||
msgstr "Τείχος της Ντροπής"
|
||||
|
||||
#. module: board_document
|
||||
#: view:board.board:0
|
||||
msgid "File Size by Month"
|
||||
msgstr "Μέγεθος Αρχείων ανά Μήνα"
|
||||
|
||||
#. module: board_document
|
||||
#: view:board.board:0
|
||||
msgid "Files by Month"
|
||||
msgstr "Αρχεία ανά Μήνα"
|
||||
|
||||
#. module: board_document
|
||||
#: model:ir.actions.act_window,name:board_document.open_board_document_manager1
|
||||
#: model:ir.ui.menu,name:board_document.menu_board_document_manager1
|
||||
msgid "Statistics by User"
|
||||
msgstr "Στατιστικά ανά Χρήστη"
|
||||
|
||||
#. module: board_document
|
||||
#: view:board.board:0
|
||||
msgid "Files by Resource Type"
|
||||
msgstr "Αρχεία ανά Τύπο Προέλευσης"
|
||||
|
||||
#. module: board_document
|
||||
#: constraint:ir.actions.act_window:0
|
||||
msgid "Invalid model name in the action definition."
|
||||
msgstr "Λανθασμένο όνομα μοντέλου στον ορισμό ενέργειας"
|
||||
|
||||
#. module: board_document
|
||||
#: model:ir.module.module,shortdesc:board_document.module_meta_information
|
||||
msgid "Dashboard for Document Management"
|
||||
msgstr "Πίνακας Διαχείρισης Εγγραφών"
|
||||
|
||||
#. module: board_document
|
||||
#: view:board.board:0
|
||||
msgid "Files by Partner"
|
||||
msgstr "Αρχεία ανά Συνεργάτη"
|
||||
|
||||
#. module: board_document
|
||||
#: model:ir.ui.menu,name:board_document.menu_board_document
|
||||
msgid "Document"
|
||||
msgstr "Έγγραφο"
|
||||
|
||||
#. module: board_document
|
||||
#: view:board.board:0
|
||||
msgid "Files by Users"
|
||||
msgstr "Αρχεία ανά Χρήστη"
|
||||
|
||||
#. module: board_document
|
||||
#: view:board.board:0
|
||||
msgid "Document board"
|
||||
msgstr "Πίνακας εγγράφου"
|
||||
@@ -1,142 +0,0 @@
|
||||
# Translation of OpenERP Server.
|
||||
# This file contains the translation of the following modules:
|
||||
# * board_project
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: OpenERP Server 5.0.0\n"
|
||||
"Report-Msgid-Bugs-To: support@openerp.com\n"
|
||||
"POT-Creation-Date: 2009-08-28 16:01+0000\n"
|
||||
"PO-Revision-Date: 2010-06-24 01:22+0000\n"
|
||||
"Last-Translator: Panayiotis Konstantinidis <Unknown>\n"
|
||||
"Language-Team: nls@hellug.gr <nls@hellug.gr>\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"X-Launchpad-Export-Date: 2010-06-26 03:57+0000\n"
|
||||
"X-Generator: Launchpad (build Unknown)\n"
|
||||
"X-Poedit-Country: GREECE\n"
|
||||
"X-Poedit-Language: Greek\n"
|
||||
"X-Poedit-SourceCharset: utf-8\n"
|
||||
|
||||
#. module: board_project
|
||||
#: view:board.board:0
|
||||
msgid "My project's planning"
|
||||
msgstr "Σχεδιασμός Έργων μου"
|
||||
|
||||
#. module: board_project
|
||||
#: view:hr_timesheet_sheet.sheet:0
|
||||
#: model:ir.actions.act_window,name:board_project.act_hr_timesheet_sheet
|
||||
msgid "Timesheets"
|
||||
msgstr "Φύλλα Χρόνου Εργασίας"
|
||||
|
||||
#. module: board_project
|
||||
#: constraint:ir.actions.act_window:0
|
||||
msgid "Invalid model name in the action definition."
|
||||
msgstr "Λανθασμένο όνομα μοντέλου στον ορισμό ενέργειας"
|
||||
|
||||
#. module: board_project
|
||||
#: view:board.board:0
|
||||
#: model:ir.actions.act_window,name:board_project.act_my_project
|
||||
msgid "My projects"
|
||||
msgstr "Τα Έργα μου"
|
||||
|
||||
#. module: board_project
|
||||
#: model:ir.actions.act_window,name:board_project.action_view_task_tree_deadline
|
||||
msgid "My Task's Deadlines"
|
||||
msgstr "Προθεσμίες Αναθέσεών μου"
|
||||
|
||||
#. module: board_project
|
||||
#: view:project.task:0
|
||||
msgid "My Tasks"
|
||||
msgstr "Οι Αναθέσεις μου"
|
||||
|
||||
#. module: board_project
|
||||
#: view:board.board:0
|
||||
#: model:ir.actions.act_window,name:board_project.action_view_board_note_tree
|
||||
msgid "Public Notes"
|
||||
msgstr "Κοινοποιημένες Σημειώσεις"
|
||||
|
||||
#. module: board_project
|
||||
#: model:ir.actions.act_window,name:board_project.open_board_project
|
||||
#: model:ir.ui.menu,name:board_project.menu_board_project
|
||||
msgid "Project Dashboard"
|
||||
msgstr "Πίνακας Έργων"
|
||||
|
||||
#. module: board_project
|
||||
#: model:ir.module.module,shortdesc:board_project.module_meta_information
|
||||
msgid "Board for project users"
|
||||
msgstr "Πίνακας Χρηστών Έργου"
|
||||
|
||||
#. module: board_project
|
||||
#: model:ir.actions.act_window,name:board_project.action_project_pipeline_user
|
||||
msgid "Pipeline of tasks"
|
||||
msgstr "Κανάλι Αναθέσεων"
|
||||
|
||||
#. module: board_project
|
||||
#: view:board.board:0
|
||||
msgid "My Planning"
|
||||
msgstr "Ο Σχεδιασμός μου"
|
||||
|
||||
#. module: board_project
|
||||
#: view:board.board:0
|
||||
#: model:ir.actions.act_window,name:board_project.act_my_account
|
||||
msgid "My accounts to invoice"
|
||||
msgstr "Οι λογαριασμοί μου προς τιμολόγηση"
|
||||
|
||||
#. module: board_project
|
||||
#: model:ir.actions.act_window,name:board_project.open_board_project_manager
|
||||
#: model:ir.ui.menu,name:board_project.menu_board_project_manager
|
||||
msgid "Project Manager Dashboard"
|
||||
msgstr "Πίνακας Αναφορών Διευθυντή Έργου"
|
||||
|
||||
#. module: board_project
|
||||
#: view:board.board:0
|
||||
msgid "My Deadlines"
|
||||
msgstr "Οι Προθεσμίες μου"
|
||||
|
||||
#. module: board_project
|
||||
#: constraint:ir.ui.view:0
|
||||
msgid "Invalid XML for View Architecture!"
|
||||
msgstr "Άκυρο XML για Αρχιτεκτονική Όψης!"
|
||||
|
||||
#. module: board_project
|
||||
#: view:board.board:0
|
||||
msgid "User's timesheets"
|
||||
msgstr "Φύλλα χρόνου χρηστών"
|
||||
|
||||
#. module: board_project
|
||||
#: model:ir.ui.menu,name:board_project.next_id_86
|
||||
msgid "Project"
|
||||
msgstr "Έργο"
|
||||
|
||||
#. module: board_project
|
||||
#: view:board.board:0
|
||||
msgid "Project manager board"
|
||||
msgstr "Πίνακας διευθυντή έργου"
|
||||
|
||||
#. module: board_project
|
||||
#: view:board.board:0
|
||||
#: model:ir.actions.act_window,name:board_project.action_view_task_tree
|
||||
msgid "My Open Tasks"
|
||||
msgstr "Οι Ανοικτές Αναθέσεις μου"
|
||||
|
||||
#. module: board_project
|
||||
#: view:board.board:0
|
||||
msgid "My Board"
|
||||
msgstr "Ο Πίνακάς μου"
|
||||
|
||||
#. module: board_project
|
||||
#: view:board.board:0
|
||||
msgid "My tasks board"
|
||||
msgstr "Ο πίνακας αναθέσεών μου"
|
||||
|
||||
#. module: board_project
|
||||
#: view:board.board:0
|
||||
msgid "My user's pipeline"
|
||||
msgstr "Το κανάλι μου"
|
||||
|
||||
#. module: board_project
|
||||
#: view:board.board:0
|
||||
msgid "My Timesheet"
|
||||
msgstr "Το Φύλλο Χρόνου μου"
|
||||
@@ -21,5 +21,6 @@
|
||||
|
||||
import event
|
||||
import wizard
|
||||
import report
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||
|
||||
|
||||
@@ -37,7 +37,7 @@
|
||||
Note that:
|
||||
- You can define new types of events in
|
||||
Events / Configuration / Types of Events
|
||||
- You can access predefined reports about number of registration per event or per event category in :
|
||||
- You can access predefined reports about number of registration per event or per event category in:
|
||||
Events / Reporting
|
||||
""",
|
||||
'author': 'Tiny',
|
||||
@@ -46,15 +46,15 @@
|
||||
'update_xml': [
|
||||
'wizard/event_confirm_registration_view.xml',
|
||||
'event_view.xml',
|
||||
'report/report_event_registration_view.xml',
|
||||
'event_sequence.xml',
|
||||
'security/event_security.xml',
|
||||
'security/ir.model.access.csv',
|
||||
'wizard/event_registration_view.xml',
|
||||
'wizard/event_registrations_partner.xml',
|
||||
'wizard/event_make_invoice_view.xml',
|
||||
'board_association_view.xml',
|
||||
],
|
||||
'demo_xml': ['event_demo.xml','board_association_demo.xml'],
|
||||
'demo_xml': ['event_demo.xml', 'board_association_demo.xml'],
|
||||
'test': ['test/test_event.yml'],
|
||||
'installable': True,
|
||||
'active': False,
|
||||
'certificate': '0083059161581',
|
||||
|
||||
@@ -12,8 +12,38 @@
|
||||
<action
|
||||
string="New members"
|
||||
name="%(membership.action_report_partner_member_year_tree)d"
|
||||
view_mode="graph,tree" colspan="4"/>-->
|
||||
|
||||
view_mode="graph,tree" colspan="4"/>-->
|
||||
|
||||
<record model ="ir.ui.view" id="view_report_event_reg_graph">
|
||||
<field name="name">Registration Event report</field>
|
||||
<field name="model">report.event.registration</field>
|
||||
<field name="type">graph</field>
|
||||
<field name="arch" type="xml">
|
||||
<graph string="Event on Registration" type="bar" >
|
||||
<field name="event_id"/>
|
||||
<field name="draft_state" operator="+"/>
|
||||
<field name="confirm_state" operator="+"/>
|
||||
<field name="register_max" operator="+"/>
|
||||
</graph>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record model="ir.actions.act_window" id="act_event_reg">
|
||||
<field name="name">Events On Registrations</field>
|
||||
<field name="res_model">report.event.registration</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_mode">graph,tree</field>
|
||||
<field name="view_id" ref="view_report_event_reg_graph"/>
|
||||
</record>
|
||||
|
||||
<record model="ir.actions.act_window" id="act_event_view">
|
||||
<field name="name">Next Events</field>
|
||||
<field name="type">ir.actions.act_window</field>
|
||||
<field name="res_model">event.event</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_mode">tree,form</field>
|
||||
</record>
|
||||
|
||||
<record model="board.note.type" id="note_association_type">
|
||||
<field name="name">associations</field>
|
||||
</record>
|
||||
@@ -27,7 +57,7 @@
|
||||
<hpaned position="100">
|
||||
<child1>
|
||||
<action string="Next Events"
|
||||
name="%(event.action_event_registration_report)d"
|
||||
name="%(act_event_view)d"
|
||||
colspan="4"/>
|
||||
<action
|
||||
string="Unpaid Invoices"
|
||||
@@ -35,14 +65,13 @@
|
||||
colspan="4"
|
||||
domain="[('state','not in',['draft','cancel']),('reconciled','=',False),('type','=','out_invoice')]"/>
|
||||
</child1>
|
||||
|
||||
<child2>
|
||||
<action
|
||||
string="Registrations by Events"
|
||||
name="%(event.action_event_type_registration)d"
|
||||
view_mode="graph,tree"
|
||||
colspan="4"/>
|
||||
<action string="Register Events"
|
||||
name="%(act_event_reg)d"
|
||||
colspan="4"/>
|
||||
|
||||
</child2>
|
||||
|
||||
</hpaned>
|
||||
</form>
|
||||
</field>
|
||||
|
||||
+327
-263
@@ -19,231 +19,166 @@
|
||||
#
|
||||
##############################################################################
|
||||
|
||||
from crm import crm
|
||||
from osv import fields, osv
|
||||
import time
|
||||
from tools.translate import _
|
||||
import netsvc
|
||||
import pooler
|
||||
import time
|
||||
import tools
|
||||
from tools.translate import _
|
||||
from crm import crm
|
||||
|
||||
|
||||
class event_type(osv.osv):
|
||||
class event_type(osv.osv):
|
||||
""" Event Type """
|
||||
_name = 'event.type'
|
||||
_description= 'Event type'
|
||||
_description = __doc__
|
||||
_columns = {
|
||||
'name': fields.char('Event type', size=64, required=True),
|
||||
}
|
||||
|
||||
event_type()
|
||||
|
||||
class event(osv.osv):
|
||||
class event_event(osv.osv):
|
||||
"""Event"""
|
||||
_name = 'event.event'
|
||||
_description = 'Event'
|
||||
_inherits = {'crm.case.section': 'section_id'}
|
||||
_description = __doc__
|
||||
_inherit = 'crm.case.section'
|
||||
_order = 'date_begin'
|
||||
|
||||
def copy(self, cr, uid, id, default=None, context=None):
|
||||
return super(event, self).copy(cr, uid, id, default={'code': self.pool.get('ir.sequence').get(cr, uid, 'event.event'), 'state': 'draft'})
|
||||
def copy(self, cr, uid, id, default=None, context=None):
|
||||
""" Copy record of Given id
|
||||
@param id: Id of Event Registration type record.
|
||||
@param context: A standard dictionary for contextual values
|
||||
"""
|
||||
if not default:
|
||||
default = {}
|
||||
default.update({
|
||||
'code': self.pool.get('ir.sequence').get(cr, uid, 'event.event'),
|
||||
'state': 'draft'
|
||||
})
|
||||
return super(event_event, self).copy(cr, uid, id, default=default, context=context)
|
||||
|
||||
def button_draft(self, cr, uid, ids, context={}):
|
||||
return self.write(cr, uid, ids, {'state': 'draft'})
|
||||
def button_draft(self, cr, uid, ids, context=None):
|
||||
return self.write(cr, uid, ids, {'state': 'draft'}, context=context)
|
||||
|
||||
def button_cancel(self, cr, uid, ids, context={}):
|
||||
return self.write(cr, uid, ids, {'state': 'cancel'})
|
||||
def button_cancel(self, cr, uid, ids, context=None):
|
||||
return self.write(cr, uid, ids, {'state': 'cancel'}, context=context)
|
||||
|
||||
def button_done(self, cr, uid, ids, context={}):
|
||||
return self.write(cr, uid, ids, {'state': 'done'})
|
||||
def button_done(self, cr, uid, ids, context=None):
|
||||
return self.write(cr, uid, ids, {'state': 'done'}, context=context)
|
||||
|
||||
def button_confirm(self, cr, uid, ids, context={}):
|
||||
for eve in self.browse(cr, uid, ids):
|
||||
if eve.mail_auto_confirm:
|
||||
def button_confirm(self, cr, uid, ids, context=None):
|
||||
register_pool = self.pool.get('event.registration')
|
||||
for event in self.browse(cr, uid, ids, context=context):
|
||||
if event.mail_auto_confirm:
|
||||
#send reminder that will confirm the event for all the people that were already confirmed
|
||||
reg_ids = self.pool.get('event.registration').search(cr, uid, [('event_id', '=', eve.id), ('state', 'not in', ['draft', 'cancel'])])
|
||||
if reg_ids:
|
||||
self.pool.get('event.registration').mail_user_confirm(cr, uid, reg_ids)
|
||||
reg_ids = register_pool.search(cr, uid, [
|
||||
('event_id', '=', event.id),
|
||||
('state', 'not in', ['draft', 'cancel'])])
|
||||
register_pool.mail_user_confirm(cr, uid, reg_ids)
|
||||
|
||||
return self.write(cr, uid, ids, {'state': 'confirm'})
|
||||
|
||||
def _get_register(self, cr, uid, ids, name, args, context=None):
|
||||
res={}
|
||||
|
||||
def _get_register(self, cr, uid, ids, fields, args, context=None):
|
||||
"""
|
||||
Get Confirm or uncofirm register value.
|
||||
@param ids: List of Event registration type's id
|
||||
@param fields: List of function fields(register_current and register_prospect).
|
||||
@param context: A standard dictionary for contextual values
|
||||
@return: Dictionary of function fields value.
|
||||
"""
|
||||
register_pool = self.pool.get('event.registration')
|
||||
res = {}
|
||||
for event in self.browse(cr, uid, ids, context):
|
||||
res[event.id] = {}
|
||||
state = 'draft'
|
||||
if name[0] == 'register_current':
|
||||
state = 'open'
|
||||
query = """SELECT sum(r.nb_register)
|
||||
from event_registration r
|
||||
where state=%s and event_id=%s"""
|
||||
|
||||
cr.execute(query, (state, event.id, ))
|
||||
res2 = cr.fetchone()
|
||||
if res2 and res2[0]:
|
||||
res[event.id][name[0]] = res2[0]
|
||||
else:
|
||||
res[event.id][name[0]] = 0
|
||||
for field in fields:
|
||||
res[event.id][field] = False
|
||||
state = []
|
||||
if 'register_current' in fields:
|
||||
state.append('open')
|
||||
if 'register_prospect' in fields:
|
||||
state.append('draft')
|
||||
|
||||
reg_ids = register_pool.search(cr, uid, [
|
||||
('event_id', '=', event.id),
|
||||
('state', 'in', state)])
|
||||
if 'register_current' in fields:
|
||||
res[event.id]['register_current'] = len(reg_ids)
|
||||
if 'register_prospect' in fields:
|
||||
res[event.id]['register_prospect'] = len(reg_ids)
|
||||
|
||||
|
||||
return res
|
||||
|
||||
def write(self, cr, uid, ids, vals, *args, **kwargs):
|
||||
res = super(event, self).write(cr, uid, ids, vals, *args, **kwargs)
|
||||
if 'date_begin' in vals and vals['date_begin']:
|
||||
for eve in self.browse(cr, uid, ids):
|
||||
def write(self, cr, uid, ids, vals, context=None):
|
||||
"""
|
||||
Writes values in one or several fields.
|
||||
@param ids: List of Event registration type's IDs
|
||||
@param vals: dictionary with values to update.
|
||||
@return: True
|
||||
"""
|
||||
register_pool = self.pool.get('event.registration')
|
||||
res = super(event_event, self).write(cr, uid, ids, vals, context=context)
|
||||
if vals.get('date_begin', False) or vals.get('mail_auto_confirm', False) or vals.get('mail_confirm', False):
|
||||
for event in self.browse(cr, uid, ids, context=context):
|
||||
#change the deadlines of the registration linked to this event
|
||||
reg_ids = self.pool.get('event.registration').search(cr, uid, [('event_id', '=', eve.id)])
|
||||
if reg_ids:
|
||||
self.pool.get('event.registration').write(cr, uid, reg_ids, {'date_deadline': vals['date_begin']})
|
||||
register_values = {}
|
||||
if vals.get('date_begin', False):
|
||||
register_values['date_deadline'] = vals['date_begin']
|
||||
|
||||
#change the description of the registration linked to this event
|
||||
if 'mail_auto_confirm' in vals:
|
||||
if vals['mail_auto_confirm']:
|
||||
if 'mail_confirm' not in vals:
|
||||
for eve in self.browse(cr, uid, ids):
|
||||
vals['mail_confirm'] = eve.mail_confirm
|
||||
else:
|
||||
vals['mail_confirm']=False
|
||||
if 'mail_confirm' in vals:
|
||||
for eve in self.browse(cr, uid, ids):
|
||||
reg_ids = self.pool.get('event.registration').search(cr, uid, [('event_id', '=', eve.id)])
|
||||
if reg_ids:
|
||||
self.pool.get('event.registration').write(cr, uid, reg_ids, {'description': vals['mail_confirm']})
|
||||
#change the description of the registration linked to this event
|
||||
if vals.get('mail_auto_confirm', False):
|
||||
if vals['mail_auto_confirm']:
|
||||
if 'mail_confirm' not in vals:
|
||||
vals['mail_confirm'] = event.mail_confirm
|
||||
else:
|
||||
vals['mail_confirm'] = False
|
||||
if 'mail_confirm' in vals:
|
||||
register_values['description'] = vals['mail_confirm']
|
||||
|
||||
if register_values:
|
||||
reg_ids = register_pool.search(cr, uid, [('event_id', '=', event.id)])
|
||||
register_pool.write(cr, uid, reg_ids, register_values)
|
||||
return res
|
||||
|
||||
_columns = {
|
||||
'type': fields.many2one('event.type', 'Type'),
|
||||
'section_id': fields.many2one('crm.case.section', 'Case section', required=True),
|
||||
'register_max': fields.integer('Maximum Registrations'),
|
||||
'register_min': fields.integer('Minimum Registrations'),
|
||||
'register_current': fields.function(_get_register, method=True, string='Confirmed Registrations', multi='register_current'),
|
||||
'register_prospect': fields.function(_get_register, method=True, string='Unconfirmed Registrations', multi='register_prospect'),
|
||||
'date_begin': fields.datetime('Beginning date', required=True),
|
||||
'date_end': fields.datetime('Ending date', required=True),
|
||||
'state': fields.selection([('draft', 'Draft'), ('confirm', 'Confirmed'), ('done', 'Done'), ('cancel', 'Cancelled')], 'State', readonly=True, required=True,
|
||||
help='If event is created, the state is \'Draft\'.\n If event is confirmed for the particular dates the state is set to \'Confirmed\'.\
|
||||
'type': fields.many2one('event.type', 'Type', help="Type of Event like Seminar, Exhibition, Conference, Training."),
|
||||
'register_max': fields.integer('Maximum Registrations', help="Provide Maximun Number of Registrations"),
|
||||
'register_min': fields.integer('Minimum Registrations', help="Providee Minimum Number of Registrations"),
|
||||
'register_current': fields.function(_get_register, method=True, string='Confirmed Registrations', multi='register_current', help="Total of Open Registrations"),
|
||||
'register_prospect': fields.function(_get_register, method=True, string='Unconfirmed Registrations', multi='register_prospect', help="Total of Prospect Registrations"),
|
||||
'date_begin': fields.datetime('Beginning date', required=True, help="Beginning Date of Event"),
|
||||
'date_end': fields.datetime('Closing date', required=True, help="Closing Date of Event"),
|
||||
'state': fields.selection([('draft', 'Draft'), ('confirm', 'Confirmed'), ('done', 'Done'), ('cancel', 'Cancelled')], 'State', readonly=True, required=True, help='If event is created, the state is \'Draft\'.\n If event is confirmed for the particular dates the state is set to \'Confirmed\'.\
|
||||
\nIf the event is over, the state is set to \'Done\'.\n If event is cancelled the state is set to \'Cancelled\'.'),
|
||||
'mail_auto_registr': fields.boolean('Mail Auto Register', help='Check this box if you want to use the automatic mailing for new registration'),
|
||||
'mail_auto_confirm': fields.boolean('Mail Auto Confirm', help='Check this box if you want ot use the automatic confirmation emailing or the reminder'),
|
||||
'mail_registr': fields.text('Registration Email', help='This email will be sent when someone subscribes to the event.'),
|
||||
'mail_confirm': fields.text('Confirmation Email', help="This email will be sent when the event gets confimed or when someone subscribes to a confirmed event. This is also the email sent to remind someone about the event."),
|
||||
'product_id': fields.many2one('product.product', 'Product', required=True),
|
||||
'product_id': fields.many2one('product.product', 'Product', required=True, help="Product which is provided cost of event. Invoice of event will be created with this Product."),
|
||||
'note': fields.text('Notes', help="Description or Summary of Event")
|
||||
}
|
||||
|
||||
_defaults = {
|
||||
'state': lambda *args: 'draft',
|
||||
'state': 'draft',
|
||||
'code': lambda obj, cr, uid, context: obj.pool.get('ir.sequence').get(cr, uid, 'event.event'),
|
||||
'user_id': lambda self, cr, uid, ctx: uid,
|
||||
'user_id': lambda obj, cr, uid, context: uid,
|
||||
}
|
||||
|
||||
event()
|
||||
event_event()
|
||||
|
||||
class event_registration(osv.osv):
|
||||
|
||||
def check_confirm(self, cr, uid, ids, context):
|
||||
mod_obj = self.pool.get('ir.model.data')
|
||||
current_registration = self.browse(cr, uid, [ids[0]])[0]
|
||||
total_confirmed = current_registration.event_id.register_current + current_registration.nb_register
|
||||
if total_confirmed <= current_registration.event_id.register_max or current_registration.event_id.register_max == 0:
|
||||
self.write(cr, uid, [ids[0]], {'state': 'open'}, context=context)
|
||||
self._history(cr, uid, [ids[0]], 'Open', history=True)
|
||||
self.mail_user(cr, uid, [ids[0]])
|
||||
return True
|
||||
else:
|
||||
model_data_ids = mod_obj.search(cr, uid, [('model', '=', 'ir.ui.view'), ('name', '=', 'view_event_confirm_registration')], context=context)
|
||||
resource_id = mod_obj.read(cr, uid, model_data_ids, fields=['res_id'], context=context)[0]['res_id']
|
||||
context.update({'reg_id': ids[0]})
|
||||
return {
|
||||
'name': _('Confirm Registration'),
|
||||
'context': context,
|
||||
'view_type': 'form',
|
||||
'view_mode': 'tree,form',
|
||||
'res_model': 'event.confirm.registration',
|
||||
'views': [(resource_id, 'form')],
|
||||
'type': 'ir.actions.act_window',
|
||||
'target': 'new',
|
||||
'nodestroy': True
|
||||
}
|
||||
|
||||
def _history(self, cr, uid, ids, keyword, history=False, email=False, context={}):
|
||||
for case in self.browse(cr, uid, ids):
|
||||
data = {
|
||||
'name': keyword,
|
||||
'som': case.som.id,
|
||||
'canal_id': case.canal_id.id,
|
||||
'user_id': uid,
|
||||
}
|
||||
obj = self.pool.get('mailgate.message')
|
||||
obj.create(cr, uid, data, context=context)
|
||||
return True
|
||||
|
||||
def button_reg_close(self, cr, uid, ids, *args):
|
||||
self.write(cr, uid, ids, {'state': 'done', })
|
||||
self._history(cr, uid, ids, 'Done', history=True)
|
||||
return True
|
||||
|
||||
def button_reg_cancel(self, cr, uid, ids, *args):
|
||||
self.write(cr, uid, ids, {'state': 'cancel', })
|
||||
self._history(cr, uid, ids, 'Cancel', history=True)
|
||||
return True
|
||||
|
||||
def create(self, cr, uid, *args, **argv):
|
||||
event = self.pool.get('event.event').browse(cr, uid, args[0]['event_id'], None)
|
||||
args[0]['section_id']= event.section_id.id
|
||||
args[0]['date_deadline']= event.date_begin
|
||||
args[0]['description']= event.mail_confirm
|
||||
res = super(event_registration, self).create(cr, uid, *args, **argv)
|
||||
self._history(cr, uid, [res], 'Created', history=True)
|
||||
return res
|
||||
|
||||
def write(self, cr, uid, *args, **argv):
|
||||
if 'event_id' in args[1]:
|
||||
event = self.pool.get('event.event').browse(cr, uid, args[1]['event_id'], None)
|
||||
args[1]['section_id']= event.section_id.id
|
||||
args[1]['date_deadline']= event.date_begin
|
||||
args[1]['description']= event.mail_confirm
|
||||
return super(event_registration, self).write(cr, uid, *args, **argv)
|
||||
|
||||
def mail_user_confirm(self, cr, uid, ids):
|
||||
reg_ids = self.browse(cr, uid, ids)
|
||||
for reg_id in reg_ids:
|
||||
src = reg_id.event_id.reply_to or False
|
||||
dest = []
|
||||
if reg_id.email_from:
|
||||
dest += [reg_id.email_from]
|
||||
if reg_id.email_cc:
|
||||
dest += [reg_id.email_cc]
|
||||
if dest and src:
|
||||
tools.email_send(src, dest, 'Auto Confirmation: '+'['+str(reg_id.id)+']'+' '+reg_id.name, reg_id.event_id.mail_confirm, openobject_id = str(reg_id.id))
|
||||
if not src:
|
||||
raise osv.except_osv(_('Error!'), _('You must define a reply-to address in order to mail the participant. You can do this in the Mailing tab of your event. Note that this is also the place where you can configure your event to not send emails automaticly while registering'))
|
||||
return False
|
||||
|
||||
def mail_user(self, cr, uid, ids):
|
||||
reg_ids = self.browse(cr, uid, ids)
|
||||
for reg_id in reg_ids:
|
||||
src = reg_id.event_id.reply_to or False
|
||||
dest = []
|
||||
if reg_id.email_from:
|
||||
dest += [reg_id.email_from]
|
||||
if reg_id.email_cc:
|
||||
dest += [reg_id.email_cc]
|
||||
if reg_id.event_id.mail_auto_confirm or reg_id.event_id.mail_auto_registr:
|
||||
if dest and src:
|
||||
if reg_id.event_id.state in ['draft', 'fixed', 'open', 'confirm', 'running'] and reg_id.event_id.mail_auto_registr:
|
||||
tools.email_send(src, dest, 'Auto Registration: '+'['+str(reg_id.id)+']'+' '+reg_id.name, reg_id.event_id.mail_registr, openobject_id = str(reg_id.id))
|
||||
if (reg_id.event_id.state in ['confirm', 'running']) and reg_id.event_id.mail_auto_confirm:
|
||||
tools.email_send(src, dest, 'Auto Confirmation: '+'['+str(reg_id.id)+']'+' '+reg_id.name, reg_id.event_id.mail_confirm, openobject_id = str(reg_id.id))
|
||||
if not src:
|
||||
raise osv.except_osv(_('Error!'), _('You must define a reply-to address in order to mail the participant. You can do this in the Mailing tab of your event. Note that this is also the place where you can configure your event to not send emails automaticly while registering'))
|
||||
return False
|
||||
|
||||
def _create_invoice_lines(self, cr, uid, ids, vals):
|
||||
return self.pool.get('account.invoice.line').create(cr, uid, vals)
|
||||
class event_registration(osv.osv):
|
||||
"""Event Registration"""
|
||||
|
||||
_name= 'event.registration'
|
||||
_description = 'Event Registration'
|
||||
_description = __doc__
|
||||
_inherit = 'crm.meeting'
|
||||
|
||||
_columns = {
|
||||
'email_cc': fields.text('Watchers Emails', size=252 , help="These \
|
||||
'email_cc': fields.text('CC', size=252 , help="These \
|
||||
people will receive a copy of the future communication between partner \
|
||||
and users by email"),
|
||||
and users by email"),
|
||||
'nb_register': fields.integer('Number of Registration', readonly=True, states={'draft': [('readonly', False)]}),
|
||||
'event_id': fields.many2one('event.event', 'Event Related', required=True),
|
||||
"partner_invoice_id": fields.many2one('res.partner', 'Partner Invoiced'),
|
||||
@@ -252,26 +187,223 @@ and users by email"),
|
||||
"badge_title": fields.char('Badge Title', size=128),
|
||||
"badge_name": fields.char('Badge Name', size=128),
|
||||
"badge_partner": fields.char('Badge Partner', size=128),
|
||||
"invoice_label": fields.char("Label Invoice", size=128, required=True),
|
||||
"event_product": fields.char("Product Name", size=128, required=True),
|
||||
"tobe_invoiced": fields.boolean("To be Invoiced"),
|
||||
"invoice_id": fields.many2one("account.invoice", "Invoice"),
|
||||
'date_closed': fields.datetime('Closed', readonly=True),
|
||||
'ref': fields.reference('Reference', selection=crm._links_get, size=128),
|
||||
'ref2': fields.reference('Reference 2', selection=crm._links_get, size=128),
|
||||
'canal_id': fields.many2one('res.partner.canal', 'Channel', help="The channels represent the different communication modes available with the customer." \
|
||||
" With each commercial opportunity, you can indicate the canall which is this opportunity source."),
|
||||
'som': fields.many2one('res.partner.som', 'State of Mind', help="The minds states allow to define a value scale which represents" \
|
||||
"the partner mentality in relation to our services.The scale has" \
|
||||
"to be created with a factor for each level from 0 (Very dissatisfied) to 10 (Extremely satisfied)."),
|
||||
}
|
||||
|
||||
_defaults = {
|
||||
'nb_register': lambda *a: 1,
|
||||
'tobe_invoiced': lambda *a: True,
|
||||
'name': lambda *a: 'Registration',
|
||||
'nb_register': 1,
|
||||
'tobe_invoiced': True,
|
||||
'name': 'Registration',
|
||||
}
|
||||
|
||||
def _make_invoice(self, cr, uid, reg, lines, context=None):
|
||||
""" Create Invoice from Invoice lines
|
||||
@param reg : Object of event.registration
|
||||
@param lines: ids of Invoice lines
|
||||
"""
|
||||
if context is None:
|
||||
context = {}
|
||||
inv_pool = self.pool.get('account.invoice')
|
||||
inv_lines_pool = self.pool.get('account.invoice.line')
|
||||
|
||||
val_invoice = inv_pool.onchange_partner_id(cr, uid, [], 'out_invoice', reg.partner_invoice_id.id, False, False)
|
||||
val_invoice['value'].update({'partner_id': reg.partner_invoice_id.id})
|
||||
partner_address_id = val_invoice['value']['address_invoice_id']
|
||||
|
||||
value = inv_lines_pool.product_id_change(cr, uid, [], reg.event_id.product_id.id, uom =False, partner_id=reg.partner_invoice_id.id, fposition_id=reg.partner_invoice_id.property_account_position.id)
|
||||
|
||||
l = inv_lines_pool.read(cr, uid, lines)
|
||||
|
||||
val_invoice['value'].update({
|
||||
'origin': reg.event_product,
|
||||
'reference': False,
|
||||
'invoice_line': [(6, 0, lines)],
|
||||
'comment': "",
|
||||
})
|
||||
inv_id = inv_pool.create(cr, uid, val_invoice['value'])
|
||||
inv_pool.button_compute(cr, uid, [inv_id])
|
||||
self._history(cr, uid, [reg], _('Invoiced'))
|
||||
return inv_id
|
||||
|
||||
def action_invoice_create(self, cr, uid, ids, grouped=False, date_inv = False, context=None):
|
||||
""" Action of Create Invoice """
|
||||
res = False
|
||||
invoices = {}
|
||||
tax_ids=[]
|
||||
|
||||
inv_lines_pool = self.pool.get('account.invoice.line')
|
||||
inv_pool = self.pool.get('account.invoice')
|
||||
product_pool = self.pool.get('product.product')
|
||||
contact_pool = self.pool.get('res.partner.contact')
|
||||
if not context:
|
||||
context = {}
|
||||
# If date was specified, use it as date invoiced, usefull when invoices are generated this month and put the
|
||||
# last day of the last month as invoice date
|
||||
if date_inv:
|
||||
context['date_inv'] = date_inv
|
||||
|
||||
for reg in self.browse(cr, uid, ids, context=context):
|
||||
|
||||
val_invoice = inv_pool.onchange_partner_id(cr, uid, [], 'out_invoice', reg.partner_invoice_id.id, False, False)
|
||||
|
||||
val_invoice['value'].update({'partner_id': reg.partner_invoice_id.id})
|
||||
partner_address_id = val_invoice['value']['address_invoice_id']
|
||||
|
||||
if not partner_address_id:
|
||||
raise osv.except_osv(_('Error !'),
|
||||
_("Registered partner doesn't have an address to make the invoice."))
|
||||
|
||||
value = inv_lines_pool.product_id_change(cr, uid, [], reg.event_id.product_id.id, uom =False, partner_id=reg.partner_invoice_id.id, fposition_id=reg.partner_invoice_id.property_account_position.id)
|
||||
product = product_pool.browse(cr, uid, reg.event_id.product_id.id, context=context)
|
||||
for tax in product.taxes_id:
|
||||
tax_ids.append(tax.id)
|
||||
|
||||
vals = value['value']
|
||||
c_name = reg.contact_id and ('-' + contact_pool.name_get(cr, uid, [reg.contact_id.id])[0][1]) or ''
|
||||
vals.update({
|
||||
'name': reg.event_product + '-' + c_name,
|
||||
'price_unit': reg.unit_price,
|
||||
'quantity': reg.nb_register,
|
||||
'product_id':reg.event_id.product_id.id,
|
||||
'invoice_line_tax_id': [(6, 0, tax_ids)],
|
||||
})
|
||||
inv_line_ids = self._create_invoice_lines(cr, uid, [reg.id], vals)
|
||||
invoices.setdefault(reg.partner_id.id, []).append((reg, inv_line_ids))
|
||||
|
||||
for val in invoices.values():
|
||||
if grouped:
|
||||
res = self._make_invoice(cr, uid, val[0][0], [v for k , v in val], context=context)
|
||||
|
||||
for k , v in val:
|
||||
self.write(cr, uid, [k.id], {'state': 'done', 'invoice_id': res}, context=context)
|
||||
|
||||
else:
|
||||
for k , v in val:
|
||||
res = self._make_invoice(cr, uid, k, [v], context=context)
|
||||
self.write(cr, uid, [k.id], {'state': 'done', 'invoice_id': res}, context=context)
|
||||
return res
|
||||
|
||||
def check_confirm(self, cr, uid, ids, context=None):
|
||||
"""
|
||||
Check confirm event register on given id.
|
||||
@param ids: List of Event registration's IDs
|
||||
@param context: A standard dictionary for contextual values
|
||||
@return: Dictionary value which open Confirm registration form.
|
||||
"""
|
||||
data_pool = self.pool.get('ir.model.data')
|
||||
unconfirmed_ids = []
|
||||
for registration in self.browse(cr, uid, ids, context=context):
|
||||
total_confirmed = registration.event_id.register_current + registration.nb_register
|
||||
if total_confirmed <= registration.event_id.register_max or registration.event_id.register_max == 0:
|
||||
self.write(cr, uid, [registration.id], {'state': 'open'}, context=context)
|
||||
self.mail_user(cr, uid, [registration.id])
|
||||
self._history(cr, uid, [registration.id], _('Open'))
|
||||
else:
|
||||
unconfirmed_ids.append(registration.id)
|
||||
if unconfirmed_ids:
|
||||
view_id = data_pool._get_id(cr, uid, 'event', 'view_event_confirm_registration')
|
||||
view_data = data_pool.browse(cr, uid, view_id)
|
||||
view_id = view_data.res_id
|
||||
context['registration_ids'] = unconfirmed_ids
|
||||
return {
|
||||
'name': _('Confirm Registration'),
|
||||
'context': context,
|
||||
'view_type': 'form',
|
||||
'view_mode': 'tree,form',
|
||||
'res_model': 'event.confirm.registration',
|
||||
'views': [(view_id, 'form')],
|
||||
'type': 'ir.actions.act_window',
|
||||
'target': 'new',
|
||||
'context': context,
|
||||
'nodestroy': True
|
||||
}
|
||||
return True
|
||||
|
||||
def button_reg_close(self, cr, uid, ids, *args):
|
||||
registrations = self.browse(cr, uid, ids)
|
||||
self._history(cr, uid, registrations, _('Done'))
|
||||
self.write(cr, uid, ids, {'state': 'done', 'date_closed': time.strftime('%Y-%m-%d %H:%M:%S')})
|
||||
return True
|
||||
|
||||
def button_reg_cancel(self, cr, uid, ids, *args):
|
||||
registrations = self.browse(cr, uid, ids)
|
||||
self._history(cr, uid, registrations, _('Cancel'))
|
||||
self.write(cr, uid, ids, {'state': 'cancel'})
|
||||
return True
|
||||
|
||||
def create(self, cr, uid, values, context=None):
|
||||
""" Overrides orm create method.
|
||||
"""
|
||||
event = self.pool.get('event.event').browse(cr, uid, values['event_id'], context=context)
|
||||
|
||||
values['date_deadline']= event.date_begin
|
||||
values['description']= event.mail_confirm
|
||||
res = super(event_registration, self).create(cr, uid, values, context=context)
|
||||
registrations = self.browse(cr, uid, [res], context=context)
|
||||
self._history(cr, uid, registrations, _('Created'))
|
||||
return res
|
||||
|
||||
def write(self, cr, uid, ids, values, context=None):
|
||||
if 'event_id' in values:
|
||||
event = self.pool.get('event.event').browse(cr, uid, values['event_id'], context=context)
|
||||
values['date_deadline']= event.date_begin
|
||||
values['description']= event.mail_confirm
|
||||
return super(event_registration, self).write(cr, uid, ids, values, context=context)
|
||||
|
||||
|
||||
def mail_user(self, cr, uid, ids, confirm=False, context=None):
|
||||
"""
|
||||
Send email to user
|
||||
"""
|
||||
if not context:
|
||||
context = {}
|
||||
|
||||
for reg_id in self.browse(cr, uid, ids):
|
||||
src = reg_id.event_id.reply_to or False
|
||||
dest = []
|
||||
if reg_id.email_from:
|
||||
dest += [reg_id.email_from]
|
||||
if reg_id.email_cc:
|
||||
dest += [reg_id.email_cc]
|
||||
if dest and src:
|
||||
if confirm:
|
||||
tools.email_send(src, dest,
|
||||
_('Auto Confirmation: [%s] %s') %(reg_id.id, reg_id.name),
|
||||
reg_id.event_id.mail_confirm,
|
||||
openobject_id = reg_id.id)
|
||||
elif reg_id.event_id.mail_auto_confirm or reg_id.event_id.mail_auto_registr:
|
||||
if reg_id.event_id.state in ['draft', 'fixed', 'open', 'confirm', 'running'] and reg_id.event_id.mail_auto_registr:
|
||||
tools.email_send(src, dest,
|
||||
_('Auto Registration: [%s] %s') %(reg_id.id, reg_id.name),
|
||||
reg_id.event_id.mail_registr, openobject_id = reg_id.id)
|
||||
if (reg_id.event_id.state in ['confirm', 'running']) and reg_id.event_id.mail_auto_confirm:
|
||||
tools.email_send(src, dest,
|
||||
_('Auto Confirmation: [%s] %s') %(reg_id.id, reg_id.name),
|
||||
reg_id.event_id.mail_confirm, openobject_id = reg_id.id)
|
||||
|
||||
if not src:
|
||||
raise osv.except_osv(_('Error!'), _('You must define a reply-to address in order to mail the participant. You can do this in the Mailing tab of your event. Note that this is also the place where you can configure your event to not send emails automaticly while registering'))
|
||||
|
||||
return True
|
||||
|
||||
def mail_user_confirm(self, cr, uid, ids, context=None):
|
||||
"""
|
||||
Send email to user
|
||||
"""
|
||||
return self.mail_user(cr, uid, ids, confirm=True, context=context)
|
||||
|
||||
def _create_invoice_lines(self, cr, uid, ids, vals):
|
||||
""" Create account Invoice line for Registration Id.
|
||||
"""
|
||||
return self.pool.get('account.invoice.line').create(cr, uid, vals)
|
||||
|
||||
def onchange_badge_name(self, cr, uid, ids, badge_name):
|
||||
|
||||
data ={}
|
||||
if not badge_name:
|
||||
return data
|
||||
@@ -279,9 +411,11 @@ and users by email"),
|
||||
return {'value': data}
|
||||
|
||||
def onchange_contact_id(self, cr, uid, ids, contact, partner):
|
||||
|
||||
data ={}
|
||||
if not contact:
|
||||
return data
|
||||
|
||||
contact_id = self.pool.get('res.partner.contact').browse(cr, uid, contact)
|
||||
data['badge_name'] = contact_id.name
|
||||
data['badge_title'] = contact_id.title
|
||||
@@ -292,26 +426,27 @@ and users by email"),
|
||||
data['email_from'] = self.pool.get('res.partner.job').browse(cr, uid, job_ids[0]).email
|
||||
d = self.onchange_badge_name(cr, uid, ids, data['badge_name'])
|
||||
data.update(d['value'])
|
||||
|
||||
return {'value': data}
|
||||
|
||||
def onchange_event(self, cr, uid, ids, event_id, partner_invoice_id):
|
||||
context={}
|
||||
if not event_id:
|
||||
return {'value': {'unit_price': False , 'invoice_label': False }}
|
||||
return {'value': {'unit_price': False, 'event_product': False}}
|
||||
data_event = self.pool.get('event.event').browse(cr, uid, event_id)
|
||||
|
||||
if data_event.product_id:
|
||||
if not partner_invoice_id:
|
||||
unit_price=self.pool.get('product.product').price_get(cr, uid, [data_event.product_id.id], context=context)[data_event.product_id.id]
|
||||
return {'value': {'unit_price': unit_price , 'invoice_label': data_event.product_id.name}}
|
||||
return {'value': {'unit_price': unit_price, 'event_product': data_event.product_id.name}}
|
||||
data_partner = self.pool.get('res.partner').browse(cr, uid, partner_invoice_id)
|
||||
context.update({'partner_id': data_partner})
|
||||
unit_price = self.pool.get('product.product')._product_price(cr, uid, [data_event.product_id.id], False, False, {'pricelist': data_partner.property_product_pricelist.id})[data_event.product_id.id]
|
||||
return {'value': {'unit_price': unit_price , 'invoice_label': data_event.product_id.name}}
|
||||
return {'value': {'unit_price': False, 'invoice_label': False}}
|
||||
|
||||
return {'value': {'unit_price': unit_price, 'event_product': data_event.product_id.name}}
|
||||
|
||||
return {'value': {'unit_price': False, 'event_product': False}}
|
||||
|
||||
def onchange_partner_id(self, cr, uid, ids, part, event_id, email=False):
|
||||
|
||||
data={}
|
||||
data['badge_partner'] = data['contact_id'] = data['partner_invoice_id'] = data['email_from'] = data['badge_title'] = data['badge_name'] = False
|
||||
if not part:
|
||||
@@ -334,6 +469,7 @@ and users by email"),
|
||||
return {'value': data}
|
||||
|
||||
def onchange_partner_invoice_id(self, cr, uid, ids, event_id, partner_invoice_id):
|
||||
|
||||
data={}
|
||||
context={}
|
||||
data['unit_price']=False
|
||||
@@ -351,80 +487,8 @@ and users by email"),
|
||||
return {'value': data}
|
||||
return {'value': data}
|
||||
|
||||
def onchange_categ_id(self, cr, uid, ids, categ, context={}):
|
||||
if not categ:
|
||||
return {'value': {}}
|
||||
cat = self.pool.get('crm.case.categ').browse(cr, uid, categ, context).probability
|
||||
return {'value': {'probability': cat}}
|
||||
|
||||
event_registration()
|
||||
|
||||
|
||||
|
||||
class report_event_registration(osv.osv):
|
||||
_name = "report.event.registration"
|
||||
_description = "Events on registrations"
|
||||
_auto = False
|
||||
_columns = {
|
||||
'name': fields.char('Event', size=20),
|
||||
'date_begin': fields.datetime('Beginning date', required=True),
|
||||
'date_end': fields.datetime('Ending date', required=True),
|
||||
'draft_state': fields.integer('Draft Registration', size=20),
|
||||
'confirm_state': fields.integer('Confirm Registration', size=20),
|
||||
'register_max': fields.integer('Maximum Registrations'),
|
||||
}
|
||||
def init(self, cr):
|
||||
cr.execute("""
|
||||
create or replace view report_event_registration as (
|
||||
select
|
||||
e.id as id,
|
||||
c.name as name,
|
||||
e.date_begin as date_begin,
|
||||
e.date_end as date_end,
|
||||
(SELECT sum(c.nb_register) FROM event_registration c WHERE c.section_id=e.section_id and state in ('draft')) as draft_state,
|
||||
(SELECT sum(c.nb_register) FROM event_registration c WHERE c.section_id=e.section_id and state in ('open')) as confirm_state,
|
||||
e.register_max as register_max
|
||||
from
|
||||
event_event e,crm_case_section c
|
||||
where
|
||||
e.section_id=c.id
|
||||
)""")
|
||||
|
||||
report_event_registration()
|
||||
|
||||
class report_event_type_registration(osv.osv):
|
||||
_name = "report.event.type.registration"
|
||||
_description = "Event type on registration"
|
||||
_auto = False
|
||||
_columns = {
|
||||
'name': fields.char('Event Type', size=20),
|
||||
'nbevent': fields.integer('Number Of Events'),
|
||||
'draft_state': fields.integer('Draft Registrations', size=20),
|
||||
'confirm_state': fields.integer('Confirm Registrations', size=20),
|
||||
}
|
||||
|
||||
|
||||
def init(self, cr):
|
||||
cr.execute("""
|
||||
create or replace view report_event_type_registration as (
|
||||
select
|
||||
count(t.id) as id,
|
||||
t.name as name,
|
||||
(select sum(c.nb_register) from event_registration c, event_event e where c.section_id=e.section_id and c.state='draft' and e.type=t.id ) as draft_state ,
|
||||
(select sum(c.nb_register) from event_registration c, event_event e where c.section_id=e.section_id and c.state='open' and e.type=t.id ) as confirm_state,
|
||||
count(t.id) as nbevent
|
||||
from
|
||||
event_event e
|
||||
inner join
|
||||
crm_case_section c1 on (e.section_id=c1.id)
|
||||
inner join
|
||||
event_type t on (e.type=t.id)
|
||||
group by
|
||||
t.name,t.id
|
||||
|
||||
)""")
|
||||
report_event_type_registration()
|
||||
|
||||
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||
|
||||
|
||||
@@ -2,12 +2,5 @@
|
||||
<openerp>
|
||||
<data>
|
||||
|
||||
<!-- The base section for all events -->
|
||||
|
||||
<record model="crm.case.section" id="case_section_event">
|
||||
<field name="name">Events</field>
|
||||
</record>
|
||||
|
||||
|
||||
</data>
|
||||
</openerp>
|
||||
|
||||
@@ -58,7 +58,6 @@
|
||||
<field name="date_begin">2008-01-01 19:00:00</field>
|
||||
<field name="date_end">2008-01-01 23:00:00</field>
|
||||
<field name="product_id" ref="event_product_0"/>
|
||||
<field name="parent_id" ref="case_section_event"/>
|
||||
<field name="user_id" ref="base.user_root"/>
|
||||
<field name="register_max">500</field>
|
||||
<field name="type" ref="event_type_1"/>
|
||||
@@ -94,7 +93,6 @@
|
||||
<field name="product_id" ref="event_product_1"/>
|
||||
<field name="type" ref="event_type_1"/>
|
||||
<field name="user_id" ref="base.user_root"/>
|
||||
<field name="parent_id" ref="case_section_event"/>
|
||||
<field name="register_max">350</field>
|
||||
<field name="state">confirm</field>
|
||||
</record>
|
||||
@@ -107,7 +105,6 @@
|
||||
<field name="type" ref="event_type_2"/>
|
||||
<field name="register_max">200</field>
|
||||
<field name="user_id" ref="base.user_root"/>
|
||||
<field name="parent_id" ref="case_section_event"/>
|
||||
<field name="mail_auto_registr">True</field>
|
||||
<field name="mail_auto_confirm">True</field>
|
||||
<field name="state">done</field>
|
||||
|
||||
+173
-199
@@ -36,19 +36,8 @@
|
||||
<menuitem name="Configuration" id="menu_event_config" parent="menu_marketing_event_main" sequence="30" groups="base.group_extended"/>
|
||||
<menuitem name="Types of Events" id="menu_event_type" action="action_event_type" parent="menu_event_config" groups="base.group_extended,crm.group_crm_manager"/>
|
||||
|
||||
<!-- The base section for all events -->
|
||||
|
||||
<record model="ir.actions.act_window" id="action_event_categories">
|
||||
<field name="name">Events by section</field>
|
||||
<field name="type">ir.actions.act_window</field>
|
||||
<field name="res_model">crm.case.section</field>
|
||||
<field name="domain" eval="[('parent_id','=',False)]" />
|
||||
<field name="view_type">tree</field>
|
||||
</record>
|
||||
<menuitem name="Events by Categories" id="menu_action_event_categories" action="action_event_categories" parent="menu_event_main"/>
|
||||
|
||||
|
||||
<!-- Events Organisation/CONFIGURATION/EVENTS -->
|
||||
<!-- Events Organisation/CONFIGURATION/EVENTS -->
|
||||
|
||||
<record model="ir.ui.view" id="view_event_form">
|
||||
<field name="name">Events</field>
|
||||
@@ -58,7 +47,7 @@
|
||||
<form string="Events">
|
||||
<group col="6" colspan="4">
|
||||
<field name="name" string="Event" select="1"/>
|
||||
<field name="type"/>
|
||||
<field name="type" widget="selection"/>
|
||||
<field name="user_id" select="1"/>
|
||||
<field name="date_begin" select="1"/>
|
||||
<field name="date_end"/>
|
||||
@@ -67,11 +56,12 @@
|
||||
<notebook colspan="4">
|
||||
<page string="General">
|
||||
<separator string="Event description" colspan="4"/>
|
||||
<field name="parent_id" domain="[('parent_id','child_of','Event')]" string="Parent Category"/>
|
||||
<field name="parent_id" domain="[('parent_id','child_of','Event')]"/>
|
||||
<field name="active"/>
|
||||
<field name="register_min"/>
|
||||
<field name="register_max"/>
|
||||
<separator string="Status" colspan="4"/>
|
||||
<separator string="Notes" colspan="4"/>
|
||||
<field name="note" colspan="4" nolabel="1"/>
|
||||
<field name="state" select="1"/>
|
||||
<group col="4" colspan="2">
|
||||
<button string="Confirm Event" name="button_confirm" states="draft" type="object" icon="gtk-apply"/>
|
||||
@@ -80,17 +70,25 @@
|
||||
<button string="Set To Draft" name="button_draft" states="confirm,cancel,done" type="object" icon="gtk-convert"/>
|
||||
</group>
|
||||
</page>
|
||||
<page string="Mailing">
|
||||
<field name="reply_to"/>
|
||||
<separator string="Auto Registration Email" colspan="4"/>
|
||||
<field name="mail_auto_registr"/>
|
||||
<newline/>
|
||||
<field name="mail_registr" colspan="4"/>
|
||||
<separator string="Auto Confirmation Email" colspan="4"/>
|
||||
<field name="mail_auto_confirm"/>
|
||||
<newline/>
|
||||
<field name="mail_confirm" colspan="4"/>
|
||||
<page string="Mailing">
|
||||
<field name="reply_to" />
|
||||
<newline/>
|
||||
|
||||
<group col="3" colspan="2" expand="1">
|
||||
<separator string="Auto Registration Email" colspan="2"/>
|
||||
<newline/>
|
||||
<field name="mail_auto_registr"/>
|
||||
<separator string="Registration Email" colspan="2"/>
|
||||
<newline/>
|
||||
<field name="mail_registr" colspan="2" nolabel="1"/>
|
||||
</group>
|
||||
<group col="2" colspan="2" >
|
||||
<separator string="Auto Confirmation Email" colspan="2"/>
|
||||
<field name="mail_auto_confirm"/>
|
||||
<newline/>
|
||||
<separator string="Confirmation Email" colspan="2"/>
|
||||
<field name="mail_confirm" colspan="2" nolabel="1"/>
|
||||
</group>
|
||||
</page>
|
||||
<page string="Statistics">
|
||||
<separator string="Registrations" colspan="4"/>
|
||||
@@ -103,6 +101,7 @@
|
||||
</record>
|
||||
|
||||
<!-- event.event tree view -->
|
||||
|
||||
<record model="ir.ui.view" id="view_event_tree">
|
||||
<field name="name">event.event.tree</field>
|
||||
<field name="model">event.event</field>
|
||||
@@ -111,6 +110,7 @@
|
||||
<tree string="Events" colors="red:register_min>register_current;black:register_min<=register_current">
|
||||
<field name="name" string="Name"/>
|
||||
<field name="user_id"/>
|
||||
<field name="type"/>
|
||||
<field name="date_begin"/>
|
||||
<field name="register_min"/>
|
||||
<field name="register_current"/>
|
||||
@@ -126,36 +126,61 @@
|
||||
<field name="arch" type="xml">
|
||||
<search string="Events">
|
||||
<group col="10" colspan="4">
|
||||
<separator orientation="vertical"/>
|
||||
<filter icon="terp-document-new" string="Draft" domain="[('state','=','draft')]" help="Draft Events"/>
|
||||
<filter icon="terp-document-new" string="Draft" name="draft" domain="[('state','=','draft')]" help="Draft Events"/>
|
||||
<filter icon="terp-camera_test" string="Confirmed" domain="[('state','=','confirm')]" help="Confirmed Events"/>
|
||||
<separator orientation="vertical"/>
|
||||
<field name="name" string="Event" select="1"/>
|
||||
<field name="user_id" select="1"/>
|
||||
<field name="date_begin" select="1"/>
|
||||
<field name="state" select="1"/>
|
||||
<field name="user_id" widget="selection">
|
||||
<filter icon="terp-personal"
|
||||
string="My Events"
|
||||
help="My Events"
|
||||
domain="[('user_id','=',uid)]"/>
|
||||
</field>
|
||||
<field name="date_begin" select="1"/>
|
||||
</group>
|
||||
<newline/>
|
||||
<group expand="0" string="Group By..." colspan="4" col="12">
|
||||
<filter string="Event Type" icon="terp-crm" context="{'group_by':'type'}"/>
|
||||
<filter string="state" icon="terp-stock_effects-object-colorize" context="{'group_by':'state'}"/>
|
||||
<separator orientation="vertical"/>
|
||||
<filter string="Responsible" icon="terp-personal" context="{'group_by': 'user_id'}"/>
|
||||
<separator orientation="vertical"/>
|
||||
<filter string="Creation" icon="terp-go-month"
|
||||
domain="[]" context="{'group_by':'date_begin'}"/>
|
||||
</group>
|
||||
</search>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<!-- Events Organisation/CONFIGURATION/EVENTS -->
|
||||
|
||||
<record model="ir.actions.act_window" id="action_event_view">
|
||||
<field name="name">Events</field>
|
||||
<field name="type">ir.actions.act_window</field>
|
||||
<field name="res_model">event.event</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_mode">tree,form</field>
|
||||
<field name="context">{"search_default_user_id":uid}</field>
|
||||
<field name="context">{"search_default_draft": "1"}</field>
|
||||
<field name="search_view_id" ref="view_event_search"/>
|
||||
</record>
|
||||
|
||||
<act_window
|
||||
id="act_event_list_register_event"
|
||||
name="Registration"
|
||||
res_model="event.registration"
|
||||
src_model="event.event"
|
||||
view_mode="tree,form"
|
||||
domain="[('event_id', '=', active_id)]"
|
||||
view_type="form"/>
|
||||
|
||||
<menuitem name="Events" id="menu_event_event" action="action_event_view" parent="menu_event_main" />
|
||||
|
||||
<!-- EVENTS/REGISTRATIONS/EVENTS -->
|
||||
|
||||
<!-- Registration view (form) by _inherits .................. -->
|
||||
<record model="ir.ui.view" id="event_registration_tree">
|
||||
|
||||
<record model="ir.ui.view" id="view_event_registration_tree">
|
||||
<field name="name">event.registration.tree</field>
|
||||
<field name="model">event.registration</field>
|
||||
<field name="type">tree</field>
|
||||
@@ -171,7 +196,7 @@
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record model="ir.ui.view" id="event_registration_form">
|
||||
<record model="ir.ui.view" id="view_event_registration_form">
|
||||
<field name="name">event.registration.form</field>
|
||||
<field name="model">event.registration</field>
|
||||
<field name="type">form</field>
|
||||
@@ -189,91 +214,107 @@
|
||||
<field name="unit_price"/>
|
||||
</group>
|
||||
<notebook colspan="4">
|
||||
<page string="General">
|
||||
<field name="contact_id" on_change="onchange_contact_id(contact_id, partner_id)" /><newline/>
|
||||
<field name="email_from"/>
|
||||
<button name="remind_partner" string="Send Reminder" states="open,pending" type="object" colspan="2" icon="gtk-go-forward"/>
|
||||
<newline/>
|
||||
<separator string="Badge" colspan="4"/>
|
||||
<field name="badge_title"/>
|
||||
<field name="badge_name" on_change="onchange_badge_name(badge_name)"/>
|
||||
<field name="badge_partner"/>
|
||||
<newline/>
|
||||
<separator string="Status" colspan="4"/>
|
||||
<group col="8" colspan="4">
|
||||
<field name="state" select="1" colspan="2"/>
|
||||
<button name="button_reg_close" string="Registration Invoiced" states="open" type="object" icon="gtk-print"/>
|
||||
<button name="check_confirm" string="Confirm Registration" states="draft" type="object" icon="gtk-apply"/>
|
||||
<button name="button_reg_cancel" string="Cancel Registration" states="draft,open" type="object" icon="gtk-cancel"/>
|
||||
</group>
|
||||
</page>
|
||||
<page string="Extra Info">
|
||||
<field name="name" select="1" colspan="4"/>
|
||||
<field name="id" select="1"/>
|
||||
<field name="active"/>
|
||||
<field name="email_cc" colspan="4"/>
|
||||
<field name="categ_id" on_change="onchange_categ_id(categ_id)"/>
|
||||
<separator colspan="4" string="Dates"/>
|
||||
<field name="create_date"/>
|
||||
<field name="date_closed"/>
|
||||
<separator colspan="4" string="References"/>
|
||||
<field name="ref" colspan="4"/>
|
||||
<field name="ref2" colspan="4"/>
|
||||
</page>
|
||||
<page string="History">
|
||||
<field name="message_ids" colspan="4" nolabel="1" mode="tree,form">
|
||||
<form string="Communication history">
|
||||
<group col="6" colspan="4">
|
||||
<field name="date"/>
|
||||
<field name="email_to"/>
|
||||
<field name="email_from"/>
|
||||
</group>
|
||||
<notebook colspan="4">
|
||||
<page string="Details">
|
||||
<field name="description" colspan="4" nolabel="1"/>
|
||||
</page>
|
||||
<page string="Attachments">
|
||||
<field name="attachment_ids" colspan="4" readonly="1" nolabel="1"/>
|
||||
</page>
|
||||
</notebook>
|
||||
<button colspan="4"
|
||||
string="Reply to Last Email"
|
||||
name="%(crm.action_crm_send_mail)d"
|
||||
context="{'mail':'reply', 'model': 'event.registration'}"
|
||||
icon="gtk-undo" type="action" />
|
||||
</form>
|
||||
<tree string="Communication history">
|
||||
<field name="date"/>
|
||||
<field name="email_from" />
|
||||
<field name="email_to"/>
|
||||
<field name="description"/>
|
||||
</tree>
|
||||
</field>
|
||||
<field name="log_ids" nolabel="1" colspan="4" mode="tree,form" readonly="1">
|
||||
<tree string="Actions">
|
||||
<separator string="Action Information" colspan="4"/>
|
||||
<field name="name"/>
|
||||
<field name="date"/>
|
||||
<field name="user_id"/>
|
||||
</tree>
|
||||
<form string="Actions">
|
||||
<separator string="Action Information" colspan="4"/>
|
||||
<field name="name" colspan="4"/>
|
||||
<field name="date"/>
|
||||
<field name="user_id"/>
|
||||
</form>
|
||||
</field>
|
||||
</page>
|
||||
<page string="Payments">
|
||||
<field name="invoice_label" select="1"/>
|
||||
<field name="tobe_invoiced" select="1"/>
|
||||
<field name="invoice_id"/>
|
||||
</page>
|
||||
<page string="General">
|
||||
<field name="contact_id" on_change="onchange_contact_id(contact_id, partner_id)" /><newline/>
|
||||
<field name="email_from"/>
|
||||
<button name="remind_partner" string="Send Reminder" states="open,pending" type="object" colspan="2" icon="gtk-go-forward"/>
|
||||
<newline/>
|
||||
<separator string="Badge" colspan="4"/>
|
||||
<field name="badge_title"/>
|
||||
<field name="badge_name" on_change="onchange_badge_name(badge_name)"/>
|
||||
<field name="badge_partner"/>
|
||||
<newline/>
|
||||
<separator string="Status" colspan="4"/>
|
||||
<group col="8" colspan="4">
|
||||
<field name="state" select="1" colspan="2"/>
|
||||
<button name="button_reg_close" string="Close Registration" states="open" type="object" icon="gtk-close"/>
|
||||
<button name="check_confirm" string="Confirm Registration" states="draft" type="object" icon="gtk-apply"/>
|
||||
<button name="button_reg_cancel" string="Cancel Registration" states="draft,open" type="object" icon="gtk-cancel"/>
|
||||
</group>
|
||||
</page>
|
||||
<page string="Payments">
|
||||
<field name="event_product" select="1"/>
|
||||
<field name="tobe_invoiced" select="1"/>
|
||||
<field name="invoice_id"/>
|
||||
</page>
|
||||
<page string="Emails" groups="base.group_extended">
|
||||
<group colspan="4">
|
||||
<field colspan="4" name="email_cc" string="CC"/>
|
||||
</group>
|
||||
<field name="message_ids" colspan="4" nolabel="1" mode="form,tree">
|
||||
<form string="Communication history">
|
||||
<group col="6" colspan="4">
|
||||
<field name="date"/>
|
||||
<field name="email_to"/>
|
||||
<field name="email_from"/>
|
||||
</group>
|
||||
<notebook colspan="4">
|
||||
<page string="Details">
|
||||
<field name="description" colspan="4" nolabel="1"/>
|
||||
</page>
|
||||
<page string="Attachments">
|
||||
<field name="attachment_ids" colspan="4" readonly="1" nolabel="1"/>
|
||||
</page>
|
||||
</notebook>
|
||||
<button colspan="4"
|
||||
string="Reply to Last Email"
|
||||
name="%(crm.action_crm_send_mail)d"
|
||||
context="{'mail':'reply', 'model': 'crm.lead', 'include_original' : True}"
|
||||
icon="gtk-undo" type="action" />
|
||||
</form>
|
||||
<tree string="Communication history">
|
||||
<field name="date"/>
|
||||
<field name="email_from" />
|
||||
<field name="email_to"/>
|
||||
<field name="description"/>
|
||||
</tree>
|
||||
</field>
|
||||
<button colspan="4" string="Send New Email"
|
||||
name="%(crm.action_crm_send_mail)d"
|
||||
context="{'mail':'new', 'model': 'event.registration'}"
|
||||
icon="gtk-go-forward" type="action" />
|
||||
</page>
|
||||
<page string="History">
|
||||
<group colspan="4">
|
||||
<field name="name" select="1" colspan="4"/>
|
||||
</group>
|
||||
<group col="2" colspan="2">
|
||||
<separator string="Dates" colspan="2"/>
|
||||
<field name="create_date"/>
|
||||
<field name="date_closed"/>
|
||||
</group>
|
||||
<group col="2" colspan="2">
|
||||
<separator string="Misc" colspan="2"/>
|
||||
<field name="id"/>
|
||||
<field name="active"/>
|
||||
</group>
|
||||
<group col="3" colspan="4">
|
||||
<separator colspan="4" string="References"/>
|
||||
<field name="ref" />
|
||||
<field name="ref2" />
|
||||
</group>
|
||||
<!-- TODO-->
|
||||
<field name="log_ids" nolabel="1" colspan="4">
|
||||
<tree string="Logs">
|
||||
<field name="name" colspan="4"/>
|
||||
<field name="date"/>
|
||||
<field name="user_id"/>
|
||||
</tree>
|
||||
<form string="Logs">
|
||||
<separator string="Action Information" colspan="4"/>
|
||||
<field name="name" colspan="4"/>
|
||||
<field name="date"/>
|
||||
<field name="user_id"/>
|
||||
</form>
|
||||
</field>
|
||||
</page>
|
||||
</notebook>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<!-- Search view of event registration form-->
|
||||
|
||||
<record model="ir.ui.view" id="view_registration_search">
|
||||
<field name="name">Registrations</field>
|
||||
<field name="model">event.registration</field>
|
||||
@@ -281,16 +322,28 @@
|
||||
<field name="arch" type="xml">
|
||||
<search string="Event Registration">
|
||||
<group col="12" colspan="4">
|
||||
<separator orientation="vertical"/>
|
||||
<filter icon="terp-document-new" string="Draft" domain="[('state','=','draft')]" help="Draft Registrations"/>
|
||||
<filter icon="terp-document-new" string="Draft" name="draft" domain="[('state','=','draft')]" help="Draft Registrations"/>
|
||||
<filter icon="terp-camera_test" string="Confirmed" domain="[('state','in',('open','done'))]" help="Confirmed Registrations"/>
|
||||
<separator orientation="vertical"/>
|
||||
<field name="event_id" select="1"/>
|
||||
<field name="user_id" select="1"/>
|
||||
<field name="partner_id" select="1"/>
|
||||
<field name="partner_id" />
|
||||
<field name="event_id" widget="selection"/>
|
||||
<field name="state" select="1"/>
|
||||
<field name="invoice_label" select="1"/>
|
||||
|
||||
<field name="user_id" widget="selection">
|
||||
<filter icon="terp-personal"
|
||||
string="My Registration"
|
||||
help="My Registration"
|
||||
domain="[('user_id','=',uid)]"/>
|
||||
</field>
|
||||
</group>
|
||||
<newline/>
|
||||
<group expand="0" string="Group By...">
|
||||
<filter string="Event" icon="terp-crm" domain="[]" context="{'group_by':'event_id'}"/>
|
||||
<filter string="State" icon="terp-stock_effects-object-colorize" domain="[]" context="{'group_by':'state'}"/>
|
||||
<separator orientation="vertical"/>
|
||||
<filter string="Partner" icon="terp-personal" domain="[]" context="{'group_by':'partner_id'}"/>
|
||||
<filter string="Responsible" icon="terp-personal" domain="[]" context="{'group_by':'user_id'}"/>
|
||||
</group>
|
||||
</search>
|
||||
</field>
|
||||
</record>
|
||||
@@ -301,93 +354,14 @@
|
||||
<field name="view_type">form</field>
|
||||
<field name="domain"></field>
|
||||
<field name="view_mode">tree,form</field>
|
||||
<field name="context">{"search_default_user_id":uid}</field>
|
||||
<field name="context">{"search_default_draft": "1"}</field>
|
||||
<field name="search_view_id" ref="view_registration_search"/>
|
||||
</record>
|
||||
|
||||
<menuitem
|
||||
name="Registrations"
|
||||
id="menu_action_registration" parent="menu_event_main"
|
||||
action="action_registration"/>
|
||||
|
||||
<!-- report , event on registration... start -->
|
||||
<record model="ir.ui.view" id="report_event_registration_tree">
|
||||
<field name="name">report.event.registration.tree</field>
|
||||
<field name="model">report.event.registration</field>
|
||||
<field name="type">tree</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree string="Event on Registration">
|
||||
<field name="name" select="1"/>
|
||||
<field name="date_begin" select="1"/>
|
||||
<field name="date_end"/>
|
||||
<field name="draft_state"/>
|
||||
<field name="confirm_state"/>
|
||||
<field name="register_max"/>
|
||||
</tree>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record model ="ir.ui.view" id="report_event_registration_graph">
|
||||
<field name="name">report.event.registration.graph</field>
|
||||
<field name="model">report.event.registration</field>
|
||||
<field name="type">graph</field>
|
||||
<field name="arch" type="xml">
|
||||
<graph string="Event on Registration" type="bar">
|
||||
<field name="name"/>
|
||||
<field name="draft_state" operator="+"/>
|
||||
<field name="confirm_state" operator="+"/>
|
||||
<field name="register_max" operator="+"/>
|
||||
</graph>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record model="ir.actions.act_window" id="action_event_registration_report">
|
||||
<field name="name">Events On Registrations</field>
|
||||
<field name="res_model">report.event.registration</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_mode">tree,graph</field>
|
||||
</record>
|
||||
<menuitem name="Reporting" id="menu_report_event" parent="menu_marketing_event_main" sequence="20"/>
|
||||
<!--<menuitem parent="menu_report_event" action="action_event_registration" id="menu_report_event_registration"/>-->
|
||||
<menuitem parent="menu_report_event" action="action_event_registration_report" id="menu_report_event_registration" />
|
||||
<!-- end... -->
|
||||
|
||||
|
||||
<!-- report , event type on registration... start -->
|
||||
<record model="ir.ui.view" id="report_event_type_registration_tree">
|
||||
<field name="name">report.event.type.registration.tree</field>
|
||||
<field name="model">report.event.type.registration</field>
|
||||
<field name="type">tree</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree string="Registration By Event Types">
|
||||
<field name="name" select="1"/>
|
||||
<field name="nbevent"/>
|
||||
<field name="draft_state"/>
|
||||
<field name="confirm_state"/>
|
||||
</tree>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record model="ir.ui.view" id="report_event_type_registration_graph">
|
||||
<field name="name">report.event.type.registration.graph</field>
|
||||
<field name="model">report.event.type.registration</field>
|
||||
<field name="type">graph</field>
|
||||
<field name="arch" type="xml">
|
||||
<graph string="Registration By Event Types" type="bar">
|
||||
<field name="name"/>
|
||||
<field name="draft_state" operator="+"/>
|
||||
<field name="confirm_state" operator="+"/>
|
||||
</graph>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record model="ir.actions.act_window" id="action_event_type_registration">
|
||||
<field name="name">Registration By Event Types</field>
|
||||
<field name="res_model">report.event.type.registration</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_mode">graph,tree</field>
|
||||
</record>
|
||||
<menuitem parent="menu_report_event" action="action_event_type_registration" id="menu_report_event_type_registration"/>
|
||||
|
||||
<!-- end... -->
|
||||
</data>
|
||||
</openerp>
|
||||
|
||||
@@ -19,32 +19,6 @@
|
||||
#
|
||||
##############################################################################
|
||||
|
||||
from osv import fields, osv
|
||||
import report_event_registration
|
||||
|
||||
class event_registration_list(osv.osv_memory):
|
||||
""" List Event Registration """
|
||||
_name = "event.registration.list"
|
||||
_description = "List Event Registrations"
|
||||
|
||||
def open_registration(self, cr, uid, ids, context={}):
|
||||
if not context.get('active_id', None):
|
||||
return {
|
||||
'name': 'Event Registrations',
|
||||
'view_type': 'form',
|
||||
'view_mode': 'tree,form',
|
||||
'res_model': 'event.registration',
|
||||
'type': 'ir.actions.act_window'
|
||||
}
|
||||
|
||||
return {
|
||||
'domain': [('section_id', '=', context['active_id'])],
|
||||
'name': 'Event Registrations',
|
||||
'view_type': 'form',
|
||||
'view_mode': 'tree,form',
|
||||
'res_model': 'event.registration',
|
||||
'type': 'ir.actions.act_window'
|
||||
}
|
||||
|
||||
event_registration_list()
|
||||
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||
@@ -0,0 +1,83 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
##############################################################################
|
||||
#
|
||||
# OpenERP, Open Source Management Solution
|
||||
# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU Affero General Public License as
|
||||
# published by the Free Software Foundation, either version 3 of the
|
||||
# License, or (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU Affero General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU Affero General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
##############################################################################
|
||||
|
||||
from osv import fields, osv
|
||||
import tools
|
||||
|
||||
class report_event_registration(osv.osv):
|
||||
|
||||
_name = "report.event.registration"
|
||||
_description = "Events on registrations and Events on type"
|
||||
_auto = False
|
||||
_rec_name = 'date'
|
||||
_columns = {
|
||||
'date': fields.date('Date', readonly=True),
|
||||
'year': fields.char('Year', size=4, readonly=True),
|
||||
'month':fields.selection([('01','January'), ('02','February'), ('03','March'), ('04','April'),
|
||||
('05','May'), ('06','June'), ('07','July'), ('08','August'), ('09','September'),
|
||||
('10','October'), ('11','November'), ('12','December')], 'Month',readonly=True),
|
||||
'day': fields.char('Day', size=128, readonly=True),
|
||||
'event_id': fields.many2one('event.event', 'Event Related', required=True),
|
||||
'draft_state': fields.integer(' # No of draft Registration.', size=20),
|
||||
'confirm_state': fields.integer(' # No of Confirm Registration', size=20),
|
||||
'register_max': fields.integer('Maximum Registrations'),
|
||||
'nbevent': fields.integer('Number Of Events'),
|
||||
'type': fields.many2one('event.type', 'Event Type'),
|
||||
'state': fields.selection([('draft', 'Draft'), ('confirm', 'Confirmed'), ('done', 'Done'), ('cancel', 'Cancelled')], 'State', readonly=True, required=True),
|
||||
'user_id':fields.many2one('res.users', 'Responsible', readonly=True),
|
||||
}
|
||||
_order = 'date desc'
|
||||
def init(self, cr):
|
||||
"""
|
||||
initialize the sql view for the event registration
|
||||
cr -- the cursor
|
||||
"""
|
||||
cr.execute("""
|
||||
create or replace view report_event_registration as (
|
||||
select
|
||||
e.id as id,
|
||||
c.event_id as event_id,
|
||||
e.date_begin as date,
|
||||
e.user_id as user_id,
|
||||
to_char(e.date_begin, 'YYYY') as year,
|
||||
to_char(e.date_begin, 'MM') as month,
|
||||
to_char(e.date_begin, 'YYYY-MM-DD') as day,
|
||||
count(t.id) as nbevent,
|
||||
t.id as type,
|
||||
(SELECT sum(c.nb_register) FROM event_registration c WHERE c.event_id=e.id and t.id=e.type and state in ('draft')) as draft_state,
|
||||
(SELECT sum(c.nb_register) FROM event_registration c WHERE c.event_id=e.id and t.id=e.type and state in ('open')) as confirm_state,
|
||||
e.register_max as register_max,
|
||||
e.state as state
|
||||
from
|
||||
event_event e
|
||||
inner join
|
||||
event_registration c on (e.id=c.event_id)
|
||||
inner join
|
||||
event_type t on (e.type=t.id)
|
||||
group by
|
||||
to_char(e.date_begin, 'YYYY'),
|
||||
to_char(e.date_begin, 'MM'),
|
||||
t.id, e.id, e.date_begin,
|
||||
e.register_max, e.type, e.state, c.event_id, e.user_id,
|
||||
to_char(e.date_begin, 'YYYY-MM-DD')
|
||||
)""")
|
||||
|
||||
report_event_registration()
|
||||
@@ -0,0 +1,129 @@
|
||||
<?xml version="1.0"?>
|
||||
<openerp>
|
||||
<data>
|
||||
<!-- report , event on registration... start -->
|
||||
<record model="ir.ui.view" id="report_event_registration_tree">
|
||||
<field name="name">report.event.registration.tree</field>
|
||||
<field name="model">report.event.registration</field>
|
||||
<field name="type">tree</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree string="Event on Registration">
|
||||
<field name="date" invisible="1"/>
|
||||
<field name="user_id" invisible="1"/>
|
||||
<field name="year" invisible="1"/>
|
||||
<field name="day" invisible="1"/>
|
||||
<field name="month" invisible="1"/>
|
||||
<field name="event_id" invisible="1"/>
|
||||
<field name="state" invisible="1"/>
|
||||
<field name="type" invisible="1"/>
|
||||
<field name="nbevent"/>
|
||||
<field name="draft_state"/>
|
||||
<field name="confirm_state"/>
|
||||
<field name="register_max"/>
|
||||
</tree>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record model ="ir.ui.view" id="report_event_registration_graph">
|
||||
<field name="name">report.event.registration.graph</field>
|
||||
<field name="model">report.event.registration</field>
|
||||
<field name="type">graph</field>
|
||||
<field name="arch" type="xml">
|
||||
<graph orientation="horizontal" string="Event on Registration" type="bar" >
|
||||
<field name="event_id"/>
|
||||
<field name="draft_state" operator="+"/>
|
||||
<field name="confirm_state" operator="+"/>
|
||||
<field name="register_max" operator="+"/>
|
||||
</graph>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<!-- Event on Registration search view -->
|
||||
|
||||
<record model="ir.ui.view" id="view_report_event_registration_search">
|
||||
<field name="name">.search</field>
|
||||
<field name="model">report.event.registration</field>
|
||||
<field name="type">search</field>
|
||||
<field name="arch" type="xml">
|
||||
<search string="Event on Registration">
|
||||
<group col="8" colspan="4">
|
||||
<filter icon="terp-go-year" string="Last 365 Days"
|
||||
domain="[('date','<=', time.strftime('%%Y-%%m-%%d')),('date','>',(datetime.date.today()-datetime.timedelta(days=365)).strftime('%%Y-%%m-%%d'))]"
|
||||
help="Tasks performed in last 365 days"/>
|
||||
<filter icon="terp-go-month" string="Last 30 Days"
|
||||
name="month"
|
||||
domain="[('date','<=', time.strftime('%%Y-%%m-%%d')), ('date','>',(datetime.date.today()-datetime.timedelta(days=30)).strftime('%%Y-%%m-%%d'))]"
|
||||
help="Tasks performed in last 30 days"/>
|
||||
<filter icon="terp-go-week"
|
||||
string="Last 7 Days"
|
||||
separator="1"
|
||||
domain="[('date','<=', time.strftime('%%Y-%%m-%%d')), ('date','>',(datetime.date.today()-datetime.timedelta(days=7)).strftime('%%Y-%%m-%%d'))]"
|
||||
help="Tasks during last 7 days"/>
|
||||
|
||||
<separator orientation="vertical"/>
|
||||
<filter icon="terp-document-new"
|
||||
string="Draft"
|
||||
domain="[('state','=','draft')]"/>
|
||||
<filter icon="terp-camera_test"
|
||||
string="Confirm"
|
||||
domain="[('state', '=', 'confirm')]"/>
|
||||
<separator orientation="vertical"/>
|
||||
<field name="event_id" widget="selection"/>
|
||||
<field name="type" widget="selection"/>
|
||||
<field name="user_id" widget="selection">
|
||||
<filter icon="terp-personal"
|
||||
string="My Events"
|
||||
help="My Events"
|
||||
domain="[('user_id','=',uid)]"/>
|
||||
</field>
|
||||
<field name="date"/>
|
||||
</group>
|
||||
<newline/>
|
||||
<group expand="0" string="Group By..." colspan="4" col="12">
|
||||
<filter string="Event" name="event" icon="terp-crm" context="{'group_by':'event_id'}"/>
|
||||
<filter string="Event Type" icon="terp-crm" context="{'group_by':'type'}"/>
|
||||
<separator orientation="vertical"/>
|
||||
<filter string="state" icon="terp-stock_effects-object-colorize" context="{'group_by':'state'}"/>
|
||||
<separator orientation="vertical"/>
|
||||
<filter string="Responsible" name="user" icon="terp-personal" context="{'group_by': 'user_id'}"/>
|
||||
<separator orientation="vertical" />
|
||||
<filter string="Day" icon="terp-go-month"
|
||||
domain="[]" context="{'group_by':'day'}"/>
|
||||
<filter string="Month" icon="terp-go-month"
|
||||
domain="[]" context="{'group_by':'month'}"/>
|
||||
<filter string="Year" icon="terp-go-year"
|
||||
domain="[]" context="{'group_by':'year'}"/>
|
||||
</group>
|
||||
</search>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record model="ir.actions.act_window" id="action_report_event_registration">
|
||||
<field name="name">Events On Registrations</field>
|
||||
<field name="res_model">report.event.registration</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_mode">tree,graph</field>
|
||||
<field name="search_view_id" ref="view_report_event_registration_search"/>
|
||||
<field name="context">{"search_default_user":1,"search_default_month":1,'group_by_no_leaf':1,'group_by':[]}</field>
|
||||
</record>
|
||||
|
||||
<record model="ir.actions.act_window.view" id="action_report_event_registration_tree">
|
||||
<field name="sequence" eval="1"/>
|
||||
<field name="view_mode">tree</field>
|
||||
<field name="view_id" ref="report_event_registration_tree"/>
|
||||
<field name="act_window_id" ref="action_report_event_registration"/>
|
||||
</record>
|
||||
|
||||
<record model="ir.actions.act_window.view" id="action_report_event_registration_graph">
|
||||
<field name="sequence" eval="2"/>
|
||||
<field name="view_mode">graph</field>
|
||||
<field name="view_id" ref="report_event_registration_graph"/>
|
||||
<field name="act_window_id" ref="action_report_event_registration"/>
|
||||
</record>
|
||||
|
||||
<!--<menuitem parent="menu_report_event" action="action_event_registration" id="menu_report_event_registration"/>-->
|
||||
<menuitem parent="menu_report_event" action="action_report_event_registration" id="menu_report_event_registration" />
|
||||
|
||||
<!-- end... -->
|
||||
</data>
|
||||
</openerp>
|
||||
@@ -1,13 +1,24 @@
|
||||
<?xml version="1.0"?>
|
||||
<openerp>
|
||||
<data>
|
||||
<record id="menu_event_config" model="ir.ui.menu">
|
||||
<field name="groups_id" eval="[(6,0,[ref('crm.group_crm_manager'), ref('base.group_extended')])]"/>
|
||||
</record>
|
||||
<data noupdate="0">
|
||||
|
||||
|
||||
<record id="group_event_manager" model="res.groups">
|
||||
<field name="name">EVENT / Manager</field>
|
||||
</record>
|
||||
|
||||
<record id="group_event_subscriber" model="res.groups">
|
||||
<field name="name">EVENT / Subscriber</field>
|
||||
</record>
|
||||
|
||||
<!-- <record id="menu_event_config" model="ir.ui.menu">-->
|
||||
<!-- <field name="groups_id" eval="[(6,0,[ref('crm.group_crm_manager'), ref('base.group_extended')])]"/>-->
|
||||
<!-- </record>-->
|
||||
<!---->
|
||||
<!-- <record id="menu_report_event" model="ir.ui.menu">-->
|
||||
<!-- <field name="groups_id" eval="[(6,0,[ref('crm.group_crm_manager'), ref('base.group_extended')])]"/>-->
|
||||
<!-- </record>-->
|
||||
|
||||
<record id="menu_report_event" model="ir.ui.menu">
|
||||
<field name="groups_id" eval="[(6,0,[ref('crm.group_crm_manager'), ref('base.group_extended')])]"/>
|
||||
</record>
|
||||
</data>
|
||||
</openerp>
|
||||
|
||||
|
||||
@@ -1,12 +1,6 @@
|
||||
"id","name","model_id:id","group_id:id","perm_read","perm_write","perm_create","perm_unlink"
|
||||
"access_event_type","event.type","model_event_type","crm.group_crm_user",1,0,0,0
|
||||
"access_event_type_manager","event.type manager","model_event_type","crm.group_crm_manager",1,1,1,1
|
||||
"access_event_event","event.event","model_event_event","crm.group_crm_user",1,1,1,1
|
||||
"access_event_registration","event.registration","model_event_registration","crm.group_crm_user",1,1,1,1
|
||||
"access_report_event_registration","report.event.registration","model_report_event_registration","crm.group_crm_user",1,0,0,0
|
||||
"access_report_event_type_registration","report.event.type.registration","model_report_event_type_registration","crm.group_crm_user",1,0,0,0
|
||||
"access_event_confirm_registration","event.confirm.registration","model_event_confirm_registration","crm.group_crm_user",1,0,0,0
|
||||
"access_event_confirm_registration_manager","event.confirm.registration manager","model_event_confirm_registration","crm.group_crm_manager",1,1,1,1
|
||||
"access_event_make_invoice","event.make.invoice","model_event_make_invoice","crm.group_crm_user",1,1,1,1
|
||||
"access_event_partners_list","event.partners.list","model_event_partners_list","crm.group_crm_user",1,0,0,0
|
||||
"access_event_registration_list","event.registration.list","model_event_registration_list","crm.group_crm_user",1,0,0,0
|
||||
"access_event_type","event.type","model_event_type","event.group_event_subscriber",1,0,0,0
|
||||
"access_event_type_manager","event.type manager","model_event_type","event.group_event_manager",1,1,1,1
|
||||
"access_event_event","event.event","model_event_event","event.group_event_subscriber",1,1,1,1
|
||||
"access_event_registration","event.registration","model_event_registration","event.group_event_subscriber",1,1,1,1
|
||||
"access_report_event_registration","report.event.registration","model_report_event_registration","event.group_event_subscriber",1,0,0,0
|
||||
|
||||
|
@@ -0,0 +1,227 @@
|
||||
- |
|
||||
In order to test the 'event' module in OpenERP, we create a new event.
|
||||
|
||||
- |
|
||||
Given that I have product "Ticket for Concert".
|
||||
-
|
||||
!record {model: product.product, id: product_product_ticketforconcert0}:
|
||||
categ_id: product.cat1
|
||||
cost_method: standard
|
||||
list_price: 68.0
|
||||
mes_type: fixed
|
||||
name: Ticket for Concert
|
||||
procure_method: make_to_stock
|
||||
standard_price: 15.0
|
||||
supply_method: buy
|
||||
type: product
|
||||
uom_id: product.product_uom_unit
|
||||
uom_po_id: product.product_uom_unit
|
||||
volume: 0.0
|
||||
warranty: 0.0
|
||||
weight: 0.0
|
||||
weight_net: 0.0
|
||||
|
||||
- |
|
||||
Given that I have also Event type "Conference".
|
||||
-
|
||||
!record {model: event.type, id: event_type_conference0}:
|
||||
name: Conference
|
||||
- |
|
||||
I create partner "Mark Johnson" and and I provide an address to this
|
||||
new customer, as well as an email "info@mycustomer.com".
|
||||
-
|
||||
!record {model: res.partner, id: res_partner_markjohnson0}:
|
||||
address:
|
||||
- city: Bruxelles
|
||||
country_id: base.be
|
||||
job_ids:
|
||||
- contact_id: base_contact.res_partner_contact_jacot0
|
||||
function: CTO
|
||||
name: base.res_partner_maxtor
|
||||
sequence_partner: 0.0
|
||||
state: current
|
||||
street: Rue des Palais 51, bte 33
|
||||
type: default
|
||||
zip: '1000'
|
||||
email: 'info@mycustomer.com'
|
||||
credit_limit: 0.0
|
||||
lang: en_US
|
||||
name: Mark Johnson
|
||||
property_account_payable: account.a_pay
|
||||
property_account_receivable: account.a_recv
|
||||
|
||||
- |
|
||||
we create it with a "Conference on OpenERP Offshore Business" event and provide "Beginning date", "Ending Date", "Product" as Concert Ticket.
|
||||
-
|
||||
!record {model: event.event, id: event_event_conference0}:
|
||||
code: C/004
|
||||
date_begin: '2010-06-07 13:39:00'
|
||||
date_end: '2010-06-10 13:39:00'
|
||||
name: Conference on OpenERP Offshore Business.
|
||||
product_id: 'product_product_ticketforconcert0'
|
||||
register_max: 0.0
|
||||
register_min: 0.0
|
||||
state: draft
|
||||
type: 'event_type_conference0'
|
||||
|
||||
- |
|
||||
we set the limit of registrations to this event using "Minimum Registrations" 2 and "Maximum Registrations" 10
|
||||
-
|
||||
!python {model: event.event}: |
|
||||
self.write(cr, uid, [ref('event_event_conference0')], {'register_max': 10, 'register_min': 2})
|
||||
|
||||
- |
|
||||
We Check that the event is in "Draft" state.
|
||||
-
|
||||
!assert {model: event.event, id: event_event_conference0}:
|
||||
- state == 'draft'
|
||||
|
||||
- |
|
||||
Then we confirm it press on "Confirm Event" button.
|
||||
-
|
||||
!python {model: event.event}: |
|
||||
self.button_confirm(cr, uid, [ref("event_event_conference0")], {"active_ids": [ref("event.menu_event_event")]})
|
||||
|
||||
- |
|
||||
Check that Event is "confirmed" or not.
|
||||
-
|
||||
!assert {model: event.event, id: event_event_conference0}:
|
||||
- state == 'confirm'
|
||||
|
||||
- |
|
||||
person "Mark Johnson" want to confirm their registrations. for that
|
||||
I create New Registration for "Conference on OpenERP Offshore Business.
|
||||
-
|
||||
!record {model: event.registration, id: event_registration_registrationjacot0}:
|
||||
badge_name: Jacot
|
||||
badge_partner: Mark Johnson
|
||||
badge_title: M.
|
||||
contact_id: base_contact.res_partner_contact_jacot0
|
||||
date_deadline: '2010-06-07 13:39:00'
|
||||
event_id: event.event_event_conference0
|
||||
event_product: Ticket for Concert
|
||||
name: 'Registration: Jacot'
|
||||
partner_id: 'res_partner_markjohnson0'
|
||||
partner_invoice_id: 'res_partner_markjohnson0'
|
||||
unit_price: 68.0
|
||||
- |
|
||||
I check that "Number of registration" is less than "Maximum registration" defined in "Conference on OpenERP Offshore Business" event.
|
||||
if not then confirmation will fail because its greater then the Maximum registration.
|
||||
-
|
||||
!python {model: event.event}: |
|
||||
obj_register = self.pool.get('event.registration')
|
||||
event_id1 = self.browse(cr, uid, [ref('event_event_conference0')])[0]
|
||||
register_ids = obj_register.search(cr, uid, [('event_id', '=', event_id1.id)])
|
||||
register_id = obj_register.browse(cr, uid, register_ids)[0]
|
||||
assert register_id.nb_register <= event_id1.register_max
|
||||
|
||||
- |
|
||||
And Confirm that Registration by click on "Confirm Registration" button of Registraion form.
|
||||
-
|
||||
!python {model: event.registration}: |
|
||||
self.check_confirm(cr, uid, [ref("event_registration_registrationjacot0")], {"active_ids": [ref("event.menu_action_registration")]})
|
||||
|
||||
- |
|
||||
one other Person "Zen" also want to confirm their Registraions. so
|
||||
They create New registraion for This event.
|
||||
-
|
||||
!record {model: event.registration, id: event_registration_registrationzen0}:
|
||||
badge_name: Zen
|
||||
badge_partner: China Export
|
||||
contact_id: base_contact.res_partner_contact_zen0
|
||||
date_deadline: '2010-06-07 13:39:00'
|
||||
event_id: event.event_event_conference0
|
||||
event_product: Ticket for Concert
|
||||
name: 'Registration: Zen'
|
||||
partner_id: base.res_partner_3
|
||||
partner_invoice_id: base.res_partner_3
|
||||
unit_price: 68.0
|
||||
|
||||
- |
|
||||
And Confirm that Registration by click on "Confirm Registration" button of Registraion form.
|
||||
-
|
||||
!python {model: event.registration}: |
|
||||
self.check_confirm(cr, uid, [ref("event_registration_registrationzen0")], {"active_ids": [ref("event.menu_action_registration")]})
|
||||
|
||||
- |
|
||||
Third person create New Registration for "Conference on OpenERP Offshore Business" event.
|
||||
-
|
||||
!record {model: event.registration, id: event_registration_registrationpassot0}:
|
||||
badge_name: Passot
|
||||
badge_partner: Mediapole SPRL
|
||||
badge_title: M.
|
||||
contact_id: base_contact.res_partner_contact_passot0
|
||||
date_deadline: '2010-06-07 13:39:00'
|
||||
email_from: info@mediapole.net
|
||||
event_id: 'event_event_conference0'
|
||||
event_product: Ticket for Concert
|
||||
name: 'Registration: Passot'
|
||||
partner_id: base.res_partner_8
|
||||
partner_invoice_id: base.res_partner_8
|
||||
unit_price: 68.0
|
||||
- |
|
||||
This person cannot Confirm their registration.so I check that state is "Unconfirmed".
|
||||
-
|
||||
!assert {model: event.registration, id: event_registration_registrationpassot0}:
|
||||
- state == 'draft'
|
||||
|
||||
- |
|
||||
I Check that the total number of confirmed is 2 and unconfirmed registrations 1.
|
||||
-
|
||||
!python {model: event.event}: |
|
||||
obj_event = self.browse(cr, uid, [ref('event_event_conference0')])[0]
|
||||
assert obj_event.register_current == '2'
|
||||
assert obj_event.register_prospect == '1'
|
||||
|
||||
- |
|
||||
We check all registered partners to this event using the wizard "List Register Partners".
|
||||
-
|
||||
!record {model: event.partners.list, id: event_partners_list_0}:
|
||||
{}
|
||||
-
|
||||
I click on "Open Partners" button of "List Register Partners" wizard.
|
||||
-
|
||||
!python {model: event.partners.list}: |
|
||||
self.list_partners(cr, uid, [ref("event_partners_list_0")], {"active_ids":
|
||||
[ref("event.event_event_conference0")]})
|
||||
|
||||
- |
|
||||
This event is finished by click on "Event Done" button of this event form.
|
||||
-
|
||||
!python {model: event.event}: |
|
||||
self.button_done(cr, uid, [ref("event.event_event_conference0")], {"active_ids": [ref("event.menu_event_event")] })
|
||||
- |
|
||||
We can create invoice if the registration is in "Open" state otherwise it gives the warning to the user.
|
||||
so I check that Registration is in "Open" state before click on "Make Invoices."
|
||||
-
|
||||
!assert {model: event.registration, id: event_registration_registrationjacot0}:
|
||||
- state == 'open'
|
||||
- |
|
||||
Now, I will invoice the participant who have address using "Make Invoices". This wizard will also give the number of invoices are created and rejected.
|
||||
Create invoice will be linked to Invoice Field available on Payments tab of registrations
|
||||
|
||||
-
|
||||
!record {model: event.make.invoice, id: event_make_invoice_0}:
|
||||
{}
|
||||
- |
|
||||
I click on "Done" button of this "Make Invoices" wizard.
|
||||
-
|
||||
!python {model: event.make.invoice}: |
|
||||
self.make_invoice(cr, uid, [ref("event_make_invoice_0")], {"active_ids": [ref("event_registration_registrationzen0")]})
|
||||
- |
|
||||
I check that Invoice for this partner is create or not.
|
||||
-
|
||||
!python {model: event.registration}: |
|
||||
obj_event_reg = self.pool.get('event.registration')
|
||||
obj_lines = self.pool.get('account.invoice.line')
|
||||
inv_obj = self.pool.get('account.invoice')
|
||||
data_event_reg = obj_event_reg.browse(cr, uid, [ref('event_registration_registrationzen0')], context=context)[0]
|
||||
invoice_ids = inv_obj.search(cr, uid, [('partner_id', '=', data_event_reg.partner_invoice_id.id)])
|
||||
|
||||
if invoice_ids:
|
||||
invoice_id = inv_obj.browse(cr, uid, invoice_ids)[0]
|
||||
line_ids = obj_lines.search(cr, uid, [('product_id', '=', data_event_reg.event_id.product_id.id), ('invoice_id', '=', invoice_id.id), ('price_unit', '=', data_event_reg.unit_price)])
|
||||
line_id = obj_lines.browse(cr, uid, line_ids)[0]
|
||||
assert line_id.product_id == data_event_reg.event_id.product_id
|
||||
assert data_event_reg.partner_id == invoice_id.partner_id
|
||||
assert invoice_id.address_invoice_id == data_event_reg.partner_address_id
|
||||
@@ -19,8 +19,6 @@
|
||||
#
|
||||
##############################################################################
|
||||
|
||||
import event_registration
|
||||
import event_make_invoice
|
||||
import event_registrations_partner
|
||||
import event_confirm_registration
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||
|
||||
@@ -20,7 +20,8 @@
|
||||
##############################################################################
|
||||
|
||||
from osv import fields, osv
|
||||
|
||||
from tools.translate import _
|
||||
|
||||
class event_confirm_registration(osv.osv_memory):
|
||||
"""
|
||||
Confirm Event Registration
|
||||
@@ -29,19 +30,40 @@ class event_confirm_registration(osv.osv_memory):
|
||||
_description = "Event Registraion"
|
||||
|
||||
_columns = {
|
||||
'msg': fields.text('Message', readonly=True),
|
||||
}
|
||||
_defaults={
|
||||
'msg':lambda *a:'The event limit is reached. What do you want to do?'
|
||||
}
|
||||
'msg': fields.text('Message', readonly=True),
|
||||
}
|
||||
_defaults = {
|
||||
'msg': 'The event limit is reached. What do you want to do?'
|
||||
}
|
||||
|
||||
def default_get(self, cr, uid, fields, context=None):
|
||||
"""
|
||||
This function gets default values
|
||||
"""
|
||||
registration_pool = self.pool.get('event.registration')
|
||||
registration_ids = context.get('registration_ids', [])
|
||||
res = super(event_confirm_registration, self).default_get(cr, uid, fields, context=context)
|
||||
msg = ""
|
||||
overlimit_event_ids = []
|
||||
for registration in registration_pool.browse(cr, uid, registration_ids, context=context):
|
||||
total_confirmed = registration.event_id.register_current
|
||||
register_max = registration.event_id.register_max
|
||||
if registration.event_id.id not in overlimit_event_ids:
|
||||
overlimit_event_ids.append(registration.event_id.id)
|
||||
msg += _("The Event '%s' is reached Maximum Limit(%s). It has %s Confirmed registration\n") \
|
||||
%(registration.event_id.name, register_max, total_confirmed)
|
||||
if 'msg' in fields:
|
||||
res.update({'msg': msg})
|
||||
|
||||
return res
|
||||
|
||||
def confirm(self, cr, uid, ids, context):
|
||||
registration_obj = self.pool.get('event.registration')
|
||||
reg_id = context.get('reg_id', False) or context.get('active_id', False)
|
||||
if reg_id:
|
||||
registration_obj.write(cr, uid, [reg_id], {'state':'open', })
|
||||
registration_obj._history(cr, uid, [reg_id], 'Open', history=True)
|
||||
registration_obj.mail_user(cr, uid, [reg_id])
|
||||
registration_pool = self.pool.get('event.registration')
|
||||
registration_ids = context.get('registration_ids', [])
|
||||
for reg_id in registration_ids:
|
||||
registration_pool.write(cr, uid, [reg_id], {'state':'open', })
|
||||
registration_pool._history(cr, uid, [reg_id], _('Open'))
|
||||
registration_pool.mail_user(cr, uid, [reg_id])
|
||||
return {}
|
||||
|
||||
event_confirm_registration()
|
||||
|
||||
@@ -2,32 +2,32 @@
|
||||
<openerp>
|
||||
<data>
|
||||
|
||||
<record id="view_event_confirm_registration" model="ir.ui.view">
|
||||
<record id="view_event_confirm_registration" model="ir.ui.view">
|
||||
<field name="name">Registration Confirmation</field>
|
||||
<field name="model">event.confirm.registration</field>
|
||||
<field name="type">form</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Registration Confirmation">
|
||||
<field name="msg"/>
|
||||
<separator string="" colspan="4"/>
|
||||
<group colspan="4" col="6">
|
||||
<button icon="gtk-cancel" special="cancel" string="_Cancel"/>
|
||||
<button icon="gtk-ok" name="confirm" string="Confirm Anyway" type="object"/>
|
||||
</group>
|
||||
</form>
|
||||
<field name="msg" nolabel="1" colspan="4"/>
|
||||
<separator string="" colspan="4"/>
|
||||
<group colspan="4" col="6">
|
||||
<button icon="gtk-close" special="cancel" string="Close"/>
|
||||
<button icon="gtk-ok" name="confirm" string="Confirm Anyway" type="object"/>
|
||||
</group>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
</record>
|
||||
|
||||
<record id="action_event_confirm_registration" model="ir.actions.act_window">
|
||||
<record id="action_event_confirm_registration" model="ir.actions.act_window">
|
||||
<field name="name">Registrations</field>
|
||||
<field name="type">ir.actions.act_window</field>
|
||||
<field name="res_model">event.confirm.registration</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_mode">form</field>
|
||||
<field name="view_id" ref="view_event_confirm_registration"/>
|
||||
<field name="context">{'record_id' : active_id}</field>
|
||||
<field name="context">{'record_id' : active_id}</field>
|
||||
<field name="target">new</field>
|
||||
</record>
|
||||
</record>
|
||||
|
||||
</data>
|
||||
</openerp>
|
||||
</openerp>
|
||||
|
||||
@@ -19,6 +19,7 @@
|
||||
#
|
||||
##############################################################################
|
||||
from osv import fields, osv
|
||||
from tools.translate import _
|
||||
|
||||
class event_make_invoice(osv.osv_memory):
|
||||
"""
|
||||
@@ -27,109 +28,71 @@ class event_make_invoice(osv.osv_memory):
|
||||
_name = "event.make.invoice"
|
||||
_description = "Event Make Invoice"
|
||||
_columns = {
|
||||
'inv_created': fields.char('Invoice Created', size=32, readonly=True),
|
||||
'inv_rejected': fields.char('Invoice Rejected', size=32, readonly=True),
|
||||
'inv_rej_reason': fields.text('Error Messages', readonly=True),
|
||||
# 'invoice_ids': fields.char('Invoice Ids', size=128), # Improve me
|
||||
}
|
||||
|
||||
def _makeInvoices(self, cr, uid, context={}):
|
||||
invoices = {}
|
||||
invoice_ids = []
|
||||
create_ids=[]
|
||||
tax_ids=[]
|
||||
inv_create = 0
|
||||
inv_reject = 0
|
||||
inv_rej_reason = ""
|
||||
list_inv = []
|
||||
obj_event_reg = self.pool.get('event.registration')
|
||||
obj_lines = self.pool.get('account.invoice.line')
|
||||
inv_obj = self.pool.get('account.invoice')
|
||||
data_event_reg = obj_event_reg.browse(cr,uid, context['active_ids'], context=context)
|
||||
|
||||
for reg in data_event_reg:
|
||||
if reg.state=='draft':
|
||||
inv_reject = inv_reject + 1
|
||||
inv_rej_reason += "ID "+str(reg.id)+": Invoice cannot be created if the registration is in draft state. \n"
|
||||
continue
|
||||
if (not reg.tobe_invoiced):
|
||||
inv_reject = inv_reject + 1
|
||||
inv_rej_reason += "ID "+str(reg.id)+": Registration is set as 'Cannot be invoiced'. \n"
|
||||
continue
|
||||
if reg.invoice_id:
|
||||
inv_reject = inv_reject + 1
|
||||
inv_rej_reason += "ID "+str(reg.id)+": Registration already has an invoice linked. \n"
|
||||
continue
|
||||
if not reg.event_id.product_id:
|
||||
inv_reject = inv_reject + 1
|
||||
inv_rej_reason += "ID "+str(reg.id)+": Event related doesn't have any product defined. \n"
|
||||
continue
|
||||
if not reg.partner_invoice_id:
|
||||
inv_reject = inv_reject + 1
|
||||
inv_rej_reason += "ID "+str(reg.id)+": Registration doesn't have any partner to invoice. \n"
|
||||
continue
|
||||
else:
|
||||
val_invoice = inv_obj.onchange_partner_id(cr, uid, [], 'out_invoice', reg.partner_invoice_id.id, False, False)
|
||||
val_invoice['value'].update({'partner_id': reg.partner_invoice_id.id})
|
||||
partner_address_id = val_invoice['value']['address_invoice_id']
|
||||
|
||||
if not partner_address_id:
|
||||
inv_reject = inv_reject + 1
|
||||
inv_rej_reason += "ID "+str(reg.id)+": Registered partner doesn't have an address to make the invoice. \n"
|
||||
continue
|
||||
'grouped': fields.boolean('Group the invoices'),
|
||||
'invoice_date':fields.date('Invoice Date'),
|
||||
# 'invoice_ids': fields.char('Invoice Ids', size=128), # Improve me
|
||||
}
|
||||
|
||||
inv_create = inv_create + 1
|
||||
value = obj_lines.product_id_change(cr, uid, [], reg.event_id.product_id.id,uom =False, partner_id=reg.partner_invoice_id.id, fposition_id=reg.partner_invoice_id.property_account_position.id)
|
||||
data_product = self.pool.get('product.product').browse(cr,uid,[reg.event_id.product_id.id])
|
||||
for tax in data_product[0].taxes_id:
|
||||
tax_ids.append(tax.id)
|
||||
def view_init(self, cr, uid, fields, context=None):
|
||||
"""
|
||||
This function checks for precondition before wizard executes
|
||||
@param self: The object pointer
|
||||
@param cr: the current row, from the database cursor,
|
||||
@param uid: the current user’s ID for security checks,
|
||||
@param fields: List of fields for default value
|
||||
@param context: A standard dictionary for contextual values
|
||||
"""
|
||||
obj_event_reg = self.pool.get('event.registration')
|
||||
data = context and context.get('active_ids', [])
|
||||
|
||||
for event_reg in obj_event_reg.browse(cr, uid, data, context=context):
|
||||
if event_reg.state == 'draft':
|
||||
raise osv.except_osv(_('Warning !'),
|
||||
_("Invoice cannot be created if the registration is in draft state."))
|
||||
if event_reg.state == 'done':
|
||||
raise osv.except_osv(_('Warning !'),
|
||||
_("Invoice cannot be created if the registration is in done state."))
|
||||
|
||||
if (not event_reg.tobe_invoiced):
|
||||
raise osv.except_osv(_('Warning !'),
|
||||
_("Registration is set as Cannot be invoiced"))
|
||||
|
||||
vals = value['value']
|
||||
c_name = reg.contact_id and ('-' + self.pool.get('res.partner.contact').name_get(cr, uid, [reg.contact_id.id])[0][1]) or ''
|
||||
vals.update({
|
||||
'name': reg.invoice_label + '-' + c_name,
|
||||
'price_unit': reg.unit_price,
|
||||
'quantity': reg.nb_register,
|
||||
'product_id':reg.event_id.product_id.id,
|
||||
'invoice_line_tax_id': [(6, 0, tax_ids)],
|
||||
})
|
||||
inv_line_ids = obj_event_reg._create_invoice_lines(cr, uid, [reg.id], vals)
|
||||
|
||||
val_invoice['value'].update({
|
||||
'origin': reg.invoice_label,
|
||||
'reference': False,
|
||||
'invoice_line': [(6,0,[inv_line_ids])],
|
||||
'comment': "",
|
||||
})
|
||||
|
||||
inv_id = inv_obj.create(cr, uid, val_invoice['value'])
|
||||
list_inv.append(inv_id)
|
||||
obj_event_reg.write(cr, uid, reg.id, {'invoice_id': inv_id, 'state': 'done'})
|
||||
obj_event_reg._history(cr, uid, [reg.id], 'Invoiced', history=True)
|
||||
|
||||
# {'inv_created' : str(inv_create) , 'inv_rejected' : str(inv_reject), 'invoice_ids': str(list_inv), 'inv_rej_reason': inv_rej_reason}
|
||||
return {'inv_created' : str(inv_create) , 'inv_rejected' : str(inv_reject), 'inv_rej_reason': inv_rej_reason}
|
||||
if not event_reg.event_id.product_id:
|
||||
raise osv.except_osv(_('Warning !'),
|
||||
_("Event related doesn't have any product defined"))
|
||||
if not event_reg.partner_invoice_id:
|
||||
raise osv.except_osv(_('Warning !'),
|
||||
_("Registration doesn't have any partner to invoice."))
|
||||
|
||||
def default_get(self, cr, uid, fields_list, context=None):
|
||||
res = super(event_make_invoice, self).default_get(cr, uid, fields_list, context)
|
||||
res.update(self._makeInvoices(cr, uid, context=context))
|
||||
return res
|
||||
|
||||
def confirm(self, cr, uid, ids, context={}):
|
||||
obj_model = self.pool.get('ir.model.data')
|
||||
data_inv = self.read(cr, uid, ids, [], context)[0]
|
||||
model_data_ids = obj_model.search(cr,uid,[('model','=','ir.ui.view'),('name','=','invoice_form')])
|
||||
resource_id = obj_model.read(cr,uid,model_data_ids,fields=['res_id'])[0]['res_id']
|
||||
def make_invoice(self, cr, uid, ids, context={}):
|
||||
|
||||
reg_obj = self.pool.get('event.registration')
|
||||
newinv = []
|
||||
|
||||
for data in self.browse(cr, uid, ids):
|
||||
res = reg_obj.action_invoice_create(cr, uid, context.get(('active_ids'),[]), data.grouped, date_inv = data.invoice_date)
|
||||
|
||||
mod_obj =self.pool.get('ir.model.data')
|
||||
result = mod_obj._get_id(cr, uid, 'account', 'view_account_invoice_filter')
|
||||
|
||||
id = mod_obj.read(cr, uid, result, ['res_id'])
|
||||
|
||||
return {
|
||||
# 'domain': "[('id','in', ["+','.join(map(str,data_inv['invoice_ids']))+"])]",
|
||||
'domain': "[('id','=',%s)]" % res,
|
||||
'name': 'Invoices',
|
||||
'view_type': 'form',
|
||||
'view_mode': 'tree,form',
|
||||
'res_model': 'account.invoice',
|
||||
'views': [(False,'tree'),(resource_id,'form')],
|
||||
'context': "{'type':'out_invoice'}",
|
||||
'type': 'ir.actions.act_window'
|
||||
'view_id': False,
|
||||
'context': "{'type':'out_refund'}",
|
||||
'type': 'ir.actions.act_window',
|
||||
'search_view_id': id['id']
|
||||
}
|
||||
|
||||
|
||||
event_make_invoice()
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||
@@ -7,15 +7,17 @@
|
||||
<field name="model">event.make.invoice</field>
|
||||
<field name="type">form</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Make Invoices">
|
||||
<field name="inv_created" />
|
||||
<field name="inv_rejected" />
|
||||
<field name="inv_rej_reason" colspan="4"/>
|
||||
<group colspan="4" col="6">
|
||||
<button icon="gtk-cancel" special="cancel" string="_Ok"/>
|
||||
<button icon="gtk-ok" name="confirm" string="Open" type="object"/>
|
||||
</group>
|
||||
</form>
|
||||
<form string="Create invoices">
|
||||
<separator colspan="4" string="Do you really want to create the invoices ?" />
|
||||
<field name="grouped" />
|
||||
<field name="invoice_date"/>
|
||||
<group colspan="4">
|
||||
<separator string="" colspan="4" />
|
||||
<label string="" colspan="2"/>
|
||||
<button special="cancel" string="Close" icon="gtk-close"/>
|
||||
<button name="make_invoice" string="Done" type="object" icon="gtk-ok"/>
|
||||
</group>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
|
||||
@@ -1,39 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<openerp>
|
||||
<data>
|
||||
|
||||
<record id="view_event_registration" model="ir.ui.view">
|
||||
<field name="name">List Event Registrations</field>
|
||||
<field name="model">event.registration.list</field>
|
||||
<field name="type">form</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="">
|
||||
<button special="cancel" string="Cancel" icon="gtk-cancel"/>
|
||||
<button name="open_registration" string="Open Registrations" type="object" icon="gtk-open"/>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="action_event_registration" model="ir.actions.act_window">
|
||||
<field name="name">Registrations</field>
|
||||
<field name="type">ir.actions.act_window</field>
|
||||
<field name="res_model">event.registration.list</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_mode">form</field>
|
||||
<field name="view_id" ref="view_event_registration"/>
|
||||
<field name="context">{'record_id' : active_id}</field>
|
||||
<field name="target">new</field>
|
||||
</record>
|
||||
|
||||
<record model="ir.values" id="event_registration_values">
|
||||
<field name="model_id" ref="event.model_event_event" />
|
||||
<field name="object" eval="1" />
|
||||
<field name="name">Event Registrations</field>
|
||||
<field name="key2">client_action_multi</field>
|
||||
<field name="value" eval="'ir.actions.act_window,' + str(ref('action_event_registration'))" />
|
||||
<field name="key">action</field>
|
||||
<field name="model">event.event</field>
|
||||
</record>
|
||||
|
||||
</data>
|
||||
</openerp>
|
||||
@@ -1,55 +0,0 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
##############################################################################
|
||||
#
|
||||
# OpenERP, Open Source Management Solution
|
||||
# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU Affero General Public License as
|
||||
# published by the Free Software Foundation, either version 3 of the
|
||||
# License, or (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU Affero General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU Affero General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
##############################################################################
|
||||
from osv import fields, osv
|
||||
from tools.translate import _
|
||||
|
||||
class event_partners_list(osv.osv_memory):
|
||||
""" Event Partners """
|
||||
_name = "event.partners.list"
|
||||
_description = "List Event Partners"
|
||||
|
||||
def list_partners(self, cr, uid, ids, context={}):
|
||||
obj_reg = self.pool.get('event.registration')
|
||||
mod_obj = self.pool.get('ir.model.data')
|
||||
list_partner = []
|
||||
reg_ids = obj_reg.search(cr, uid, [('event_id','in',context['active_ids'])], context=context)
|
||||
data_reg = obj_reg.browse(cr, uid, reg_ids, context=context)
|
||||
for reg in data_reg:
|
||||
if not reg.partner_id.id in list_partner:
|
||||
list_partner.append(reg.partner_id.id)
|
||||
result = mod_obj._get_id(cr, uid, 'base', 'view_res_partner_filter')
|
||||
id = mod_obj.read(cr, uid, result, ['res_id'], context=context)
|
||||
model_data_ids = mod_obj.search(cr,uid,[('model','=','ir.ui.view'),('name','=','view_partner_form')], context=context)
|
||||
resource_id = mod_obj.read(cr, uid, model_data_ids, fields=['res_id'], context=context)[0]['res_id']
|
||||
return {
|
||||
'domain': "[('id','in', ["+','.join(map(str, list_partner))+"])]",
|
||||
'name': _('Event Partners'),
|
||||
'view_type': 'form',
|
||||
'view_mode': 'tree,form',
|
||||
'res_model': 'res.partner',
|
||||
'views': [(False,'tree'),(resource_id,'form')],
|
||||
'type': 'ir.actions.act_window',
|
||||
'search_view_id': id['res_id']
|
||||
}
|
||||
|
||||
event_partners_list()
|
||||
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||
@@ -1,39 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<openerp>
|
||||
<data>
|
||||
|
||||
<record id="view_event_partners" model="ir.ui.view">
|
||||
<field name="name">Event Partners</field>
|
||||
<field name="model">event.partners.list</field>
|
||||
<field name="type">form</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Event Partners">
|
||||
<button special="cancel" string="Cancel" icon="gtk-cancel"/>
|
||||
<button name="list_partners" string="Open Partners" type="object" icon="gtk-open"/>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="action_event_partners" model="ir.actions.act_window">
|
||||
<field name="name">List Register Partners</field>
|
||||
<field name="type">ir.actions.act_window</field>
|
||||
<field name="res_model">event.partners.list</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_mode">form</field>
|
||||
<field name="view_id" ref="view_event_partners"/>
|
||||
<field name="context">{'record_id' : active_id}</field>
|
||||
<field name="target">new</field>
|
||||
</record>
|
||||
|
||||
<record model="ir.values" id="event_partner_values">
|
||||
<field name="model_id" ref="event.model_event_event" />
|
||||
<field name="object" eval="1" />
|
||||
<field name="name">Event Partners</field>
|
||||
<field name="key2">client_action_multi</field>
|
||||
<field name="value" eval="'ir.actions.act_window,' + str(ref('action_event_partners'))"/>
|
||||
<field name="key">action</field>
|
||||
<field name="model">event.event</field>
|
||||
</record>
|
||||
|
||||
</data>
|
||||
</openerp>
|
||||
@@ -21,5 +21,6 @@
|
||||
|
||||
import membership
|
||||
import wizard
|
||||
import report
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||
|
||||
|
||||
@@ -43,10 +43,12 @@ invoice and send propositions for membership renewal.
|
||||
'security/ir.model.access.csv',
|
||||
'wizard/membership_invoice_view.xml',
|
||||
'membership_view.xml',
|
||||
'report/report_membership_view.xml',
|
||||
'wizard/membership_unpaid_invoice_view.xml',
|
||||
'process/membership_process.xml'
|
||||
],
|
||||
'demo_xml': ['membership_demo.xml'],
|
||||
'test': ['test/test_membership.yml'],
|
||||
'installable': True,
|
||||
'active': False,
|
||||
'certificate': '0042907796381',
|
||||
|
||||
+46
-207
@@ -201,10 +201,10 @@ class membership_line(osv.osv):
|
||||
_name = 'membership.membership_line'
|
||||
_columns = {
|
||||
'partner': fields.many2one('res.partner', 'Partner', ondelete='cascade', select=1),
|
||||
'date_from': fields.date('From'),
|
||||
'date_to': fields.date('To'),
|
||||
'date_from': fields.date('From', readonly=True),
|
||||
'date_to': fields.date('To', readonly=True),
|
||||
'date_cancel' : fields.date('Cancel date'),
|
||||
'account_invoice_line': fields.many2one('account.invoice.line', 'Account Invoice line'),
|
||||
'account_invoice_line': fields.many2one('account.invoice.line', 'Account Invoice line', readonly=True),
|
||||
'state': fields.function(_state, method=True, string='State', type='selection', selection=STATE),
|
||||
}
|
||||
_rec_name = 'partner'
|
||||
@@ -221,6 +221,7 @@ class Partner(osv.osv):
|
||||
_inherit = 'res.partner'
|
||||
|
||||
def _get_partner_id(self, cr, uid, ids, context=None):
|
||||
|
||||
data_inv = self.pool.get('membership.membership_line').browse(cr, uid, ids, context)
|
||||
list_partner = []
|
||||
for data in data_inv:
|
||||
@@ -298,55 +299,47 @@ class Partner(osv.osv):
|
||||
res_state = self._membership_state(cr, uid, [partner_data.associate_member.id], name, args, context)
|
||||
res[id] = res_state[partner_data.associate_member.id]
|
||||
return res
|
||||
|
||||
def _membership_start(self, cr, uid, ids, name, args, context=None):
|
||||
'''Return the start date of membership'''
|
||||
|
||||
def _membership_date(self, cr, uid, ids, name, args, context=None):
|
||||
|
||||
'''Return date of membership'''
|
||||
|
||||
name = name[0]
|
||||
res = {}
|
||||
member_line_obj = self.pool.get('membership.membership_line')
|
||||
|
||||
for partner in self.browse(cr, uid, ids):
|
||||
|
||||
if partner.associate_member:
|
||||
partner_id = partner.associate_member.id
|
||||
partner_id = partner.associate_member.id
|
||||
else:
|
||||
partner_id = partner.id
|
||||
line_id = member_line_obj.search(cr, uid, [('partner', '=', partner_id)],
|
||||
limit=1, order='date_from')
|
||||
if line_id:
|
||||
res[partner.id] = member_line_obj.read(cr, uid, line_id[0],
|
||||
['date_from'])['date_from']
|
||||
else:
|
||||
res[partner.id] = False
|
||||
return res
|
||||
|
||||
def _membership_stop(self, cr, uid, ids, name, args, context=None):
|
||||
'''Return the stop date of membership'''
|
||||
res = {}
|
||||
member_line_obj = self.pool.get('membership.membership_line')
|
||||
for partner in self.browse(cr, uid, ids):
|
||||
cr.execute('select membership_state from res_partner where id=%s', (partner.id,))
|
||||
data_state = cr.fetchall()
|
||||
if partner.associate_member:
|
||||
partner_id = partner.associate_member.id
|
||||
else:
|
||||
partner_id = partner.id
|
||||
line_id = member_line_obj.search(cr, uid, [('partner', '=', partner_id)],
|
||||
limit=1, order='date_to desc')
|
||||
if line_id:
|
||||
res[partner.id] = member_line_obj.read(cr, uid, line_id[0],
|
||||
['date_to'])['date_to']
|
||||
else:
|
||||
res[partner.id] = False
|
||||
return res
|
||||
|
||||
def _membership_cancel(self, cr, uid, ids, name, args, context=None):
|
||||
'''Return the cancel date of membership'''
|
||||
res = {}
|
||||
member_line_obj = self.pool.get('membership.membership_line')
|
||||
for partner in self.browse(cr, uid, ids, context=context):
|
||||
res[partner.id] = False
|
||||
if partner.membership_state == 'canceled':
|
||||
line_id = member_line_obj.search(cr, uid, [('partner', '=', partner.id)],limit=1, order='date_cancel')
|
||||
partner_id = partner.id
|
||||
|
||||
res[partner.id]={
|
||||
'membership_start': False,
|
||||
'membership_stop': False,
|
||||
'membership_cancel': False
|
||||
}
|
||||
|
||||
if name == 'membership_start':
|
||||
line_id = member_line_obj.search(cr, uid, [('partner', '=', partner_id)],
|
||||
limit=1, order='date_from')
|
||||
if line_id:
|
||||
res[partner.id] = member_line_obj.read(cr, uid, line_id[0],['date_cancel'])['date_cancel']
|
||||
res[partner.id]['membership_start'] = member_line_obj.read(cr, uid, line_id[0],
|
||||
['date_from'])['date_from']
|
||||
|
||||
if name == 'membership_stop':
|
||||
line_id1 = member_line_obj.search(cr, uid, [('partner', '=', partner_id)],
|
||||
limit=1, order='date_to desc')
|
||||
if line_id1:
|
||||
res[partner.id]['membership_stop'] = member_line_obj.read(cr, uid, line_id1[0],
|
||||
['date_to'])['date_to']
|
||||
if name == 'membership_cancel':
|
||||
if partner.membership_state == 'canceled':
|
||||
line_id2 = member_line_obj.search(cr, uid, [('partner', '=', partner.id)],limit=1, order='date_cancel')
|
||||
if line_id2:
|
||||
res[partner.id]['membership_cancel'] = member_line_obj.read(cr, uid, line_id2[0],['date_cancel'])['date_cancel']
|
||||
|
||||
return res
|
||||
|
||||
def _get_partners(self, cr, uid, ids, context={}):
|
||||
@@ -377,17 +370,17 @@ class Partner(osv.osv):
|
||||
}
|
||||
),
|
||||
'membership_start': fields.function(
|
||||
_membership_start, method=True,
|
||||
_membership_date, method=True, multi='membeship_start',
|
||||
string = 'Start membership date', type = 'date',
|
||||
store = {
|
||||
'account.invoice':(_get_invoice_partner,['state'], 10),
|
||||
'membership.membership_line':(_get_partner_id,['state'], 10),
|
||||
'membership.membership_line':(_get_partner_id,['state'], 10, ),
|
||||
'res.partner':(lambda self,cr,uid,ids,c={}:ids, ['free_member'], 10)
|
||||
}
|
||||
),
|
||||
'membership_stop': fields.function(
|
||||
_membership_stop, method = True,
|
||||
string = 'Stop membership date', type = 'date',
|
||||
_membership_date, method = True,
|
||||
string = 'Stop membership date', type = 'date', multi='membership_stop',
|
||||
store = {
|
||||
'account.invoice':(_get_invoice_partner,['state'], 10),
|
||||
'membership.membership_line':(_get_partner_id,['state'], 10),
|
||||
@@ -396,8 +389,8 @@ class Partner(osv.osv):
|
||||
),
|
||||
|
||||
'membership_cancel': fields.function(
|
||||
_membership_cancel, method = True,
|
||||
string = 'Cancel membership date', type='date',
|
||||
_membership_date, method = True,
|
||||
string = 'Cancel membership date', type='date', multi='membership_cancel',
|
||||
store = {
|
||||
'account.invoice':(_get_invoice_partner,['state'], 11),
|
||||
'membership.membership_line':(_get_partner_id,['state'], 10),
|
||||
@@ -491,160 +484,6 @@ class Invoice(osv.osv):
|
||||
return super(Invoice, self).action_cancel(cr, uid, ids, context)
|
||||
Invoice()
|
||||
|
||||
|
||||
class ReportPartnerMemberYear(osv.osv):
|
||||
'''Membership by Years'''
|
||||
|
||||
_name = 'report.partner_member.year'
|
||||
_description = __doc__
|
||||
_auto = False
|
||||
_rec_name = 'year'
|
||||
_columns = {
|
||||
'year': fields.char('Year', size='4', readonly=True, select=1),
|
||||
'canceled_number': fields.integer('Canceled', readonly=True),
|
||||
'waiting_number': fields.integer('Waiting', readonly=True),
|
||||
'invoiced_number': fields.integer('Invoiced', readonly=True),
|
||||
'paid_number': fields.integer('Paid', readonly=True),
|
||||
'canceled_amount': fields.float('Canceled', digits=(16, 2), readonly=True),
|
||||
'waiting_amount': fields.float('Waiting', digits=(16, 2), readonly=True),
|
||||
'invoiced_amount': fields.float('Invoiced', digits=(16, 2), readonly=True),
|
||||
'paid_amount': fields.float('Paid', digits=(16, 2), readonly=True),
|
||||
'currency': fields.many2one('res.currency', 'Currency', readonly=True,
|
||||
select=2),
|
||||
}
|
||||
|
||||
def init(self, cr):
|
||||
'''Create the view'''
|
||||
cr.execute("""
|
||||
CREATE OR REPLACE VIEW report_partner_member_year AS (
|
||||
SELECT
|
||||
MIN(id) AS id,
|
||||
COUNT(ncanceled) as canceled_number,
|
||||
COUNT(npaid) as paid_number,
|
||||
COUNT(ninvoiced) as invoiced_number,
|
||||
COUNT(nwaiting) as waiting_number,
|
||||
SUM(acanceled) as canceled_amount,
|
||||
SUM(apaid) as paid_amount,
|
||||
SUM(ainvoiced) as invoiced_amount,
|
||||
SUM(awaiting) as waiting_amount,
|
||||
year,
|
||||
currency
|
||||
FROM (SELECT
|
||||
CASE WHEN ai.state = 'cancel' THEN ml.id END AS ncanceled,
|
||||
CASE WHEN ai.state = 'paid' THEN ml.id END AS npaid,
|
||||
CASE WHEN ai.state = 'open' THEN ml.id END AS ninvoiced,
|
||||
CASE WHEN (ai.state = 'draft' OR ai.state = 'proforma')
|
||||
THEN ml.id END AS nwaiting,
|
||||
CASE WHEN ai.state = 'cancel'
|
||||
THEN SUM(ail.price_unit * ail.quantity * (1 - ail.discount / 100))
|
||||
ELSE 0 END AS acanceled,
|
||||
CASE WHEN ai.state = 'paid'
|
||||
THEN SUM(ail.price_unit * ail.quantity * (1 - ail.discount / 100))
|
||||
ELSE 0 END AS apaid,
|
||||
CASE WHEN ai.state = 'open'
|
||||
THEN SUM(ail.price_unit * ail.quantity * (1 - ail.discount / 100))
|
||||
ELSE 0 END AS ainvoiced,
|
||||
CASE WHEN (ai.state = 'draft' OR ai.state = 'proforma')
|
||||
THEN SUM(ail.price_unit * ail.quantity * (1 - ail.discount / 100))
|
||||
ELSE 0 END AS awaiting,
|
||||
TO_CHAR(ml.date_from, 'YYYY') AS year,
|
||||
ai.currency_id AS currency,
|
||||
MIN(ml.id) AS id
|
||||
FROM membership_membership_line ml
|
||||
JOIN (account_invoice_line ail
|
||||
LEFT JOIN account_invoice ai
|
||||
ON (ail.invoice_id = ai.id))
|
||||
ON (ml.account_invoice_line = ail.id)
|
||||
JOIN res_partner p
|
||||
ON (ml.partner = p.id)
|
||||
GROUP BY TO_CHAR(ml.date_from, 'YYYY'), ai.state,
|
||||
ai.currency_id, ml.id) AS foo
|
||||
GROUP BY year, currency)
|
||||
""")
|
||||
|
||||
ReportPartnerMemberYear()
|
||||
|
||||
|
||||
class ReportPartnerMemberYearNew(osv.osv):
|
||||
'''New Membership by Years'''
|
||||
|
||||
_name = 'report.partner_member.year_new'
|
||||
_description = __doc__
|
||||
_auto = False
|
||||
_rec_name = 'year'
|
||||
_columns = {
|
||||
'year': fields.char('Year', size='4', readonly=True, select=1),
|
||||
'canceled_number': fields.integer('Canceled', readonly=True),
|
||||
'waiting_number': fields.integer('Waiting', readonly=True),
|
||||
'invoiced_number': fields.integer('Invoiced', readonly=True),
|
||||
'paid_number': fields.integer('Paid', readonly=True),
|
||||
'canceled_amount': fields.float('Canceled', digits=(16, 2), readonly=True),
|
||||
'waiting_amount': fields.float('Waiting', digits=(16, 2), readonly=True),
|
||||
'invoiced_amount': fields.float('Invoiced', digits=(16, 2), readonly=True),
|
||||
'paid_amount': fields.float('Paid', digits=(16, 2), readonly=True),
|
||||
'currency': fields.many2one('res.currency', 'Currency', readonly=True,
|
||||
select=2),
|
||||
}
|
||||
|
||||
def init(self, cursor):
|
||||
'''Create the view'''
|
||||
cursor.execute("""
|
||||
CREATE OR REPLACE VIEW report_partner_member_year_new AS (
|
||||
SELECT
|
||||
MIN(id) AS id,
|
||||
COUNT(ncanceled) AS canceled_number,
|
||||
COUNT(npaid) AS paid_number,
|
||||
COUNT(ninvoiced) AS invoiced_number,
|
||||
COUNT(nwaiting) AS waiting_number,
|
||||
SUM(acanceled) AS canceled_amount,
|
||||
SUM(apaid) AS paid_amount,
|
||||
SUM(ainvoiced) AS invoiced_amount,
|
||||
SUM(awaiting) AS waiting_amount,
|
||||
year,
|
||||
currency
|
||||
FROM (SELECT
|
||||
CASE WHEN ai.state = 'cancel' THEN ml2.id END AS ncanceled,
|
||||
CASE WHEN ai.state = 'paid' THEN ml2.id END AS npaid,
|
||||
CASE WHEN ai.state = 'open' THEN ml2.id END AS ninvoiced,
|
||||
CASE WHEN (ai.state = 'draft' OR ai.state = 'proforma')
|
||||
THEN ml2.id END AS nwaiting,
|
||||
CASE WHEN ai.state = 'cancel'
|
||||
THEN SUM(ail.price_unit * ail.quantity * (1 - ail.discount / 100))
|
||||
ELSE 0 END AS acanceled,
|
||||
CASE WHEN ai.state = 'paid'
|
||||
THEN SUM(ail.price_unit * ail.quantity * (1 - ail.discount / 100))
|
||||
ELSE 0 END AS apaid,
|
||||
CASE WHEN ai.state = 'open'
|
||||
THEN SUM(ail.price_unit * ail.quantity * (1 - ail.discount / 100))
|
||||
ELSE 0 END AS ainvoiced,
|
||||
CASE WHEN (ai.state = 'draft' OR ai.state = 'proforma')
|
||||
THEN SUM(ail.price_unit * ail.quantity * (1 - ail.discount / 100))
|
||||
ELSE 0 END AS awaiting,
|
||||
TO_CHAR(ml2.date_from, 'YYYY') AS year,
|
||||
ai.currency_id AS currency,
|
||||
MIN(ml2.id) AS id
|
||||
FROM (SELECT
|
||||
partner AS id,
|
||||
MIN(date_from) AS date_from
|
||||
FROM membership_membership_line
|
||||
GROUP BY partner
|
||||
) AS ml1
|
||||
JOIN membership_membership_line ml2
|
||||
JOIN (account_invoice_line ail
|
||||
LEFT JOIN account_invoice ai
|
||||
ON (ail.invoice_id = ai.id))
|
||||
ON (ml2.account_invoice_line = ail.id)
|
||||
ON (ml1.id = ml2.partner AND ml1.date_from = ml2.date_from)
|
||||
JOIN res_partner p
|
||||
ON (ml2.partner = p.id)
|
||||
GROUP BY TO_CHAR(ml2.date_from, 'YYYY'), ai.state,
|
||||
ai.currency_id, ml2.id) AS foo
|
||||
GROUP BY year, currency
|
||||
)
|
||||
""")
|
||||
|
||||
ReportPartnerMemberYearNew()
|
||||
|
||||
class account_invoice_line(osv.osv):
|
||||
_inherit='account.invoice.line'
|
||||
|
||||
@@ -703,4 +542,4 @@ class account_invoice_line(osv.osv):
|
||||
return result
|
||||
|
||||
account_invoice_line()
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||
@@ -39,7 +39,8 @@
|
||||
<field name="membership" colspan="1"/>
|
||||
<field name="active" colspan="1"/>
|
||||
<newline/>
|
||||
<field name="taxes_id" colspan="4"/>
|
||||
<separator colspan="4" string="Customer Taxes:"/>
|
||||
<field name="taxes_id" colspan="4" nolabel="1"/>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
@@ -117,28 +118,32 @@
|
||||
<field name="type">search</field>
|
||||
<field name="arch" type="xml">
|
||||
<field name="category_id" position="after">
|
||||
<group col="4" colspan="6">
|
||||
<filter string="Members" icon="terp-personal" domain="[]" context="{'group_by':'membership_state'}"/>
|
||||
<separator orientation="vertical"/>
|
||||
<field name="membership_state"/>
|
||||
</group>
|
||||
<filter icon="terp-personal" name="old" domain="[('membership_state', '=', 'old')]" string="Old Members" />
|
||||
<filter icon="terp-personal" name = "invoiced" domain="[('membership_state', '=', 'invoiced')]" string="Invoiced Members"/>
|
||||
<filter icon="terp-personal" domain="[('membership_state', '=', 'paid')]" string="Paid Members" />
|
||||
<filter icon="terp-personal" domain="[('membership_state', '=', 'waiting')]" string="Future Members" />
|
||||
<separator orientation="vertical"/>
|
||||
<field name="membership_state"/>
|
||||
<field name="membership_start"/>
|
||||
<newline/>
|
||||
</field>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
|
||||
<record id="view_res_partner_member_filter2" model="ir.ui.view">
|
||||
<field name="name">res.partner.select2</field>
|
||||
<field name="model">res.partner</field>
|
||||
<field name="inherit_id" ref="view_res_partner_member_filter"/>
|
||||
<field name="type">search</field>
|
||||
<field name="arch" type="xml">
|
||||
<field name="membership_state" position="after">
|
||||
<field name="membership_start" position="after">
|
||||
<newline/>
|
||||
<group expand="1" string="Group By" colspan="10" col="8">
|
||||
<separator orientation="vertical"/>
|
||||
<filter string="Associate Member" name = "associate" icon="terp-personal" domain="[]" context="{'group_by':'associate_member'}"/>
|
||||
<filter string="State" icon="terp-stock_effects-object-colorize" domain="[]" context="{'group_by':'membership_state'}"/>
|
||||
<separator orientation="vertical"/>
|
||||
<filter string="Start Date" icon="terp-go-month" domain="[]" context="{'group_by':'membership_start'}"/>
|
||||
<filter string="End Date" icon="terp-go-month" domain="[]" context="{'group_by':'membership_stop'}"/>
|
||||
<filter string="Associate Member" icon="terp-personal" domain="[]" context="{'group_by':'associate_member'}"/>
|
||||
<filter string="State" icon="terp-stock_effects-object-colorize" domain="[]" context="{'group_by':'membership_state'}"/>
|
||||
</group>
|
||||
</field>
|
||||
</field>
|
||||
@@ -149,6 +154,7 @@
|
||||
<field name="res_model">res.partner</field>
|
||||
<field name="domain">[('membership_state','<>','none'),('membership_state','<>','canceled'),('membership_state','<>','old'),('membership_state','<>','waiting')]</field>
|
||||
<field name="search_view_id" ref="view_res_partner_member_filter"/>
|
||||
<field name="context">{"search_default_old": 1}</field>
|
||||
</record>
|
||||
|
||||
<record model="ir.actions.act_window.view" id="action_membership_members_view_tree">
|
||||
@@ -229,7 +235,6 @@
|
||||
</field>
|
||||
</page>
|
||||
</notebook>
|
||||
|
||||
</field>
|
||||
</record>
|
||||
|
||||
@@ -238,211 +243,6 @@
|
||||
sequence="2"
|
||||
id="menu_reporting"/>
|
||||
|
||||
<!-- REPORTING/MEMBERSHIP BY YEAR -->
|
||||
|
||||
|
||||
<record model="ir.ui.view" id="view_report_partner_member_year_tree1">
|
||||
<field name="name">report.partner_member.year.tree</field>
|
||||
<field name="model">report.partner_member.year</field>
|
||||
<field name="type">tree</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree string="Membership by Years">
|
||||
<field name="canceled_number"/>
|
||||
<field name="waiting_number"/>
|
||||
<field name="invoiced_number"/>
|
||||
<field name="paid_number"/>
|
||||
<field name="year"/>
|
||||
</tree>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
|
||||
<record model="ir.ui.view" id="view_report_partner_member_year_tree2">
|
||||
<field name="name">report.partner_member.year.tree</field>
|
||||
<field name="model">report.partner_member.year</field>
|
||||
<field name="type">tree</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree string="Membership by Years">
|
||||
<field name="canceled_amount"/>
|
||||
<field name="waiting_amount"/>
|
||||
<field name="invoiced_amount"/>
|
||||
<field name="paid_amount"/>
|
||||
<field name="currency"/>
|
||||
<field name="year"/>
|
||||
</tree>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record model="ir.ui.view" id="view_report_partner_member_year_graph1">
|
||||
<field name="name">report.partner_member.year.graph1</field>
|
||||
<field name="model">report.partner_member.year</field>
|
||||
<field name="type">graph</field>
|
||||
<field name="arch" type="xml">
|
||||
<graph string="Membership by Years" type="bar">
|
||||
<field name="year"/>
|
||||
<field name="canceled_number"/>
|
||||
<field name="waiting_number"/>
|
||||
<field name="invoiced_number"/>
|
||||
<field name="paid_number"/>
|
||||
</graph>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record model="ir.ui.view" id="view_report_partner_member_year_graph2">
|
||||
<field name="name">report.partner_member.year.graph2</field>
|
||||
<field name="model">report.partner_member.year</field>
|
||||
<field name="type">graph</field>
|
||||
<field name="arch" type="xml">
|
||||
<graph string="Membership by Years" type="bar">
|
||||
<field name="year"/>
|
||||
<field name="canceled_amount"/>
|
||||
<field name="waiting_amount"/>
|
||||
<field name="invoiced_amount"/>
|
||||
<field name="paid_amount"/>
|
||||
</graph>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record model="ir.actions.act_window" id="action_report_partner_member_year_tree">
|
||||
<field name="res_model">report.partner_member.year</field>
|
||||
<field name="view_type">form</field>
|
||||
</record>
|
||||
|
||||
<record model="ir.actions.act_window.view" id="action_report_partner_member_year_tree_view1">
|
||||
<field name="sequence" eval="3"/>
|
||||
<field name="view_mode">tree</field>
|
||||
<field name="view_id" ref="view_report_partner_member_year_tree1"/>
|
||||
<field name="act_window_id" ref="action_report_partner_member_year_tree"/>
|
||||
</record>
|
||||
|
||||
|
||||
<record model="ir.actions.act_window.view" id="action_report_partner_member_year_tree_view4">
|
||||
<field name="sequence" eval="4"/>
|
||||
<field name="view_mode">tree</field>
|
||||
<field name="view_id" ref="view_report_partner_member_year_tree2"/>
|
||||
<field name="act_window_id" ref="action_report_partner_member_year_tree"/>
|
||||
</record>
|
||||
|
||||
<record model="ir.actions.act_window.view" id="action_report_partner_member_year_tree_view2">
|
||||
<field name="sequence" eval="1"/>
|
||||
<field name="view_mode">graph</field>
|
||||
<field name="view_id" ref="view_report_partner_member_year_graph1"/>
|
||||
<field name="act_window_id" ref="action_report_partner_member_year_tree"/>
|
||||
</record>
|
||||
|
||||
<record model="ir.actions.act_window.view" id="action_report_partner_member_year_tree_view3">
|
||||
<field name="sequence" eval="2"/>
|
||||
<field name="view_mode">graph</field>
|
||||
<field name="view_id" ref="view_report_partner_member_year_graph2"/>
|
||||
<field name="act_window_id" ref="action_report_partner_member_year_tree"/>
|
||||
</record>
|
||||
|
||||
<menuitem name="Membership by Years" parent="menu_reporting"
|
||||
action="action_report_partner_member_year_tree"
|
||||
id="menu_report_partner_member_year"/>
|
||||
|
||||
|
||||
<!-- REPORTING/NEW MEMBERSHIP BY YEAR -->
|
||||
|
||||
|
||||
|
||||
<record model="ir.ui.view" id="view_report_partner_member_year_new_tree1">
|
||||
<field name="name">report.partner_member.year_new.tree</field>
|
||||
<field name="model">report.partner_member.year_new</field>
|
||||
<field name="type">tree</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree string="New Membership by Years">
|
||||
<field name="canceled_number"/>
|
||||
<field name="waiting_number"/>
|
||||
<field name="invoiced_number"/>
|
||||
<field name="paid_number"/>
|
||||
<field name="year"/>
|
||||
</tree>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record model="ir.ui.view" id="view_report_partner_member_year_new_tree2">
|
||||
<field name="name">report.partner_member.year_new.tree</field>
|
||||
<field name="model">report.partner_member.year_new</field>
|
||||
<field name="type">tree</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree string="New Membership by Years">
|
||||
<field name="canceled_amount"/>
|
||||
<field name="waiting_amount"/>
|
||||
<field name="invoiced_amount"/>
|
||||
<field name="paid_amount"/>
|
||||
<field name="currency"/>
|
||||
<field name="year"/>
|
||||
</tree>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record model="ir.ui.view" id="view_report_partner_member_year_new_graph1">
|
||||
<field name="name">report.partner_member.year_new.graph1</field>
|
||||
<field name="model">report.partner_member.year_new</field>
|
||||
<field name="type">graph</field>
|
||||
<field name="arch" type="xml">
|
||||
<graph string="New Membership by Years" type="bar">
|
||||
<field name="year"/>
|
||||
<field name="canceled_number"/>
|
||||
<field name="waiting_number"/>
|
||||
<field name="invoiced_number"/>
|
||||
<field name="paid_number"/>
|
||||
</graph>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record model="ir.ui.view" id="view_report_partner_member_year_new_graph2">
|
||||
<field name="name">report.partner_member.year_new.graph2</field>
|
||||
<field name="model">report.partner_member.year_new</field>
|
||||
<field name="type">graph</field>
|
||||
<field name="arch" type="xml">
|
||||
<graph string="New Membership by Years" type="bar">
|
||||
<field name="year"/>
|
||||
<field name="canceled_amount"/>
|
||||
<field name="waiting_amount"/>
|
||||
<field name="invoiced_amount"/>
|
||||
<field name="paid_amount"/>
|
||||
</graph>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record model="ir.actions.act_window" id="action_report_partner_member_year_new_tree">
|
||||
<field name="res_model">report.partner_member.year_new</field>
|
||||
<field name="view_type">form</field>
|
||||
</record>
|
||||
|
||||
<record model="ir.actions.act_window.view" id="action_report_partner_member_year_new_tree_view4">
|
||||
<field name="sequence" eval="4"/>
|
||||
<field name="view_mode">tree</field>
|
||||
<field name="view_id" ref="view_report_partner_member_year_new_tree2"/>
|
||||
<field name="act_window_id" ref="action_report_partner_member_year_new_tree"/>
|
||||
</record>
|
||||
|
||||
<record model="ir.actions.act_window.view" id="action_report_partner_member_year_new_tree_view1">
|
||||
<field name="sequence" eval="3"/>
|
||||
<field name="view_mode">tree</field>
|
||||
<field name="view_id" ref="view_report_partner_member_year_new_tree1"/>
|
||||
<field name="act_window_id" ref="action_report_partner_member_year_new_tree"/>
|
||||
</record>
|
||||
|
||||
<record model="ir.actions.act_window.view" id="action_report_partner_member_year_new_tree_view2">
|
||||
<field name="sequence" eval="1"/>
|
||||
<field name="view_mode">graph</field>
|
||||
<field name="view_id" ref="view_report_partner_member_year_new_graph1"/>
|
||||
<field name="act_window_id" ref="action_report_partner_member_year_new_tree"/>
|
||||
</record>
|
||||
|
||||
<record model="ir.actions.act_window.view" id="action_report_partner_member_year_new_tree_view3">
|
||||
<field name="sequence" eval="2"/>
|
||||
<field name="view_mode">graph</field>
|
||||
<field name="view_id" ref="view_report_partner_member_year_new_graph2"/>
|
||||
<field name="act_window_id" ref="action_report_partner_member_year_new_tree"/>
|
||||
</record>
|
||||
|
||||
<menuitem name="New Membership by Years" parent="menu_reporting"
|
||||
action="action_report_partner_member_year_new_tree"
|
||||
id="menu_report_partner_member_year_new"/>
|
||||
|
||||
<!-- View for product.product object inherited from product module................ -->
|
||||
<record model="ir.ui.view" id="view_product_form_inherit1">
|
||||
|
||||
@@ -0,0 +1,22 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
##############################################################################
|
||||
#
|
||||
# OpenERP, Open Source Management Solution
|
||||
# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU Affero General Public License as
|
||||
# published by the Free Software Foundation, either version 3 of the
|
||||
# License, or (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU Affero General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU Affero General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
##############################################################################
|
||||
|
||||
import report_membership
|
||||
@@ -0,0 +1,123 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
##############################################################################
|
||||
#
|
||||
# OpenERP, Open Source Management Solution
|
||||
# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU Affero General Public License as
|
||||
# published by the Free Software Foundation, either version 3 of the
|
||||
# License, or (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU Affero General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU Affero General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
##############################################################################
|
||||
|
||||
from osv import fields, osv
|
||||
import tools
|
||||
|
||||
|
||||
class report_membership(osv.osv):
|
||||
'''Membership by Years'''
|
||||
|
||||
_name = 'report.membership'
|
||||
_description = __doc__
|
||||
_auto = False
|
||||
_rec_name = 'year'
|
||||
_columns = {
|
||||
'year': fields.char('Year', size=4, readonly=True, select=1),
|
||||
'month':fields.selection([('01', 'January'), ('02', 'February'), \
|
||||
('03', 'March'), ('04', 'April'),\
|
||||
('05', 'May'), ('06', 'June'), \
|
||||
('07', 'July'), ('08', 'August'),\
|
||||
('09', 'September'), ('10', 'October'),\
|
||||
('11', 'November'), ('12', 'December')], 'Month', readonly=True),
|
||||
'create_date': fields.datetime('Create Date', readonly=True),
|
||||
'canceled_number': fields.integer('Canceled', readonly=True),
|
||||
'waiting_number': fields.integer('Waiting', readonly=True),
|
||||
'invoiced_number': fields.integer('Invoiced', readonly=True),
|
||||
'paid_number': fields.integer('Paid', readonly=True),
|
||||
'canceled_amount': fields.float('Canceled', digits=(16, 2), readonly=True),
|
||||
'waiting_amount': fields.float('Waiting', digits=(16, 2), readonly=True),
|
||||
'invoiced_amount': fields.float('Invoiced', digits=(16, 2), readonly=True),
|
||||
'paid_amount': fields.float('Paid', digits=(16, 2), readonly=True),
|
||||
'currency': fields.many2one('res.currency', 'Currency', readonly=True,
|
||||
select=2),
|
||||
|
||||
'state':fields.selection([('draft', 'Non Member'),
|
||||
('cancel', 'Cancelled Member'),
|
||||
('done', 'Old Member'),
|
||||
('open', 'Invoiced Member'),
|
||||
('free', 'Free Member'), ('paid', 'Paid Member')], 'State'),
|
||||
'partner_id': fields.many2one('res.partner', 'Members', readonly=True, select=3)
|
||||
|
||||
|
||||
}
|
||||
|
||||
def init(self, cr):
|
||||
'''Create the view'''
|
||||
cr.execute("""
|
||||
CREATE OR REPLACE VIEW report_membership AS (
|
||||
SELECT
|
||||
MIN(id) as id,
|
||||
COUNT(ncanceled) as canceled_number,
|
||||
COUNT(npaid) as paid_number,
|
||||
COUNT(ninvoiced) as invoiced_number,
|
||||
COUNT(nwaiting) as waiting_number,
|
||||
SUM(acanceled) as canceled_amount,
|
||||
SUM(apaid) as paid_amount,
|
||||
SUM(ainvoiced) as invoiced_amount,
|
||||
SUM(awaiting) as waiting_amount,
|
||||
year,
|
||||
month,
|
||||
create_date,
|
||||
partner_id,
|
||||
state,
|
||||
currency
|
||||
|
||||
FROM (SELECT
|
||||
CASE WHEN ai.state = 'cancel' THEN ml.id END AS ncanceled,
|
||||
CASE WHEN ai.state = 'paid' THEN ml.id END AS npaid,
|
||||
CASE WHEN ai.state = 'open' THEN ml.id END AS ninvoiced,
|
||||
CASE WHEN (ai.state = 'draft' OR ai.state = 'proforma')
|
||||
THEN ml.id END AS nwaiting,
|
||||
CASE WHEN ai.state = 'cancel'
|
||||
THEN SUM(ail.price_unit * ail.quantity * (1 - ail.discount / 100))
|
||||
ELSE 0 END AS acanceled,
|
||||
CASE WHEN ai.state = 'paid'
|
||||
THEN SUM(ail.price_unit * ail.quantity * (1 - ail.discount / 100))
|
||||
ELSE 0 END AS apaid,
|
||||
CASE WHEN ai.state = 'open'
|
||||
THEN SUM(ail.price_unit * ail.quantity * (1 - ail.discount / 100))
|
||||
ELSE 0 END AS ainvoiced,
|
||||
CASE WHEN (ai.state = 'draft' OR ai.state = 'proforma')
|
||||
THEN SUM(ail.price_unit * ail.quantity * (1 - ail.discount / 100))
|
||||
ELSE 0 END AS awaiting,
|
||||
TO_CHAR(ml.date_from, 'YYYY') AS year,
|
||||
TO_CHAR(ml.date_from, 'MM')as month,
|
||||
TO_CHAR(ml.date_from, 'YYYY-MM-DD') as create_date,
|
||||
ai.partner_id AS partner_id,
|
||||
ai.currency_id AS currency,
|
||||
ai.state as state,
|
||||
MIN(ml.id) AS id
|
||||
FROM membership_membership_line ml
|
||||
JOIN (account_invoice_line ail
|
||||
LEFT JOIN account_invoice ai
|
||||
ON (ail.invoice_id = ai.id))
|
||||
ON (ml.account_invoice_line = ail.id)
|
||||
JOIN res_partner p
|
||||
ON (ml.partner = p.id)
|
||||
GROUP BY TO_CHAR(ml.date_from, 'YYYY'), TO_CHAR(ml.date_from, 'MM'), TO_CHAR(ml.date_from, 'YYYY-MM-DD'), ai.state, ai.partner_id,
|
||||
ai.currency_id, ml.id) AS foo
|
||||
GROUP BY year, month, create_date, currency, partner_id, state)
|
||||
""")
|
||||
|
||||
report_membership()
|
||||
|
||||
#
|
||||
@@ -0,0 +1,112 @@
|
||||
<?xml version="1.0"?>
|
||||
<openerp>
|
||||
<data>
|
||||
<!-- REPORTING/MEMBERSHIP BY YEAR -->
|
||||
|
||||
|
||||
<record model="ir.ui.view" id="view_report_membership_tree1">
|
||||
<field name="name">report.membership.tree</field>
|
||||
<field name="model">report.membership</field>
|
||||
<field name="type">tree</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree string="Membership">
|
||||
<field name="state"/>
|
||||
<field name="partner_id"/>
|
||||
<field name="canceled_number"/>
|
||||
<field name="waiting_number"/>
|
||||
<field name="invoiced_number"/>
|
||||
<field name="paid_number"/>
|
||||
<field name="year"/>
|
||||
<field name="month"/>
|
||||
</tree>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record model="ir.ui.view" id="view_report_membership_search">
|
||||
<field name="name">report.membership.search</field>
|
||||
<field name="model">report.membership</field>
|
||||
<field name="type">search</field>
|
||||
<field name="arch" type="xml">
|
||||
<search string="Membership">
|
||||
<group col="8" colspan="4">
|
||||
<filter string="Last 365 Days" icon="terp-go-year"
|
||||
domain="[('create_date','<=', time.strftime('%%Y-%%m-%%d')), ('create_date','>',(datetime.date.today()-datetime.timedelta(days=365)).strftime('%%Y-%%m-%%d'))]"/>
|
||||
<filter string="Last 30 Days" icon="terp-go-month" name="month"
|
||||
domain="[('create_date','<=', time.strftime('%%Y-%%m-%%d')), ('create_date','>',(datetime.date.today()-datetime.timedelta(days=30)).strftime('%%Y-%%m-%%d'))]"/>
|
||||
<separator orientation="vertical"/>
|
||||
<filter icon="terp-camera_test"
|
||||
string="Invoiced"
|
||||
domain="[('state','=','open')]"/>
|
||||
<filter icon="terp-check"
|
||||
string="Paid"
|
||||
domain="[('state','=','paid')]"/>
|
||||
<filter icon="terp-gtk-media-pause"
|
||||
string="Waiting"
|
||||
default="1" name="none"
|
||||
domain="[('state','=', 'draft')]"/>
|
||||
|
||||
<separator orientation="vertical"/>
|
||||
<field name="partner_id"/>
|
||||
</group>
|
||||
<newline/>
|
||||
<group expand="0" string="Group By..." colspan="4" col="12">
|
||||
<filter string="Members" icon="terp-personal" name="member"
|
||||
domain="[]" context="{'group_by':'partner_id'}"/>
|
||||
|
||||
<filter string="state" icon="terp-stock_effects-object-colorize"
|
||||
domain="[]" context="{'group_by':'state'}"/>
|
||||
|
||||
<separator orientation="vertical"/>
|
||||
<filter string="Year" name="year" icon="terp-go-year"
|
||||
domain="[]" context="{'group_by':'year'}"/>
|
||||
<filter string="Month" name="month" icon="terp-go-month"
|
||||
domain="[]" context="{'group_by':'month'}"/>
|
||||
|
||||
</group>
|
||||
</search>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record model="ir.ui.view" id="view_report_membership_graph1">
|
||||
<field name="name">report.membership.graph1</field>
|
||||
<field name="model">report.membership</field>
|
||||
<field name="type">graph</field>
|
||||
<field name="arch" type="xml">
|
||||
<graph string="Membership" type="bar">
|
||||
<field name="year"/>
|
||||
<field name="canceled_number"/>
|
||||
<field name="waiting_number"/>
|
||||
<field name="invoiced_number"/>
|
||||
<field name="paid_number"/>
|
||||
</graph>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record model="ir.actions.act_window" id="action_report_membership_tree">
|
||||
<field name="res_model">report.membership</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="search_view_id" ref="view_report_membership_search"/>
|
||||
<field name="context">{"search_default_member":1}</field>
|
||||
</record>
|
||||
|
||||
<record model="ir.actions.act_window.view" id="action_report_membership_tree_view1">
|
||||
<field name="sequence" eval="1"/>
|
||||
<field name="view_mode">tree</field>
|
||||
<field name="view_id" ref="view_report_membership_tree1"/>
|
||||
<field name="act_window_id" ref="action_report_membership_tree"/>
|
||||
</record>
|
||||
|
||||
|
||||
<record model="ir.actions.act_window.view" id="action_report_membership_tree_view2">
|
||||
<field name="sequence" eval="3"/>
|
||||
<field name="view_mode">graph</field>
|
||||
<field name="view_id" ref="view_report_membership_graph1"/>
|
||||
<field name="act_window_id" ref="action_report_membership_tree"/>
|
||||
</record>
|
||||
|
||||
<menuitem name="Membership" parent="menu_reporting"
|
||||
action="action_report_membership_tree"
|
||||
id="menu_report_membership"/>
|
||||
|
||||
</data>
|
||||
</openerp>
|
||||
@@ -1,7 +1,6 @@
|
||||
"id","name","model_id:id","group_id:id","perm_read","perm_write","perm_create","perm_unlink"
|
||||
"access_membership_membership_line_partner_manager","membership.membership_line partner_manager","model_membership_membership_line","base.group_partner_manager",1,1,1,1
|
||||
"access_membership_membership_line","membership.membership_line","model_membership_membership_line",,1,0,0,0
|
||||
"access_report_partner_member_year","report.partner_member.year","model_report_partner_member_year","base.group_partner_manager",1,0,0,0
|
||||
"access_report_partner_member_year_new","report.partner_member.year_new","model_report_partner_member_year_new","base.group_partner_manager",1,0,0,0
|
||||
"access_report_membership","report.membership","model_report_membership","base.group_partner_manager",1,0,0,0
|
||||
"access_membership_invoice","membership.invoice","model_membership_invoice",,1,1,1,1
|
||||
"access_membership_unpaid_invoice","membership.unpaid.invoice","model_membership_unpaid_invoice",,1,0,0,0
|
||||
|
||||
|
@@ -0,0 +1,115 @@
|
||||
- |
|
||||
In Order to test the Membership in OpenERP, which allows us to manage all operations for managing memberships.
|
||||
- |
|
||||
We have to create "Membership Products" to make it available for partner or customer to make membership with it.
|
||||
select product type to "service" type and membership field is ticked to visible this product while creating membership for the partner.
|
||||
-
|
||||
!record {model: product.product, id: product_product_membershipproduct0}:
|
||||
categ_id: product.cat1
|
||||
membership: 1
|
||||
membership_date_from: '2009-06-01'
|
||||
membership_date_to: '2010-06-01'
|
||||
name: Membership Products
|
||||
type: service
|
||||
list_price: 80.00
|
||||
|
||||
- |
|
||||
I create new member "Mark Johnson" and I provide an address to this
|
||||
new customer, as well as an email "info@mycustomer.com".
|
||||
-
|
||||
!record {model: res.partner, id: res_partner_markjohnson0}:
|
||||
address:
|
||||
- city: paris
|
||||
country_id: base.fr
|
||||
name: Arthur Grosbonnet
|
||||
street: 1 rue Rockfeller
|
||||
title: M.
|
||||
type: default
|
||||
zip: '75016'
|
||||
credit_limit: 0.0
|
||||
membership_amount: 0.0
|
||||
name: Mark Johnson
|
||||
property_account_payable: account.a_pay
|
||||
property_account_receivable: account.a_recv
|
||||
|
||||
- |
|
||||
I check that "Current membership state" is set to "Non Member".
|
||||
-
|
||||
!assert {model: res.partner, id: res_partner_markjohnson0}:
|
||||
- membership_state == 'none'
|
||||
- |
|
||||
I can make it a Free member by selecting the "Free member" check box.
|
||||
-
|
||||
!record {model: res.partner, id: membership.res_partner_markjohnson0}:
|
||||
free_member: 1
|
||||
- |
|
||||
Now, I create Membership Invoices using wizard available on partner and Select Membership Product.
|
||||
-
|
||||
!record {model: membership.invoice, id: membership_invoice_0}:
|
||||
product_id: membership.product_product_membershipproduct0
|
||||
- |
|
||||
I check that address is defined or not for this Member.
|
||||
-
|
||||
!python {model: membership.invoice}: |
|
||||
partner_ids = [ref('res_partner_markjohnson0')]
|
||||
addre_obj = self.pool.get('res.partner.address')
|
||||
ids = addre_obj.search(cr, uid, [('partner_id', '=', partner_ids)])
|
||||
|
||||
addre_id = addre_obj.browse(cr, uid, ids)[0]
|
||||
assert addre_id.partner_id
|
||||
assert addre_id.id
|
||||
assert addre_id.type
|
||||
|
||||
- |
|
||||
I click on "Confirm" button of this wizard.
|
||||
-
|
||||
!python {model: membership.invoice}: |
|
||||
self.membership_invoice(cr, uid, [ref("membership_invoice_0")], {"active_ids": [ref("membership.res_partner_markjohnson0")]})
|
||||
|
||||
- |
|
||||
I check that Invoice is created for this members.
|
||||
-
|
||||
!python {model: res.partner}: |
|
||||
invoice_obj = self.pool.get('account.invoice')
|
||||
partner_obj = self.pool.get('res.partner')
|
||||
product_obj = self.pool.get('product.product')
|
||||
invoice_line_obj = self.pool.get(('account.invoice.line'))
|
||||
|
||||
partner_id = self.browse(cr, uid, [ref('res_partner_markjohnson0')])[0]
|
||||
ids = invoice_obj.search(cr, uid, [('partner_id', '=', partner_id.id), ('account_id', '=', partner_id.property_account_receivable.id)])
|
||||
invoice_id = invoice_obj.browse(cr, uid, ids)[0]
|
||||
|
||||
product = product_obj.browse(cr, uid, [ref('product_product_membershipproduct0')], context=context)[0]
|
||||
line_ids = invoice_line_obj.search(cr, uid, [('product_id', '=', product.id), ('invoice_id', '=', invoice_id.id)])
|
||||
line_id = invoice_line_obj.browse(cr, uid, line_ids)[0]
|
||||
|
||||
assert line_id.product_id.id == product.id
|
||||
assert invoice_id.partner_id.id == partner_id.id
|
||||
|
||||
- |
|
||||
I check that the "Current membership state" will remain same untill opening the invoice.
|
||||
-
|
||||
!assert {model: res.partner, id: res_partner_markjohnson0}:
|
||||
- membership_state == 'free'
|
||||
|
||||
- |
|
||||
"Current membership state" of any member depends on the state of invoice.
|
||||
So, I check that invoice is in draft state then the "membership state" of a member is "Waiting member".
|
||||
-
|
||||
!python {model: membership.membership_line}: |
|
||||
partner_id = self.pool.get('res.partner').browse(cr, uid, [ref('res_partner_markjohnson0')])[0]
|
||||
ids = self.search(cr, uid, [('partner', '=', partner_id.id)])
|
||||
current_id = self.browse(cr, uid, ids)[0]
|
||||
|
||||
partner_obj = self.pool.get('res.partner')
|
||||
inv_obj = self.pool.get('account.invoice')
|
||||
|
||||
ids = inv_obj.search(cr, uid, [('partner_id', '=', partner_id.id), ('account_id', '=', partner_id.property_account_receivable.id)])
|
||||
inv_id = inv_obj.browse(cr, uid, ids)[0]
|
||||
if inv_id.state == 'draft':
|
||||
assert current_id == 'waiting'
|
||||
- |
|
||||
When the invoice is in open state it become Invoiced Member, When the invoice is in paid state the same "Current membership state" changed to Paid Member.
|
||||
Now, If we cancel the invoice "Current membership state" changed to Cancel Member.
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
<field name="product_id" context="{'product':membership_product}" domain="[('membership','=',True)]"/>
|
||||
</group>
|
||||
<group colspan="4" col="6">
|
||||
<button icon="gtk-cancel" special="cancel" string="Cancel"/>
|
||||
<button icon="gtk-close" special="cancel" string="Close"/>
|
||||
<button icon="gtk-ok" string="Confirm" name="membership_invoice" type="object"/>
|
||||
</group>
|
||||
</form>
|
||||
|
||||
@@ -29,7 +29,7 @@ class member_unpaid_invoice(osv.osv_memory):
|
||||
'product': fields.many2one('product.product','Membership product', size=64,required=True, help='Select Membership product'),
|
||||
}
|
||||
|
||||
def _invoice_membership(self, cr, uid, ids, context):
|
||||
def invoice_membership(self, cr, uid, ids, context):
|
||||
model_obj = self.pool.get('ir.model.data')
|
||||
partners = []
|
||||
result = model_obj._get_id(cr, uid, 'base', 'view_res_partner_filter')
|
||||
@@ -56,4 +56,4 @@ class member_unpaid_invoice(osv.osv_memory):
|
||||
|
||||
member_unpaid_invoice()
|
||||
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||
|
||||
@@ -12,8 +12,8 @@
|
||||
<field name="product" context="{'product':membership_product}" domain="[('membership','=',True)]"/>
|
||||
</group>
|
||||
<group colspan="4" col="6">
|
||||
<button icon="gtk-cancel" special="cancel" string="Cancel"/>
|
||||
<button icon="gtk-ok" string="Unpaid Partners" name="_invoice_membership" type="object"/>
|
||||
<button icon="gtk-close" special="cancel" string="Close"/>
|
||||
<button icon="gtk-ok" string="Unpaid Partners" name="invoice_membership" type="object"/>
|
||||
</group>
|
||||
</form>
|
||||
</field>
|
||||
|
||||
@@ -1,347 +0,0 @@
|
||||
# Translation of OpenERP Server.
|
||||
# This file contains the translation of the following modules:
|
||||
# * report_analytic_planning
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: OpenERP Server 5.0.0\n"
|
||||
"Report-Msgid-Bugs-To: support@openerp.com\n"
|
||||
"POT-Creation-Date: 2009-08-28 16:01+0000\n"
|
||||
"PO-Revision-Date: 2010-06-23 17:32+0000\n"
|
||||
"Last-Translator: Jordi Esteve (www.zikzakmedia.com) "
|
||||
"<jesteve@zikzakmedia.com>\n"
|
||||
"Language-Team: \n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"X-Launchpad-Export-Date: 2010-06-26 03:57+0000\n"
|
||||
"X-Generator: Launchpad (build Unknown)\n"
|
||||
|
||||
#. module: report_analytic_planning
|
||||
#: rml:report_account_analytic.planning.print:0
|
||||
msgid "To:"
|
||||
msgstr "Hasta:"
|
||||
|
||||
#. module: report_analytic_planning
|
||||
#: view:report_account_analytic.planning:0
|
||||
msgid "Planning by Account"
|
||||
msgstr "Planificación por cuenta"
|
||||
|
||||
#. module: report_analytic_planning
|
||||
#: rml:report_account_analytic.planning.print:0
|
||||
msgid "Summary by project"
|
||||
msgstr "Resumen por proyecto"
|
||||
|
||||
#. module: report_analytic_planning
|
||||
#: field:report_account_analytic.planning.line,amount_unit:0
|
||||
msgid "Qty UoM"
|
||||
msgstr "Ctdad UdM"
|
||||
|
||||
#. module: report_analytic_planning
|
||||
#: field:report_account_analytic.planning,user_id:0
|
||||
msgid "Responsible"
|
||||
msgstr "Responsable"
|
||||
|
||||
#. module: report_analytic_planning
|
||||
#: model:ir.model,name:report_analytic_planning.model_report_account_analytic_planning_stat
|
||||
msgid "Planning stat"
|
||||
msgstr "Estad. planificación"
|
||||
|
||||
#. module: report_analytic_planning
|
||||
#: field:report_account_analytic.planning,state:0
|
||||
msgid "Status"
|
||||
msgstr "Estado"
|
||||
|
||||
#. module: report_analytic_planning
|
||||
#: field:report_account_analytic.planning.line,account_id:0
|
||||
msgid "Analytic account"
|
||||
msgstr "Cuenta analítica"
|
||||
|
||||
#. module: report_analytic_planning
|
||||
#: constraint:ir.actions.act_window:0
|
||||
msgid "Invalid model name in the action definition."
|
||||
msgstr "Nombre de modelo no válido en la definición de acción."
|
||||
|
||||
#. module: report_analytic_planning
|
||||
#: constraint:ir.model:0
|
||||
msgid ""
|
||||
"The Object name must start with x_ and not contain any special character !"
|
||||
msgstr ""
|
||||
"¡El nombre del objeto debe empezar con x_ y no contener ningún carácter "
|
||||
"especial!"
|
||||
|
||||
#. module: report_analytic_planning
|
||||
#: model:ir.actions.act_window,name:report_analytic_planning.action_account_analytic_planning_stat_form
|
||||
#: model:ir.ui.menu,name:report_analytic_planning.menu_report_account_analytic_planning_stat
|
||||
msgid "Planning Statistics"
|
||||
msgstr "Estadísticas de planificación"
|
||||
|
||||
#. module: report_analytic_planning
|
||||
#: model:ir.model,name:report_analytic_planning.model_report_account_analytic_planning_stat_account
|
||||
msgid "Planning account stat"
|
||||
msgstr "Estad. cuenta planificación"
|
||||
|
||||
#. module: report_analytic_planning
|
||||
#: field:report_account_analytic.planning.stat,sum_amount:0
|
||||
msgid "Planned hours"
|
||||
msgstr "Horas planeadas"
|
||||
|
||||
#. module: report_analytic_planning
|
||||
#: rml:report_account_analytic.planning.print:0
|
||||
msgid "Real"
|
||||
msgstr "Real"
|
||||
|
||||
#. module: report_analytic_planning
|
||||
#: model:ir.actions.act_window,name:report_analytic_planning.action_account_analytic_planning_stat_my_form
|
||||
#: model:ir.ui.menu,name:report_analytic_planning.menu_report_account_analytic_planning_stat_my
|
||||
msgid "My Planning Statistics"
|
||||
msgstr "Mis estadísticas de planificación"
|
||||
|
||||
#. module: report_analytic_planning
|
||||
#: model:ir.module.module,description:report_analytic_planning.module_meta_information
|
||||
msgid "Planning on analytic accounts."
|
||||
msgstr "Planificación a partir de cuentas analíticas."
|
||||
|
||||
#. module: report_analytic_planning
|
||||
#: field:report_account_analytic.planning,name:0
|
||||
msgid "Planning Name"
|
||||
msgstr "Nombre planificación"
|
||||
|
||||
#. module: report_analytic_planning
|
||||
#: rml:report_account_analytic.planning.print:0
|
||||
msgid "Quantities"
|
||||
msgstr "Cantidades"
|
||||
|
||||
#. module: report_analytic_planning
|
||||
#: rml:report_account_analytic.planning.print:0
|
||||
msgid "HR Planning"
|
||||
msgstr "Planificación RRHH"
|
||||
|
||||
#. module: report_analytic_planning
|
||||
#: field:report_account_analytic.planning.stat,sum_amount_real:0
|
||||
#: field:report_account_analytic.planning.stat.account,sum_amount_real:0
|
||||
#: field:report_account_analytic.planning.stat.user,sum_amount_real:0
|
||||
msgid "Timesheet"
|
||||
msgstr "Hoja de asistencia"
|
||||
|
||||
#. module: report_analytic_planning
|
||||
#: model:ir.model,name:report_analytic_planning.model_report_account_analytic_planning_line
|
||||
#: view:report_account_analytic.planning:0
|
||||
msgid "Planning Line"
|
||||
msgstr "Línea de planificación"
|
||||
|
||||
#. module: report_analytic_planning
|
||||
#: rml:report_account_analytic.planning.print:0
|
||||
msgid "Responsible:"
|
||||
msgstr "Responsable:"
|
||||
|
||||
#. module: report_analytic_planning
|
||||
#: field:report_account_analytic.planning.line,amount:0
|
||||
msgid "Quantity"
|
||||
msgstr "Cantidad"
|
||||
|
||||
#. module: report_analytic_planning
|
||||
#: view:report_account_analytic.planning:0
|
||||
msgid "Quantities by Account"
|
||||
msgstr "Cantidades por cuenta"
|
||||
|
||||
#. module: report_analytic_planning
|
||||
#: rml:report_account_analytic.planning.print:0
|
||||
msgid "From:"
|
||||
msgstr "Desde:"
|
||||
|
||||
#. module: report_analytic_planning
|
||||
#: view:report_account_analytic.planning:0
|
||||
msgid "Time by Account"
|
||||
msgstr "Tiempo por cuenta"
|
||||
|
||||
#. module: report_analytic_planning
|
||||
#: field:report_account_analytic.planning,date_to:0
|
||||
msgid "End Date"
|
||||
msgstr "Fecha final"
|
||||
|
||||
#. module: report_analytic_planning
|
||||
#: constraint:ir.ui.view:0
|
||||
msgid "Invalid XML for View Architecture!"
|
||||
msgstr "¡XML inválido para la definición de la vista!"
|
||||
|
||||
#. module: report_analytic_planning
|
||||
#: view:report_account_analytic.planning:0
|
||||
msgid "Time by User"
|
||||
msgstr "Tiempo por usuario"
|
||||
|
||||
#. module: report_analytic_planning
|
||||
#: model:ir.actions.act_window,name:report_analytic_planning.action_account_analytic_planning_stat_my_manager_form
|
||||
#: model:ir.ui.menu,name:report_analytic_planning.menu_report_account_analytic_planning_stat_my_manager
|
||||
msgid "Planning Statistics of My Projects"
|
||||
msgstr "Estadísticas de planificación de mis proyectos"
|
||||
|
||||
#. module: report_analytic_planning
|
||||
#: model:ir.actions.act_window,name:report_analytic_planning.action_account_analytic_planning_form_current
|
||||
#: model:ir.ui.menu,name:report_analytic_planning.menu_report_account_analytic_planning_current
|
||||
msgid "Current Planning"
|
||||
msgstr "Planificación actual"
|
||||
|
||||
#. module: report_analytic_planning
|
||||
#: rml:report_account_analytic.planning.print:0
|
||||
msgid "Summary by user"
|
||||
msgstr "Resumen por usuario"
|
||||
|
||||
#. module: report_analytic_planning
|
||||
#: view:report_account_analytic.planning:0
|
||||
msgid "Analysis"
|
||||
msgstr "Análisis"
|
||||
|
||||
#. module: report_analytic_planning
|
||||
#: field:report_account_analytic.planning.line,user_id:0
|
||||
#: rml:report_account_analytic.planning.print:0
|
||||
#: field:report_account_analytic.planning.stat,user_id:0
|
||||
#: field:report_account_analytic.planning.stat.user,user_id:0
|
||||
msgid "User"
|
||||
msgstr "Usuario"
|
||||
|
||||
#. module: report_analytic_planning
|
||||
#: rml:report_account_analytic.planning.print:0
|
||||
msgid "Project"
|
||||
msgstr "Proyecto"
|
||||
|
||||
#. module: report_analytic_planning
|
||||
#: view:report_account_analytic.planning:0
|
||||
msgid "Total Timesheet"
|
||||
msgstr "Total hoja de servicios"
|
||||
|
||||
#. module: report_analytic_planning
|
||||
#: rml:report_account_analytic.planning.print:0
|
||||
msgid "Details of user's time by projects"
|
||||
msgstr "Detalle del tiempo del usuario por proyectos"
|
||||
|
||||
#. module: report_analytic_planning
|
||||
#: model:ir.model,name:report_analytic_planning.model_report_account_analytic_planning_stat_user
|
||||
msgid "Planning user stat"
|
||||
msgstr "Estad. planificación del usuario"
|
||||
|
||||
#. module: report_analytic_planning
|
||||
#: rml:report_account_analytic.planning.print:0
|
||||
#: field:report_account_analytic.planning.stat.account,quantity:0
|
||||
#: field:report_account_analytic.planning.stat.user,quantity:0
|
||||
msgid "Planned"
|
||||
msgstr "Planificado"
|
||||
|
||||
#. module: report_analytic_planning
|
||||
#: field:report_account_analytic.planning,stat_ids:0
|
||||
msgid "Planning analysis"
|
||||
msgstr "Análisis planificación"
|
||||
|
||||
#. module: report_analytic_planning
|
||||
#: rml:report_account_analytic.planning.print:0
|
||||
msgid "["
|
||||
msgstr "["
|
||||
|
||||
#. module: report_analytic_planning
|
||||
#: field:report_account_analytic.planning,line_ids:0
|
||||
msgid "Planning lines"
|
||||
msgstr "Líneas planificación"
|
||||
|
||||
#. module: report_analytic_planning
|
||||
#: model:ir.module.module,shortdesc:report_analytic_planning.module_meta_information
|
||||
msgid "Analytic planning - Reporting"
|
||||
msgstr "Informes - Planificación analítica"
|
||||
|
||||
#. module: report_analytic_planning
|
||||
#: rml:report_account_analytic.planning.print:0
|
||||
msgid "]"
|
||||
msgstr "]"
|
||||
|
||||
#. module: report_analytic_planning
|
||||
#: model:ir.actions.act_window,name:report_analytic_planning.action_account_analytic_planning_form_my
|
||||
#: model:ir.ui.menu,name:report_analytic_planning.menu_report_account_analytic_planning_my2
|
||||
msgid "My Planning"
|
||||
msgstr "Mi planificación"
|
||||
|
||||
#. module: report_analytic_planning
|
||||
#: field:report_account_analytic.planning,stat_user_ids:0
|
||||
msgid "Planning by user"
|
||||
msgstr "Planificación por usuario"
|
||||
|
||||
#. module: report_analytic_planning
|
||||
#: field:report_account_analytic.planning.line,note:0
|
||||
msgid "Note"
|
||||
msgstr "Nota"
|
||||
|
||||
#. module: report_analytic_planning
|
||||
#: rml:report_account_analytic.planning.print:0
|
||||
#: field:report_account_analytic.planning.stat,sum_amount_tasks:0
|
||||
msgid "Tasks"
|
||||
msgstr "Tareas"
|
||||
|
||||
#. module: report_analytic_planning
|
||||
#: field:report_account_analytic.planning,stat_account_ids:0
|
||||
msgid "Planning by account"
|
||||
msgstr "Planificación por cuenta"
|
||||
|
||||
#. module: report_analytic_planning
|
||||
#: view:report_account_analytic.planning:0
|
||||
msgid "Quantities by User"
|
||||
msgstr "Cantidades por usuario"
|
||||
|
||||
#. module: report_analytic_planning
|
||||
#: model:ir.actions.act_window,name:report_analytic_planning.action_account_analytic_planning_form_current_my
|
||||
#: model:ir.ui.menu,name:report_analytic_planning.menu_report_account_analytic_planning_current_my
|
||||
msgid "My Current Planning"
|
||||
msgstr "Mi planificación actual"
|
||||
|
||||
#. module: report_analytic_planning
|
||||
#: field:report_account_analytic.planning.stat.account,account_id:0
|
||||
msgid "Analytic Account"
|
||||
msgstr "Cuenta analítica"
|
||||
|
||||
#. module: report_analytic_planning
|
||||
#: field:report_account_analytic.planning.stat,manager_id:0
|
||||
msgid "Manager"
|
||||
msgstr "Responsable"
|
||||
|
||||
#. module: report_analytic_planning
|
||||
#: model:ir.actions.act_window,name:report_analytic_planning.action_account_analytic_planning_form
|
||||
#: model:ir.actions.report.xml,name:report_analytic_planning.report_planning
|
||||
#: model:ir.model,name:report_analytic_planning.model_report_account_analytic_planning
|
||||
#: model:ir.ui.menu,name:report_analytic_planning.menu_report_account_analytic_planning
|
||||
#: model:ir.ui.menu,name:report_analytic_planning.next_id_85
|
||||
#: model:ir.ui.menu,name:report_analytic_planning.planning_main
|
||||
#: view:report_account_analytic.planning:0
|
||||
#: field:report_account_analytic.planning.line,planning_id:0
|
||||
#: field:report_account_analytic.planning.stat,planning_id:0
|
||||
#: field:report_account_analytic.planning.stat.account,planning_id:0
|
||||
#: field:report_account_analytic.planning.stat.user,planning_id:0
|
||||
msgid "Planning"
|
||||
msgstr "Planificación"
|
||||
|
||||
#. module: report_analytic_planning
|
||||
#: selection:report_account_analytic.planning,state:0
|
||||
msgid "Done"
|
||||
msgstr "Realizado"
|
||||
|
||||
#. module: report_analytic_planning
|
||||
#: view:report_account_analytic.planning:0
|
||||
msgid "Total Planned"
|
||||
msgstr "Total planeado"
|
||||
|
||||
#. module: report_analytic_planning
|
||||
#: field:report_account_analytic.planning,date_from:0
|
||||
msgid "Start Date"
|
||||
msgstr "Fecha inicial"
|
||||
|
||||
#. module: report_analytic_planning
|
||||
#: view:report_account_analytic.planning.stat:0
|
||||
msgid "Planning statistics"
|
||||
msgstr "Estadísticas de planificación"
|
||||
|
||||
#. module: report_analytic_planning
|
||||
#: selection:report_account_analytic.planning,state:0
|
||||
msgid "Open"
|
||||
msgstr "Abierto"
|
||||
|
||||
#. module: report_analytic_planning
|
||||
#: model:ir.actions.act_window,name:report_analytic_planning.action_account_analytic_planning_form_new
|
||||
#: model:ir.ui.menu,name:report_analytic_planning.menu_report_account_analytic_planning_new
|
||||
msgid "New Planning"
|
||||
msgstr "Nueva planificación"
|
||||
@@ -1,269 +0,0 @@
|
||||
# Translation of OpenERP Server.
|
||||
# This file contains the translation of the following modules:
|
||||
# * report_task
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: OpenERP Server 5.0.0\n"
|
||||
"Report-Msgid-Bugs-To: support@openerp.com\n"
|
||||
"POT-Creation-Date: 2009-08-28 16:01+0000\n"
|
||||
"PO-Revision-Date: 2010-06-23 17:33+0000\n"
|
||||
"Last-Translator: Jordi Esteve (www.zikzakmedia.com) "
|
||||
"<jesteve@zikzakmedia.com>\n"
|
||||
"Language-Team: \n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"X-Launchpad-Export-Date: 2010-06-26 03:58+0000\n"
|
||||
"X-Generator: Launchpad (build Unknown)\n"
|
||||
|
||||
#. module: report_task
|
||||
#: selection:report.closed.task,state:0
|
||||
msgid "In Progress"
|
||||
msgstr "En proceso"
|
||||
|
||||
#. module: report_task
|
||||
#: model:ir.actions.act_window,name:report_task.action_project_task
|
||||
#: model:ir.ui.menu,name:report_task.menu_project_task_user_tree
|
||||
#: view:report.task.user.pipeline.open:0
|
||||
msgid "Tasks by User"
|
||||
msgstr "Tareas por usuario"
|
||||
|
||||
#. module: report_task
|
||||
#: constraint:ir.model:0
|
||||
msgid ""
|
||||
"The Object name must start with x_ and not contain any special character !"
|
||||
msgstr ""
|
||||
"¡El nombre del objeto debe empezar con x_ y no contener ningún carácter "
|
||||
"especial!"
|
||||
|
||||
#. module: report_task
|
||||
#: field:report.closed.task,remaining_hours:0
|
||||
msgid "Remaining Hours"
|
||||
msgstr "Horas restantes"
|
||||
|
||||
#. module: report_task
|
||||
#: selection:report.task.user.pipeline.open,task_state:0
|
||||
msgid "No Task"
|
||||
msgstr "No hay tarea"
|
||||
|
||||
#. module: report_task
|
||||
#: model:ir.module.module,shortdesc:report_task.module_meta_information
|
||||
msgid "Report on tasks by user for projects"
|
||||
msgstr "Informe de tareas por usuario para proyectos"
|
||||
|
||||
#. module: report_task
|
||||
#: view:report.closed.task:0
|
||||
msgid "Delay"
|
||||
msgstr "Retraso"
|
||||
|
||||
#. module: report_task
|
||||
#: selection:report.closed.task,priority:0
|
||||
msgid "Very Low"
|
||||
msgstr "Muy baja"
|
||||
|
||||
#. module: report_task
|
||||
#: selection:report.closed.task,state:0
|
||||
#: selection:report.task.user.pipeline.open,task_state:0
|
||||
msgid "Draft"
|
||||
msgstr "Borrador"
|
||||
|
||||
#. module: report_task
|
||||
#: selection:report.closed.task,priority:0
|
||||
msgid "Low"
|
||||
msgstr "Baja"
|
||||
|
||||
#. module: report_task
|
||||
#: constraint:ir.actions.act_window:0
|
||||
msgid "Invalid model name in the action definition."
|
||||
msgstr "Nombre de modelo no válido en la definición de acción."
|
||||
|
||||
#. module: report_task
|
||||
#: field:report.closed.task,name:0
|
||||
msgid "Task summary"
|
||||
msgstr "Resumen de tarea"
|
||||
|
||||
#. module: report_task
|
||||
#: selection:report.closed.task,state:0
|
||||
#: selection:report.task.user.pipeline.open,task_state:0
|
||||
msgid "Pending"
|
||||
msgstr "Pendiente"
|
||||
|
||||
#. module: report_task
|
||||
#: field:report.closed.task,state:0
|
||||
#: field:report.task.user.pipeline.open,task_state:0
|
||||
msgid "Status"
|
||||
msgstr "Estado"
|
||||
|
||||
#. module: report_task
|
||||
#: selection:report.closed.task,priority:0
|
||||
msgid "Medium"
|
||||
msgstr "Media"
|
||||
|
||||
#. module: report_task
|
||||
#: model:ir.actions.act_window,name:report_task.action_report_timesheet_task_user
|
||||
#: model:ir.ui.menu,name:report_task.menu_timesheet_task_user
|
||||
msgid "Timesheet / Task Hours Per Month"
|
||||
msgstr "Tiempo / Horas de tareas por mes"
|
||||
|
||||
#. module: report_task
|
||||
#: field:report.closed.task,progress:0
|
||||
msgid "Progress (%)"
|
||||
msgstr "Progreso (%)"
|
||||
|
||||
#. module: report_task
|
||||
#: field:report.closed.task,priority:0
|
||||
msgid "Importance"
|
||||
msgstr "Importancia"
|
||||
|
||||
#. module: report_task
|
||||
#: field:report.task.user.pipeline.open,company_id:0
|
||||
msgid "Company"
|
||||
msgstr "Compañía"
|
||||
|
||||
#. module: report_task
|
||||
#: model:ir.ui.menu,name:report_task.next_id_57
|
||||
msgid "Reporting"
|
||||
msgstr "Informe"
|
||||
|
||||
#. module: report_task
|
||||
#: model:ir.module.module,description:report_task.module_meta_information
|
||||
msgid ""
|
||||
"Gives statistics on tasks by user on projects to check the pipeline of users."
|
||||
msgstr ""
|
||||
"Proporciona estadísticas de tareas por usuario en proyectos para comprobar "
|
||||
"el trabajo encadenado de los usuarios."
|
||||
|
||||
#. module: report_task
|
||||
#: field:report.task.user.pipeline.open,user_id:0
|
||||
#: field:report.timesheet.task.user,user_id:0
|
||||
msgid "User"
|
||||
msgstr "Usuario"
|
||||
|
||||
#. module: report_task
|
||||
#: model:ir.actions.act_window,name:report_task.action_closed_task_board
|
||||
msgid "Task Closed Within Past 15 Days"
|
||||
msgstr "Tareas cerradas en los últimos 15 días"
|
||||
|
||||
#. module: report_task
|
||||
#: selection:report.closed.task,priority:0
|
||||
msgid "Very urgent"
|
||||
msgstr "Muy urgente"
|
||||
|
||||
#. module: report_task
|
||||
#: selection:report.closed.task,state:0
|
||||
#: selection:report.task.user.pipeline.open,task_state:0
|
||||
msgid "Done"
|
||||
msgstr "Realizada"
|
||||
|
||||
#. module: report_task
|
||||
#: field:report.task.user.pipeline.open,task_hrs:0
|
||||
#: field:report.timesheet.task.user,task_hrs:0
|
||||
msgid "Task Hours"
|
||||
msgstr "Horas de tarea"
|
||||
|
||||
#. module: report_task
|
||||
#: constraint:ir.ui.view:0
|
||||
msgid "Invalid XML for View Architecture!"
|
||||
msgstr "¡XML inválido para la definición de la vista!"
|
||||
|
||||
#. module: report_task
|
||||
#: field:report.closed.task,delay_hours:0
|
||||
msgid "Delay Hours"
|
||||
msgstr "Horas de retraso"
|
||||
|
||||
#. module: report_task
|
||||
#: field:report.closed.task,project_id:0
|
||||
msgid "Project"
|
||||
msgstr "Proyecto"
|
||||
|
||||
#. module: report_task
|
||||
#: field:report.task.user.pipeline.open,task_nbr:0
|
||||
msgid "Task Number"
|
||||
msgstr "Número de tarea"
|
||||
|
||||
#. module: report_task
|
||||
#: model:ir.model,name:report_task.model_report_timesheet_task_user
|
||||
msgid "report.timesheet.task.user"
|
||||
msgstr ""
|
||||
|
||||
#. module: report_task
|
||||
#: model:ir.model,name:report_task.model_report_task_user_pipeline_open
|
||||
msgid "Tasks by user and project"
|
||||
msgstr "Tareas por usuario y proyecto"
|
||||
|
||||
#. module: report_task
|
||||
#: view:report.closed.task:0
|
||||
msgid "Planned"
|
||||
msgstr "Planificado"
|
||||
|
||||
#. module: report_task
|
||||
#: selection:report.closed.task,state:0
|
||||
#: selection:report.task.user.pipeline.open,task_state:0
|
||||
msgid "Cancelled"
|
||||
msgstr "Cancelado"
|
||||
|
||||
#. module: report_task
|
||||
#: view:report.timesheet.task.user:0
|
||||
msgid "Timesheet/Task hours Report Per Month"
|
||||
msgstr "Horario / Informe de horas de trabajo por mes"
|
||||
|
||||
#. module: report_task
|
||||
#: field:report.task.user.pipeline.open,task_progress:0
|
||||
msgid "Task Progress"
|
||||
msgstr "Progreso de la tarea"
|
||||
|
||||
#. module: report_task
|
||||
#: field:report.closed.task,date_close:0
|
||||
msgid "Date Closed"
|
||||
msgstr "Fecha de cierre"
|
||||
|
||||
#. module: report_task
|
||||
#: field:report.closed.task,user_id:0
|
||||
msgid "Assigned to"
|
||||
msgstr "Asignado a"
|
||||
|
||||
#. module: report_task
|
||||
#: field:report.closed.task,sequence:0
|
||||
msgid "Sequence"
|
||||
msgstr "Secuencia"
|
||||
|
||||
#. module: report_task
|
||||
#: model:ir.model,name:report_task.model_report_closed_task
|
||||
msgid "Closed Task Report"
|
||||
msgstr "Informe de tareas cerradas"
|
||||
|
||||
#. module: report_task
|
||||
#: field:report.timesheet.task.user,name:0
|
||||
msgid "Month"
|
||||
msgstr "Mes"
|
||||
|
||||
#. module: report_task
|
||||
#: selection:report.closed.task,priority:0
|
||||
msgid "Urgent"
|
||||
msgstr "Urgente"
|
||||
|
||||
#. module: report_task
|
||||
#: field:report.closed.task,date_deadline:0
|
||||
msgid "Deadline"
|
||||
msgstr "Fecha límite"
|
||||
|
||||
#. module: report_task
|
||||
#: field:report.timesheet.task.user,timesheet_hrs:0
|
||||
msgid "Timesheet Hours"
|
||||
msgstr "Horas del horario"
|
||||
|
||||
#. module: report_task
|
||||
#: view:report.closed.task:0
|
||||
msgid "Closed Tasks"
|
||||
msgstr "Tareas cerradas"
|
||||
|
||||
#. module: report_task
|
||||
#: selection:report.task.user.pipeline.open,task_state:0
|
||||
msgid "Open"
|
||||
msgstr "Abrir"
|
||||
|
||||
#. module: report_task
|
||||
#: field:report.closed.task,planned_hours:0
|
||||
msgid "Planned Hours"
|
||||
msgstr "Horas planeadas"
|
||||
Reference in New Issue
Block a user