[MERGE] Merge with main branch

bzr revid: mra@tinyerp.com-20100517045150-h7n3ob8hv40ep4pj
This commit is contained in:
mra (Open ERP) 2010-05-17 10:21:50 +05:30
commit adb80ffeb4
11 changed files with 6858 additions and 87 deletions

5924
addons/account/i18n/eu.po Normal file

File diff suppressed because it is too large Load Diff

View File

@ -8,13 +8,13 @@ msgstr ""
"Project-Id-Version: openobject-addons\n"
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
"POT-Creation-Date: 2009-08-28 16:01+0000\n"
"PO-Revision-Date: 2009-09-08 14:46+0000\n"
"Last-Translator: Fabien (Open ERP) <fp@tinyerp.com>\n"
"PO-Revision-Date: 2010-05-14 17:04+0000\n"
"Last-Translator: Borja López Soilán (Pexego) <borjals@pexego.es>\n"
"Language-Team: Galician <gl@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2010-04-17 04:06+0000\n"
"X-Launchpad-Export-Date: 2010-05-15 04:58+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: account
@ -25,7 +25,7 @@ msgstr "Nome interno"
#. module: account
#: view:account.tax.code:0
msgid "Account Tax Code"
msgstr ""
msgstr "Código impuesto contable"
#. module: account
#: model:ir.actions.act_window,name:account.action_invoice_tree9
@ -56,7 +56,7 @@ msgstr ""
#. module: account
#: constraint:ir.actions.act_window:0
msgid "Invalid model name in the action definition."
msgstr ""
msgstr "Nome do modelo incorrecto na definición da acción."
#. module: account
#: help:account.journal,currency:0
@ -806,7 +806,6 @@ msgstr ""
msgid "Move Lines"
msgstr ""
#. module: account
#: model:ir.actions.act_window,name:account.report_account_analytic_journal_tree
#: model:ir.ui.menu,name:account.report_account_analytic_journal_print
@ -2134,7 +2133,8 @@ msgid "Analytic Entry"
msgstr ""
#. module: account
#: view:res.company:0 field:res.company,overdue_msg:0
#: view:res.company:0
#: field:res.company,overdue_msg:0
msgid "Overdue Payments Message"
msgstr ""

View File

