[MERGE] saas-4
bzr revid: sle@openerp.com-20140423141323-8rlqxuovo720hbyg
This commit is contained in:
commit
f340fc33ea
|
@ -317,6 +317,7 @@ class event_registration(osv.osv):
|
|||
def confirm_registration(self, cr, uid, ids, context=None):
|
||||
for reg in self.browse(cr, uid, ids, context=context or {}):
|
||||
self.pool.get('event.event').message_post(cr, uid, [reg.event_id.id], body=_('New registration confirmed: %s.') % (reg.name or '', ),subtype="event.mt_event_registration", context=context)
|
||||
self.message_post(cr, uid, reg.id, body=_('Event Registration confirmed.'), context=context)
|
||||
return self.write(cr, uid, ids, {'state': 'open'}, context=context)
|
||||
|
||||
def registration_open(self, cr, uid, ids, context=None):
|
||||
|
|
|
@ -434,6 +434,8 @@
|
|||
<filter string="Partner" domain="[]" context="{'group_by':'partner_id'}"/>
|
||||
<filter string="Event" name="group_event" domain="[]" context="{'group_by':'event_id'}"/>
|
||||
<filter string="Status" domain="[]" context="{'group_by':'state'}"/>
|
||||
<filter string="Registration Day" domain="[]" context="{'group_by': 'create_date:day'}"/>
|
||||
<filter string="Registration Month" domain="[]" context="{'group_by': 'create_date:month'}"/>
|
||||
</group>
|
||||
</search>
|
||||
</field>
|
||||
|
|
|
@ -39,6 +39,17 @@
|
|||
</field>
|
||||
</record>
|
||||
|
||||
<record model="ir.ui.view" id="view_event_registration_ticket_form">
|
||||
<field name="name">event.registration.ticket.form</field>
|
||||
<field name="model">event.registration</field>
|
||||
<field name="inherit_id" ref="event.view_event_registration_form" />
|
||||
<field name="arch" type="xml">
|
||||
<field name="user_id" position="after">
|
||||
<field name="event_ticket_id" domain="[('event_id', '=', event_id)]"/>
|
||||
</field>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record model="ir.ui.view" id="event_sale_product_template_form">
|
||||
<field name="model">product.template</field>
|
||||
<field name="inherit_id" ref="product.product_template_form_view" />
|
||||
|
|
|
@ -32,9 +32,5 @@
|
|||
<field name="header_spacing">35</field>
|
||||
<field name="dpi">90</field>
|
||||
</record>
|
||||
|
||||
<record id="base.main_company" model="res.company">
|
||||
<field name="paperformat_id" ref="paperformat_euro"></field>
|
||||
</record>
|
||||
</data>
|
||||
</openerp>
|
||||
</openerp>
|
||||
|
|
|
@ -19,6 +19,9 @@
|
|||
#
|
||||
##############################################################################
|
||||
|
||||
from functools import partial
|
||||
|
||||
from openerp import SUPERUSER_ID
|
||||
from openerp.osv import osv, fields
|
||||
|
||||
|
||||
|
@ -114,6 +117,24 @@ class res_company(osv.Model):
|
|||
|
||||
_columns = {'paperformat_id': fields.many2one('report.paperformat', 'Paper format')}
|
||||
|
||||
def init(self, cr):
|
||||
# set a default paperformat based on rml one.
|
||||
ref = partial(self.pool['ir.model.data'].xmlid_to_res_id, cr, SUPERUSER_ID)
|
||||
|
||||
ids = self.search(cr, SUPERUSER_ID, [('paperformat_id', '=', False)])
|
||||
for company in self.browse(cr, SUPERUSER_ID, ids):
|
||||
paperformat_id = {
|
||||
'a4': ref('report.paperformat_euro'),
|
||||
'us_letter': ref('report.paperformat_us'),
|
||||
}.get(company.rml_paper_format) or ref('report.paperformat_euro')
|
||||
|
||||
if paperformat_id:
|
||||
company.write({'paperformat_id': paperformat_id})
|
||||
|
||||
sup = super(res_company, self)
|
||||
if hasattr(sup, 'init'):
|
||||
sup.init(cr)
|
||||
|
||||
|
||||
class ir_actions_report(osv.Model):
|
||||
_inherit = 'ir.actions.report.xml'
|
||||
|
|
Loading…
Reference in New Issue