bzr revid: fp@tinyerp.com-20081027152923-dsed29urmwtw0zxt
This commit is contained in:
Fabien Pinckaers 2008-10-27 16:29:23 +01:00
commit 9300cff52b
5 changed files with 560 additions and 6 deletions

View File

@ -289,6 +289,23 @@ class crm_case_rule(osv.osv):
case_obj = self.pool.get('crm.case')
cases = case_obj.browse(cr, uid, ids2, context)
return case_obj._action(cr, uid, cases, False, context=context)
def _check_mail(self, cr, uid, ids, context=None):
caseobj = self.pool.get('crm.case')
emptycase = orm.browse_null()
for rule in self.browse(cr, uid, ids):
if rule.act_mail_body:
try:
caseobj.format_mail(emptycase, rule.act_mail_body)
except (ValueError, KeyError, TypeError):
return False
return True
_constraints = [
(_check_mail, 'Error: The mail is not well formated', ['act_mail_body']),
]
crm_case_rule()
def _links_get(self, cr, uid, context={}):
@ -487,7 +504,7 @@ class crm_case(osv.osv):
level -= 1
return True
def email_send(self, cr, uid, case, emails, body, context={}):
def format_mail(self, case, body):
data = {
'case_id': case.id,
'case_subject': case.name,
@ -501,7 +518,10 @@ class crm_case(osv.osv):
'partner': (case.partner_id and case.partner_id.name) or '/',
'partner_email': (case.partner_address_id and case.partner_address_id.email) or '/',
}
body = body % data
return body % data
def email_send(self, cr, uid, case, emails, body, context={}):
body = self.format_mail(case, body)
if case.user_id and case.user_id.address_id and case.user_id.address_id.email:
emailfrom = case.user_id.address_id.email
else:

View File

@ -110,7 +110,7 @@ msgstr "Présent"
#. module: hr
#: model:ir.actions.wizard,name:hr.wizard_attendance_error
msgid "Print Attendance Error Report"
msgstr "écarts de présences"
msgstr "Imprimer le Rapport des Écarts de Présences"
#. module: hr
#: wizard_field:hr.si_so,si_ask_so,last_time:0
@ -152,7 +152,7 @@ msgstr ""
#: model:ir.actions.act_window,name:hr.open_view_attendance_reason
#: model:ir.ui.menu,name:hr.menu_open_view_attendance_reason
msgid "Attendance Reasons"
msgstr "Raisons d'assistance"
msgstr "Motifs de pointage"
#. module: hr
#: model:ir.ui.menu,name:hr.menu_hr_configuration

View File