@ -0,0 +1,312 @@
# Basque translation for openobject-addons
# Copyright (c) 2010 Rosetta Contributors and Canonical Ltd 2010
# This file is distributed under the same license as the openobject-addons package.
# FIRST AUTHOR <EMAIL@ADDRESS>, 2010.
#
msgid ""
msgstr ""
"Project-Id-Version: openobject-addons\n"
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
"POT-Creation-Date: 2009-08-28 16:01+0000\n"
"PO-Revision-Date: 2010-05-14 16:07+0000\n"
"Last-Translator: Jon A. Ortuondo (Euskotec) <Unknown>\n"
"Language-Team: Basque <eu@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2010-05-15 04:58+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: account_invoice_layout
#: selection:account.invoice.line,state:0
msgid "Sub Total"
msgstr "Sub Totala"
#. module: account_invoice_layout
#: rml:account.invoice.layout:0
msgid "Invoice Date:"
msgstr "Fakturaren Data:"
#. module: account_invoice_layout
#: constraint:ir.model:0
msgid ""
"The Object name must start with x_ and not contain any special character !"
msgstr ""
"Objetuaren izena x_ -z hasi behar da eta ezin ditu karaktere berezirik izan!"
#. module: account_invoice_layout
#: rml:account.invoice.layout:0
msgid "Cancelled Invoice"
msgstr "Factura Ezeztatua(k)"
#. module: account_invoice_layout
#: selection:account.invoice.line,state:0
#: field:notify.message,name:0
msgid "Title"
msgstr "Izenburua"
#. module: account_invoice_layout
#: model:ir.actions.wizard,name:account_invoice_layout.wizard_notify_message
msgid "Invoices with Layout and Message"
msgstr "Molde eta mezu-dun Fakturak"
#. module: account_invoice_layout
#: rml:account.invoice.layout:0
msgid "Disc. (%)"
msgstr "Beherapena (%)"
#. module: account_invoice_layout
#: rml:account.invoice.layout:0
msgid "(Incl. taxes):"
msgstr "(Barne Zerga):"
#. module: account_invoice_layout
#: selection:account.invoice.line,state:0
msgid "Note"
msgstr "Oharra"
#. module: account_invoice_layout
#: wizard_button:wizard.notify_message,init,print:0
msgid "Print"
msgstr "Inprimatu"
#. module: account_invoice_layout
#: help:notify.message,msg:0
msgid ""
"This notification will appear at the bottom of the Invoices when printed."
msgstr "Ohar hau inprimatutako fakturaren oinean agertuko da."
#. module: account_invoice_layout
#: rml:account.invoice.layout:0
msgid "Unit Price"
msgstr "Unitate Prezioa"
#. module: account_invoice_layout
#: constraint:ir.actions.act_window:0
msgid "Invalid model name in the action definition."
msgstr ""
#. module: account_invoice_layout
#: model:ir.model,name:account_invoice_layout.model_notify_message
msgid "Notify By Messages"
msgstr "Mezuz Adierazi"
#. module: account_invoice_layout
#: rml:account.invoice.layout:0
msgid "PRO-FORMA"
msgstr "PRO-FORMA"
#. module: account_invoice_layout
#: field:account.invoice,abstract_line_ids:0
msgid "Invoice Lines"
msgstr "Faktura Lerroak"
#. module: account_invoice_layout
#: view:account.invoice.line:0
msgid "Seq."
msgstr "Sek."
#. module: account_invoice_layout
#: model:ir.ui.menu,name:account_invoice_layout.menu_finan_config_notify_message
msgid "Notification Message"
msgstr "Adierazpen Mezua"
#. module: account_invoice_layout
#: rml:account.invoice.layout:0
msgid "Customer Ref:"
msgstr "Bezero Erref."
#. module: account_invoice_layout
#: rml:account.invoice.layout:0
msgid ")"
msgstr ""
#. module: account_invoice_layout
#: field:account.invoice.line,state:0
msgid "Type"
msgstr "Mota"
#. module: account_invoice_layout
#: rml:account.invoice.layout:0
msgid "Price"
msgstr "Prezioa"
#. module: account_invoice_layout
#: rml:account.invoice.layout:0
msgid "/ ("
msgstr ""
#. module: account_invoice_layout
#: rml:account.invoice.layout:0
msgid "Taxes:"
msgstr "Zergak:"
#. module: account_invoice_layout
#: field:account.invoice.line,functional_field:0
msgid "Source Account"
msgstr "Jatorri Kontua"
#. module: account_invoice_layout
#: model:ir.actions.act_window,name:account_invoice_layout.notify_mesage_tree_form
msgid "Write Messages"
msgstr "Mezua Idatzi"
#. module: account_invoice_layout
#: rml:account.invoice.layout:0
msgid "Base"
msgstr "Oinarria"
#. module: account_invoice_layout
#: rml:account.invoice.layout:0
msgid "Fax :"
msgstr "Fax:"
#. module: account_invoice_layout
#: field:notify.message,msg:0
msgid "Special Message"
msgstr "Mezu Berezia"
#. module: account_invoice_layout
#: view:notify.message:0
msgid "Write a notification or a wishful message."
msgstr "Adierazpen edo zorion-idazkiak sartu"
#. module: account_invoice_layout
#: rml:account.invoice.layout:0
msgid "Tel. :"
msgstr "Tel.:"
#. module: account_invoice_layout
#: constraint:ir.ui.view:0
msgid "Invalid XML for View Architecture!"
msgstr ""
#. module: account_invoice_layout
#: selection:account.invoice.line,state:0
msgid "Page Break"
msgstr ""
#. module: account_invoice_layout
#: rml:account.invoice.layout:0
msgid "Document:"
msgstr ""
#. module: account_invoice_layout
#: wizard_view:wizard.notify_message,init:0
msgid "Select Message"
msgstr ""
#. module: account_invoice_layout
#: view:notify.message:0
msgid "Messages"
msgstr ""
#. module: account_invoice_layout
#: selection:account.invoice.line,state:0
msgid "Product"
msgstr ""
#. module: account_invoice_layout
#: model:ir.actions.report.xml,name:account_invoice_layout.account_invoices_1
msgid "Invoices with Layout"
msgstr ""
#. module: account_invoice_layout
#: rml:account.invoice.layout:0
msgid "Description / Taxes"
msgstr ""
#. module: account_invoice_layout
#: rml:account.invoice.layout:0
msgid "Amount"
msgstr ""
#. module: account_invoice_layout
#: rml:account.invoice.layout:0
msgid "Description/Taxes"
msgstr ""
#. module: account_invoice_layout
#: rml:account.invoice.layout:0
msgid "Draft Invoice"
msgstr ""
#. module: account_invoice_layout
#: field:account.invoice.line,sequence:0
msgid "Sequence Number"
msgstr ""
#. module: account_invoice_layout
#: rml:account.invoice.layout:0
msgid "Quantity"
msgstr ""
#. module: account_invoice_layout
#: rml:account.invoice.layout:0
msgid "Refund"
msgstr ""
#. module: account_invoice_layout
#: rml:account.invoice.layout:0
msgid "VAT :"
msgstr ""
#. module: account_invoice_layout
#: selection:account.invoice.line,state:0
msgid "Separator Line"
msgstr ""
#. module: account_invoice_layout
#: rml:account.invoice.layout:0
msgid "Supplier Invoice"
msgstr ""
#. module: account_invoice_layout
#: rml:account.invoice.layout:0
msgid "Note :"
msgstr ""
#. module: account_invoice_layout
#: rml:account.invoice.layout:0
msgid "Tax"
msgstr ""
#. module: account_invoice_layout
#: model:ir.module.module,shortdesc:account_invoice_layout.module_meta_information
msgid "account_invoice_layout"
msgstr ""
#. module: account_invoice_layout
#: rml:account.invoice.layout:0
msgid "Total (Excl. taxes):"
msgstr ""
#. module: account_invoice_layout
#: rml:account.invoice.layout:0
msgid "Invoice"
msgstr ""
#. module: account_invoice_layout
#: wizard_button:wizard.notify_message,init,end:0
msgid "Cancel"
msgstr ""
#. module: account_invoice_layout
#: rml:account.invoice.layout:0
msgid "Supplier Refund"
msgstr ""
#. module: account_invoice_layout
#: wizard_field:wizard.notify_message,init,message:0
msgid "Message"
msgstr ""
#. module: account_invoice_layout
#: rml:account.invoice.layout:0
msgid "Total"
msgstr ""
#. module: account_invoice_layout
#: model:ir.ui.menu,name:account_invoice_layout.menu_notify_mesage_tree_form
msgid "All Notification Messages"
msgstr ""

View File

