@@ -2070,8 +2070,6 @@ class wizard_multi_charts_accounts(osv.osv_memory):
|
||||
#create the account_account for this bank journal
|
||||
tmp = self.pool.get('res.partner.bank').name_get(cr, uid, [line.acc_no.id])[0][1]
|
||||
dig = obj_multi.code_digits
|
||||
print ">>>>",dig
|
||||
print ">>>",ref_acc_bank.code.ljust(dig,'0')
|
||||
vals={
|
||||
'name': line.acc_no.bank and line.acc_no.bank.name+' '+tmp or tmp,
|
||||
'currency_id': line.currency_id and line.currency_id.id or False,
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
<field name="model">account.invoice</field>
|
||||
<field name="inherit_id" ref="account.invoice_form"/>
|
||||
<field name="arch" type="xml">
|
||||
<field name="invoice_line" position="before">
|
||||
<field colspan="4" name="invoice_line" nolabel="1" widget="one2many_list" position="before">
|
||||
<field name="price_type"/>
|
||||
</field>
|
||||
</field>
|
||||
@@ -33,7 +33,7 @@
|
||||
<field name="model">account.invoice</field>
|
||||
<field name="inherit_id" ref="account.invoice_supplier_form"/>
|
||||
<field name="arch" type="xml">
|
||||
<field name="invoice_line" position="before">
|
||||
<field colspan="4" default_get="{'check_total': check_total, 'invoice_line': invoice_line, 'address_invoice_id': address_invoice_id, 'partner_id': partner_id, 'price_type': 'price_type' in dir() and price_type or False}" name="invoice_line" nolabel="1" position="before">
|
||||
<field name="price_type"/>
|
||||
</field>
|
||||
</field>
|
||||
|
||||
@@ -1,2 +1,3 @@
|
||||
"id","name","model_id:id","perm_read","perm_write","perm_create","perm_unlink"
|
||||
"access_wizard_quality_check","wizard.quality.check","model_wizard_quality_check",1,1,1,1
|
||||
"access_wizard_quality_check","wizard.quality.check","model_wizard_quality_check",,1,1,1,1
|
||||
"access_quality_check_detail","quality.check.detail","model_quality_check_detail",,1,1,1,1
|
||||
|
@@ -38,9 +38,17 @@ section_fields = {
|
||||
'menu_parent_id': {'string':'Parent Menu', 'type':'many2one', 'relation':'ir.ui.menu', 'required':True},
|
||||
}
|
||||
|
||||
def check_views(self, cr, uid, data, context):
|
||||
pool = pooler.get_pool(cr.dbname)
|
||||
board = pool.get('board.board').browse(cr, uid, data['id'])
|
||||
if not board.line_ids:
|
||||
raise wizard.except_wizard('User Error!',"Please Insert Dashboard View(s) !")
|
||||
return data['form']
|
||||
|
||||
def board_menu_create(self, cr, uid, data, context):
|
||||
pool = pooler.get_pool(cr.dbname)
|
||||
board = pool.get('board.board').browse(cr, uid, data['id'])
|
||||
|
||||
action_id = pool.get('ir.actions.act_window').create(cr, uid, {
|
||||
'name': board.name,
|
||||
'view_type':'form',
|
||||
@@ -54,12 +62,13 @@ def board_menu_create(self, cr, uid, data, context):
|
||||
'icon': 'STOCK_SELECT_COLOR',
|
||||
'action': 'ir.actions.act_window,'+str(action_id)
|
||||
}, context)
|
||||
|
||||
return {}
|
||||
|
||||
class wizard_section_menu_create(wizard.interface):
|
||||
states = {
|
||||
'init': {
|
||||
'actions': [],
|
||||
'actions': [check_views],
|
||||
'result': {'type':'form', 'arch':section_form, 'fields':section_fields, 'state':[('end','Cancel'),('create_menu','Create Menu')]}
|
||||
},
|
||||
'create_menu': {
|
||||
|
||||
@@ -62,5 +62,39 @@
|
||||
</graph>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
# ------------------------------------------------------
|
||||
# Stage
|
||||
# ------------------------------------------------------
|
||||
<record model="ir.ui.view" id="crm_case_stage_tree">
|
||||
<field name="name">crm.case.stage.tree</field>
|
||||
<field name="model">crm.case.stage</field>
|
||||
<field name="type">tree</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree string="Stages">
|
||||
<field name="name"/>
|
||||
<field name="section_id"/>
|
||||
</tree>
|
||||
</field>
|
||||
</record>
|
||||
<record model="ir.ui.view" id="crm_case_stage_form">
|
||||
<field name="name">crm.case.stage.form</field>
|
||||
<field name="model">crm.case.stage</field>
|
||||
<field name="type">form</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Stage">
|
||||
<field name="name" select="1"/>
|
||||
<field name="section_id" select="1"/>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
<record id="crm_case_stage_act" model="ir.actions.act_window">
|
||||
<field name="name">Stages</field>
|
||||
<field name="res_model">crm.case.stage</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_id" ref="crm_case_stage_tree"/>
|
||||
</record>
|
||||
<menuitem action="crm_case_stage_act" id="menu_crm_case_stage_act" parent="crm.next_id_51"/>
|
||||
|
||||
</data>
|
||||
</openerp>
|
||||
|
||||
@@ -128,7 +128,7 @@
|
||||
<field name="name" string="Name"/>
|
||||
<field name="partner_phone"/>
|
||||
<field name="partner_name2" string="Email"/>
|
||||
<field name="stage_id" string="Status"/>
|
||||
<field name="stage_id"/>
|
||||
<field name="categ_id" string="Lead Source"/>
|
||||
<field name="category2_id" string="Campaign Type"/>
|
||||
<field name="user_id"/>
|
||||
|
||||
+18
-17
@@ -87,27 +87,28 @@ class node_class(object):
|
||||
if self.object2:
|
||||
where.append( ('res_model','=',self.object2._name) )
|
||||
where.append( ('res_id','=',self.object2.id) )
|
||||
for content in self.object.content_ids:
|
||||
if self.object2 or not content.include_name:
|
||||
if content.include_name:
|
||||
test_nodename = self.object2.name + (content.suffix or '') + (content.extension or '')
|
||||
else:
|
||||
test_nodename = (content.suffix or '') + (content.extension or '')
|
||||
if test_nodename.find('/'):
|
||||
test_nodename=test_nodename.replace('/', '_')
|
||||
path = self.path+'/'+test_nodename
|
||||
if not nodename:
|
||||
n = node_class(self.cr, self.uid,path, self.object2, False, content=content, type='content', root=False)
|
||||
res2.append( n)
|
||||
else:
|
||||
if nodename == test_nodename:
|
||||
n = node_class(self.cr, self.uid, path, self.object2, False, content=content, type='content', root=False)
|
||||
res2.append(n)
|
||||
else:
|
||||
where.append( ('parent_id','=',self.object.id) )
|
||||
where.append( ('res_id','=',False) )
|
||||
if nodename:
|
||||
where.append( (fobj._rec_name,'like',nodename) )
|
||||
where.append( (fobj._rec_name,'like',nodename) )
|
||||
for content in self.object.content_ids:
|
||||
if self.object2 or not content.include_name:
|
||||
if content.include_name:
|
||||
test_nodename = self.object2.name + (content.suffix or '') + (content.extension or '')
|
||||
else:
|
||||
test_nodename = (content.suffix or '') + (content.extension or '')
|
||||
if test_nodename.find('/'):
|
||||
test_nodename=test_nodename.replace('/', '_')
|
||||
path = self.path+'/'+test_nodename
|
||||
if not nodename:
|
||||
n = node_class(self.cr, self.uid,path, self.object2, False, content=content, type='content', root=False)
|
||||
res2.append( n)
|
||||
else:
|
||||
if nodename == test_nodename:
|
||||
n = node_class(self.cr, self.uid, path, self.object2, False, content=content, type='content', root=False)
|
||||
res2.append(n)
|
||||
|
||||
ids = fobj.search(self.cr, self.uid, where+[ ('parent_id','=',self.object and self.object.id or False) ], context=self.context)
|
||||
if self.object and self.root and (self.object.type=='ressource'):
|
||||
ids += fobj.search(self.cr, self.uid, where+[ ('parent_id','=',False) ], context=self.context)
|
||||
|
||||
@@ -26,6 +26,7 @@ class file_wrapper(StringIO.StringIO):
|
||||
def close(self, *args, **kwargs):
|
||||
db,pool = pooler.get_db_and_pool(self.dbname)
|
||||
cr = db.cursor()
|
||||
cr.commit()
|
||||
try:
|
||||
val = self.getvalue()
|
||||
val2 = {
|
||||
@@ -49,6 +50,7 @@ class content_wrapper(StringIO.StringIO):
|
||||
def close(self, *args, **kwargs):
|
||||
db,pool = pooler.get_db_and_pool(self.dbname)
|
||||
cr = db.cursor()
|
||||
cr.commit()
|
||||
try:
|
||||
getattr(self.pool.get('document.directory.content'), 'process_write_'+self.node.content.extension[1:])(cr, self.uid, self.node, self.getvalue())
|
||||
finally:
|
||||
@@ -617,7 +619,7 @@ class abstracted_fs:
|
||||
elif self.isfile(path):
|
||||
basedir, filename = os.path.split(path.path)
|
||||
self.lstat(path) # raise exc in case of problems
|
||||
return self.format_list(basedir, [filename])
|
||||
return self.format_list(basedir, [path])
|
||||
|
||||
|
||||
# Ok
|
||||
|
||||
@@ -47,6 +47,12 @@ class hr_timesheet_group(osv.osv):
|
||||
while todo>0:
|
||||
cr.execute("select hour_from,hour_to from hr_timesheet where dayofweek='%s' and tgroup_id=%s order by hour_from", (dt_from.day_of_week,id))
|
||||
for (hour_from,hour_to) in cr.fetchall():
|
||||
|
||||
import math
|
||||
|
||||
hour_from = '%02d:%02d' % (math.floor(abs(hour_from)),round(abs(hour_from)%1+0.01,2) * 60)
|
||||
hour_to = '%02d:%02d' % (math.floor(abs(hour_to)),round(abs(hour_to)%1+0.01,2) * 60)
|
||||
|
||||
h1,m1 = map(int,hour_from.split(':'))
|
||||
h2,m2 = map(int,hour_to.split(':'))
|
||||
d1 = DateTime.DateTime(dt_from.year,dt_from.month,dt_from.day,h1,m1)
|
||||
|
||||
@@ -34,7 +34,7 @@
|
||||
* We have the account templates which can be helpful to generate Charts of Accounts.
|
||||
* On that particular wizard,You will be asked to pass the name of the company,the chart template to follow,the no. of digits to generate the code for your account and Bank account,currency to create Journals.
|
||||
Thus,the pure copy of Chart Template is generated.
|
||||
* This is the same wizard that runs from Financial Managament/Configuration/Financial Accounting/Financial Accounts/Generate Chart of Accounts from a Chart Template.
|
||||
* This is the same wizard that runs from Financial Management/Configuration/Financial Accounting/Financial Accounts/Generate Chart of Accounts from a Chart Template.
|
||||
|
||||
Wizards provided by this module:
|
||||
* Enlist the partners with their related VAT and invoiced amounts.Prepares an XML file format.Path to access : Financial Management/Reporting/Listing of VAT Customers.
|
||||
|
||||
@@ -409,11 +409,15 @@ class project_work(osv.osv):
|
||||
}
|
||||
_order = "date desc"
|
||||
def create(self, cr, uid, vals, *args, **kwargs):
|
||||
if 'hours' in vals and (not vals['hours']):
|
||||
vals['hours'] = 0.00
|
||||
if 'task_id' in vals:
|
||||
cr.execute('update project_task set remaining_hours=remaining_hours - %s where id=%s', (vals.get('hours',0.0), vals['task_id']))
|
||||
return super(project_work,self).create(cr, uid, vals, *args, **kwargs)
|
||||
|
||||
def write(self, cr, uid, ids,vals,context={}):
|
||||
if 'hours' in vals and (not vals['hours']):
|
||||
vals['hours'] = 0.00
|
||||
for work in self.browse(cr, uid, ids, context):
|
||||
cr.execute('update project_task set remaining_hours=remaining_hours - %s + (%s) where id=%s', (vals.get('hours',0.0), work.hours, work.task_id.id))
|
||||
return super(project_work,self).write(cr, uid, ids, vals, context)
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
<field name="model">report.account.analytic.line.to.invoice</field>
|
||||
<field name="type">form</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree string="Analytic Lines to Invoice">
|
||||
<form string="Analytic Lines to Invoice">
|
||||
<field name="name" select="1"/>
|
||||
<field name="account_id" select="1"/>
|
||||
<newline/>
|
||||
@@ -16,7 +16,7 @@
|
||||
<newline/>
|
||||
<field colspan="1" name="amount"/>
|
||||
<field colspan="1" name="unit_amount"/>
|
||||
</tree>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
|
||||
@@ -563,7 +563,7 @@
|
||||
</group>
|
||||
<group col="10" colspan="4">
|
||||
<field name="state" readonly="1"/>
|
||||
<button name="draft_force_assign" states="draft" string="Process Later" type="object"/>
|
||||
<button name="draft_force_assign" states="draft" string="Confirm (Do Not Process Now)" type="object"/>
|
||||
<button name="draft_validate" states="draft" string="Process Now" type="object"/>
|
||||
<button name="action_assign" states="confirmed" string="Check Availability" type="object"/>
|
||||
<button name="force_assign" states="confirmed" string="Force Availability" type="object"/>
|
||||
|
||||
Reference in New Issue
Block a user