bzr revid: nch@tinyerp.com-20081008060002-36wv9cvd4yhkkk3f
This commit is contained in:
Naresh Choksy 2008-10-08 11:30:02 +05:30
commit de44b0f64a
12 changed files with 48 additions and 40 deletions

View File

@ -165,13 +165,13 @@
<para style="Balance">Balance brought forward</para>
</td>
<td>
<para style="P8"><u>[[ (sum_debit(data)) ]]</u></para>
<para style="P8"><u>[[ (sum_debit(data)) or '0.0' ]]</u></para>
</td>
<td>
<para style="P8"><u>[[ (sum_credit(data)) ]]</u></para>
<para style="P8"><u>[[ (sum_credit(data)) or '0.0' ]]</u></para>
</td>
<td>
<para style="P8"><u>[[ (sum_debit(data) - sum_credit(data)) ]]</u></para>
<para style="P8"><u>[[ (sum_debit(data) - sum_credit(data)) or '0.0' ]]</u></para>
</td>
</tr>
</blockTable>
@ -192,13 +192,13 @@
<para style="total"></para>
</td>
<td>
<para style="P9b"><u>[[ (sum_debit_partner(p,data)) ]]</u></para>
<para style="P9b"><u>[[ (sum_debit_partner(p,data)) or '0.0' ]]</u></para>
</td>
<td>
<para style="P9b"><u>[[ (sum_credit_partner(p,data)) ]]</u></para>
<para style="P9b"><u>[[ (sum_credit_partner(p,data)) or '0.0' ]]</u></para>
</td>
<td>
<para style="P9b"><u>[[ (sum_debit_partner(p,data) - sum_credit_partner(p,data)) ]]</u></para>
<para style="P9b"><u>[[ (sum_debit_partner(p,data) - sum_credit_partner(p,data)) or '0.0' ]]</u></para>
</td>
</tr>
</blockTable>

View File