@ -7,40 +7,40 @@ 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: 2009-09-08 12:29+0000\n"
"Last-Translator: Fabien (Open ERP) <fp@tinyerp.com>\n"
"PO-Revision-Date: 2010-05-14 16:28+0000\n"
"Last-Translator: Grzegorz Grzelak (Cirrus.pl) <Unknown>\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-04-17 03:59+0000\n"
"X-Launchpad-Export-Date: 2010-05-15 04:58+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: board_sale
#: model:ir.module.module,shortdesc:board_sale.module_meta_information
msgid "Dashboard for sales"
msgstr ""
msgstr "Konsola dla sprzedaży"
#. module: board_sale
#: model:ir.actions.act_window,name:board_sale.open_board_sales_manager
#: model:ir.ui.menu,name:board_sale.menu_board_sales_manager
msgid "Sale Dashboard"
msgstr ""
msgstr "Konsola sprzedaży"
#. module: board_sale
#: view:board.board:0
msgid "Sales of the month"
msgstr ""
msgstr "Sprzedaż w miesiącu"
#. module: board_sale
#: view:board.board:0
msgid "Sales manager board"
msgstr ""
msgstr "Konsola szefa sprzedaży"
#. module: board_sale
#: view:board.board:0
msgid "Cases of the month"
msgstr ""
msgstr "Zdarzenia miesiąca"
#. module: board_sale
#: constraint:ir.ui.view:0
@ -50,12 +50,12 @@ msgstr "XML niewłaściwy dla tej architektury wyświetlania!"
#. module: board_sale
#: view:board.board:0
msgid "My open quotations"
msgstr ""
msgstr "Moje otwarte zamówienia"
#. module: board_sale
#: constraint:ir.actions.act_window:0
msgid "Invalid model name in the action definition."
msgstr ""
msgstr "Nieprawidłowa nazwa modelu w definicji akcji."
#. module: board_sale
#: model:ir.ui.menu,name:board_sale.next_id_88
@ -65,9 +65,9 @@ msgstr "Sprzedaż"
#. module: board_sale
#: view:board.board:0
msgid "Cases statistics"
msgstr ""
msgstr "Statystyka zdarzeń"
#. module: board_sale
#: view:board.board:0
msgid "Top ten sales of the month"
msgstr ""
msgstr "Dziesięć najlepszych sprzedaży w miesiącu"

View File