@ -0,0 +1,269 @@
# Translation of OpenERP Server.
# This file containt the translation of the following modules:
# * product_margin
#
msgid ""
msgstr "a"
"Project-Id-Version: OpenERP Server 4.3.99\n"
"Report-Msgid-Bugs-To: support@openerp.com\n"
"POT-Creation-Date: 2008-10-27 14:01:44+0000\n"
"PO-Revision-Date: 2008-10-27 14:01:44+0000\n"
"Last-Translator: <>\n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: \n"
#. module: product_margin
#: field:product.product,expected_margin_rate:0
msgid "Expected Margin (%)"
msgstr "Marge Attendue (%)"
#. module: product_margin
#: wizard_field:product.margins,init,from_date:0
msgid "From"
msgstr "De"
#. module: product_margin
#: help:product.product,sale_expected:0
msgid "Sum of Multification of Sale Catalog price and quantity of Customer Invoices"
msgstr ""
"Somme de la Multiplication du prix de Catalogue de Vente et de la quantité des "
"Factures Clients"
#. module: product_margin
#: wizard_field:product.margins,init,to_date:0
msgid "To"
msgstr "À"
#. module: product_margin
#: field:product.product,date_to:0
msgid "To Date"
msgstr "Date de Fin"
#. module: product_margin
#: field:product.product,date_from:0
msgid "From Date"
msgstr "Date de Début"
#. module: product_margin
#: selection:product.product,invoice_state:0
msgid "Draft, Open and Paid"
msgstr "Brouillon, Ouverte et Payée"
#. module: product_margin
#: field:product.product,purchase_avg_price:0
#: field:product.product,sale_avg_price:0
msgid "Avg. Unit Price"
msgstr "Prix Unitaire Moyen"
#. module: product_margin
#: help:product.product,total_cost:0
msgid "Sum of Multification of Invoice price and quantity of Supplier Invoices "
msgstr ""
"Somme de la Multiplication du prix de la Facture et de la quantité des "
"Factures Fournisseurs"
#. module: product_margin
#: model:ir.ui.menu,name:product_margin.menu_product_reporting
msgid "Reporting"
msgstr "Reporting"
#. module: product_margin
#: selection:product.product,invoice_state:0
msgid "Paid"
msgstr "Payée"
#. module: product_margin
#: view:product.product:0
msgid "#Purchased"
msgstr "# Acheté"
#. module: product_margin
#: help:product.product,purchase_num_invoiced:0
msgid "Sum of Quantity in Supplier Invoices"
msgstr "Somme de la Quantité dans les Factures Fournisseurs"
#. module: product_margin
#: view:product.product:0
msgid "Standard Price"
msgstr "Prix Standard"
#. module: product_margin
#: field:product.product,sale_expected:0
msgid "Expected Sale"
msgstr "Ventes Attendues"
#. module: product_margin
#: help:product.product,normal_cost:0
msgid "Sum of Multification of Cost price and quantity of Supplier Invoices"
msgstr "Somme de la Multiplication du Prix d'Achat et de la quantité des Factures Fournisseurs"
#. module: product_margin
#: field:product.product,turnover:0
#: view:product.product:0
msgid "Turnover"
msgstr "Chiffre d'affaires"
#. module: product_margin
#: field:product.product,purchase_num_invoiced:0
#: field:product.product,sale_num_invoiced:0
msgid "# Invoiced"
msgstr "# Facturés"
#. module: product_margin
#: view:product.product:0
msgid "Catalog Price"
msgstr "Prix Catalogue"
#. module: product_margin
#: field:product.product,total_cost:0
#: view:product.product:0
msgid "Total Cost"
msgstr "Coût Total"
#. module: product_margin
#: constraint:ir.ui.view:0
msgid "Invalid XML for View Architecture!"
msgstr "XML non valide pour l'architecture de la vue"
#. module: product_margin
#: help:product.product,expected_margin:0
msgid "Excepted Sale - Normal Cost"
msgstr "Ventes Attendues - Coût Normal"
#. module: product_margin
#: field:product.product,expected_margin:0
msgid "Expected Margin"
msgstr "Marge Attendue"
#. module: product_margin
#: view:product.product:0
msgid "Purchases"
msgstr "Achats"
#. module: product_margin
#: help:product.product,sales_gap:0
msgid "Excepted Sale - Turn Over"
msgstr "Ventes Attendues - Chiffre d'Affaires"
#. module: product_margin
#: help:product.product,turnover:0
msgid "Sum of Multification of Invoice price and quantity of Customer Invoices"
msgstr "Somme de la Multiplication du prix Facturé et de la quantité des Factures Clients"
#. module: product_margin
#: help:product.product,expected_margin_rate:0
msgid "Expected margin * 100 / Expected Sale"
msgstr "Marge Attendue * 100 / Ventes Attendues"
#. module: product_margin
#: help:product.product,sale_avg_price:0
msgid "Avg. Price in Customer Invoices)"
msgstr ""
#. module: product_margin
#: wizard_view:product.margins,init:0
msgid "Select "
msgstr "Sélectionnez "
#. module: product_margin
#: wizard_field:product.margins,init,invoice_state:0
#: field:product.product,invoice_state:0
msgid "Invoice State"
msgstr "État de la Facture"
#. module: product_margin
#: help:product.product,purchase_gap:0
msgid "Normal Cost - Total Cost"
msgstr "Coût Normal - Coût Total"
#. module: product_margin
#: field:product.product,sales_gap:0
#: view:product.product:0
msgid "Sales Gap"
msgstr "Écart des Ventes"
#. module: product_margin
#: field:product.product,normal_cost:0
msgid "Normal Cost"
msgstr "Coût Normal"
#. module: product_margin
#: help:product.product,total_margin:0
msgid "Turnorder - Total Cost"
msgstr "Chiffre d'Affaires - Coût Total"
#. module: product_margin
#: help:product.product,purchase_avg_price:0
msgid "Avg. Price in Supplier Invoices "
msgstr "Prix Moy. dans les Factures Fournisseurs"
#. module: product_margin
#: field:product.product,total_margin:0
msgid "Total Margin"
msgstr "Marge Totale"
#. module: product_margin
#: help:product.product,total_margin_rate:0
msgid "Total margin * 100 / Turnover"
msgstr "Marge Totale * 100 / Chiffre d'Affaires"
#. module: product_margin
#: wizard_button:product.margins,init,open:0
msgid "Open Margins"
msgstr "Marges Ouvertes"
#. module: product_margin
#: wizard_view:product.margins,init:0
msgid "View Stock of Products"
msgstr "Voir le Stock des Produits"
#. module: product_margin
#: view:product.product:0
msgid "Analysis Criteria"
msgstr "Critères d'Analyse"
#. module: product_margin
#: view:product.product:0
msgid "Sales"
msgstr "Ventes"
#. module: product_margin
#: model:ir.actions.wizard,name:product_margin.action_open_margin
#: model:ir.ui.menu,name:product_margin.menu_action_product_margin
#: view:product.product:0
msgid "Product Margins"
msgstr "Marges des Produits"
#. module: product_margin
#: field:product.product,purchase_gap:0
msgid "Purchase Gap"
msgstr "Écart des Achats"
#. module: product_margin
#: field:product.product,total_margin_rate:0
msgid "Total Margin (%)"
msgstr "Marge Totale (%)"
#. module: product_margin
#: wizard_button:product.margins,init,end:0
msgid "Cancel"
msgstr "Annuler"
#. module: product_margin
#: view:product.product:0
msgid "Margins"
msgstr "Marges"
#. module: product_margin
#: help:product.product,sale_num_invoiced:0
msgid "Sum of Quantity in Customer Invoices"
msgstr "Somme de la Quantité dans les Factures Clients"
#. module: product_margin
#: selection:product.product,invoice_state:0
msgid "Open and Paid"
msgstr "Ouverte et Payée"

