'note': fields.text('Description'),
'working_hours': fields.float('Working Hours', digits=(16, 2)),
'stage_ids': fields.many2many('crm.case.stage', 'section_stage_rel', 'section_id', 'stage_id', 'Stages'),
- 'alias_id': fields.many2one('mail.alias', 'Alias', ondelete="cascade", required=True,
+ 'alias_id': fields.many2one('mail.alias', 'Alias', ondelete="restrict", required=True,
help="The email address associated with this team. New emails received will automatically "
"create new leads assigned to the team."),
- 'open_lead_ids': fields.one2many('crm.lead', 'section_id',
- string='Open Leads', readonly=True,
- domain=['&', ('type', '!=', 'opportunity'), ('state', 'not in', ['done', 'cancel'])]),
- 'open_opportunity_ids': fields.one2many('crm.lead', 'section_id',
- string='Open Opportunities', readonly=True,
- domain=['&', '|', ('type', '=', 'opportunity'), ('type', '=', 'both'), ('state', 'not in', ['done', 'cancel'])]),
'color': fields.integer('Color Index'),
'use_leads': fields.boolean('Leads',
- help="This enables the management of leads in the sales team. Otherwise the sales team manages only opportunities."),
+ help="The first contact you get with a potential customer is a lead you qualify before converting it into a real business opportunity. Check this box to manage leads in this sales team."),
+
+ 'monthly_open_leads': fields.function(_get_opportunities_data,
+ type="string", readonly=True, multi='_get_opportunities_data',
+ string='Open Leads per Month'),
+ 'monthly_planned_revenue': fields.function(_get_opportunities_data,
+ type="string", readonly=True, multi='_get_opportunities_data',
+ string='Planned Revenue per Month')
}
def _get_stage_common(self, cr, uid, context):
_inherits = {'mail.alias': 'alias_id'}
_columns = {
- 'alias_id': fields.many2one('mail.alias', 'Alias', ondelete="cascade", required=True,
+ 'alias_id': fields.many2one('mail.alias', 'Alias', ondelete="restrict", required=True,
help="Email address internally associated with this user. Incoming "\
"emails will appear in the user's notifications."),
+ 'display_groups_suggestions': fields.boolean("Display Groups Suggestions"),
}
_defaults = {
};
this.custom_payment_status = this.default_payment_status;
- this.connection = new instance.web.JsonRPC();
- this.connection.setup(url);
+ this.connection = new instance.web.Session(undefined,url);
-
+ this.connection.session_id = _.uniqueId('posproxy');
this.bypass_proxy = false;
this.notifications = {};
// The barcode readers acts as a keyboard, we catch all keyup events and try to find a
// barcode sequence in the typed keys, then act accordingly.
- $('body').delegate('','keyup', function (e){
- this.handler = function(e){
++ $('body').delegate('','keypress', function (e){
+ //console.log('keyup:'+String.fromCharCode(e.keyCode)+' '+e.keyCode,e);
//We only care about numbers
- if (e.which >= 48 && e.which < 58){
+ if (e.keyCode >= 48 && e.keyCode < 58){
// The barcode reader sends keystrokes with a specific interval.
// We look if the typed keys fit in the interval.
<field eval="[(6,0,[])]" name="transition_ids"/>
<field eval=""""Procurement Task"""" name="name"/>
<field eval=""""if product type is 'service' then it creates the task."""" name="note"/>
- <field model="process.node" name="target_node_id" ref="process_node_procuretasktask0"/>
- <field model="process.node" name="source_node_id" ref="sale_stock.process_node_saleprocurement0"/>
+ <field name="target_node_id" ref="process_node_procuretasktask0"/>
- <field name="source_node_id" ref="sale_stock.process_node_saleprocurement0"/>
++ <field name="source_node_id" ref="mrp.process_node_productionorder0"/>
</record>
<record id="process_transition_createtask0" model="process.transition">