@ -7,13 +7,13 @@ msgstr ""
"Project-Id-Version: OpenERP Server 5.0.0\n"
"Report-Msgid-Bugs-To: support@openerp.com\n"
"POT-Creation-Date: 2010-01-05 05:59+0000\n"
"PO-Revision-Date: 2010-05-12 20:13+0000\n"
"PO-Revision-Date: 2010-05-14 20:14+0000\n"
"Last-Translator: Grzegorz Grzelak (Cirrus.pl) <Unknown>\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-05-13 04:36+0000\n"
"X-Launchpad-Export-Date: 2010-05-15 04:58+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: crm
@ -27,16 +27,12 @@ msgid ""
"This property defines the list of date/time exceptions for "
"arecurring calendar component."
msgstr ""
"Ta cecha definiuje listę wyjątków daty/czasu dla powtarzanych elementów "
"kalendarza."
#. module: crm
#: help:crm.case.rule,act_mail_to_user:0
msgid ""
"Check this if you want the rule to send an email to the responsible person."
msgstr ""
"Zaznacz to jeżeli chcesz aby przez regułę został wysłany email do "
"odpowiedzialnej osoby."
#. module: crm
#: view:crm.meeting:0
@ -84,12 +80,12 @@ msgstr "Planowane koszty"
#. module: crm
#: wizard_field:crm.job.partner_create,init,close:0
msgid "Close job request"
msgstr "Żądanie zakończenia zadania."
msgstr ""
#. module: crm
#: field:crm.case.stage,name:0
msgid "Stage Name"
msgstr ""
msgstr "Nazwa etapu"
#. module: crm
#: view:crm.case:0
@ -255,7 +251,7 @@ msgstr "Rozmowa telefoniczna"
#. module: crm
#: model:ir.model,name:crm.model_report_crm_case_section_stage
msgid "Cases by section and stage"
msgstr ""
msgstr "Zdarzenia wg sekcji i etapów"
#. module: crm
#: field:crm.case.rule,act_mail_to_email:0
@ -661,7 +657,7 @@ msgstr ""
#. module: crm
#: help:crm.case,email_from:0
msgid "These people will receive email."
msgstr ""
msgstr "Ci ludzie otrzymają wiadomość"
#. module: crm
#: help:crm.case.section,calendar:0
@ -710,6 +706,8 @@ msgstr ""
msgid ""
"You must define a responsible user for this case in order to use this action!"
msgstr ""
"Musisz zdefiniować użytkownika odpowiedzialnego za zdarzenie, aby zastosować "
"tę akcję!"
#. module: crm
#: view:crm.phonecall:0
@ -724,7 +722,7 @@ msgstr "Zdarzenia partnera"
#. module: crm
#: model:crm.case.stage,name:crm.stage_job4
msgid "Contract Proposed"
msgstr ""
msgstr "Zaproponowano umowę"
#. module: crm
#: model:ir.ui.menu,name:crm.menu_crm_case_job_req_main
@ -737,7 +735,7 @@ msgstr "Praca - proces zatrudnienia"
#: view:crm.lead:0
#: view:crm.opportunity:0
msgid "Related Cases"
msgstr ""
msgstr "Zdarzenia związane"
#. module: crm
#: selection:report.crm.case.section.categ.categ2,month:0
@ -781,7 +779,7 @@ msgstr ""
#. module: crm
#: model:ir.ui.menu,name:crm.menu_action_report_crm_case_oppor_stage
msgid "Cases by Opportunities and Stage"
msgstr ""
msgstr "Zdarzenia wg szans i etapów"
#. module: crm
#: view:crm.claim:0
@ -796,18 +794,18 @@ msgstr "Pozycje segmentacji partnera"
#. module: crm
#: model:ir.actions.act_window,name:crm.crm_case_category_act_leads_all
msgid "All Leads"
msgstr ""
msgstr "Wszystkie sygnały"
#. module: crm
#: view:crm.lead:0
msgid "Leads Form"
msgstr ""
msgstr "Formularz sygnałów"
#. module: crm
#: view:crm.segmentation:0
#: model:ir.model,name:crm.model_crm_segmentation
msgid "Partner Segmentation"
msgstr ""
msgstr "Segmentacja partnerów"
#. module: crm
#: model:crm.case.stage,name:crm.stage_job5
@ -833,7 +831,7 @@ msgstr "Prawdopodobieństwo (%)"
#. module: crm
#: model:ir.model,name:crm.model_crm_lead
msgid "Leads Cases"
msgstr ""
msgstr "Zdarzenia - sygnały"
#. module: crm
#: help:crm.case.section,reply_to:0
@ -846,7 +844,7 @@ msgstr ""
#: view:crm.case.rule:0
#: model:ir.model,name:crm.model_crm_case_rule
msgid "Case Rule"
msgstr ""
msgstr "Reguła zdarzenia"
#. module: crm
#: code:addons/crm/crm_opportunity.py:0
@ -1299,7 +1297,7 @@ msgstr "Oblicz segmentację"
#. module: crm
#: view:crm.lead:0
msgid "Lead Email"
msgstr ""
msgstr "Email sygnału"
#. module: crm
#: model:ir.actions.act_window,name:crm.crm_segmentation-act
@ -1851,7 +1849,7 @@ msgstr ""
#. module: crm
#: view:crm.claim:0
msgid "In Progress Claims"
msgstr ""
msgstr "Reklamacje w toku"
#. module: crm
#: model:ir.actions.wizard,name:crm.wizard_crm_set_rrule
@ -1916,7 +1914,7 @@ msgstr ""
#. module: crm
#: view:crm.lead:0
msgid "Leads Tree"
msgstr ""
msgstr "Drzewo sygnałów"
#. module: crm
#: field:crm.meeting,caldav_url:0
@ -2180,7 +2178,7 @@ msgstr "Utworzono"
#. module: crm
#: view:crm.lead:0
msgid "Lead Information"
msgstr ""
msgstr "Informacja sygnału"
#. module: crm
#: model:ir.model,name:crm.model_crm_segmentation_line
@ -2438,6 +2436,8 @@ msgid ""
"Allows you to track and manage leads which are pre-sales requests or "
"contacts, the very first contact with a customer request."
msgstr ""
"Pozwala śledzić i zarządzać sygnałami, które są pytaniami sondażowymi lub "
"przypadkowymi kontaktami."
#. module: crm
#: help:crm.case,som:0
@ -2770,7 +2770,7 @@ msgstr ""
#. module: crm
#: view:crm.lead:0
msgid "Lead Name"
msgstr ""
msgstr "Nazwa sygnału"
#. module: crm
#: view:crm.claim:0
@ -2785,13 +2785,14 @@ msgstr ""
#. module: crm
#: view:crm.lead:0
msgid "Meeting For Leads Generation"
msgstr ""
msgstr "Spotkanie do generacji sygnałów"
#. module: crm
#: wizard_view:crm.lead.opportunity_set,create_partner:0
#: wizard_view:crm.lead.partner_create,init:0
msgid "Are you sure you want to create a partner based on this lead ?"
msgstr ""
"Jesteś pewien, że chcesz utworzyć partnera na podstawie tego sygnału ?"
#. module: crm
#: model:crm.case.stage,name:crm.stage_job6
@ -2868,7 +2869,7 @@ msgstr ""
#. module: crm
#: model:ir.actions.act_window,name:crm.crm_case_categ_claim0
msgid "All Claims"
msgstr ""
msgstr "Wszystkie reklamacje"
#. module: crm
#: field:crm.case.log,user_id:0
@ -2972,12 +2973,12 @@ msgstr "Wszystkie przypadki"
#: code:addons/crm/wizard/crm_lead_wizard.py:0
#, python-format
msgid "A partner is already defined on this lead."
msgstr ""
msgstr "Na podstawie tego sygnału juz został utworzony partner."
#. module: crm
#: view:crm.lead:0
msgid "Lead Source"
msgstr ""
msgstr "Źródło sygnału"
#. module: crm
#: field:report.crm.case.section.categ.categ2,nbr:0
@ -3072,7 +3073,7 @@ msgstr ""
#. module: crm
#: view:crm.lead:0
msgid "Search Leads"
msgstr ""
msgstr "Szukaj sygnału"
#. module: crm
#: help:crm.case.rule,active:0
@ -3244,7 +3245,7 @@ msgstr ""
#. module: crm
#: model:ir.ui.menu,name:crm.menu_action_report_crm_case_lead_stage
msgid "Cases by Leads and Stage"
msgstr ""
msgstr "Zdarzenia wg sygnałów i etapów"
#. module: crm
#: field:crm.meeting,exdate:0
@ -3259,7 +3260,7 @@ msgstr ""
#. module: crm
#: model:process.transition,note:crm.process_transition_leadopportunity0
msgid "Creating business opportunities from Leads"
msgstr ""
msgstr "Tworzenie szansy z sygnału"
#. module: crm
#: model:ir.ui.menu,name:crm.next_id_64
@ -3331,7 +3332,7 @@ msgstr ""
#. module: crm
#: view:crm.lead:0
msgid "Lead Subject"
msgstr ""
msgstr "Temat sygnału"
#. module: crm
#: view:crm.lead:0
@ -3515,7 +3516,7 @@ msgstr ""
#. module: crm
#: view:crm.lead:0
msgid "Lead Details"
msgstr ""
msgstr "Szczegóły sygnału"
#. module: crm
#: field:crm.case.rule,act_section_id:0