View File

@ -0,0 +1,265 @@
# Translation of OpenERP Server.
# This file containt the translation of the following modules:
# * product_margin
#
msgid ""
msgstr ""
"Project-Id-Version: OpenERP Server 4.3.99\n"
"Report-Msgid-Bugs-To: support@openerp.com\n"
"POT-Creation-Date: 2008-10-27 14:01:44+0000\n"
"PO-Revision-Date: 2008-10-27 14:01:44+0000\n"
"Last-Translator: <>\n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: \n"
#. module: product_margin
#: field:product.product,expected_margin_rate:0
msgid "Expected Margin (%)"
msgstr ""
#. module: product_margin
#: wizard_field:product.margins,init,from_date:0
msgid "From"
msgstr ""
#. module: product_margin
#: help:product.product,sale_expected:0
msgid "Sum of Multification of Sale Catalog price and quantity of Customer Invoices"
msgstr ""
#. module: product_margin
#: wizard_field:product.margins,init,to_date:0
msgid "To"
msgstr ""
#. module: product_margin
#: field:product.product,date_to:0
msgid "To Date"
msgstr ""
#. module: product_margin
#: field:product.product,date_from:0
msgid "From Date"
msgstr ""
#. module: product_margin
#: selection:product.product,invoice_state:0
msgid "Draft, Open and Paid"
msgstr ""
#. module: product_margin
#: field:product.product,purchase_avg_price:0
#: field:product.product,sale_avg_price:0
msgid "Avg. Unit Price"
msgstr ""
#. module: product_margin
#: help:product.product,total_cost:0
msgid "Sum of Multification of Invoice price and quantity of Supplier Invoices "
msgstr ""
#. module: product_margin
#: model:ir.ui.menu,name:product_margin.menu_product_reporting
msgid "Reporting"
msgstr ""
#. module: product_margin
#: selection:product.product,invoice_state:0
msgid "Paid"
msgstr ""
#. module: product_margin
#: view:product.product:0
msgid "#Purchased"
msgstr ""
#. module: product_margin
#: help:product.product,purchase_num_invoiced:0
msgid "Sum of Quantity in Supplier Invoices"
msgstr ""
#. module: product_margin
#: view:product.product:0
msgid "Standard Price"
msgstr ""
#. module: product_margin
#: field:product.product,sale_expected:0
msgid "Expected Sale"
msgstr ""
#. module: product_margin
#: help:product.product,normal_cost:0
msgid "Sum of Multification of Cost price and quantity of Supplier Invoices"
msgstr ""
#. module: product_margin
#: field:product.product,turnover:0
#: view:product.product:0
msgid "Turnover"
msgstr ""
#. module: product_margin
#: field:product.product,purchase_num_invoiced:0
#: field:product.product,sale_num_invoiced:0
msgid "# Invoiced"
msgstr ""
#. module: product_margin
#: view:product.product:0
msgid "Catalog Price"
msgstr ""
#. module: product_margin
#: field:product.product,total_cost:0
#: view:product.product:0
msgid "Total Cost"
msgstr ""
#. module: product_margin
#: constraint:ir.ui.view:0
msgid "Invalid XML for View Architecture!"
msgstr ""
#. module: product_margin
#: help:product.product,expected_margin:0
msgid "Excepted Sale - Normal Cost"
msgstr ""
#. module: product_margin
#: field:product.product,expected_margin:0
msgid "Expected Margin"
msgstr ""
#. module: product_margin
#: view:product.product:0
msgid "Purchases"
msgstr ""
#. module: product_margin
#: help:product.product,sales_gap:0
msgid "Excepted Sale - Turn Over"
msgstr ""
#. module: product_margin
#: help:product.product,turnover:0
msgid "Sum of Multification of Invoice price and quantity of Customer Invoices"
msgstr ""
#. module: product_margin
#: help:product.product,expected_margin_rate:0
msgid "Expected margin * 100 / Expected Sale"
msgstr ""
#. module: product_margin
#: help:product.product,sale_avg_price:0
msgid "Avg. Price in Customer Invoices)"
msgstr ""
#. module: product_margin
#: wizard_view:product.margins,init:0
msgid "Select "
msgstr ""
#. module: product_margin
#: wizard_field:product.margins,init,invoice_state:0
#: field:product.product,invoice_state:0
msgid "Invoice State"
msgstr ""
#. module: product_margin
#: help:product.product,purchase_gap:0
msgid "Normal Cost - Total Cost"
msgstr ""
#. module: product_margin
#: field:product.product,sales_gap:0
#: view:product.product:0
msgid "Sales Gap"
msgstr ""
#. module: product_margin
#: field:product.product,normal_cost:0
msgid "Normal Cost"
msgstr ""
#. module: product_margin
#: help:product.product,total_margin:0
msgid "Turnorder - Total Cost"
msgstr ""
#. module: product_margin
#: help:product.product,purchase_avg_price:0
msgid "Avg. Price in Supplier Invoices "
msgstr ""
#. module: product_margin
#: field:product.product,total_margin:0
msgid "Total Margin"
msgstr ""
#. module: product_margin
#: help:product.product,total_margin_rate:0
msgid "Total margin * 100 / Turnover"
msgstr ""
#. module: product_margin
#: wizard_button:product.margins,init,open:0
msgid "Open Margins"
msgstr ""
#. module: product_margin
#: wizard_view:product.margins,init:0
msgid "View Stock of Products"
msgstr ""
#. module: product_margin
#: view:product.product:0
msgid "Analysis Criteria"
msgstr ""
#. module: product_margin
#: view:product.product:0
msgid "Sales"
msgstr ""
#. module: product_margin
#: model:ir.actions.wizard,name:product_margin.action_open_margin
#: model:ir.ui.menu,name:product_margin.menu_action_product_margin
#: view:product.product:0
msgid "Product Margins"
msgstr ""
#. module: product_margin
#: field:product.product,purchase_gap:0
msgid "Purchase Gap"
msgstr ""
#. module: product_margin
#: field:product.product,total_margin_rate:0
msgid "Total Margin (%)"
msgstr ""
#. module: product_margin
#: wizard_button:product.margins,init,end:0
msgid "Cancel"
msgstr ""
#. module: product_margin
#: view:product.product:0
msgid "Margins"
msgstr ""
#. module: product_margin
#: help:product.product,sale_num_invoiced:0
msgid "Sum of Quantity in Customer Invoices"
msgstr ""
#. module: product_margin
#: selection:product.product,invoice_state:0
msgid "Open and Paid"
msgstr ""

View File

@ -54,7 +54,7 @@ class project_work(osv.osv):
# delete entry from timesheet too while deleting entry to task.
list_avail_ids=self.pool.get('hr.analytic.timesheet').search(cr,uid,[])
if timesheet_id in list_avail_ids:
obj = self.pool.get('hr.analytic.timesheet').unlink(cr,uid,[timesheet_id],*args)
obj = self.pool.get('hr.analytic.timesheet').unlink(cr,uid,[timesheet_id],*args)
return super(project_work,self).unlink(cr, uid, ids,*args, **kwargs)
@ -70,7 +70,7 @@ class project_project(osv.osv):
def name_get(self, cr, user, ids, context=None):
result = []
for project in self.browse(cr, user, ids, context):
if project.category_id and projet.category_id.code:
if project.category_id and project.category_id.code:
result.append((project.id, '['+(project.category_id.code or '')+'] '+project.name))
else:
result.append((project.id, '[?] '+project.name))