commit
19df0c75aa
|
@ -119,6 +119,7 @@ class account_balance(report_sxw.rml_parse):
|
|||
self.date_lst.sort()
|
||||
|
||||
def lines(self, form, ids={}, done=None, level=1):
|
||||
print "DS LINES", ids
|
||||
if not ids:
|
||||
ids = self.ids
|
||||
if not ids:
|
||||
|
@ -194,6 +195,7 @@ class account_balance(report_sxw.rml_parse):
|
|||
else:
|
||||
result_acc.append(res)
|
||||
res1 = self.moveline(form, account.id,res['level'])
|
||||
print "NNN",res1, res
|
||||
if res1:
|
||||
for r in res1:
|
||||
result_acc.append(r)
|
||||
|
|
|
@ -50,7 +50,7 @@
|
|||
<paraStyle name="P9a" fontName="Helvetica-Bold" fontSize="9" leftIndent="0.0" alignment="LEFT"/>
|
||||
<paraStyle name="P12" fontName="Helvetica" fontSize="9.0" leading="14" alignment="CENTER" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="P12a" fontName="Helvetica" fontSize="9.0" leading="14" alignment="LEFT" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="P14" fontName="Helvetica" fontSize="8.0" leading="5" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="P14" fontName="Helvetica" fontSize="8.0" leading="12" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
|
||||
<blockTableStyle id="TrLevel8">
|
||||
<blockLeftPadding length="0" start="0,0" stop="-1,0"/>
|
||||
|
@ -174,33 +174,33 @@
|
|||
<paraStyle
|
||||
name="Det_Level8"
|
||||
fontName="Times-Italic"
|
||||
fontSize="8.0" leading="5"/>
|
||||
fontSize="8.0" leading="7"/>
|
||||
<paraStyle
|
||||
name="Det_Level7"
|
||||
fontName="Times-Italic"
|
||||
fontSize="8.0" leading="5"/>
|
||||
fontSize="8.0" leading="7"/>
|
||||
<paraStyle
|
||||
name="Det_Level6"
|
||||
fontName="Times-Italic"
|
||||
fontSize="8.0" leading="5"/>
|
||||
fontSize="8.0" leading="7"/>
|
||||
<paraStyle
|
||||
name="Det_Level5"
|
||||
fontName="Times-Italic"
|
||||
fontSize="8.0" leading="5"/>
|
||||
fontSize="8.0" leading="7"/>
|
||||
<paraStyle
|
||||
name="Det_Level4"
|
||||
fontName="Times-Italic"
|
||||
fontSize="8.0" leading="5"/>
|
||||
fontSize="8.0" leading="7"/>
|
||||
<paraStyle
|
||||
name="Det_Level3"
|
||||
fontName="Times-Italic"
|
||||
fontSize="8.0" leading="5"/>
|
||||
fontSize="8.0" leading="7"/>
|
||||
<paraStyle name="Det_Level2"
|
||||
fontSize="8.0" leading="5"
|
||||
fontSize="8.0" leading="7"
|
||||
fontName="Times-Italic"
|
||||
/>
|
||||
<paraStyle name="Det_Level1"
|
||||
fontSize="8.0" leading="5"
|
||||
fontSize="8.0" leading="7"
|
||||
fontName="Times-Italic"
|
||||
/>
|
||||
|
||||
|
@ -277,24 +277,24 @@
|
|||
<td><para style="P14">[[ setTag('para','para',{'style':('Level'+str(a['level']))}) ]]<i>[[ a['code'] or removeParentNode('tr') ]]</i></para></td>
|
||||
<td><para style="P14">[[ setTag('para','para',{'style':('Level'+str(a['level']))}) ]][[ setTag('blockTable','blockTable',{'style':'TrLevel'+str(a['level'])}) ]][[ a['name'] ]]</para></td>
|
||||
<td>
|
||||
<para style="P3"><font><u>[[ a['level']>3 and removeParentNode('font') ]][[ setTag('para','para',{'style':('Amt_Level'+str(a['level']))}) ]][[ formatLang(a['debit']) and '%.2f'%a['debit'] or '0.00' ]]</u></font>
|
||||
<font>[[ a['level']<4 and removeParentNode('font') ]][[ setTag('para','para',{'style':('Amt_Level'+str(a['level']))}) ]][[ formatLang(a['debit']) and '%.2f'%a['debit'] or '0.00' ]]</font></para>
|
||||
<para style="P3"><font><u>[[ a['level']>3 and removeParentNode('font') ]][[ setTag('para','para',{'style':('Amt_Level'+str(a['level']))}) ]][[ formatLang(a['debit']) or '0.00' ]]</u></font>
|
||||
<font>[[ a['level']<4 and removeParentNode('font') ]][[ setTag('para','para',{'style':('Amt_Level'+str(a['level']))}) ]][[ formatLang(a['debit']) or '0.00' ]]</font></para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P3"><font><u>[[ a['level']>3 and removeParentNode('font') ]][[ setTag('para','para',{'style':('Amt_Level'+str(a['level']))}) ]][[ formatLang(a['credit']) and '%.2f'%a['credit'] or '0.00' ]]</u></font>
|
||||
<font>[[ a['level']<4 and removeParentNode('font') ]][[ setTag('para','para',{'style':('Amt_Level'+str(a['level']))}) ]][[ formatLang(a['credit']) and '%.2f'%a['credit'] or '0.00' ]]</font></para>
|
||||
<para style="P3"><font><u>[[ a['level']>3 and removeParentNode('font') ]][[ setTag('para','para',{'style':('Amt_Level'+str(a['level']))}) ]][[ formatLang(a['credit']) or '0.00' ]]</u></font>
|
||||
<font>[[ a['level']<4 and removeParentNode('font') ]][[ setTag('para','para',{'style':('Amt_Level'+str(a['level']))}) ]][[ formatLang(a['credit']) or '0.00' ]]</font></para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P3"><font><u>[[ a['level']>3 and removeParentNode('font') ]][[ setTag('para','para',{'style':('Amt_Level'+str(a['level']))}) ]][[ formatLang(a['balance']) and '%.2f'%a['balance'] or '0.00' ]]</u></font>
|
||||
<font>[[ a['level']<4 and removeParentNode('font') ]][[ setTag('para','para',{'style':('Amt_Level'+str(a['level']))}) ]][[ formatLang(a['balance']) and '%.2f'%a['balance'] or '0.00' ]]</font></para>
|
||||
<para style="P3"><font><u>[[ a['level']>3 and removeParentNode('font') ]][[ setTag('para','para',{'style':('Amt_Level'+str(a['level']))}) ]][[ formatLang(a['balance']) or '0.00' ]]</u></font>
|
||||
<font>[[ a['level']<4 and removeParentNode('font') ]][[ setTag('para','para',{'style':('Amt_Level'+str(a['level']))}) ]][[ formatLang(a['balance']) or '0.00' ]]</font></para>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><para style="P14">[[ setTag('para','para',{'style':('Det_Level'+str(a['level']))}) ]][[ a['jname'] or removeParentNode('tr') ]]</para></td>
|
||||
<td><para style="P14">[[ setTag('para','para',{'style':('Det_Level'+str(a['level']))}) ]] [[ setTag('tr','tr',{'style':('TrLevel_Name'+str(a['level']))}) ]]<font>[ref: [[ a['ref'] or removeParentNode('font') ]] ]</font> [[ a['lname'] ]]</para></td>
|
||||
<td><para style="P3">[[ setTag('para','para',{'style':('Det_Amt_Level'+str(a['level']))}) ]][[ formatLang(a['debit1']) and '%.2f'%a['debit1'] or '0.00']]</para></td>
|
||||
<td><para style="P3">[[ setTag('para','para',{'style':('Det_Amt_Level'+str(a['level']))}) ]][[ formatLang(a['credit1']) and '%.2f'%a['credit1'] or '0.00']]</para></td>
|
||||
<td><para style="P3">[[ setTag('para','para',{'style':('Det_Amt_Level'+str(a['level']))}) ]][[ formatLang(a['balance1']) and '%.2f'%a['balance1'] or '0.00' ]]</para></td>
|
||||
<td><para style="P3">[[ setTag('para','para',{'style':('Det_Amt_Level'+str(a['level']))}) ]][[ formatLang(a['debit1']) or '0.00']]</para></td>
|
||||
<td><para style="P3">[[ setTag('para','para',{'style':('Det_Amt_Level'+str(a['level']))}) ]][[ formatLang(a['credit1']) or '0.00']]</para></td>
|
||||
<td><para style="P3">[[ setTag('para','para',{'style':('Det_Amt_Level'+str(a['level']))}) ]][[ formatLang(a['balance1']) or '0.00' ]]</para></td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
</td>
|
||||
|
|
|
@ -123,9 +123,9 @@
|
|||
<td><para style="P3">[[ line['ref'] or '']]</para></td>
|
||||
<td><para style="P3">[[ line['move'] or '']]</para></td>
|
||||
<td><para style="P3">[[ line['name'] or '' ]]</para></td>
|
||||
<td><para style="P4">[[ line['debit'] and line['debit'] or '0.0' ]]</para></td>
|
||||
<td><para style="P4">[[ line['credit'] and line['credit'] or '0.0' ]]</para></td>
|
||||
<td><para style="P4">[[ line['progress'] and line['progress'] or '0.0' ]]</para></td>
|
||||
<td><para style="P4">[[ line['debit'] or '0.0' ]]</para></td>
|
||||
<td><para style="P4">[[ line['credit'] or '0.0' ]]</para></td>
|
||||
<td><para style="P4">[[ line['progress'] or '0.0' ]]</para></td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
|
||||
|
@ -175,4 +175,4 @@
|
|||
|
||||
|
||||
|
||||
</document>
|
||||
</document>
|
||||
|
|
|
@ -203,7 +203,7 @@
|
|||
<paraStyle name="Caption" fontName="Times-Roman" fontSize="10.0" leading="13" spaceBefore="6.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="Index" fontName="Times-Roman"/>
|
||||
<paraStyle name="Heading" fontName="Helvetica" fontSize="15.0" leading="19" spaceBefore="12.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="terp_header" fontName="Helvetica-Bold" fontSize="12.0" leading="15" alignment="LEFT" spaceBefore="12.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="terp_header" fontName="Helvetica-Bold" fontSize="15.0" leading="15" alignment="LEFT" spaceBefore="12.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="terp_default_8" rightIndent="0.0" leftIndent="0.0" fontName="Helvetica" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<paraStyle name="Footer" fontName="Times-Roman"/>
|
||||
<paraStyle name="Horizontal Line" fontName="Times-Roman" fontSize="6.0" leading="8" spaceBefore="0.0" spaceAfter="14.0"/>
|
||||
|
@ -276,7 +276,7 @@
|
|||
<para style="terp_tblheader_General_Centre">Invoice Date</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_tblheader_General_Centre">Partner Ref.</para>
|
||||
<para style="terp_tblheader_General_Centre">Partner Code</para>
|
||||
</td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
|
@ -314,7 +314,7 @@
|
|||
<para style="terp_tblheader_Details_Right">Disc. (%)</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_tblheader_Details_Centre">Price</para>
|
||||
<para style="terp_tblheader_Details_Right">Price</para>
|
||||
</td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
|
|
|
@ -75,6 +75,8 @@
|
|||
"access_account_account_product_manager","account.account product manager","model_account_account","product.group_product_manager",1,0,0,0
|
||||
"access_account_journal_product_manager","account.journal product manager","model_account_journal","product.group_product_manager",1,0,0,0
|
||||
"access_account_fiscal_position_product_manager","account.fiscal.position account.manager","model_account_fiscal_position","account.group_account_manager",1,1,1,1
|
||||
"access_account_fiscal_position_tax_product_manager","account.fiscal.position.tax account.manager","model_account_fiscal_position_tax","account.group_account_manager",1,1,1,1
|
||||
"access_account_fiscal_position_account_product_manager","account.fiscal.position account.manager","model_account_fiscal_position_account","account.group_account_manager",1,1,1,1
|
||||
"access_account_fiscal_position","account.fiscal.position all","model_account_fiscal_position","base.group_user",1,0,0,0
|
||||
"access_account_fiscal_position_tax","account.fiscal.position.tax all","model_account_fiscal_position_tax","base.group_user",1,0,0,0
|
||||
"access_account_fiscal_position_account","account.fiscal.position all","model_account_fiscal_position_account","base.group_user",1,0,0,0
|
||||
|
|
|
|
@ -9,7 +9,7 @@
|
|||
people to intelligently and efficiently manage tasks, issues,
|
||||
and requests. It manages key tasks such as communication,
|
||||
identification, prioritization, assignment, resolution and notification.""",
|
||||
"depends" : ["crm","report_crm", "process", "account"],
|
||||
"depends" : ["crm","report_crm", "process", "account", "board_document"],
|
||||
"init_xml" : [
|
||||
"crm_config_view.xml",
|
||||
"crm_bugs_view.xml",
|
||||
|
|
|
@ -86,6 +86,7 @@ class crm_menu_config_wizard(osv.osv_memory):
|
|||
'lead' : fields.boolean('Leads', help="Allows you to track and manage leads which are pre-sales requests, the very first contact with a customer request."),
|
||||
'opportunity' : fields.boolean('Business Opportunities', help="Tracks identified business opportunities for your sales pipeline."),
|
||||
'jobs' : fields.boolean('Jobs Hiring Process', help="Help you to organise the jobs hiring process: evaluation, meetings, email integration..."),
|
||||
'board_document':fields.boolean('Document Management', help= "The Document Management System of Open ERP allows you to store, browse, automatically index, search and preview all kind of documents (internal documents, printed reports, calendar system). It opens an FTP access for the users to easily browse association's document."),
|
||||
'bugs' : fields.boolean('Bug Tracking', help="Used by companies to track bugs and support requests on softwares"),
|
||||
'fund' : fields.boolean('Fund Raising Operations', help="This may help associations in their fund raising process and tracking."),
|
||||
'helpdesk' : fields.boolean('Help Desk Operations', help="This may help your Help Desk."),
|
||||
|
|
|
@ -20,6 +20,7 @@
|
|||
<field name="bugs"/>
|
||||
<field name="fund"/>
|
||||
<field name="helpdesk"/>
|
||||
<field name="board_document"/>
|
||||
<group col="4" colspan="4">
|
||||
<button icon="gtk-cancel" name="action_cancel" type="object" special="cancel" string="Cancel"/>
|
||||
<button icon="gtk-go-forward" name="action_create" string="Next" type="object"/>
|
||||
|
|
|
@ -416,6 +416,8 @@ class document_directory_content(osv.osv):
|
|||
'sequence': lambda *args: 1,
|
||||
'include_name': lambda *args: 1,
|
||||
}
|
||||
def process_write_pdf(self, cr, uid, node, context={}):
|
||||
return True
|
||||
def process_read_pdf(self, cr, uid, node, context={}):
|
||||
report = self.pool.get('ir.actions.report.xml').browse(cr, uid, node.content.report_id.id)
|
||||
srv = netsvc.LocalService('report.'+report.report_name)
|
||||
|
|
|
@ -12,6 +12,43 @@ import netsvc
|
|||
import os
|
||||
from service import security
|
||||
|
||||
class file_wrapper(StringIO.StringIO):
|
||||
def __init__(self, sstr='', ressource_id=False, dbname=None, uid=1, name=''):
|
||||
StringIO.StringIO.__init__(self, sstr)
|
||||
self.ressource_id = ressource_id
|
||||
self.name = name
|
||||
self.dbname = dbname
|
||||
self.uid = uid
|
||||
def close(self, *args, **kwargs):
|
||||
db,pool = pooler.get_db_and_pool(self.dbname)
|
||||
cr = db.cursor()
|
||||
uid =self.uid
|
||||
val = self.getvalue()
|
||||
val2 = {
|
||||
'datas': base64.encodestring(val),
|
||||
'file_size': len(val),
|
||||
}
|
||||
pool.get('ir.attachment').write(cr, uid, [self.ressource_id], val2)
|
||||
cr.commit()
|
||||
StringIO.StringIO.close(self, *args, **kwargs)
|
||||
|
||||
class content_wrapper(StringIO.StringIO):
|
||||
def __init__(self, dbname, uid, pool, node, name=''):
|
||||
StringIO.StringIO.__init__(self, '')
|
||||
self.dbname = dbname
|
||||
self.uid = uid
|
||||
self.node = node
|
||||
self.pool = pool
|
||||
self.name = name
|
||||
def close(self, *args, **kwargs):
|
||||
db,pool = pooler.get_db_and_pool(self.dbname)
|
||||
cr = db.cursor()
|
||||
getattr(self.pool.get('document.directory.content'), 'process_write_'+self.node.content.extension[1:])(cr, self.uid, self.node, self.getvalue())
|
||||
StringIO.StringIO.close(self, *args, **kwargs)
|
||||
cr.commit()
|
||||
cr.close()
|
||||
|
||||
|
||||
class abstracted_fs:
|
||||
"""A class used to interact with the file system, providing a high
|
||||
level, cross-platform interface compatible with both Windows and
|
||||
|
@ -114,31 +151,17 @@ class abstracted_fs:
|
|||
|
||||
# Ok
|
||||
def create(self, node, objname, mode):
|
||||
cr = node.cr
|
||||
uid = node.uid
|
||||
pool = pooler.get_pool(cr.dbname)
|
||||
child = node.child(objname)
|
||||
if child:
|
||||
if child.type in ('collection','database'):
|
||||
raise OSError(1, 'Operation not permited.')
|
||||
if child.type=='content':
|
||||
s = content_wrapper(cr.dbname, uid, pool, child)
|
||||
return s
|
||||
try:
|
||||
class file_wrapper(StringIO.StringIO):
|
||||
def __init__(self, sstr='', ressource_id=False, dbname=None, uid=1, name=''):
|
||||
StringIO.StringIO.__init__(self, sstr)
|
||||
self.ressource_id = ressource_id
|
||||
self.name = name
|
||||
self.dbname = dbname
|
||||
self.uid = uid
|
||||
def close(self, *args, **kwargs):
|
||||
db,pool = pooler.get_db_and_pool(self.dbname)
|
||||
cr = db.cursor()
|
||||
uid =self.uid
|
||||
val = self.getvalue()
|
||||
val2 = {
|
||||
'datas': base64.encodestring(val),
|
||||
'file_size': len(val),
|
||||
}
|
||||
pool.get('ir.attachment').write(cr, uid, [self.ressource_id], val2)
|
||||
cr.commit()
|
||||
StringIO.StringIO.close(self, *args, **kwargs)
|
||||
|
||||
cr = node.cr
|
||||
uid = node.uid
|
||||
pool = pooler.get_pool(cr.dbname)
|
||||
|
||||
fobj = pool.get('ir.attachment')
|
||||
ext = objname.find('.') >0 and objname.split('.')[1] or False
|
||||
|
||||
|
|
|
@ -35,6 +35,7 @@ import StringIO
|
|||
import base64
|
||||
import datetime
|
||||
import time
|
||||
import random
|
||||
|
||||
ICS_TAGS = {
|
||||
'summary':'normal',
|
||||
|
@ -70,8 +71,41 @@ class document_directory_content(osv.osv):
|
|||
_defaults = {
|
||||
'ics_domain': lambda *args: '[]'
|
||||
}
|
||||
def process_write_ics(self, cr, uid, node, data, context={}):
|
||||
import vobject
|
||||
parsedCal = vobject.readOne(data)
|
||||
fields = {}
|
||||
fobj = self.pool.get('document.directory.content')
|
||||
content = fobj.browse(cr, uid, node.content.id, context)
|
||||
|
||||
for n in content.ics_field_ids:
|
||||
fields[n.name] = n.field_id.name
|
||||
if 'uid' not in fields:
|
||||
return True
|
||||
for child in parsedCal.getChildren():
|
||||
result = {}
|
||||
uuid = None
|
||||
for event in child.getChildren():
|
||||
if event.name.lower()=='uid':
|
||||
uuid = event.value
|
||||
if event.name.lower() in fields:
|
||||
if ICS_TAGS[event.name.lower()]=='normal':
|
||||
result[fields[event.name.lower()]] = event.value.encode('utf8')
|
||||
elif ICS_TAGS[event.name.lower()]=='date':
|
||||
result[fields[event.name.lower()]] = event.value.strftime('%Y-%m-%d %H:%M:%S')
|
||||
if not uuid:
|
||||
continue
|
||||
|
||||
fobj = self.pool.get(content.ics_object_id.model)
|
||||
id = fobj.search(cr, uid, [(fields['uid'], '=', uuid.encode('utf8'))], context=context)
|
||||
if id:
|
||||
fobj.write(cr, uid, id, result, context=context)
|
||||
else:
|
||||
fobj.create(cr, uid, result, context=context)
|
||||
|
||||
return True
|
||||
|
||||
def process_read_ics(self, cr, uid, node, context={}):
|
||||
print 'READ ICS'
|
||||
import vobject
|
||||
obj_class = self.pool.get(node.content.ics_object_id.model)
|
||||
# Can be improved to use context and active_id !
|
||||
|
@ -81,20 +115,24 @@ class document_directory_content(osv.osv):
|
|||
for obj in obj_class.browse(cr, uid, ids, context):
|
||||
event = cal.add('vevent')
|
||||
for field in node.content.ics_field_ids:
|
||||
value = getattr(obj, field.field_id.name)
|
||||
if (not value) and field.name=='uid':
|
||||
value = 'OpenERP-'+str(random.randint(1999999999, 9999999999))
|
||||
obj_class.write(cr, uid, [obj.id], {field.field_id.name: value})
|
||||
if ICS_TAGS[field.name]=='normal':
|
||||
value = getattr(obj, field.field_id.name) or ''
|
||||
event.add(field.name).value = value
|
||||
value = value or ''
|
||||
event.add(field.name).value = value and value.decode('utf8') or ''
|
||||
elif ICS_TAGS[field.name]=='date':
|
||||
dt = getattr(obj, field.field_id.name) or time.strftime('%Y-%m-%d %H:%M:%S')
|
||||
dt = value or time.strftime('%Y-%m-%d %H:%M:%S')
|
||||
if len(dt)==10:
|
||||
if field.name=='dtend':
|
||||
dt = dt+' 10:00:00'
|
||||
else:
|
||||
dt = dt+' 09:00:00'
|
||||
dt = dt+' 09:00:00'
|
||||
value = datetime.datetime.strptime(dt, '%Y-%m-%d %H:%M:%S')
|
||||
if field.name=='dtend':
|
||||
value += datetime.timedelta(hours=2)
|
||||
event.add(field.name).value = value
|
||||
s= StringIO.StringIO(cal.serialize())
|
||||
s= StringIO.StringIO(cal.serialize().encode('utf8'))
|
||||
s.name = node
|
||||
cr.commit()
|
||||
return s
|
||||
document_directory_content()
|
||||
|
||||
|
|
|
@ -81,7 +81,7 @@ class attendance_print(report_sxw.rml_parse):
|
|||
|
||||
return (self._sign(total),total2 and self._sign(total2))
|
||||
|
||||
report_sxw.report_sxw('report.hr.timesheet.attendance.error', 'hr.employee', 'addons/hr_attendance/report/attendance_errors.rml',parser=attendance_print)
|
||||
report_sxw.report_sxw('report.hr.timesheet.attendance.error', 'hr.employee', 'addons/hr_attendance/report/attendance_errors.rml',parser=attendance_print, header=2)
|
||||
|
||||
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||
|
|
|
@ -283,6 +283,11 @@ class product_template(osv.osv):
|
|||
res = cr.fetchone()
|
||||
return res and res[0] or False
|
||||
|
||||
def _default_category(self, cr, uid, context={}):
|
||||
if 'categ_id' in context and context['categ_id']:
|
||||
return context['categ_id']
|
||||
return False
|
||||
|
||||
_defaults = {
|
||||
'type': lambda *a: 'product',
|
||||
'list_price': lambda *a: 1,
|
||||
|
@ -298,6 +303,7 @@ class product_template(osv.osv):
|
|||
'uom_po_id': _get_uom_id,
|
||||
'uos_coeff' : lambda *a: 1.0,
|
||||
'mes_type' : lambda *a: 'fixed',
|
||||
'categ_id' : _default_category,
|
||||
}
|
||||
|
||||
def _check_uom(self, cursor, user, ids):
|
||||
|
|
|
@ -39,6 +39,9 @@ class profile_accounting_config_install_modules_wizard(osv.osv_memory):
|
|||
'account_asset':fields.boolean('Asset Management'),
|
||||
'hr_timesheet_invoice':fields.boolean('Invoice on Analytic Entries'),
|
||||
'account_budget_crossover':fields.boolean('Analytic Budgets'),
|
||||
'board_document':fields.boolean('Document Management',help= "The Document Management System of Open ERP allows you to store, browse, automatically index, search and preview all kind of documents (internal documents, printed reports, calendar system). It opens an FTP access for the users to easily browse association's document."),
|
||||
|
||||
|
||||
}
|
||||
def action_cancel(self,cr,uid,ids,conect=None):
|
||||
return {
|
||||
|
|
|
@ -16,6 +16,7 @@
|
|||
<field name="account_asset"/>
|
||||
<separator string="Services Management" colspan="4"/>
|
||||
<field name="hr_timesheet_invoice"/>
|
||||
<field name="board_document"/>
|
||||
<separator string="" colspan="4"/>
|
||||
<label string="" colspan="2"/>
|
||||
<group col="4" colspan="2">
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
"version":"0.1",
|
||||
"author":"Tiny",
|
||||
"category":"Profile",
|
||||
"depends":["membership", "event", "board_association"],
|
||||
"depends":["membership", "board_association"],
|
||||
"demo_xml":[],
|
||||
"update_xml":[
|
||||
"security/ir.model.access.csv",
|
||||
|
|
|
@ -35,7 +35,8 @@ class profile_association_config_install_modules_wizard(osv.osv_memory):
|
|||
_columns = {
|
||||
'hr_expense':fields.boolean('Expenses Tracking', help="Tracks the personal expenses process, from the employee expense encoding, to the reimbursement of the employee up to the reinvoicing to the final customer."),
|
||||
'project':fields.boolean('Project Management'),
|
||||
'board_document':fields.boolean('Document Management'),
|
||||
'board_document':fields.boolean('Document Management', help= "The Document Management System of Open ERP allows you to store, browse, automatically index, search and preview all kind of documents (internal documents, printed reports, calendar system). It opens an FTP access for the users to easily browse association's document."),
|
||||
'document_ics':fields.boolean('Shared Calendar', help=" Will allow you to synchronise your Open ERP calendars with your phone, outlook, Sunbird, ical, ..."),
|
||||
'segmentation':fields.boolean('Segmentation'),
|
||||
'crm_configuration' : fields.boolean('Partner Relation & Calendars'),
|
||||
'project_gtd':fields.boolean('Getting Things Done', help="GTD is a methodology to efficiently organise yourself and your tasks. This module fully integrates GTD principle with OpenERP's project management."),
|
||||
|
|
|
@ -9,13 +9,13 @@
|
|||
<form string="Install Extra Module">
|
||||
<separator string="Project Management" colspan="4"/>
|
||||
<field name="project"/>
|
||||
<field name="event"/>
|
||||
<separator string="Resources Management" colspan="4"/>
|
||||
<field name="hr_expense"/>
|
||||
<separator string="Relationship Management" colspan="4"/>
|
||||
<field name="crm_configuration"/>
|
||||
<field name="base_contact"/>
|
||||
<separator string="" colspan="4"/>
|
||||
<field name="document_ics"/>
|
||||
<field name="board_document"/>
|
||||
<label string="" colspan="2"/>
|
||||
<group col="4" colspan="2">
|
||||
<button special="cancel" string="Cancel" name="action_cancel" type="object" icon='gtk-cancel'/>
|
||||
|
|
|
@ -71,7 +71,10 @@ class profile_manufacturing_config_install_modules_wizard(osv.osv_memory):
|
|||
'portal': fields.boolean('Portal',
|
||||
help="This module allows you to manage a Portal system."),
|
||||
'mrp_subproduct': fields.boolean('Mrp Sub Product',
|
||||
help="This module allows you to add sub poducts in mrp bom.")
|
||||
help="This module allows you to add sub poducts in mrp bom."),
|
||||
'board_document':fields.boolean('Document Management',
|
||||
help= "The Document Management System of Open ERP allows you to store, browse, automatically index, search and preview all kind of documents (internal documents, printed reports, calendar system). It opens an FTP access for the users to easily browse association's document."),
|
||||
|
||||
}
|
||||
def action_cancel(self,cr,uid,ids,conect=None):
|
||||
return {
|
||||
|
|
|
@ -18,6 +18,7 @@
|
|||
<field name="sale_margin"/>
|
||||
<separator string="Relationship Management" colspan="4"/>
|
||||
<field name="crm_configuration"/>
|
||||
<field name="board_document"/>
|
||||
<separator string="Portal Management" colspan="4"/>
|
||||
<field name="portal"/>
|
||||
<separator string="" colspan="4"/>
|
||||
|
|
|
@ -40,6 +40,8 @@ class profile_service_config_install_modules_wizard(osv.osv_memory):
|
|||
'hr_holidays':fields.boolean('Holidays Management', help="Tracks the full holidays management process, from the employee's request to the global planning."),
|
||||
'hr_expense':fields.boolean('Expenses Tracking', help="Tracks the personal expenses process, from the employee expense encoding, to the reimbursement of the employee up to the reinvoicing to the final customer."),
|
||||
'account_budget_crossover':fields.boolean('Analytic Budgets', help="Allows you to manage analytic budgets by journals. This module is used to manage budgets of your projects."),
|
||||
'board_document':fields.boolean('Document Management',
|
||||
help= "The Document Management System of Open ERP allows you to store, browse, automatically index, search and preview all kind of documents (internal documents, printed reports, calendar system). It opens an FTP access for the users to easily browse association's document."),
|
||||
'project_gtd':fields.boolean('Getting Things Done', help="GTD is a methodology to efficiently organise yourself and your tasks. This module fully integrates GTD principle with OpenERP's project management."),
|
||||
'scrum':fields.boolean('Scrum Methodology', help="Scrum is an 'agile development methodology', mainly used in IT projects. It helps you to manage teams, long term roadmaps, sprints, and so on."),
|
||||
'base_contact':fields.boolean('Contacts Management', help="Allows you to manage partners (enterprises), addresses of partners and contacts of these partners (employee/people). Install this if you plan to manage your relationships with partners and contacts."),
|
||||
|
|
|
@ -17,10 +17,10 @@
|
|||
<field name="hr_holidays"/>
|
||||
<field name="hr_expense"/>
|
||||
<field name="account_budget_crossover"/>
|
||||
|
||||
<separator string="Relationship Management" colspan="4"/>
|
||||
<field name="crm_configuration"/>
|
||||
<field name="base_contact"/>
|
||||
<field name="board_document"/>
|
||||
<separator string="Portal Management" colspan="4"/>
|
||||
<field name="portal"/>
|
||||
<separator string="" colspan="4"/>
|
||||
|
|
|
@ -273,6 +273,11 @@ class task(osv.osv):
|
|||
def onchange_planned(self, cr, uid, ids, planned, effective):
|
||||
return {'value':{'remaining_hours': planned-effective}}
|
||||
|
||||
def _default_project(self, cr, uid, context={}):
|
||||
if 'project_id' in context and context['project_id']:
|
||||
return context['project_id']
|
||||
return False
|
||||
|
||||
#_sql_constraints = [
|
||||
# ('remaining_hours', 'CHECK (remaining_hours>=0)', 'Please increase and review remaining hours ! It can not be smaller than 0.'),
|
||||
#]
|
||||
|
@ -313,6 +318,7 @@ class task(osv.osv):
|
|||
'sequence': lambda *a: 10,
|
||||
'active': lambda *a: True,
|
||||
'date_start': lambda *a: time.strftime('%Y-%m-%d %H:%M:%S'),
|
||||
'project_id': _default_project,
|
||||
}
|
||||
_order = "sequence, priority, date_deadline, id"
|
||||
|
||||
|
|
|
@ -439,6 +439,7 @@
|
|||
<field name="view_type">form</field>
|
||||
<field name="view_mode">tree,form,calendar,graph</field>
|
||||
<field name="domain">[('project_id', 'child_of', [active_id])]</field>
|
||||
<field name="context">{'project_id':active_id}</field>
|
||||
</record>
|
||||
<record id="ir_project_task_open" model="ir.values">
|
||||
<field eval=" 'tree_but_open'" name="key2"/>
|
||||
|
|
|
@ -474,6 +474,7 @@ class purchase_order_line(osv.osv):
|
|||
partner = self.pool.get('res.partner').browse(cr, uid, partner_id)
|
||||
taxes = self.pool.get('account.tax').browse(cr, uid,prod['supplier_taxes_id'])
|
||||
res['value']['taxes_id'] = self.pool.get('account.fiscal.position').map_tax(cr, uid, partner, taxes)
|
||||
# res['value']['taxes_id'] = [x.id for x in taxes]
|
||||
|
||||
res2 = self.pool.get('product.uom').read(cr, uid, [uom], ['category_id'])
|
||||
res3 = self.pool.get('product.uom').read(cr, uid, [prod_uom_po], ['category_id'])
|
||||
|
|
|
@ -114,7 +114,7 @@
|
|||
<paraStyle name="Index" fontName="Times-Roman"/>
|
||||
<paraStyle name="Footer" fontName="Times-Roman"/>
|
||||
<paraStyle name="Horizontal Line" fontName="Times-Roman" fontSize="6.0" leading="8" spaceBefore="0.0" spaceAfter="14.0"/>
|
||||
<paraStyle name="terp_header" fontName="Helvetica-Bold" fontSize="12.0" leading="15" alignment="LEFT" spaceBefore="12.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="terp_header" fontName="Helvetica-Bold" fontSize="15.0" leading="15" alignment="LEFT" spaceBefore="12.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="Heading 9" fontName="Helvetica-Bold" fontSize="75%" leading="NaN" spaceBefore="12.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="terp_tblheader_General" fontName="Helvetica-Bold" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="6.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="terp_tblheader_Details" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="LEFT" spaceBefore="6.0" spaceAfter="6.0"/>
|
||||
|
@ -157,7 +157,7 @@
|
|||
<tr>
|
||||
<td>
|
||||
<para style="P5">[[ repeatIn(o.dest_address_id and [o.dest_address_id] or [],'addr') ]]</para>
|
||||
<para style="P4">Shipping address :</para>
|
||||
<para style="terp_tblheader_General">Shipping address :</para>
|
||||
<para style="P5">[[ o.partner_id.title or '' ]] [[ o.partner_id.name ]]</para>
|
||||
<para style="P5">[[ addr.title or '' ]] [[ addr.name ]]</para>
|
||||
<para style="P5">[[ addr.street ]]</para>
|
||||
|
@ -207,11 +207,11 @@
|
|||
<para style="terp_default_8">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
<blockTable colWidths="136.0,132.0,133.0,133.0" style="Header_Order_Reference_Tbl">
|
||||
<blockTable colWidths="180.0,180.0,180.0" style="Header_Order_Reference_Tbl">
|
||||
<tr>
|
||||
<td>
|
||||
<!--td>
|
||||
<para style="terp_tblheader_General_Centre">Our Order Reference</para>
|
||||
</td>
|
||||
</td-->
|
||||
<td>
|
||||
<para style="terp_tblheader_General_Centre">Your Order Reference</para>
|
||||
</td>
|
||||
|
@ -223,16 +223,16 @@
|
|||
</td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
<blockTable colWidths="136.0,132.0,133.0,133.0" style="Content_Order_Reference_Table">
|
||||
<blockTable colWidths="180.0,180.0,180.0" style="Content_Order_Reference_Table">
|
||||
<tr>
|
||||
<td>
|
||||
<!--td>
|
||||
<para style="terp_default_Centre_8">[[ o.name or '' ]]</para>
|
||||
</td>
|
||||
</td-->
|
||||
<td>
|
||||
<para style="terp_default_Centre_8">[[ o.partner_ref or '' ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Centre_8">[[ time.strftime('%d/%m/%Y', time.strptime(o.date_order, '%Y-%m-%d')) ]]</para>
|
||||
<para style="terp_default_Centre_9">[[o.date_order]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Centre_8">[[ o.validator and o.validator.name or '' ]]</para>
|
||||
|
@ -275,7 +275,7 @@
|
|||
<para style="terp_default_9">[[ ', '.join(map(lambda x: x.name, line.taxes_id)) ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_9">[[ time.strftime('%d/%m/%Y', time.strptime( line.date_planned, '%Y-%m-%d %H:%M:%S')) ]]</para>
|
||||
<para style="terp_default_Centre_9">[[ line.date_planned]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Right_9">[[ line.product_qty ]] </para>
|
||||
|
|
|
@ -44,7 +44,7 @@
|
|||
<paraStyle name="Index" fontName="Times-Roman"/>
|
||||
<paraStyle name="Footer" fontName="Times-Roman"/>
|
||||
<paraStyle name="Horizontal Line" fontName="Times-Roman" fontSize="6.0" leading="8" spaceBefore="0.0" spaceAfter="14.0"/>
|
||||
<paraStyle name="terp_header" fontName="Helvetica-Bold" fontSize="12.0" leading="15" alignment="LEFT" spaceBefore="12.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="terp_header" fontName="Helvetica-Bold" fontSize="15.0" leading="15" alignment="LEFT" spaceBefore="12.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="Heading 9" fontName="Helvetica-Bold" fontSize="75%" leading="NaN" spaceBefore="12.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="terp_tblheader_General" fontName="Helvetica-Bold" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="6.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="terp_tblheader_Details" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="LEFT" spaceBefore="6.0" spaceAfter="6.0"/>
|
||||
|
|
|
@ -191,7 +191,7 @@
|
|||
<para style="terp_tblheader_General_Centre">Your Reference </para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_tblheader_General_Centre">Date Ordered </para>
|
||||
<para style="terp_tblheader_General_Centre">Date </para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_tblheader_General_Centre">Our Salesman </para>
|
||||
|
@ -204,7 +204,7 @@
|
|||
<blockTable colWidths="132.0,134.0,135.0,135.0" style="OrderTable">
|
||||
<tr>
|
||||
<td>
|
||||
<para style="terp_default_Centre_8">[[ o.name ]]</para>
|
||||
<para style="terp_default_Centre_8">[[ o.client_order_ref or '' ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Centre_8">[[ o.date_order ]]</para>
|
||||
|
@ -213,7 +213,7 @@
|
|||
<para style="terp_default_Centre_8">[[ o.user_id.name ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Centre_8">[[ o.partner_id.property_payment_term['name'] ]]</para>
|
||||
<para style="terp_default_Centre_8">[[ o.partner_id.property_payment_term['name'] or o.payment_term and o.payment_term.name or '' ]]</para>
|
||||
</td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
"access_sale_journal_invoice_type_stats","sale_journal.invoice.type.stats","model_sale_journal_invoice_type_stats","sale.group_sale_user",1,0,0,0
|
||||
"access_sale_journal_picking_stats","sale_journal.picking.stats","model_sale_journal_picking_stats","sale.group_sale_user",1,0,0,0
|
||||
"access_sale_journal_invoice_type","sale_journal.invoice.type","model_sale_journal_invoice_type","sale.group_sale_user",1,0,0,0
|
||||
"access_sale_journal_invoice_type_finance_invoice","sale_journal.invoice.type invoice","model_sale_journal_invoice_type","account.group_account_invoice",1,0,0,0
|
||||
"access_sale_journal_invoice_type_partner_manager","sale_journal.invoice.type partner manager","model_sale_journal_invoice_type","base.group_partner_manager",1,0,0,0
|
||||
"access_sale_journal_sale_journal","sale_journal.sale.journal","model_sale_journal_sale_journal","sale.group_sale_user",1,0,0,0
|
||||
"access_sale_journal_picking_journal","sale_journal.picking.journal","model_sale_journal_picking_journal","sale.group_sale_user",1,0,0,0
|
||||
|
|
|
|
@ -3,8 +3,7 @@
|
|||
"access_stock_warehouse_manager","stock.warehouse.manager","model_stock_warehouse","stock.group_stock_manager",1,1,1,1
|
||||
"access_stock_warehouse_user","stock.warehouse.user","model_stock_warehouse","base.group_user",1,0,0,0
|
||||
"access_stock_location_manager","stock.location.manager","model_stock_location","stock.group_stock_manager",1,1,1,1
|
||||
"access_stock_location_user","stock.location.user","model_stock_location","stock.group_stock_user",1,0,0,0
|
||||
"access_stock_location_partner_manager","stock.location partner manager","model_stock_location","base.group_partner_manager",1,0,0,0
|
||||
"access_stock_location_user","stock.location.user","model_stock_location","base.group_user",1,0,0,0
|
||||
"access_stock_picking_move_wizard","stock.picking.move.wizard","model_stock_picking_move_wizard","stock.group_stock_user",1,1,1,1
|
||||
"access_stock_tracking","stock.tracking","model_stock_tracking","stock.group_stock_user",1,1,1,0
|
||||
"access_stock_picking","stock.picking","model_stock_picking","stock.group_stock_user",1,1,1,1
|
||||
|
|
|
|
@ -600,6 +600,7 @@ class stock_picking(osv.osv):
|
|||
|
||||
def action_invoice_create(self, cursor, user, ids, journal_id=False,
|
||||
group=False, type='out_invoice', context=None):
|
||||
print "WW"*12,context
|
||||
'''Return ids of created invoices for the pickings'''
|
||||
invoice_obj = self.pool.get('account.invoice')
|
||||
invoice_line_obj = self.pool.get('account.invoice.line')
|
||||
|
|
Loading…
Reference in New Issue