View File

@ -20,7 +20,6 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
##############################################################################
from mx import DateTime
import time
import pooler
@ -70,8 +69,6 @@ class hr_holidays_status(osv.osv):
return_false = False
employee_id = False
res = {}
for id in ids:
res[id] = {}.fromkeys(name, 0)
if context and context.has_key('employee_id'):
if not context['employee_id']:
return_false = True
@ -84,6 +81,8 @@ class hr_holidays_status(osv.osv):
return_false = True
if employee_id:
res = self.get_days(cr, uid, ids, employee_id, return_false, context=context)
else:
res = dict.fromkeys(ids, {name: 0})
return res
# To do: we can add remaining_leaves_category field to display remaining leaves for particular type
@ -183,20 +182,15 @@ class hr_holidays(osv.osv):
}
return result
def onchange_date_from(self, cr, uid, ids, date_to, date_from):
result = {}
if date_to and date_from:
from_dt = time.mktime(time.strptime(date_from,'%Y-%m-%d %H:%M:%S'))
to_dt = time.mktime(time.strptime(date_to,'%Y-%m-%d %H:%M:%S'))
diff_day = (to_dt-from_dt)/(3600*24)
result['value'] = {
'number_of_days_temp': round(diff_day)+1
}
return result
result['value'] = {
'number_of_days_temp': 0,
}
return result
def _get_number_of_days(date_from, date_to):
"""Returns a float equals to the timedelta between two dates given as string."""
DATETIME_FORMAT = "%Y-%m-%d %H:%M:%S"
from_dt = datetime.datetime.strptime(date_from, DATETIME_FORMAT)
to_dt = datetime.datetime.strptime(date_to, DATETIME_FORMAT)
timedelta = to_dt - from_dt
diff_day = timedelta.days + float(timedelata.seconds) / 86400
return diff_day
def _update_user_holidays(self, cr, uid, ids):
for record in self.browse(cr, uid, ids):
@ -226,21 +220,23 @@ class hr_holidays(osv.osv):
leave_obj.unlink(cr, uid, leave_ids)
return super(hr_holidays, self).unlink(cr, uid, ids, context)
def onchange_date_to(self, cr, uid, ids, date_from, date_to):
def onchange_date_from(self, cr, uid, ids, date_to, date_from):
result = {}
if date_from and date_to:
from_dt = time.mktime(time.strptime(date_from,'%Y-%m-%d %H:%M:%S'))
to_dt = time.mktime(time.strptime(date_to,'%Y-%m-%d %H:%M:%S'))
diff_day = (to_dt-from_dt)/(3600*24)
if date_to and date_from:
diff_day = self._get_number_of_days(date_from, date_to)
result['value'] = {
'number_of_days_temp': round(diff_day)+1
}
return result
result['value'] = {
'number_of_days_temp': 0
'number_of_days_temp': 0,
}
return result
def onchange_date_to(self, cr, uid, ids, date_from, date_to):
return onchange_date_from(cr, uid, ids, date_to, date_from)
def onchange_sec_id(self, cr, uid, ids, status, context={}):
warning = {}
if status:
@ -401,19 +397,29 @@ class hr_holidays(osv.osv):
self.holidays_validate(cr, uid, holiday_ids)
#if record.holiday_status_id.categ_id and record.date_from and record.date_to and record.employee_id:
if record.holiday_status_id.categ_id and record.date_from and record.date_to:
vals={}
vals['name']=record.name
vals['categ_id']=record.holiday_status_id.categ_id.id
epoch_c = time.mktime(time.strptime(record.date_to,'%Y-%m-%d %H:%M:%S'))
epoch_d = time.mktime(time.strptime(record.date_from,'%Y-%m-%d %H:%M:%S'))
diff_day = (epoch_c - epoch_d)/(3600*24)
vals['duration'] = (diff_day) * 8
vals['note'] = record.notes
# vals['user_id'] = record.user_id.id
vals['date'] = record.date_from
if record.holiday_type=='employee':
vals['user_id'] = record.user_id.id
# if record.holiday_status_id.categ_id and record.date_from and record.date_to:
# vals={}
# vals['name']=record.name
# vals['categ_id']=record.holiday_status_id.categ_id.id
# epoch_c = time.mktime(time.strptime(record.date_to,'%Y-%m-%d %H:%M:%S'))
# epoch_d = time.mktime(time.strptime(record.date_from,'%Y-%m-%d %H:%M:%S'))
# diff_day = (epoch_c - epoch_d)/(3600*24)
# vals['duration'] = (diff_day) * 8
# vals['note'] = record.notes
## vals['user_id'] = record.user_id.id
# vals['date'] = record.date_from
# if record.holiday_type=='employee':
# vals['user_id'] = record.user_id.id
if record.holiday_status_id.categ_id and record.date_from and record.date_to and record.employee_id:
diff_day = self._get_number_of_days(record.date_from, record.date_to)
vals = {
'name' : record.name,
'categ_id' : record.holiday_status_id.categ_id.id,
'duration' : (diff_day) * 8,
'note' : record.notes,
'user_id' : record.user_id.id,
'date' : record.date_from,
}
case_id = self.pool.get('crm.meeting').create(cr,uid,vals)
self.write(cr, uid, ids, {'case_id':case_id})
return True