@ -638,7 +638,8 @@ class account_analytic_account_summary_month(osv.osv):
'month': fields.char('Month', size=25, readonly=True),
}
def init(self, cr):
cr.execute('CREATE OR REPLACE VIEW account_analytic_analysis_summary_month AS (' \
cr.execute('DROP VIEW IF EXISTS account_analytic_analysis_summary_month')
cr.execute('CREATE VIEW account_analytic_analysis_summary_month AS (' \
'SELECT ' \
'(TO_NUMBER(TO_CHAR(d.month, \'YYYYMM\'), \'999999\') + (d.account_id * 1000000))::integer AS id, ' \
'd.account_id AS account_id, ' \

View File

@ -11,7 +11,10 @@
"init_xml" : [],
"description": "Allows the administrator to track every user operations on all objects of the system.",
"category" : "Generic Modules/Others",
"update_xml" : ["audittrail_view.xml"],
"update_xml" : ["audittrail_view.xml",
"security/ir.model.access.csv",
"security/audittrail_security.xml",
],
"demo_xml" : ["audittrail_demo.xml"],
"active" : False,
"installable": True

View File

@ -0,0 +1,10 @@
<?xml version="1.0"?>
<openerp>
<data noupdate="0">
<!-- Set access to menu -->
<record id="menu_action_audittrail" model="ir.ui.menu">
<field eval="[(6,0,[ref('base.group_system')])]" name="groups_id"/>
</record>
</data>
</openerp>

View File

@ -0,0 +1,4 @@
"id","name","model_id:id","group_id:id","perm_read","perm_write","perm_create","perm_unlink"
"access_audittrail_rule_group_system","audittrail rule system","model_audittrail_rule","base.group_system",1,1,1,1
"access_audittrail_log_group_system","audittrail log system","model_audittrail_log","base.group_system",1,1,1,1
"access_audittrail_logline_group_system","audittrail log line system","model_audittrail_log_line","base.group_system",1,1,1,1
1 id name model_id:id group_id:id perm_read perm_write perm_create perm_unlink
2 access_audittrail_rule_group_system audittrail rule system model_audittrail_rule base.group_system 1 1 1 1
3 access_audittrail_log_group_system audittrail log system model_audittrail_log base.group_system 1 1 1 1
4 access_audittrail_logline_group_system audittrail log line system model_audittrail_log_line base.group_system 1 1 1 1

View File

@ -75,17 +75,6 @@
<!-- Views for Partners -->
<record model="ir.ui.view" id="view_partner_tree_inherited1">
<field name="name">Partner tree inherited</field>
<field name="model">res.partner</field>
<field name="inherit_id" ref="base.view_partner_tree"/>
<field name="type">tree</field>
<field name="arch" type="xml">
<field name="address" position="replace">
<field name='address' string='# of Addresses'/>
</field>
</field>
</record>
<record model="ir.ui.view" id="view_partner_form_inherit">
<field name="name">Partner form inherited</field>

View File

@ -52,7 +52,7 @@
<field name="type">tree</field>
<field name="field_parent">child_ids</field>
<field name="arch" type="xml">
<tree string="Directories">
<tree string="Directories" toolbar="1">
<field name="name"/>
<field name="type"/>
<field name="user_id"/>

View File

@ -137,7 +137,7 @@ class event(osv.osv):
#change the description of the registration linked to this event
if 'mail_auto_confirm' in vals:
if vals['mail_auto_confirm']:
if 'mail_confirm' not in vals:
if 'mail_confirm' not in vals:
for eve in self.browse(cr, uid, ids):
vals['mail_confirm'] = eve.mail_confirm
else:
@ -203,18 +203,20 @@ class event_registration(osv.osv):
return True
def create(self, cr, uid, *args, **argv):
args[0]['section_id']= self.pool.get('event.event').browse(cr, uid, args[0]['event_id'], None).section_id.id
args[0]['date_deadline']= self.pool.get('event.event').browse(cr, uid, args[0]['event_id'], None).date_begin
args[0]['description']= self.pool.get('event.event').browse(cr, uid, args[0]['event_id'], None).mail_confirm
event = self.pool.get('event.event').browse(cr, uid, args[0]['event_id'], None)
args[0]['section_id']= event.section_id.id
args[0]['date_deadline']= event.date_begin
args[0]['description']= event.mail_confirm
res = super(event_registration, self).create(cr, uid, *args, **argv)
self._history(cr, uid,self.browse(cr, uid, [res]), 'Created', history=True)
return res
def write(self, cr, uid, *args, **argv):
if 'event_id' in args[1]:
args[1]['section_id']= self.pool.get('event.event').browse(cr, uid, args[1]['event_id'], None).section_id.id
args[1]['date_deadline']= self.pool.get('event.event').browse(cr, uid, args[1]['event_id'], None).date_begin
args[1]['description']= self.pool.get('event.event').browse(cr, uid, args[1]['event_id'], None).mail_confirm
event = self.pool.get('event.event').browse(cr, uid, args[1]['event_id'], None)
args[1]['section_id']= event.section_id.id
args[1]['date_deadline']= event.date_begin
args[1]['description']= event.mail_confirm
return super(event_registration, self).write(cr, uid, *args, **argv)
def mail_user_confirm(self,cr,uid,ids):
@ -242,7 +244,7 @@ class event_registration(osv.osv):
if reg_id.event_id.state in ['draft', 'fixed', 'open','confirm','running'] and reg_id.event_id.mail_auto_registr:
tools.email_send(src, dest,'Auto Registration: '+'['+str(reg_id.id)+']'+' '+reg_id.name, reg_id.event_id.mail_registr, tinycrm = str(reg_id.case_id.id))
if (reg_id.event_id.state in ['confirm','running']) and reg_id.event_id.mail_auto_confirm:
tools.email_send(src, dest,'Auto Confirmation: '+'['+str(reg_id.id)+']'+' '+reg_id.name, reg_id.event_id.description, tinycrm = str(reg_id.case_id.id))
tools.email_send(src, dest,'Auto Confirmation: '+'['+str(reg_id.id)+']'+' '+reg_id.name, reg_id.event_id.mail_confirm, tinycrm = str(reg_id.case_id.id))
if not src:
raise osv.except_osv(_('Error!'), _('You must define a reply-to address in order to mail the participant. You can do this in the Mailing tab of your event. Note that this is also the place where you can configure your event to not send emails automaticly while registering'))
return False
@ -286,8 +288,9 @@ class event_registration(osv.osv):
data['badge_title'] = contact_id.title
if partner:
partner_addresses = self.pool.get('res.partner.address').search(cr, uid, [('partner_id','=',partner)])
job_id = self.pool.get('res.partner.job').search(cr, uid, [('contact_id','=',contact),('address_id','in',partner_addresses)])[0]
data['email_from'] = self.pool.get('res.partner.job').browse(cr, uid, job_id).email
job_ids = self.pool.get('res.partner.job').search(cr, uid, [('contact_id','=',contact),('address_id','in',partner_addresses)])
if job_ids:
data['email_from'] = self.pool.get('res.partner.job').browse(cr, uid, job_ids[0]).email
d = self.onchange_badge_name(cr, uid, ids,data['badge_name'])
data.update(d['value'])
@ -309,7 +312,7 @@ class event_registration(osv.osv):
return {'value':{'unit_price' : False,'invoice_label' : False}}
def onchange_partner_id(self, cr, uid, ids, part, event_id):
def onchange_partner_id(self, cr, uid, ids, part, event_id, email=False):
data={}
data['badge_partner'] = data['contact_id'] = data['partner_invoice_id'] = data['email_from'] = data['badge_title'] = data['badge_name'] = False
if not part:

View File

@ -203,7 +203,10 @@
<group col="6" colspan="4">
<field name="event_id" select="1" on_change="onchange_event(event_id, partner_invoice_id)" domain="[('state','in',('draft','confirm'))]"/>
<field name="nb_register"/>
<field name="user_id" select="1"/>
<group colspan="2">
<field name="user_id" select="1"/>
<button name="remind_user" string="Send Reminder" states="open,pending" type="object" colspan="2"/>
</group>
<field name="partner_id" required="1" select="1" on_change="onchange_partner_id(partner_id,event_id)" />
<field name="partner_invoice_id" on_change="onchange_partner_invoice_id(event_id, partner_invoice_id)"/>
<field name="unit_price" select="2"/>
@ -213,7 +216,6 @@
<field name="contact_id" select="2" on_change="onchange_contact_id(contact_id, partner_id)" /><newline/>
<field name="email_from" select="2"/>
<button name="remind_partner" string="Send Reminder" states="open,pending" type="object" colspan="2"/>
<button name="remind_user" string="Send Reminder" states="open,pending" type="object" colspan="2"/>
<newline/>
<separator string="Badge" colspan="4"/>
<field name="badge_title" select="2"/>

View File

@ -45,7 +45,7 @@ def _confirm(self, cr, uid, data, context):
current_registration = registration_obj.browse(cr, uid, [data['id']])[0]
total_confirmed = current_registration.event_id.register_current + current_registration.nb_register
if total_confirmed <= current_registration.event_id.register_max:
if total_confirmed <= current_registration.event_id.register_max or current_registration.event_id.register_max == 0:
return 'confirm'
return 'split'
@ -53,7 +53,6 @@ def _confirm(self, cr, uid, data, context):
def _check_confirm(self, cr, uid, data, context):
registration_obj = pooler.get_pool(cr.dbname).get('event.registration')
registration_obj.write(cr, uid, [data['id']], {'state':'open',})
reg = registration_obj.browse(cr, uid, [data['id']])
registration_obj._history(cr, uid, reg, 'Open', history=True)
registration_obj.mail_user(cr,uid,[data['id']])
return {}

View File

@ -255,9 +255,8 @@
<field name="field_parent">bom_lines</field>
<field name="arch" type="xml">
<tree string="BoM Structure">
<field name="name"/>
<field name="code"/>
<field name="product_id"/>
<field name="code"/>
<field name="product_qty"/>
<field name="product_uom"/>
<field name="date_start"/>

View File

@ -57,9 +57,7 @@
<field name="view_mode">tree,graph</field>
</record>
<menuitem action="action_account_analytic_line_to_invoice" id="account_analytic_lines_to_invoice_report" parent="account.next_id_42"/>
<act_window domain="[('product_id', '=', active_id)]" id="act_product_product_2_report_acc_analytic_line_to_invoice" name="Analytic Lines to Invoice" res_model="report.account.analytic.line.to.invoice" src_model="product.product"/>
<act_window domain="[('account_id', '=', active_id),('invoice_id','=',False),('to_invoice','&lt;&gt;',False)]" id="act_acc_analytic_acc_2_report_acc_analytic_line_to_invoice" name="Lines to Invoice" res_model="account.analytic.line" src_model="account.analytic.account"/>
</data>