[MRG] merge with main branch
bzr revid: tpa@tinyerp.com-20120301054724-g2fwea0letkcn8cl
This commit is contained in:
@@ -34,20 +34,6 @@ class followup(osv.osv):
|
||||
'company_id': lambda s, cr, uid, c: s.pool.get('res.company')._company_default_get(cr, uid, 'account_followup.followup', context=c),
|
||||
}
|
||||
|
||||
def check_company_uniq(self, cr, uid, ids, context=None):
|
||||
sr_id = self.search(cr,uid,[],context=context)
|
||||
lines = self.browse(cr, uid, sr_id, context=context)
|
||||
company = []
|
||||
for l in lines:
|
||||
if l.company_id.id in company:
|
||||
return False
|
||||
if l.company_id.id not in company:
|
||||
company.append(l.company_id.id)
|
||||
return True
|
||||
_constraints = [
|
||||
(check_company_uniq, 'Only One Followup by Company.',['company_id'] )
|
||||
]
|
||||
|
||||
followup()
|
||||
|
||||
class followup_line(osv.osv):
|
||||
|
||||
@@ -31,7 +31,7 @@ class base_synchro_server(osv.osv):
|
||||
'server_port': fields.integer('Server Port', size=64,required=True),
|
||||
'server_db': fields.char('Server Database', size=64,required=True),
|
||||
'login': fields.char('User Name',size=50,required=True),
|
||||
'password': fields.char('Password',size=64,invisible=True,required=True),
|
||||
'password': fields.char('Password',size=64,required=True),
|
||||
'obj_ids' : fields.one2many('base.synchro.obj','server_id','Models',ondelete='cascade')
|
||||
}
|
||||
_defaults = {
|
||||
|
||||
@@ -0,0 +1,32 @@
|
||||
# Portuguese translation for openobject-addons
|
||||
# Copyright (c) 2012 Rosetta Contributors and Canonical Ltd 2012
|
||||
# This file is distributed under the same license as the openobject-addons package.
|
||||
# FIRST AUTHOR <EMAIL@ADDRESS>, 2012.
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: openobject-addons\n"
|
||||
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"POT-Creation-Date: 2012-02-08 00:36+0000\n"
|
||||
"PO-Revision-Date: 2012-02-29 22:48+0000\n"
|
||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"Language-Team: Portuguese <pt@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: 2012-03-01 04:46+0000\n"
|
||||
"X-Generator: Launchpad (build 14874)\n"
|
||||
|
||||
#. module: fetchmail_hr_recruitment
|
||||
#: model:ir.actions.act_window,help:fetchmail_hr_recruitment.action_link_applicant_to_email_account
|
||||
msgid ""
|
||||
"You can synchronize the job email account (e.g. job@yourcompany.com) with "
|
||||
"OpenERP so that new applicants are created automatically in OpenERP for the "
|
||||
"followup of the recruitment process. Attachments are automatically stored in "
|
||||
"the DMS of OpenERP so that you get an indexation of all the CVs received."
|
||||
msgstr ""
|
||||
|
||||
#. module: fetchmail_hr_recruitment
|
||||
#: model:ir.actions.act_window,name:fetchmail_hr_recruitment.action_link_applicant_to_email_account
|
||||
msgid "Create Applicants from Email Account"
|
||||
msgstr ""
|
||||
@@ -104,8 +104,6 @@
|
||||
<field name="type">search</field>
|
||||
<field name="arch" type="xml">
|
||||
<search string="Employees">
|
||||
<filter icon="terp-personal+" domain="[('active','=',True)]" name="active" string="Active" groups="base.group_extended"/>
|
||||
<separator orientation="vertical" />
|
||||
<field name="name"/>
|
||||
<field name="department_id" widget="selection">
|
||||
<filter icon="terp-personal+" domain="[('department_id','=',context.get('department_id',False))]" string="My Departments Employee"/>
|
||||
@@ -185,7 +183,7 @@
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_mode">kanban,tree,form</field>
|
||||
<field name="domain">[]</field>
|
||||
<field name="context">{"search_default_department_id": department_id,"search_default_active":eval('True')}</field>
|
||||
<field name="context">{"search_default_department_id": department_id}</field>
|
||||
<field name="view_id" eval="False"/>
|
||||
<field name="search_view_id" ref="view_employee_filter"/>
|
||||
<field name="help">Here you can manage your work force by creating employees and assigning them specific properties in the system. Maintain all employee related information and keep track of anything that needs to be recorded for them. The personal information tab will help you maintain their identity data. The Categories tab gives you the opportunity to assign them related employee categories depending on their position and activities within the company. A category can be a seniority level within the company or a department. The Timesheets tab allows to assign them a specific timesheet and analytic journal where they will be able to enter time through the system. In the note tab, you can enter text data that should be recorded for a specific employee.</field>
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
I create a contract for "Richard"
|
||||
-
|
||||
!record {model: hr.contract, id: hr_contract_richard}:
|
||||
date_end: !eval "'%s-%s-%s' %(datetime.now().year+1,datetime.now().month,datetime.now().day)"
|
||||
date_end: !eval "(datetime.now() + timedelta(days=365)).strftime('%Y-%m-%d')"
|
||||
date_start: !eval time.strftime('%Y-%m-%d')
|
||||
name: Contract for Richard
|
||||
wage: 5000.0
|
||||
|
||||
@@ -42,7 +42,7 @@
|
||||
I create a contract for "John".
|
||||
-
|
||||
!record {model: hr.contract, id: hr_contract_john}:
|
||||
date_end: !eval "'%s-%s-%s' %(datetime.now().year+1,datetime.now().month,datetime.now().day)"
|
||||
date_end: !eval "(datetime.now() + timedelta(days=365)).strftime('%Y-%m-%d')"
|
||||
date_start: !eval time.strftime('%Y-%m-%d')
|
||||
name: Contract for John
|
||||
wage: 5000.0
|
||||
|
||||
@@ -93,7 +93,7 @@ id,code,name,parent_id:id,user_type:id,type,reconcile
|
||||
2530,2530,clienti c/acconti ,25,account_type_payable,payable,TRUE
|
||||
26,26,DEBITI DIVERSI ,2,account_type_view,view,TRUE
|
||||
2601,2601,IVA n/debito ,26,account_type_tax,other,TRUE
|
||||
2602,2602,debiti per ritenute da versare ,26,account_type_tax,other,TRUE
|
||||
2602,2602,debiti per ritenute da versare ,26,account_type_payable,payable,TRUE
|
||||
2605,2605,erario c/IVA ,26,account_type_payable,payable,TRUE
|
||||
2606,2606,debiti per imposte ,26,account_type_tax,other,TRUE
|
||||
2619,2619,debiti per cauzioni ,26,account_type_asset,other,TRUE
|
||||
|
||||
|
@@ -1,62 +1,65 @@
|
||||
"code","id","name","parent_id:id"
|
||||
,"vat_code_chart_root","Tassazione",
|
||||
"IVC","template_ivacode_pagata","IVA a credito","vat_code_chart_root"
|
||||
"IVC0","template_ivacode_pagata_0","Esente IVA (credito)","template_ivacode_pagata"
|
||||
"IVCI","template_impcode_pagata","IVA a credito (imponibile)","vat_code_chart_root"
|
||||
"IVC0I","template_impcode_pagata_0","Esente IVA a credito (imponibile)","template_impcode_pagata"
|
||||
"IVC10","template_ivacode_pagata_10","IVA a credito 10%","template_ivacode_pagata"
|
||||
"IVC10I","template_impcode_pagata_10","IVA a credito 10% (imponibile)","template_impcode_pagata"
|
||||
"IVC10ind","template_ivacode_pagata_10ind","IVA a credito 10% indetraibile","template_ivacode_pagata"
|
||||
"IVC10Iind","template_impcode_pagata_10ind","IVA a credito 10% indetraibile (imponibile)","template_impcode_pagata"
|
||||
"IVC20ind","template_ivacode_pagata_20ind","IVA a credito 20% indetraibile","template_ivacode_pagata"
|
||||
"IVC20Iind","template_impcode_pagata_20ind","IVA a credito 20% indetraibile (imponibile)","template_impcode_pagata"
|
||||
"IVC4ind","template_ivacode_pagata_4ind","IVA a credito 4% indetraibile","template_ivacode_pagata"
|
||||
"IVC4Iind","template_impcode_pagata_4ind","IVA a credito 4% indetraibile (imponibile)","template_impcode_pagata"
|
||||
"IVC20det10","template_ivacode_pagata_20det10","IVA a credito 20% detraibile 10%","template_ivacode_pagata"
|
||||
"IVC20Idet10","template_impcode_pagata_20det10","IVA a credito 20% detraibile 10% (imponibile)","template_impcode_pagata"
|
||||
"IVC20det15","template_ivacode_pagata_20det15","IVA a credito 20% detraibile 15%","template_ivacode_pagata"
|
||||
"IVC20Idet15","template_impcode_pagata_20det15","IVA a credito 20% detraibile 15% (imponibile)","template_impcode_pagata"
|
||||
"IVC20det40","template_ivacode_pagata_20det40","IVA a credito 20% detraibile 40%","template_ivacode_pagata"
|
||||
"IVC20Idet40","template_impcode_pagata_20det40","IVA a credito 20% detraibile 40% (imponibile)","template_impcode_pagata"
|
||||
"IVC20det50","template_ivacode_pagata_20det50","IVA a credito 20% detraibile 50%","template_ivacode_pagata"
|
||||
"IVC20Idet50","template_impcode_pagata_20det50","IVA a credito 20% detraibile 50% (imponibile)","template_impcode_pagata"
|
||||
"IVC10det50","template_ivacode_pagata_10det50","IVA a credito 10% detraibile 50%","template_ivacode_pagata"
|
||||
"IVC10Idet50","template_impcode_pagata_10det50","IVA a credito 10% detraibile 50% (imponibile)","template_impcode_pagata"
|
||||
"IVC4det50","template_ivacode_pagata_4det50","IVA a credito 4% detraibile 50%","template_ivacode_pagata"
|
||||
"IVC4Idet50","template_impcode_pagata_4det50","IVA a credito 4% detraibile 50% (imponibile)","template_impcode_pagata"
|
||||
"IVC20","template_ivacode_pagata_20","IVA a credito 20%","template_ivacode_pagata"
|
||||
"IVC20I","template_impcode_pagata_20","IVA a credito 20% (imponibile)","template_impcode_pagata"
|
||||
"IVC21","template_ivacode_pagata_21","IVA a credito 21%","template_ivacode_pagata"
|
||||
"IVC21I","template_impcode_pagata_21","IVA a credito 21% (imponibile)","template_impcode_pagata"
|
||||
"IVC4","template_ivacode_pagata_4","IVA a credito 4%","template_ivacode_pagata"
|
||||
"IVC4I","template_impcode_pagata_4","IVA a credito 4% (imponibile)","template_impcode_pagata"
|
||||
"IVC12","template_ivacode_pagata_12","IVA a credito 12%","template_ivacode_pagata"
|
||||
"IVC12I","template_impcode_pagata_12","IVA a credito 12% (imponibile)","template_impcode_pagata"
|
||||
"IVC2","template_ivacode_pagata_2","IVA a credito 2%","template_ivacode_pagata"
|
||||
"IVC2I","template_impcode_pagata_2","IVA a credito 2% (imponibile)","template_impcode_pagata"
|
||||
"IVD","template_ivacode_riscossa","IVA a debito","vat_code_chart_root"
|
||||
"IVD0","template_ivacode_riscossa_0","Esente IVA (debito)","template_ivacode_riscossa"
|
||||
"IVDI","template_impcode_riscossa","IVA a debito (imponibile)","vat_code_chart_root"
|
||||
"IVD0I","template_impcode_riscossa_0","Esente IVA a debito (imponibile)","template_impcode_riscossa"
|
||||
"IVD10","template_ivacode_riscossa_10","IVA a debito 10%","template_ivacode_riscossa"
|
||||
"IVD10I","template_impcode_riscossa_10","IVA a debito 10% (imponibile)","template_impcode_riscossa"
|
||||
"IVD20","template_ivacode_riscossa_20","IVA a debito 20%","template_ivacode_riscossa"
|
||||
"IVD20I","template_impcode_riscossa_20","IVA a debito 20% (imponibile)","template_impcode_riscossa"
|
||||
"IVD21","template_ivacode_riscossa_21","IVA a debito 21%","template_ivacode_riscossa"
|
||||
"IVD21I","template_impcode_riscossa_21","IVA a debito 21% (imponibile)","template_impcode_riscossa"
|
||||
"IVD4","template_ivacode_riscossa_4","IVA a debito 4%","template_ivacode_riscossa"
|
||||
"IVD4I","template_impcode_riscossa_4","IVA a debito 4% (imponibile)","template_impcode_riscossa"
|
||||
"IVD12","template_ivacode_riscossa_12","IVA a debito 12%","template_ivacode_riscossa"
|
||||
"IVD12I","template_impcode_riscossa_12","IVA a debito 12% (imponibile)","template_impcode_riscossa"
|
||||
"IVD2","template_ivacode_riscossa_2","IVA a debito 2%","template_ivacode_riscossa"
|
||||
"IVD2I","template_impcode_riscossa_2","IVA a debito 2% (imponibile)","template_impcode_riscossa"
|
||||
"IVC21ind","template_ivacode_pagata_21ind","IVA a credito 21% indetraibile","template_ivacode_pagata"
|
||||
"IVC21Iind","template_impcode_pagata_21ind","IVA a credito 21% indetraibile (imponibile)","template_impcode_pagata"
|
||||
"IVC21det10","template_ivacode_pagata_21det10","IVA a credito 21% detraibile 10%","template_ivacode_pagata"
|
||||
"IVC21Idet10","template_impcode_pagata_21det10","IVA a credito 21% detraibile 10% (imponibile)","template_impcode_pagata"
|
||||
"IVC21det15","template_ivacode_pagata_21det15","IVA a credito 21% detraibile 15%","template_ivacode_pagata"
|
||||
"IVC21Idet15","template_impcode_pagata_21det15","IVA a credito 21% detraibile 15% (imponibile)","template_impcode_pagata"
|
||||
"IVC21det40","template_ivacode_pagata_21det40","IVA a credito 21% detraibile 40%","template_ivacode_pagata"
|
||||
"IVC21Idet40","template_impcode_pagata_21det40","IVA a credito 21% detraibile 40% (imponibile)","template_impcode_pagata"
|
||||
"IVC21det50","template_ivacode_pagata_21det50","IVA a credito 21% detraibile 50%","template_ivacode_pagata"
|
||||
"IVC21Idet50","template_impcode_pagata_21det50","IVA a credito 21% detraibile 50% (imponibile)","template_impcode_pagata"
|
||||
code,id,name,parent_id:id
|
||||
,vat_code_chart_root,Tassazione,
|
||||
IVC,template_ivacode_pagata,IVA a credito,vat_code_chart_root
|
||||
IVC0,template_ivacode_pagata_0,Esente IVA (credito),template_ivacode_pagata
|
||||
IVCI,template_impcode_pagata,IVA a credito (imponibile),vat_code_chart_root
|
||||
IVC0I,template_impcode_pagata_0,Esente IVA a credito (imponibile),template_impcode_pagata
|
||||
IVC10,template_ivacode_pagata_10,IVA a credito 10%,template_ivacode_pagata
|
||||
IVC10I,template_impcode_pagata_10,IVA a credito 10% (imponibile),template_impcode_pagata
|
||||
IVC10ind,template_ivacode_pagata_10ind,IVA a credito 10% indetraibile,template_ivacode_pagata
|
||||
IVC10Iind,template_impcode_pagata_10ind,IVA a credito 10% indetraibile (imponibile),template_impcode_pagata
|
||||
IVC20ind,template_ivacode_pagata_20ind,IVA a credito 20% indetraibile,template_ivacode_pagata
|
||||
IVC20Iind,template_impcode_pagata_20ind,IVA a credito 20% indetraibile (imponibile),template_impcode_pagata
|
||||
IVC4ind,template_ivacode_pagata_4ind,IVA a credito 4% indetraibile,template_ivacode_pagata
|
||||
IVC4Iind,template_impcode_pagata_4ind,IVA a credito 4% indetraibile (imponibile),template_impcode_pagata
|
||||
IVC20det10,template_ivacode_pagata_20det10,IVA a credito 20% detraibile 10%,template_ivacode_pagata
|
||||
IVC20Idet10,template_impcode_pagata_20det10,IVA a credito 20% detraibile 10% (imponibile),template_impcode_pagata
|
||||
IVC20det15,template_ivacode_pagata_20det15,IVA a credito 20% detraibile 15%,template_ivacode_pagata
|
||||
IVC20Idet15,template_impcode_pagata_20det15,IVA a credito 20% detraibile 15% (imponibile),template_impcode_pagata
|
||||
IVC20det40,template_ivacode_pagata_20det40,IVA a credito 20% detraibile 40%,template_ivacode_pagata
|
||||
IVC20Idet40,template_impcode_pagata_20det40,IVA a credito 20% detraibile 40% (imponibile),template_impcode_pagata
|
||||
IVC20det50,template_ivacode_pagata_20det50,IVA a credito 20% detraibile 50%,template_ivacode_pagata
|
||||
IVC20Idet50,template_impcode_pagata_20det50,IVA a credito 20% detraibile 50% (imponibile),template_impcode_pagata
|
||||
IVC10det50,template_ivacode_pagata_10det50,IVA a credito 10% detraibile 50%,template_ivacode_pagata
|
||||
IVC10Idet50,template_impcode_pagata_10det50,IVA a credito 10% detraibile 50% (imponibile),template_impcode_pagata
|
||||
IVC4det50,template_ivacode_pagata_4det50,IVA a credito 4% detraibile 50%,template_ivacode_pagata
|
||||
IVC4Idet50,template_impcode_pagata_4det50,IVA a credito 4% detraibile 50% (imponibile),template_impcode_pagata
|
||||
IVC20,template_ivacode_pagata_20,IVA a credito 20%,template_ivacode_pagata
|
||||
IVC20I,template_impcode_pagata_20,IVA a credito 20% (imponibile),template_impcode_pagata
|
||||
IVC21,template_ivacode_pagata_21,IVA a credito 21%,template_ivacode_pagata
|
||||
IVC21I,template_impcode_pagata_21,IVA a credito 21% (imponibile),template_impcode_pagata
|
||||
IVC4,template_ivacode_pagata_4,IVA a credito 4%,template_ivacode_pagata
|
||||
IVC4I,template_impcode_pagata_4,IVA a credito 4% (imponibile),template_impcode_pagata
|
||||
IVC12,template_ivacode_pagata_12,IVA a credito 12%,template_ivacode_pagata
|
||||
IVC12I,template_impcode_pagata_12,IVA a credito 12% (imponibile),template_impcode_pagata
|
||||
IVC2,template_ivacode_pagata_2,IVA a credito 2%,template_ivacode_pagata
|
||||
IVC2I,template_impcode_pagata_2,IVA a credito 2% (imponibile),template_impcode_pagata
|
||||
IVD,template_ivacode_riscossa,IVA a debito,vat_code_chart_root
|
||||
IVD0,template_ivacode_riscossa_0,Esente IVA (debito),template_ivacode_riscossa
|
||||
IVDI,template_impcode_riscossa,IVA a debito (imponibile),vat_code_chart_root
|
||||
IVD0I,template_impcode_riscossa_0,Esente IVA a debito (imponibile),template_impcode_riscossa
|
||||
IVD10,template_ivacode_riscossa_10,IVA a debito 10%,template_ivacode_riscossa
|
||||
IVD10I,template_impcode_riscossa_10,IVA a debito 10% (imponibile),template_impcode_riscossa
|
||||
IVD20,template_ivacode_riscossa_20,IVA a debito 20%,template_ivacode_riscossa
|
||||
IVD20I,template_impcode_riscossa_20,IVA a debito 20% (imponibile),template_impcode_riscossa
|
||||
IVD21,template_ivacode_riscossa_21,IVA a debito 21%,template_ivacode_riscossa
|
||||
IVD21I,template_impcode_riscossa_21,IVA a debito 21% (imponibile),template_impcode_riscossa
|
||||
IVD4,template_ivacode_riscossa_4,IVA a debito 4%,template_ivacode_riscossa
|
||||
IVD4I,template_impcode_riscossa_4,IVA a debito 4% (imponibile),template_impcode_riscossa
|
||||
IVD12,template_ivacode_riscossa_12,IVA a debito 12%,template_ivacode_riscossa
|
||||
IVD12I,template_impcode_riscossa_12,IVA a debito 12% (imponibile),template_impcode_riscossa
|
||||
IVD2,template_ivacode_riscossa_2,IVA a debito 2%,template_ivacode_riscossa
|
||||
IVD2I,template_impcode_riscossa_2,IVA a debito 2% (imponibile),template_impcode_riscossa
|
||||
IVC21ind,template_ivacode_pagata_21ind,IVA a credito 21% indetraibile,template_ivacode_pagata
|
||||
IVC21Iind,template_impcode_pagata_21ind,IVA a credito 21% indetraibile (imponibile),template_impcode_pagata
|
||||
IVC21det10,template_ivacode_pagata_21det10,IVA a credito 21% detraibile 10%,template_ivacode_pagata
|
||||
IVC21Idet10,template_impcode_pagata_21det10,IVA a credito 21% detraibile 10% (imponibile),template_impcode_pagata
|
||||
IVC21det15,template_ivacode_pagata_21det15,IVA a credito 21% detraibile 15%,template_ivacode_pagata
|
||||
IVC21Idet15,template_impcode_pagata_21det15,IVA a credito 21% detraibile 15% (imponibile),template_impcode_pagata
|
||||
IVC21det40,template_ivacode_pagata_21det40,IVA a credito 21% detraibile 40%,template_ivacode_pagata
|
||||
IVC21Idet40,template_impcode_pagata_21det40,IVA a credito 21% detraibile 40% (imponibile),template_impcode_pagata
|
||||
IVC21det50,template_ivacode_pagata_21det50,IVA a credito 21% detraibile 50%,template_ivacode_pagata
|
||||
IVC21Idet50,template_impcode_pagata_21det50,IVA a credito 21% detraibile 50% (imponibile),template_impcode_pagata
|
||||
Rit,template_ra,Ritenute d'acconto,vat_code_chart_root
|
||||
RitD20,template_ritcode_20,Ritenute a debito 20%,template_ra
|
||||
RitD20I,template_ritimpcode_20,Ritenute a debito 20% (imponibile),template_ra
|
||||
|
||||
|
@@ -62,3 +62,4 @@ id,description,chart_template_id:id,name,sequence,amount,parent_id:id,child_depe
|
||||
21I5,21I5,l10n_it_chart_template_generic,IVA al 21% detraibile al 50%,,0.21,,True,percent,,,purchase,template_impcode_pagata_21det50,,template_impcode_pagata_21det50,,,,False,-1,-1
|
||||
21I5b,21I5b,l10n_it_chart_template_generic,IVA al 21% detraibile al 50% (I),1,0.5,21I5,False,percent,,,purchase,,,,,,,False,,
|
||||
21I5a,21I5a,l10n_it_chart_template_generic,IVA al 21% detraibile al 50% (D),2,0,21I5,False,balance,1601,1601,purchase,,template_ivacode_pagata_21det50,,template_ivacode_pagata_21det50,,,False,,
|
||||
rit-20,rit-20,l10n_it_chart_template_generic,Ritenuta d'acconto al 20% (debito),,-0.2,,False,percent,2602,2602,purchase,template_ritimpcode_20,template_ritcode_20,template_ritimpcode_20,template_ritcode_20,-1,1,False,1,-1
|
||||
|
||||
|
@@ -157,7 +157,7 @@ class mail_message(osv.osv):
|
||||
msg_txt += truncate_text(message.body_text)
|
||||
else:
|
||||
msg_txt = (message.user_id.name or '/') + _(' on ') + format_date_tz(message.date, tz) + ':\n\t'
|
||||
msg_txt += message.subject
|
||||
msg_txt += (message.subject or '')
|
||||
result[message.id] = msg_txt
|
||||
return result
|
||||
|
||||
|
||||
@@ -147,13 +147,13 @@ class mail_compose_message(osv.osv_memory):
|
||||
# as it is easier to quote than the HTML version.
|
||||
# XXX TODO: make it possible to switch to HTML on the fly
|
||||
current_user = self.pool.get('res.users').browse(cr, uid, uid, context)
|
||||
body = message_data.body_text or current_user.signature
|
||||
body = message_data.body_text or current_user.signature or ''
|
||||
if context.get('mail.compose.message.mode') == 'reply':
|
||||
sent_date = _('On %(date)s, ') % {'date': message_data.date} if message_data.date else ''
|
||||
sender = _('%(sender_name)s wrote:') % {'sender_name': tools.ustr(message_data.email_from or _('You'))}
|
||||
quoted_body = '> %s' % tools.ustr(body.replace('\n', "\n> ") or '')
|
||||
body = '\n'.join(["\n", (sent_date + sender), quoted_body])
|
||||
body += "\n" + current_user.signature
|
||||
body += "\n" + (current_user.signature or '')
|
||||
re_prefix = _("Re:")
|
||||
if not (subject.startswith('Re:') or subject.startswith(re_prefix)):
|
||||
subject = "%s %s" % (re_prefix, subject)
|
||||
|
||||
@@ -83,6 +83,7 @@ Main features :
|
||||
'certificate' : '001156338024966477869',
|
||||
# Web client
|
||||
'js': ['static/lib/backbone/backbone-0.5.3.js', 'static/src/js/pos.js'],
|
||||
'css': ['static/src/css/pos.css']
|
||||
'css': ['static/src/css/pos.css'],
|
||||
'qweb': ['static/src/xml/pos.xml'],
|
||||
}
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||
|
||||
@@ -19,7 +19,6 @@ openerp.point_of_sale = function(db) {
|
||||
};
|
||||
|
||||
var QWeb = db.web.qweb;
|
||||
QWeb.add_template("/point_of_sale/static/src/xml/pos.xml");
|
||||
var qweb_template = function(template) {
|
||||
return function(ctx) {
|
||||
return QWeb.render(template, _.extend({}, ctx,{
|
||||
@@ -682,7 +681,7 @@ openerp.point_of_sale = function(db) {
|
||||
}, this));
|
||||
return (this.shop.get('selectedOrder')).addPaymentLine(cashRegister);
|
||||
},
|
||||
render_element: function() {
|
||||
renderElement: function() {
|
||||
this.$element.empty();
|
||||
return (this.shop.get('cashRegisters')).each(_.bind( function(cashRegister) {
|
||||
var button = new PaymentButtonWidget();
|
||||
@@ -693,7 +692,7 @@ openerp.point_of_sale = function(db) {
|
||||
});
|
||||
var PaymentButtonWidget = db.web.OldWidget.extend({
|
||||
template_fct: qweb_template('pos-payment-button-template'),
|
||||
render_element: function() {
|
||||
renderElement: function() {
|
||||
this.$element.html(this.template_fct({
|
||||
id: this.model.get('id'),
|
||||
name: (this.model.get('journal_id'))[1]
|
||||
@@ -736,7 +735,7 @@ openerp.point_of_sale = function(db) {
|
||||
Shopping carts.
|
||||
*/
|
||||
var OrderlineWidget = db.web.OldWidget.extend({
|
||||
tag_name: 'tr',
|
||||
tagName: 'tr',
|
||||
template_fct: qweb_template('pos-orderline-template'),
|
||||
init: function(parent, options) {
|
||||
this._super(parent);
|
||||
@@ -756,12 +755,12 @@ openerp.point_of_sale = function(db) {
|
||||
clickHandler: function() {
|
||||
this.select();
|
||||
},
|
||||
render_element: function() {
|
||||
renderElement: function() {
|
||||
this.$element.html(this.template_fct(this.model.toJSON()));
|
||||
this.select();
|
||||
},
|
||||
refresh: function() {
|
||||
this.render_element();
|
||||
this.renderElement();
|
||||
var heights = _.map(this.$element.prevAll(), function(el) {return $(el).outerHeight();});
|
||||
heights.push($('#current-order thead').outerHeight());
|
||||
var position = _.reduce(heights, function(memo, num){ return memo + num; }, 0);
|
||||
@@ -806,12 +805,12 @@ openerp.point_of_sale = function(db) {
|
||||
changeSelectedOrder: function() {
|
||||
this.currentOrderLines.unbind();
|
||||
this.bindOrderLineEvents();
|
||||
this.render_element();
|
||||
this.renderElement();
|
||||
},
|
||||
bindOrderLineEvents: function() {
|
||||
this.currentOrderLines = (this.shop.get('selectedOrder')).get('orderLines');
|
||||
this.currentOrderLines.bind('add', this.addLine, this);
|
||||
this.currentOrderLines.bind('remove', this.render_element, this);
|
||||
this.currentOrderLines.bind('remove', this.renderElement, this);
|
||||
},
|
||||
addLine: function(newLine) {
|
||||
var line = new OrderlineWidget(null, {
|
||||
@@ -833,7 +832,7 @@ openerp.point_of_sale = function(db) {
|
||||
this.numpadState.reset();
|
||||
this.updateSummary();
|
||||
},
|
||||
render_element: function() {
|
||||
renderElement: function() {
|
||||
this.$element.empty();
|
||||
this.currentOrderLines.each(_.bind( function(orderLine) {
|
||||
var line = new OrderlineWidget(null, {
|
||||
@@ -864,7 +863,7 @@ openerp.point_of_sale = function(db) {
|
||||
this.$element.find(".oe-pos-categories-list a").click(_.bind(this.changeCategory, this));
|
||||
},
|
||||
template_fct: qweb_template('pos-category-template'),
|
||||
render_element: function() {
|
||||
renderElement: function() {
|
||||
var self = this;
|
||||
var c;
|
||||
this.$element.html(this.template_fct({
|
||||
@@ -895,7 +894,7 @@ openerp.point_of_sale = function(db) {
|
||||
on_change_category: function(id) {},
|
||||
});
|
||||
var ProductWidget = db.web.OldWidget.extend({
|
||||
tag_name:'li',
|
||||
tagName:'li',
|
||||
template_fct: qweb_template('pos-product-template'),
|
||||
init: function(parent, options) {
|
||||
this._super(parent);
|
||||
@@ -910,7 +909,7 @@ openerp.point_of_sale = function(db) {
|
||||
event.preventDefault();
|
||||
return (this.shop.get('selectedOrder')).addProduct(this.model);
|
||||
},
|
||||
render_element: function() {
|
||||
renderElement: function() {
|
||||
this.$element.addClass("product");
|
||||
this.$element.html(this.template_fct(this.model.toJSON()));
|
||||
return this;
|
||||
@@ -921,9 +920,9 @@ openerp.point_of_sale = function(db) {
|
||||
this._super(parent);
|
||||
this.model = options.model;
|
||||
this.shop = options.shop;
|
||||
this.shop.get('products').bind('reset', this.render_element, this);
|
||||
this.shop.get('products').bind('reset', this.renderElement, this);
|
||||
},
|
||||
render_element: function() {
|
||||
renderElement: function() {
|
||||
this.$element.empty();
|
||||
(this.shop.get('products')).each(_.bind( function(product) {
|
||||
var p = new ProductWidget(null, {
|
||||
@@ -939,7 +938,7 @@ openerp.point_of_sale = function(db) {
|
||||
"Payment" step.
|
||||
*/
|
||||
var PaymentlineWidget = db.web.OldWidget.extend({
|
||||
tag_name: 'tr',
|
||||
tagName: 'tr',
|
||||
template_fct: qweb_template('pos-paymentline-template'),
|
||||
init: function(parent, options) {
|
||||
this._super(parent);
|
||||
@@ -959,9 +958,9 @@ openerp.point_of_sale = function(db) {
|
||||
},
|
||||
changedAmount: function() {
|
||||
if (this.amount !== this.model.get('amount'))
|
||||
this.render_element();
|
||||
this.renderElement();
|
||||
},
|
||||
render_element: function() {
|
||||
renderElement: function() {
|
||||
this.amount = this.model.get('amount');
|
||||
this.$element.html(this.template_fct({
|
||||
name: (this.model.get('journal_id'))[1],
|
||||
@@ -1005,7 +1004,7 @@ openerp.point_of_sale = function(db) {
|
||||
bindPaymentLineEvents: function() {
|
||||
this.currentPaymentLines = (this.shop.get('selectedOrder')).get('paymentLines');
|
||||
this.currentPaymentLines.bind('add', this.addPaymentLine, this);
|
||||
this.currentPaymentLines.bind('remove', this.render_element, this);
|
||||
this.currentPaymentLines.bind('remove', this.renderElement, this);
|
||||
this.currentPaymentLines.bind('all', this.updatePaymentSummary, this);
|
||||
},
|
||||
bindOrderLineEvents: function() {
|
||||
@@ -1017,7 +1016,7 @@ openerp.point_of_sale = function(db) {
|
||||
this.bindPaymentLineEvents();
|
||||
this.currentOrderLines.unbind();
|
||||
this.bindOrderLineEvents();
|
||||
this.render_element();
|
||||
this.renderElement();
|
||||
},
|
||||
addPaymentLine: function(newPaymentLine) {
|
||||
var x = new PaymentlineWidget(null, {
|
||||
@@ -1026,7 +1025,7 @@ openerp.point_of_sale = function(db) {
|
||||
x.on_delete.add(_.bind(this.deleteLine, this, x));
|
||||
x.appendTo(this.paymentLineList());
|
||||
},
|
||||
render_element: function() {
|
||||
renderElement: function() {
|
||||
this.paymentLineList().empty();
|
||||
this.currentPaymentLines.each(_.bind( function(paymentLine) {
|
||||
this.addPaymentLine(paymentLine);
|
||||
@@ -1080,7 +1079,7 @@ openerp.point_of_sale = function(db) {
|
||||
this.shop.bind('change:selectedOrder', this.changeSelectedOrder, this);
|
||||
this.changeSelectedOrder();
|
||||
},
|
||||
render_element: function() {
|
||||
renderElement: function() {
|
||||
this.$element.html(qweb_template('pos-receipt-view'));
|
||||
$('button#pos-finish-order', this.$element).click(_.bind(this.finishOrder, this));
|
||||
$('button#print-the-ticket', this.$element).click(_.bind(this.print, this));
|
||||
@@ -1110,7 +1109,7 @@ openerp.point_of_sale = function(db) {
|
||||
},
|
||||
});
|
||||
var OrderButtonWidget = db.web.OldWidget.extend({
|
||||
tag_name: 'li',
|
||||
tagName: 'li',
|
||||
template_fct: qweb_template('pos-order-selector-button-template'),
|
||||
init: function(parent, options) {
|
||||
this._super(parent);
|
||||
@@ -1143,7 +1142,7 @@ openerp.point_of_sale = function(db) {
|
||||
closeOrder: function(event) {
|
||||
this.order.destroy();
|
||||
},
|
||||
render_element: function() {
|
||||
renderElement: function() {
|
||||
this.$element.html(this.template_fct({widget:this}));
|
||||
this.$element.addClass('order-selector-button');
|
||||
}
|
||||
@@ -1162,13 +1161,13 @@ openerp.point_of_sale = function(db) {
|
||||
shop: this.shop
|
||||
});
|
||||
this.productListView.$element = $("#products-screen-ol");
|
||||
this.productListView.render_element();
|
||||
this.productListView.renderElement();
|
||||
this.productListView.start();
|
||||
this.paypadView = new PaypadWidget(null, {
|
||||
shop: this.shop
|
||||
});
|
||||
this.paypadView.$element = $('#paypad');
|
||||
this.paypadView.render_element();
|
||||
this.paypadView.renderElement();
|
||||
this.paypadView.start();
|
||||
this.numpadView = new NumpadWidget(null);
|
||||
this.numpadView.$element = $('#numpad');
|
||||
@@ -1182,7 +1181,7 @@ openerp.point_of_sale = function(db) {
|
||||
shop: this.shop
|
||||
});
|
||||
this.paymentView.$element = $('#payment-screen');
|
||||
this.paymentView.render_element();
|
||||
this.paymentView.renderElement();
|
||||
this.paymentView.start();
|
||||
this.receiptView = new ReceiptWidget(null, {
|
||||
shop: this.shop,
|
||||
@@ -1252,7 +1251,7 @@ openerp.point_of_sale = function(db) {
|
||||
c = pos.categories[id];
|
||||
this.categoryView.ancestors = c.ancestors;
|
||||
this.categoryView.children = c.children;
|
||||
this.categoryView.render_element();
|
||||
this.categoryView.renderElement();
|
||||
this.categoryView.start();
|
||||
products = pos.store.get('product.product').filter( function(p) {
|
||||
var _ref;
|
||||
@@ -1289,13 +1288,13 @@ openerp.point_of_sale = function(db) {
|
||||
this._super.apply(this, arguments);
|
||||
this.nbr_pending = 0;
|
||||
},
|
||||
render_element: function() {
|
||||
renderElement: function() {
|
||||
this._super.apply(this, arguments);
|
||||
$('.oe_pos_synch-notification-button', this.$element).click(this.on_synch);
|
||||
},
|
||||
on_change_nbr_pending: function(nbr_pending) {
|
||||
this.nbr_pending = nbr_pending;
|
||||
this.render_element();
|
||||
this.renderElement();
|
||||
},
|
||||
on_synch: function() {}
|
||||
});
|
||||
@@ -1313,7 +1312,7 @@ openerp.point_of_sale = function(db) {
|
||||
start: function() {
|
||||
var self = this;
|
||||
return pos.ready.then(_.bind(function() {
|
||||
this.render_element();
|
||||
this.renderElement();
|
||||
this.synch_notification = new db.point_of_sale.SynchNotification(this);
|
||||
this.synch_notification.replace($('.oe_pos_synch-notification', this.$element));
|
||||
this.synch_notification.on_synch.add(_.bind(pos.flush, pos));
|
||||
|
||||
@@ -42,10 +42,6 @@ class publisher_warranty_contract(osv.osv):
|
||||
domain = [('state', '=', 'valid'), ('check_support', '=', True)]
|
||||
return self.search_count(cr, uid, domain) != 0
|
||||
|
||||
@cache(skiparg=3)
|
||||
def get_default_livechat_text(self, cr, uid):
|
||||
return '<a href="#" target="_blank"><img src="/web_livechat/static/src/img/busy.png"/>Support</a>'
|
||||
|
||||
publisher_warranty_contract()
|
||||
|
||||
|
||||
|
||||
@@ -22,8 +22,8 @@ var __lc_buttons = [];
|
||||
|
||||
openerp.web_livechat = function (openerp) {
|
||||
|
||||
openerp.web_livechat.Livechat = openerp.web.OldWidget.extend({
|
||||
template: 'Header-LiveChat',
|
||||
openerp.web_livechat.Livechat = openerp.web.Widget.extend({
|
||||
template: 'Systray.LiveChat',
|
||||
|
||||
start: function() {
|
||||
this._super();
|
||||
@@ -31,26 +31,28 @@ openerp.web_livechat.Livechat = openerp.web.OldWidget.extend({
|
||||
return;
|
||||
var self = this;
|
||||
var pwc = new openerp.web.Model("publisher_warranty.contract");
|
||||
return pwc.get_func('get_default_livechat_text')().then(function(text) {
|
||||
self.$element.html(text);
|
||||
pwc.get_func('is_livechat_enable')().then(function(res) {
|
||||
if(res) {
|
||||
self.$element.click(self.do_load_livechat);
|
||||
} else {
|
||||
self.$element.click(self.do_open_url);
|
||||
}
|
||||
})
|
||||
pwc.get_func('is_livechat_enable')().then(function(res) {
|
||||
if(res) {
|
||||
self.$element.click(self.do_load_livechat);
|
||||
} else {
|
||||
self.$element.click(self.do_open_url);
|
||||
}
|
||||
});
|
||||
this.$element.on('hover', '.oe_systray_livechat img', function() {
|
||||
$(this).tipsy();
|
||||
});
|
||||
},
|
||||
|
||||
do_open_url: function(evt) {
|
||||
evt.preventDefault();
|
||||
evt.preventDefault();
|
||||
openerp.webclient.action_manager.do_action({type: 'ir.actions.act.url', url: 'http://www.openerp.com/support-or-publisher-warranty-contract', target: 'new'});
|
||||
},
|
||||
|
||||
do_load_livechat: function(evt) {
|
||||
evt.preventDefault();
|
||||
var self = this;
|
||||
if (evt) {
|
||||
evt.preventDefault();
|
||||
}
|
||||
|
||||
this.$element.unbind('click', this.do_load_livechat);
|
||||
|
||||
@@ -58,9 +60,8 @@ openerp.web_livechat.Livechat = openerp.web.OldWidget.extend({
|
||||
this.$element.attr('id', lc_id);
|
||||
|
||||
var pwc = new openerp.web.Model("publisher_warranty.contract");
|
||||
|
||||
|
||||
pwc.get_func('is_livechat_enable')().then(function(res) {
|
||||
console.log('res', res);
|
||||
if(!res) {
|
||||
return;
|
||||
}
|
||||
@@ -74,39 +75,35 @@ openerp.web_livechat.Livechat = openerp.web.OldWidget.extend({
|
||||
skill: '2',
|
||||
type: 'text',
|
||||
labels: {
|
||||
online: '<img src="/web_livechat/static/src/img/available.png"/>Support',
|
||||
offline: '<img src="/web_livechat/static/src/img/away.png"/>Support',
|
||||
online: '<img src="/web_livechat/static/src/img/available.png" title="Support"/>',
|
||||
offline: '<img src="/web_livechat/static/src/img/away.png" title="Support"/>',
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
openerp.web.Header.include({
|
||||
openerp.web.UserMenu.include({
|
||||
do_update: function() {
|
||||
var self = this;
|
||||
this._super();
|
||||
this._super.apply(this, arguments);
|
||||
this.update_promise.then(function() {
|
||||
if (self.livechat) {
|
||||
self.livechat.destroy();
|
||||
}
|
||||
self.livechat = new openerp.web_livechat.Livechat(self);
|
||||
self.livechat.prependTo(self.$element.find('div.header_corner'));
|
||||
self.livechat.appendTo(openerp.webclient.$element.find('.oe_systray'));
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
|
||||
|
||||
if (openerp.webclient) {
|
||||
// tracking code from LiveChat
|
||||
var license = '1035052',
|
||||
params = '',
|
||||
lang = 'en',
|
||||
skill = '0';
|
||||
__lc_load = function (p) {
|
||||
__lc_load = function (p) {
|
||||
if (typeof __lc_loaded != 'function')
|
||||
if (p) {
|
||||
var d = document,
|
||||
|
||||
@@ -2,7 +2,9 @@
|
||||
<!-- vim:fdl=1:
|
||||
-->
|
||||
<templates id="template" xml:space="preserve">
|
||||
<t t-name="Header-LiveChat">
|
||||
<div class="livechat block logout"></div>
|
||||
</t>
|
||||
<t t-name="Systray.LiveChat">
|
||||
<div class="oe_systray_livechat">
|
||||
<img src="/web_livechat/static/src/img/busy.png" title="Support"/>
|
||||
</div>
|
||||
</t>
|
||||
</templates>
|
||||
|
||||
@@ -38,7 +38,6 @@ Invite OpenERP user feedback, powered by uservoice.
|
||||
'certificate': '0040452504963885',
|
||||
|
||||
'js': ['static/src/js/web_uservoice.js'],
|
||||
'css': ['static/src/css/uservoice.css'],
|
||||
'qweb' : [
|
||||
"static/src/xml/*.xml",
|
||||
],
|
||||
|
||||
@@ -1,7 +0,0 @@
|
||||
div.header_corner div.feedback a {
|
||||
/*color: #9a0404;*/
|
||||
}
|
||||
div.header_corner div.feedback img {
|
||||
vertical-align: middle;
|
||||
margin-right: 0.5em;
|
||||
}
|
||||
@@ -1,8 +1,7 @@
|
||||
|
||||
openerp.web_uservoice = function(instance) {
|
||||
|
||||
instance.web_uservoice.UserVoice = instance.web.OldWidget.extend({
|
||||
template: 'Header-UserVoice',
|
||||
instance.web_uservoice.UserVoice = instance.web.Widget.extend({
|
||||
template: 'Systray.UserVoice',
|
||||
default_forum: '77459',
|
||||
|
||||
init: function() {
|
||||
@@ -16,7 +15,12 @@ instance.web_uservoice.UserVoice = instance.web.OldWidget.extend({
|
||||
showTab: false
|
||||
};
|
||||
|
||||
instance.webclient.menu.do_menu_click.add_first(this.do_menu_click);
|
||||
instance.webclient.menu.on('menuClicked', this, function(id, $clicked_menu) {
|
||||
var root = $clicked_menu.parents('div.oe_menu').length === 1;
|
||||
if (id && root) {
|
||||
this.uservoiceOptions.forum = this.uservoiceForums[id] || this.default_forum;
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
start: function() {
|
||||
@@ -45,27 +49,16 @@ instance.web_uservoice.UserVoice = instance.web.OldWidget.extend({
|
||||
self.uservoiceForums[menu.id] = forum_mapping[menu.name.toLowerCase()] || self.default_forum;
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
this.$element.find('a').click(function(e) {
|
||||
e.preventDefault();
|
||||
UserVoice.Popin.show(self.uservoiceOptions);
|
||||
return false;
|
||||
});
|
||||
},
|
||||
|
||||
|
||||
do_menu_click: function($clicked_menu, manual) {
|
||||
var id = $clicked_menu.attr('data-menu'),
|
||||
root = $clicked_menu.parents('div.menu').length === 1;
|
||||
if (id && root) {
|
||||
this.uservoiceOptions.forum = this.uservoiceForums[id] || this.default_forum;
|
||||
}
|
||||
},
|
||||
|
||||
}).tipsy();
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
instance.web.Header.include({
|
||||
instance.web.UserMenu.include({
|
||||
do_update: function() {
|
||||
var self = this;
|
||||
this._super();
|
||||
@@ -74,12 +67,11 @@ instance.web.Header.include({
|
||||
self.uservoice.destroy();
|
||||
}
|
||||
self.uservoice = new instance.web_uservoice.UserVoice(self);
|
||||
self.uservoice.prependTo(self.$element.find('div.header_corner'));
|
||||
self.uservoice.appendTo(instance.webclient.$element.find('.oe_systray'));
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
if (instance.webclient) {
|
||||
$(function() {
|
||||
var src = ("https:" == document.location.protocol ? "https://" : "http://") + "cdn.uservoice.com/javascripts/widgets/tab.js";
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
<!-- vim:fdl=1:
|
||||
-->
|
||||
<templates id="template" xml:space="preserve">
|
||||
<t t-name="Header-UserVoice">
|
||||
<div class="block logout feedback"><a href="#"><img src="/web_uservoice/static/src/img/uv_favicon.png" />feedback</a></div>
|
||||
</t>
|
||||
<t t-name="Systray.UserVoice">
|
||||
<div class="oe_systray_uservoice"><a href="#" title="Feedback"><img src="/web_uservoice/static/src/img/uv_favicon.png"/></a></div>
|
||||
</t>
|
||||
</templates>
|
||||
|
||||
Reference in New Issue
Block a user