View File

@ -0,0 +1,25 @@
# -*- 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 marketing_campaign
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -0,0 +1,44 @@
# -*- 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/>.
#
##############################################################################
{
"name" : "",
"version" : "1.1",
"depends" : ["crm",
"document",
"poweremail" # need to get this module form the branch
# lp:poweremail
],
"author" : "Tiny",
"category": 'Generic Modules/Marketing',
"description": """
""",
'website': 'http://www.openerp.com',
'init_xml': [],
'update_xml': [
'marketing_campaign_view.xml',
],
'demo_xml': [],
'installable': True,
'active': False,
}
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -0,0 +1,180 @@
# -*- 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 time
from datetime import datetime
from dateutil.relativedelta import relativedelta
from osv import fields, osv
_intervalTypes = {
'hours': lambda interval: relativedelta(hours=interval),
'days': lambda interval: relativedelta(days=interval),
'months': lambda interval: relativedelta(months=interval),
'years': lambda interval: relativedelta(years=interval),
}
class marketing_campaign(osv.osv): #{{{
_name = "marketing.campaign"
_description = "Marketing Campaigns"
_columns = {
'name': fields.char('Name', size=64),
'object_id': fields.many2one('ir.model', 'Objects'),
'mode':fields.selection([('test', 'Test'),
('test_realtime', 'Realtime Time'),
('manual', 'Manual'),
('active', 'Active')],
'Mode'),
'state': fields.selection([('draft', 'Draft'),
('running', 'Running'),
('done', 'Done'),
('cancelled', 'Cancelled'),],
'State',
readonly=True),
}
marketing_campaign()#}}}
class marketing_campaign_segment(osv.osv): #{{{
_name = "marketing.campaign.segment"
_description = "Marketing Campaign Segments"
_columns = {
'name': fields.char('Name', size=64),
'campaign_id': fields.many2one('marketing.campaign', 'Campaign'),
'object_id': fields.related('campaign_id','object_id',
type='many2one', relation='ir.model',
string='Object'),
'ir_filter_id':fields.many2one('ir.filters', 'Filter'),
'sync_last_date': fields.datetime('Date'),
'sync_mode':fields.selection([('create', 'Create'),
('write', 'Write')],
'Mode'),
'state': fields.selection([('draft', 'Draft'),
('running', 'Running'),
('done', 'Done'),
('cancelled', 'Cancelled')],
'State',
readonly=True),
'date_run': fields.datetime('Running'),
'date_done': fields.datetime('Done'),
}
marketing_campaign_segment()#}}}
class marketing_campaign_activity(osv.osv): #{{{
_name = "marketing.campaign.activity"
_description = "Marketing Campaign Activities"
_columns = {
'name': fields.char('Name', size=64),
'campaign_id': fields.many2one('marketing.campaign', 'Campaign'),
'object_id': fields.related('campaign_id','object_id',
type='many2one', relation='ir.model',
string='Object'),
'start': fields.boolean('Start'),
'condition': fields.text('Condition'),
'type':fields.selection([('email', 'E-mail'),
('paper', 'Paper'),
('action', 'Action'),
('subcampaign', 'Sub-Campaign')],
'Type'),
'email_template_id': fields.many2one('poweremail.templates','Email Template'),
'report_id': fields.many2one('ir.actions.report.xml', 'Reports'),
'report_directory_id': fields.many2one('document.directory', 'Directory'),
'server_action_id': fields.many2one('ir.actions.server', string='Action'),
'to_ids': fields.one2many('marketing.campaign.transition',
'activity_from_id',
'Next Activities'),
'subcampaign_id' :fields.many2one('marketing.campaign', 'Sub-Campaign'),
'subcampaign_segment_id' :fields.many2one('marketing.campaign.segment',
'Sub Campaign Segment'),
}
marketing_campaign_activity()#}}}
class marketing_campaign_transition(osv.osv): #{{{
_name = "marketing.campaign.transition"
_description = "Campaign Transitions"
_columns = {
'activity_from_id': fields.many2one('marketing.campaign.activity',
'Source Activity'),
'activity_to_id': fields.many2one('marketing.campaign.activity',
'Destination Activity'),
'interval_nbr': fields.integer('Interval No.'),
'interval_type': fields.selection([('hours', 'Hours'), ('days', 'Days'),
('months', 'Months'), ('years','Years')], 'Interval Type')
}
marketing_campaign_transition() #}}}
class marketing_campaign_workitem(osv.osv): #{{{
_name = "marketing.campaign.workitem"
_description = "Campaign Workitems"
_columns = {
'segment_id': fields.many2one('marketing.campaign.segment', 'Segment'),
'activity_id': fields.many2one('marketing.campaign.activity', 'Activity'),
'object_id': fields.related('segment_id', 'campaign_id', 'object_id',
type='many2one', relation='ir.model',
string='Object'),
'res_id': fields.integer('Results'),
'date': fields.datetime('Execution Date'),
'partner_id': fields.many2one('res.partner', 'Partner'),
'state': fields.selection([('todo', 'ToDo'), ('inprogress', 'In Progress'),
('exception', 'Exception'), ('done', 'Done'),
('cancelled', 'Cancelled')], 'State')
}
def process_chain(self, cr, uid, workitem_id, context={}):
workitem = self.browse(cr, uid, workitem_id)
to_ids = [to_ids.id for to_ids in workitem.activity_id.to_ids]
mct_obj = self.pool.get('marketing.campaign.transition')
process_to_id = mct_obj.search(cr,uid, [('id', 'in', to_ids),
('activity_from_id','=', 'activity_id')])
for mct_id in mct_obj.browse(cr, uid, process_to_id):
launch_date = datetime.datetime.now() + _intervalTypes[ \
mct_id.interval_type](mct_id.interval_nbr)
workitem_vals = {'segment_id': workitem.segment_id.id,
'activity_id': mct_id.activity_to_id.id,
'date': launch_date,
'partner_id': workitem.partner_id.id,
'state': 'todo',
}
self.create(cr, uid, workitem_vals)
def process(self, cr, uid, workitem_ids, context={}):
#for wi in self.browse(cr, uid, workitem_ids):
# if wi.state == 'todo'# we searched the wi which are in todo state then y v keep this filter again
return True
def process_all(self, cr, uid, context={}):
workitem_ids = self.search(cr, uid, [('type', '=', 'todo'),
('date','<=', time.strftime('%Y-%m-%d %H:%M:%S'))])
if workitem_ids:
self.parocess(cr, uid, workitem_ids, context)
marketing_campaign_workitem() #}}}
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -0,0 +1,18 @@
<?xml version="1.0" ?>
<openerp>
<data noupdate="1">
<!-- Cron -->
<record model="ir.cron" id="ir_cron_marketing_campaign_every_hour">
<field name="name">Check Workitem</field>
<field name="interval_number">60</field>
<field name="interval_type">minutes</field>
<field name="numbercall">-1</field>
<field name="doall" eval="False"/>
<field name="model" eval="'marketing.campaign.workitem'"/>
<field name="function" eval="'process_all'"/>
<field name="args" eval="'()'"/>
</record>
</data>
</openerp>

View File

@ -0,0 +1,261 @@
<?xml version="1.0"?>
<openerp>
<data>
<menuitem name="Direct Marketing" id="menu_marketing" parent="base.menu_base_partner"/>
<!--
======================
Marketing Campaign
======================
-->
<record model="ir.ui.view" id="view_marketing_campaign_form">
<field name="name">marketing.campaign.form</field>
<field name="model">marketing.campaign</field>
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Campaign">
<group colspan="4">
<field name="name" select="1"/>
<field name="object_id" select="1"/>
<field name="mode"/>
</group>
<separator string="Status" colspan="4" />
<field name="state" nolabel = "1" colspan="4"/>
</form>
</field>
</record>
<record model="ir.ui.view" id="view_marketing_campaign_tree">
<field name="name">marketing.campaign.tree</field>
<field name="model">marketing.campaign</field>
<field name="type">tree</field>
<field name="arch" type="xml">
<tree string="All Campaigns">
<field name="name" select="1"/>
<field name="object_id" select="1"/>
<field name="mode"/>
<field name="state"/>
</tree>
</field>
</record>
<!--record id="view_marketing_campaign_diagram" model="ir.ui.view">
<field name="name">marketing.campaign.diagram</field>
<field name="model">marketing.campaign</field>
<field name="type">diagram</field>
<field name="arch" type="xml">
<diagram string="Campaign Editor">
<node object="marketing.campaign.activity" shape="rectangle:type!='subcampaign'" bgcolor="gray:start==True">
<field name="name"/>
<field name="type"/>
<field name="start" invisible="1"/>
</node>
<arrow object="marketing.campaign.transition" source="activity_from_id" destination="activity_to_id">
<field name="activity_from_id"/>
<field name="activity_to_id"/>
</arrow>
</diagram>
</field>
</record-->
<record model="ir.actions.act_window" id="action_marketing_campaign_form">
<field name="name">All Campaigns</field>
<field name="type">ir.actions.act_window</field>
<field name="res_model">marketing.campaign</field>
<field name="view_type">form</field>
<field name="view_mode">tree,form,diagram</field>
<field name="view_id" ref="view_marketing_campaign_tree"/>
</record>
<menuitem id="menu_marketing_campaign_form" parent="menu_marketing" action="action_marketing_campaign_form" sequence="20" />
<!--
======================
Marketing Segments
======================
-->
<record model="ir.ui.view" id="view_marketing_campaign_segment_form">
<field name="name">marketing.campaign.segment.form</field>
<field name="model">marketing.campaign.segment</field>
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Segments">
<group colspan="4">
<field name="name" select="1"/>
<newline/>
<field name="campaign_id" select="1"/>
<field name="object_id" select="1"/>
<newline/>
<field name="ir_filter_id" select="1"/>
<newline/>
<field name="date_run"/>
<field name="date_done"/>
<separator string="Synchronization" colspan="4" />
<field name="sync_last_date"/>
<field name="sync_mode"/>
</group>
<separator string="Status" colspan="4" />
<field name="state" nolabel = "1" colspan="4"/>
</form>
</field>
</record>
<record model="ir.ui.view" id="view_marketing_campaign_segment_tree">
<field name="name">marketing.campaign.segment.tree</field>
<field name="model">marketing.campaign.segment</field>
<field name="type">tree</field>
<field name="arch" type="xml">
<tree string="All Segments">
<field name="name" select="1"/>
<field name="campaign_id" select="1"/>
<field name="sync_last_date"/>
<field name="sync_mode"/>
<field name="state"/>
<field name="date_run"/>
<field name="date_done"/>
</tree>
</field>
</record>
<record model="ir.actions.act_window" id="action_marketing_campaign_segment_form">
<field name="name">All Segments</field>
<field name="type">ir.actions.act_window</field>
<field name="res_model">marketing.campaign.segment</field>
<field name="view_type">form</field>
<field name="view_mode">tree,form</field>
<field name="view_id" ref="view_marketing_campaign_segment_tree"/>
</record>
<menuitem id="menu_marketing_campaign_segment_form" parent="menu_marketing" action="action_marketing_campaign_segment_form" sequence="10" />
<!--
======================
Marketing Activities
======================
-->
<record model="ir.ui.view" id="view_marketing_campaign_activity_form">
<field name="name">marketing.campaign.activity.form</field>
<field name="model">marketing.campaign.activity</field>
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Activities">
<field name="name" select="1" />
<field name="start"/>
<field name="campaign_id" select="1"/>
<field name="object_id"/>
<field name="condition" colspan="4"/>
<newline/>
<field name="type"/>
<group colspan="4" attrs="{'invisible':[('type','!=','email')]}" >
<field name="email_template_id" attrs="{'required':[('type','=','email')]}" />
</group>
<group colspan="4" attrs="{'invisible':[('type','!=','paper')]}" >
<field name="report_id" attrs="{'required':[('type','=','paper')]}" />
<field name="report_directory_id" attrs="{'required':[('type','=','paper')]}" />
</group>
<group colspan="4" attrs="{'invisible':[('type','!=','action')]}" >
<field name="server_action_id" attrs="{'required':[('type','=','action')]}" />
</group>
<group colspan="4" attrs="{'invisible':[('type','!=','subcampaign')]}" >
<field name="subcampaign_id" attrs="{'required':[('type','=','subcampaign')]}" />
<field name="subcampaign_segment_id" attrs="{'required':[('type','=','subcampaign')]}" />
</group>
<field name="to_ids" nolabel="1" colspan="4" mode="tree">
<tree string="All Transitions" editable="bottom">
<field name="activity_from_id"/>
<field name="activity_to_id" />
<field name="interval_nbr" />
<field name="interval_type"/>
</tree>
</field>
</form>
</field>
</record>
<record model="ir.ui.view" id="view_marketing_campaign_activity_tree">
<field name="name">marketing.campaign.activity.tree</field>
<field name="model">marketing.campaign.activity</field>
<field name="type">tree</field>
<field name="arch" type="xml">
<tree string="All Activities">
<field name="name" select="1"/>
<field name="campaign_id" select="1"/>
<field name="start"/>
<field name="object_id"/>
<field name="condition"/>
<field name="type"/>
<field name="report_id"/>
<field name="to_ids"/>
<field name="subcampaign_id"/>
<field name="subcampaign_segment_id"/>
</tree>
</field>
</record>
<record model="ir.actions.act_window" id="action_marketing_campaign_activity_form">
<field name="name">All Activities</field>
<field name="type">ir.actions.act_window</field>
<field name="res_model">marketing.campaign.activity</field>
<field name="view_type">form</field>
<field name="view_mode">tree,form</field>
<field name="view_id" ref="view_marketing_campaign_activity_tree"/>
</record>
<!--
<menuitem id="menu_marketing_campaign_activity_form" parent="menu_marketing" action="action_marketing_campaign_activity_form" sequence="3" />-->
<!--
======================
Marketing Workitems
======================
-->
<record model="ir.ui.view" id="view_marketing_campaign_workitem_tree">
<field name="name">marketing.campaign.workitem.tree</field>
<field name="model">marketing.campaign.workitem</field>
<field name="type">tree</field>
<field name="arch" type="xml">
<tree string="All Workitems">
<field name="segment_id"/>
<field name="activity_id" />
<field name="res_id" />
<field name="date"/>
<field name="state"/>
</tree>
</field>
</record>
<record model="ir.ui.view" id="view_marketing_campaign_workitem_form">
<field name="name">marketing.campaign.workitem.form</field>
<field name="model">marketing.campaign.workitem</field>
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Workitem">
<field name="segment_id" select="1"/>
<field name="activity_id" select="1"/>
<field name="object_id"/>
<field name="res_id"/>
<field name="date" select="1"/>
<field name="partner_id" select="1"/>
<separator string="Status" colspan="4"/>
<field name="state" nolabel="1" colspan="4" readonly="True" select="1"/>
</form>
</field>
</record>
<record model="ir.actions.act_window" id="action_marketing_campaign_workitem">
<field name="name">All Workitems</field>
<field name="type">ir.actions.act_window</field>
<field name="res_model">marketing.campaign.workitem</field>
<field name="view_type">form</field>
<field name="view_mode">tree,form</field>
<field name="view_id" ref="view_marketing_campaign_workitem_tree"/>
</record>
<menuitem id="menu_action_marketing_campaign_workitem" parent="menu_marketing" action="action_marketing_campaign_workitem" sequence="30" groups="base.group_extended"/>
</data>
</openerp>