[MERGE] merge from lp:~openerp-commiter/openobject-addons/ergonomy-search-views
bzr revid: hmo@tinyerp.com-20091230123242-a4bvd12vbd6afwds
This commit is contained in:
commit
625e67df3b
|
@ -380,9 +380,9 @@ class account_move_line(osv.osv):
|
|||
'balance': fields.function(_balance, fnct_search=_balance_search, method=True, string='Balance'),
|
||||
'state': fields.selection([('draft','Draft'), ('valid','Valid')], 'State', readonly=True,
|
||||
help='When new move line is created the state will be \'Draft\'.\n* When all the payments are done it will be in \'Valid\' state.'),
|
||||
'tax_code_id': fields.many2one('account.tax.code', 'Tax Account', help="The Account can either be a base tax code or tax code account."),
|
||||
'tax_amount': fields.float('Tax/Base Amount', digits=(16,int(tools.config['price_accuracy'])), select=True, help="If the Tax account is a tax code account, this field will contain the taxed amount.If the tax account is base tax code,\
|
||||
this field will contain the basic amount(without tax)."),
|
||||
'tax_code_id': fields.many2one('account.tax.code', 'Tax Account', help="The Account can either be a base tax code or a tax code account."),
|
||||
'tax_amount': fields.float('Tax/Base Amount', digits=(16,int(tools.config['price_accuracy'])), select=True, help="If the Tax account is a tax code account, this field will contain the taxed amount.If the tax account is base tax code, "\
|
||||
"this field will contain the basic amount(without tax)."),
|
||||
'invoice': fields.function(_invoice, method=True, string='Invoice',
|
||||
type='many2one', relation='account.invoice', fnct_search=_invoice_search),
|
||||
'account_tax_id':fields.many2one('account.tax', 'Tax'),
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
##############################################################################
|
||||
#
|
||||
#
|
||||
# OpenERP, Open Source Management Solution
|
||||
# Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>).
|
||||
#
|
||||
|
@ -15,7 +15,7 @@
|
|||
# GNU Affero General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU Affero General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
##############################################################################
|
||||
|
||||
|
@ -102,17 +102,17 @@ class report_creator(osv.osv):
|
|||
set_dict[f.calendar_mode] = 'field'+str(i)
|
||||
i+=1
|
||||
del required_types[required_types.index(f.calendar_mode)]
|
||||
|
||||
|
||||
else:
|
||||
temp_list.append('''<field name="%(name)s" select="1"/>''' % {'name':'field'+str(i)})
|
||||
i+=1
|
||||
arch += '''<%(view_type)s string="%(string)s" date_start="%(date_start)s" ''' %set_dict
|
||||
if set_dict.get('date_delay',False):
|
||||
arch +=''' date_delay="%(date_delay)s" '''%set_dict
|
||||
|
||||
|
||||
if set_dict.get('date_stop',False):
|
||||
arch +=''' date_stop="%(date_stop)s" '''%set_dict
|
||||
|
||||
arch +=''' date_stop="%(date_stop)s" '''%set_dict
|
||||
|
||||
if set_dict.get('color',False):
|
||||
arch +=''' color="%(color)s"'''%set_dict
|
||||
arch += '''>'''
|
||||
|
@ -151,12 +151,12 @@ class report_creator(osv.osv):
|
|||
for k in r:
|
||||
r[k] = r[k] or False
|
||||
field_dict = fields_get.get(k)
|
||||
field_type = field_dict and field_dict.get('type',False) or False
|
||||
field_type = field_dict and field_dict.get('type',False) or False
|
||||
if field_type and field_type == 'many2one':
|
||||
if r[k]==False:
|
||||
continue
|
||||
related_name = self.pool.get(field_dict.get('relation')).name_get(cr,user,[r[k]],context)[0]
|
||||
r[k] = related_name
|
||||
r[k] = related_name
|
||||
return res
|
||||
|
||||
def search(self, cr, user, args, offset=0, limit=None, order=None, context=None, count=False):
|
||||
|
@ -196,9 +196,9 @@ class report_creator(osv.osv):
|
|||
from_list = []
|
||||
where_list = []
|
||||
filter_list = []
|
||||
for model in models:
|
||||
for model in models:
|
||||
model_dict[model.model] = self.pool.get(model.model)._table
|
||||
|
||||
|
||||
model_list = model_dict.keys()
|
||||
reference_model_dict = {}
|
||||
for model in model_dict:
|
||||
|
@ -207,9 +207,9 @@ class report_creator(osv.osv):
|
|||
rest_list.remove(model)
|
||||
model_pool = self.pool.get(model)
|
||||
fields_get = model_pool.fields_get(cr,uid)
|
||||
fields_filter = dict(filter(lambda x:x[1].get('relation',False)
|
||||
and x[1].get('relation') in rest_list
|
||||
and x[1].get('type')=='many2one'
|
||||
fields_filter = dict(filter(lambda x:x[1].get('relation',False)
|
||||
and x[1].get('relation') in rest_list
|
||||
and x[1].get('type')=='many2one'
|
||||
and not (isinstance(model_pool._columns[x[0]],fields.function) or isinstance(model_pool._columns[x[0]],fields.related) or isinstance(model_pool._columns[x[0]],fields.dummy)), fields_get.items()))
|
||||
if fields_filter:
|
||||
model in model_list and model_list.remove(model)
|
||||
|
@ -225,30 +225,30 @@ class report_creator(osv.osv):
|
|||
reference_model_dict[v.get('relation')] = relation_count+1
|
||||
else:
|
||||
reference_model_dict[v.get('relation')]=1
|
||||
|
||||
|
||||
str_where = model_dict.get(model)+"."+ k + "=" + model_dict.get(v.get('relation'))+'.id'
|
||||
where_list.append(str_where)
|
||||
if reference_model_dict:
|
||||
self.model_set_id = model_dict.get(reference_model_dict.keys()[reference_model_dict.values().index(min(reference_model_dict.values()))])
|
||||
if model_list and not len(model_dict.keys()) == 1:
|
||||
raise osv.except_osv(_('No Related Models!!'),_('These is/are model(s) (%s) in selection which is/are not related to any other model') % ','.join(model_list))
|
||||
|
||||
|
||||
if filter_ids and where_list<>[]:
|
||||
filter_list.append(' and ')
|
||||
filter_list.append(' ')
|
||||
|
||||
|
||||
for filter_id in filter_ids:
|
||||
filter_list.append(filter_id.expression)
|
||||
filter_list.append(' ')
|
||||
filter_list.append(filter_id.condition)
|
||||
|
||||
|
||||
if len(from_list) == 1 and filter_ids:
|
||||
from_list.append(' ')
|
||||
ret_str = "\n where \n".join(from_list)
|
||||
else:
|
||||
ret_str = ",\n".join(from_list)
|
||||
|
||||
|
||||
|
||||
|
||||
if where_list:
|
||||
ret_str+="\n where \n"+" and\n".join(where_list)
|
||||
ret_str = ret_str.strip()
|
||||
|
@ -283,7 +283,7 @@ class report_creator(osv.osv):
|
|||
check = self._id_get(cr, uid, ids[0], context)
|
||||
if check<>False:
|
||||
fields.insert(0,(check+' as id'))
|
||||
|
||||
|
||||
if models:
|
||||
result[obj.id] = """select
|
||||
%s
|
||||
|
@ -301,7 +301,7 @@ class report_creator(osv.osv):
|
|||
else:
|
||||
result[obj.id] = False
|
||||
return result
|
||||
|
||||
|
||||
_columns = {
|
||||
'name': fields.char('Report Name',size=64, required=True),
|
||||
'type': fields.selection([('list','Rows And Columns Report'),], 'Report Type',required=True),#('sum','Summation Report')
|
||||
|
@ -314,7 +314,12 @@ class report_creator(osv.osv):
|
|||
'model_ids': fields.many2many('ir.model', 'base_report_creator_report_model_rel', 'report_id','model_id', 'Reported Objects'),
|
||||
'field_ids': fields.one2many('base_report_creator.report.fields', 'report_id', 'Fields to Display'),
|
||||
'filter_ids': fields.one2many('base_report_creator.report.filter', 'report_id', 'Filters'),
|
||||
'state': fields.selection([('draft','Draft'),('valid','Valid')], 'State', required=True),
|
||||
'state': fields.selection([
|
||||
('draft','Draft'),
|
||||
('valid','Valid')],
|
||||
'State', required=True,
|
||||
help=' * The \'Draft\' state is used when a user is encoding a new and unconfirmed custom report. \
|
||||
\n* The \'Valid\' state is used when user validates the custom report.'),
|
||||
'sql_query': fields.function(_sql_query_get, method=True, type="text", string='SQL Query', store=True),
|
||||
'group_ids': fields.many2many('res.groups', 'base_report_creator_group_rel','report_id','group_id','Authorized Groups'),
|
||||
}
|
||||
|
@ -333,26 +338,26 @@ class report_creator(osv.osv):
|
|||
for fld in obj.field_ids:
|
||||
model_column = self.pool.get(fld.field_id.model)._columns[fld.field_id.name]
|
||||
if (isinstance(model_column,fields.function) or isinstance(model_column,fields.related)) and not model_column.store:
|
||||
return False
|
||||
return False
|
||||
return True
|
||||
|
||||
|
||||
def _aggregation_error(self, cr, uid, ids):
|
||||
aggregate_columns = ('integer','float')
|
||||
apply_functions = ('sum','min','max','avg','count')
|
||||
this_objs = self.browse(cr, uid, ids)
|
||||
for obj in this_objs:
|
||||
for fld in obj.field_ids:
|
||||
model_column = self.pool.get(fld.field_id.model)._columns[fld.field_id.name]
|
||||
model_column = self.pool.get(fld.field_id.model)._columns[fld.field_id.name]
|
||||
if model_column._type not in aggregate_columns and fld.group_method in apply_functions:
|
||||
return False
|
||||
return False
|
||||
return True
|
||||
|
||||
|
||||
def _calander_view_error(self, cr, uid, ids):
|
||||
# required_types = ['date_start','date_delay','color']
|
||||
# required_types = ['date_start','date_delay','color']
|
||||
required_types = []
|
||||
this_objs = self.browse(cr, uid, ids)
|
||||
for obj in this_objs:
|
||||
if obj.view_type1=='calendar' or obj.view_type2=='calendar' or obj.view_type3=='calendar':
|
||||
if obj.view_type1=='calendar' or obj.view_type2=='calendar' or obj.view_type3=='calendar':
|
||||
for fld in obj.field_ids:
|
||||
model_column = self.pool.get(fld.field_id.model)._columns[fld.field_id.name]
|
||||
if fld.calendar_mode in ('date_start','date_end') and model_column._type not in ('date','datetime'):
|
||||
|
@ -362,9 +367,9 @@ class report_creator(osv.osv):
|
|||
else:
|
||||
required_types.append(fld.calendar_mode)
|
||||
if 'date_start' not in required_types:
|
||||
return False
|
||||
return False
|
||||
return True
|
||||
|
||||
|
||||
_constraints = [
|
||||
(_function_field, 'You can not display field which are not stored in Database.', ['field_ids']),
|
||||
(_aggregation_error, 'You can apply aggregate function to the non calculated field.', ['field_ids']),
|
||||
|
|
|
@ -23,6 +23,13 @@ import crm
|
|||
import crm_segmentation
|
||||
import crm_meeting
|
||||
import crm_config
|
||||
import crm_lead
|
||||
import crm_phonecall
|
||||
import crm_opportunity
|
||||
import crm_claim
|
||||
import crm_fundraising
|
||||
import crm_job
|
||||
import crm_helpdesk
|
||||
|
||||
import report
|
||||
import wizard
|
||||
|
|
|
@ -48,23 +48,37 @@ between mails and Open ERP.""",
|
|||
'caldav',
|
||||
'process'
|
||||
],
|
||||
'init_xml': ['crm_data.xml', 'crm_meeting_data.xml'
|
||||
'init_xml': ['crm_data.xml',
|
||||
'crm_meeting_data.xml',
|
||||
'crm_claims_data.xml',
|
||||
'crm_fund_data.xml',
|
||||
'crm_helpdesk_data.xml',
|
||||
'crm_jobs_data.xml',
|
||||
'crm_lead_data.xml',
|
||||
'crm_meeting_data.xml',
|
||||
'crm_opportunity_data.xml',
|
||||
'crm_phonecall_data.xml',
|
||||
],
|
||||
'update_xml': [
|
||||
'crm_wizard.xml',
|
||||
'crm_configuration_wizard.xml',
|
||||
'crm_view.xml',
|
||||
'crm_config_view.xml',
|
||||
'crm_bugs_view.xml',
|
||||
'crm_jobs_view.xml',
|
||||
'crm_lead_view.xml',
|
||||
'crm_jobs_menu.xml',
|
||||
'crm_lead_view.xml',
|
||||
'crm_lead_menu.xml',
|
||||
'crm_meeting_wizard.xml',
|
||||
'crm_meeting_view.xml',
|
||||
'crm_meeting_menu.xml',
|
||||
'crm_opportunity_view.xml',
|
||||
'crm_opportunity_menu.xml',
|
||||
'crm_fund_view.xml',
|
||||
'crm_fund_menu.xml',
|
||||
'crm_claims_view.xml',
|
||||
'crm_claims_menu.xml',
|
||||
'crm_phonecall_view.xml',
|
||||
'crm_phonecall_menu.xml',
|
||||
'crm_report_view.xml',
|
||||
'crm_helpdesk_view.xml',
|
||||
'crm_report.xml',
|
||||
|
@ -72,7 +86,17 @@ between mails and Open ERP.""",
|
|||
'security/ir.model.access.csv',
|
||||
'process/crm_configuration_process.xml'
|
||||
],
|
||||
'demo_xml': ['crm_demo.xml', 'crm_meeting_demo.xml'],
|
||||
'demo_xml': [
|
||||
'crm_demo.xml',
|
||||
'crm_meeting_demo.xml',
|
||||
'crm_claims_demo.xml',
|
||||
'crm_fund_demo.xml',
|
||||
'crm_helpdesk_demo.xml',
|
||||
'crm_jobs_demo.xml',
|
||||
'crm_lead_demo.xml',
|
||||
'crm_meeting_demo.xml',
|
||||
'crm_opportunity_demo.xml',
|
||||
'crm_phonecall_demo.xml'],
|
||||
'installable': True,
|
||||
'active': False,
|
||||
'certificate': '0079056041421',
|
||||
|
|
|
@ -0,0 +1,66 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
##############################################################################
|
||||
#
|
||||
# OpenERP, Open Source Management Solution
|
||||
# Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>).
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU Affero General Public License as
|
||||
# published by the Free Software Foundation, either version 3 of the
|
||||
# License, or (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU Affero General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU Affero General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
##############################################################################
|
||||
|
||||
import tools
|
||||
from osv import fields, osv
|
||||
import os
|
||||
import pooler
|
||||
import netsvc
|
||||
from tools.translate import _
|
||||
|
||||
class crm_claim(osv.osv):
|
||||
_name = "crm.claim"
|
||||
_description = "Claim Cases"
|
||||
_order = "id desc"
|
||||
_inherits = {'crm.case':"inherit_case_id"}
|
||||
_columns = {
|
||||
'inherit_case_id': fields.many2one('crm.case','Case',ondelete='cascade'),
|
||||
}
|
||||
def _map_ids(self, method, cr, uid, ids, *args, **argv):
|
||||
case_data = self.browse(cr, uid, ids)
|
||||
new_ids = []
|
||||
for case in case_data:
|
||||
if case.inherit_case_id:
|
||||
new_ids.append(case.inherit_case_id.id)
|
||||
return getattr(self.pool.get('crm.case'),method)(cr, uid, new_ids, *args, **argv)
|
||||
|
||||
|
||||
def onchange_case_id(self, cr, uid, ids, *args, **argv):
|
||||
return self._map_ids('onchange_case_id',cr,uid,ids,*args,**argv)
|
||||
def onchange_partner_id(self, cr, uid, ids, *args, **argv):
|
||||
return self._map_ids('onchange_partner_id',cr,uid,ids,*args,**argv)
|
||||
def onchange_partner_address_id(self, cr, uid, ids, *args, **argv):
|
||||
return self._map_ids('onchange_partner_address_id',cr,uid,ids,*args,**argv)
|
||||
def onchange_categ_id(self, cr, uid, ids, *args, **argv):
|
||||
return self._map_ids('onchange_categ_id',cr,uid,ids,*args,**argv)
|
||||
def case_close(self,cr, uid, ids, *args, **argv):
|
||||
return self._map_ids('case_close',cr,uid,ids,*args,**argv)
|
||||
def case_open(self,cr, uid, ids, *args, **argv):
|
||||
return self._map_ids('case_open',cr,uid,ids,*args,**argv)
|
||||
def case_cancel(self,cr, uid, ids, *args, **argv):
|
||||
return self._map_ids('case_cancel',cr,uid,ids,*args,**argv)
|
||||
def case_reset(self,cr, uid, ids, *args, **argv):
|
||||
return self._map_ids('case_reset',cr,uid,ids,*args,**argv)
|
||||
def case_escalate(self,cr, uid, ids, *args, **argv):
|
||||
return self._map_ids('case_escalate',cr,uid,ids,*args,**argv)
|
||||
def case_pending(self,cr, uid, ids, *args, **argv):
|
||||
return self._map_ids('case_pending',cr,uid,ids,*args,**argv)
|
||||
crm_claim()
|
|
@ -1,54 +1,6 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<openerp>
|
||||
<data>
|
||||
|
||||
<!-- configartion view -->
|
||||
|
||||
<record id="view_config_crm_menu" model="ir.ui.view">
|
||||
<field name="name">Configure Menu for Sections</field>
|
||||
<field name="model">crm.menu.config_wizard</field>
|
||||
<field name="type">form</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Configure CRM Sections">
|
||||
<separator colspan="4" string="Install Pre-Configured Features"/>
|
||||
<label colspan="4" align="0.0" string="The CRM module of OpenERP is able to manage any kind of relationship. But, as to help you to start quickly on the system, we configured a few of them for you."/>
|
||||
<newline/>
|
||||
<field name="meeting"/>
|
||||
<field name="opportunity"/>
|
||||
<field name="phonecall"/>
|
||||
<field name="lead"/>
|
||||
<field name="claims"/>
|
||||
<field name="bugs"/>
|
||||
<field name="helpdesk"/>
|
||||
<field name="jobs"/>
|
||||
<field name="fund"/>
|
||||
<separator colspan="4" string="Calendar Sharing"/>
|
||||
<field name="document_ics"/>
|
||||
<newline/>
|
||||
<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"/>
|
||||
</group>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="action_view_config_crm_menu" model="ir.actions.act_window">
|
||||
<field name="name">Configure Menu for CRM case Section</field>
|
||||
<field name="type">ir.actions.act_window</field>
|
||||
<field name="res_model">crm.menu.config_wizard</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_mode">form</field>
|
||||
<field name="target">new</field>
|
||||
</record>
|
||||
|
||||
<!-- register configuration wizard -->
|
||||
<record id="config_wizard_step_case_section_menu" model="ir.actions.todo">
|
||||
<field name="name">Create Menu for CRM Case Section</field>
|
||||
<field name="note">This Configuration step use to create Menu for Case Sections</field>
|
||||
<field name="action_id" ref="action_view_config_crm_menu"/>
|
||||
</record>
|
||||
|
||||
<!-- graph view -->
|
||||
<record model="ir.ui.view" id="crm_case_graph_view_stage_cost">
|
||||
<field name="name">CRM -Graph</field>
|
||||
|
|
|
@ -0,0 +1,73 @@
|
|||
#-*- coding: utf-8 -*-
|
||||
##############################################################################
|
||||
#
|
||||
# OpenERP, Open Source Management Solution
|
||||
# Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>).
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU Affero General Public License as
|
||||
# published by the Free Software Foundation, either version 3 of the
|
||||
# License, or (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU Affero General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU Affero General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
##############################################################################
|
||||
|
||||
import time
|
||||
import re
|
||||
import os
|
||||
|
||||
import mx.DateTime
|
||||
import base64
|
||||
|
||||
from tools.translate import _
|
||||
|
||||
import tools
|
||||
from osv import fields,osv,orm
|
||||
from osv.orm import except_orm
|
||||
|
||||
class crm_fundraising(osv.osv):
|
||||
_name = "crm.fundraising"
|
||||
_description = "Fund Raising Cases"
|
||||
_order = "id desc"
|
||||
_inherits = {'crm.case':"inherit_case_id"}
|
||||
_columns = {
|
||||
'inherit_case_id': fields.many2one('crm.case','Case',ondelete='cascade'),
|
||||
}
|
||||
def _map_ids(self, method, cr, uid, ids, *args, **argv):
|
||||
case_data = self.browse(cr, uid, ids)
|
||||
new_ids = []
|
||||
for case in case_data:
|
||||
if case.inherit_case_id:
|
||||
new_ids.append(case.inherit_case_id.id)
|
||||
return getattr(self.pool.get('crm.case'),method)(cr, uid, new_ids, *args, **argv)
|
||||
|
||||
|
||||
def onchange_case_id(self, cr, uid, ids, *args, **argv):
|
||||
return self._map_ids('onchange_case_id',cr,uid,ids,*args,**argv)
|
||||
def onchange_partner_id(self, cr, uid, ids, *args, **argv):
|
||||
return self._map_ids('onchange_partner_id',cr,uid,ids,*args,**argv)
|
||||
def onchange_partner_address_id(self, cr, uid, ids, *args, **argv):
|
||||
return self._map_ids('onchange_partner_address_id',cr,uid,ids,*args,**argv)
|
||||
def onchange_categ_id(self, cr, uid, ids, *args, **argv):
|
||||
return self._map_ids('onchange_categ_id',cr,uid,ids,*args,**argv)
|
||||
def case_close(self,cr, uid, ids, *args, **argv):
|
||||
return self._map_ids('case_close',cr,uid,ids,*args,**argv)
|
||||
def case_open(self,cr, uid, ids, *args, **argv):
|
||||
return self._map_ids('case_open',cr,uid,ids,*args,**argv)
|
||||
def case_cancel(self,cr, uid, ids, *args, **argv):
|
||||
return self._map_ids('case_cancel',cr,uid,ids,*args,**argv)
|
||||
def case_reset(self,cr, uid, ids, *args, **argv):
|
||||
return self._map_ids('case_reset',cr,uid,ids,*args,**argv)
|
||||
def case_escalate(self,cr, uid, ids, *args, **argv):
|
||||
return self._map_ids('case_escalate',cr,uid,ids,*args,**argv)
|
||||
def case_pending(self,cr, uid, ids, *args, **argv):
|
||||
return self._map_ids('case_pending',cr,uid,ids,*args,**argv)
|
||||
|
||||
crm_fundraising()
|
|
@ -0,0 +1,73 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
##############################################################################
|
||||
#
|
||||
# OpenERP, Open Source Management Solution
|
||||
# Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>).
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU Affero General Public License as
|
||||
# published by the Free Software Foundation, either version 3 of the
|
||||
# License, or (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU Affero General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU Affero General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
##############################################################################
|
||||
|
||||
import time
|
||||
import re
|
||||
import os
|
||||
|
||||
import mx.DateTime
|
||||
import base64
|
||||
|
||||
from tools.translate import _
|
||||
|
||||
import tools
|
||||
from osv import fields,osv,orm
|
||||
from osv.orm import except_orm
|
||||
|
||||
class crm_helpdesk(osv.osv):
|
||||
_name = "crm.helpdesk"
|
||||
_description = "Helpdesk Cases"
|
||||
_order = "id desc"
|
||||
_inherits = {'crm.case':"inherit_case_id"}
|
||||
_columns = {
|
||||
'inherit_case_id':fields.many2one('crm.case','Case'),
|
||||
}
|
||||
|
||||
def _map_ids(self, method, cr, uid, ids, *args, **argv):
|
||||
case_data = self.browse(cr, uid, ids)
|
||||
new_ids = []
|
||||
for case in case_data:
|
||||
if case.inherit_case_id:
|
||||
new_ids.append(case.inherit_case_id.id)
|
||||
return getattr(self.pool.get('crm.case'),method)(cr, uid, new_ids, *args, **argv)
|
||||
|
||||
|
||||
def onchange_case_id(self, cr, uid, ids, *args, **argv):
|
||||
return self._map_ids('onchange_case_id',cr,uid,ids,*args,**argv)
|
||||
def onchange_partner_id(self, cr, uid, ids, *args, **argv):
|
||||
return self._map_ids('onchange_partner_id',cr,uid,ids,*args,**argv)
|
||||
def onchange_partner_address_id(self, cr, uid, ids, *args, **argv):
|
||||
return self._map_ids('onchange_partner_address_id',cr,uid,ids,*args,**argv)
|
||||
def onchange_categ_id(self, cr, uid, ids, *args, **argv):
|
||||
return self._map_ids('onchange_categ_id',cr,uid,ids,*args,**argv)
|
||||
def case_close(self,cr, uid, ids, *args, **argv):
|
||||
return self._map_ids('case_close',cr,uid,ids,*args,**argv)
|
||||
def case_open(self,cr, uid, ids, *args, **argv):
|
||||
return self._map_ids('case_open',cr,uid,ids,*args,**argv)
|
||||
def case_cancel(self,cr, uid, ids, *args, **argv):
|
||||
return self._map_ids('case_cancel',cr,uid,ids,*args,**argv)
|
||||
def case_reset(self,cr, uid, ids, *args, **argv):
|
||||
return self._map_ids('case_reset',cr,uid,ids,*args,**argv)
|
||||
|
||||
|
||||
|
||||
crm_helpdesk()
|
||||
|
|
@ -0,0 +1,67 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
##############################################################################
|
||||
#
|
||||
# OpenERP, Open Source Management Solution
|
||||
# Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>).
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU Affero General Public License as
|
||||
# published by the Free Software Foundation, either version 3 of the
|
||||
# License, or (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU Affero General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU Affero General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
##############################################################################
|
||||
|
||||
import time
|
||||
import re
|
||||
import os
|
||||
|
||||
import mx.DateTime
|
||||
import base64
|
||||
|
||||
from tools.translate import _
|
||||
|
||||
import tools
|
||||
from osv import fields,osv,orm
|
||||
from osv.orm import except_orm
|
||||
class crm_job(osv.osv):
|
||||
_name = "crm.job"
|
||||
_description = "Job Cases"
|
||||
_order = "id desc"
|
||||
_inherits = {'crm.case':"inherit_case_id"}
|
||||
_columns = {
|
||||
'inherit_case_id': fields.many2one('crm.case','Case',ondelete='cascade'),
|
||||
}
|
||||
def _map_ids(self, method, cr, uid, ids, *args, **argv):
|
||||
case_data = self.browse(cr, uid, ids)
|
||||
new_ids = []
|
||||
for case in case_data:
|
||||
if case.inherit_case_id:
|
||||
new_ids.append(case.inherit_case_id.id)
|
||||
return getattr(self.pool.get('crm.case'),method)(cr, uid, new_ids, *args, **argv)
|
||||
|
||||
|
||||
def onchange_case_id(self, cr, uid, ids, *args, **argv):
|
||||
return self._map_ids('onchange_case_id',cr,uid,ids,*args,**argv)
|
||||
def onchange_partner_id(self, cr, uid, ids, *args, **argv):
|
||||
return self._map_ids('onchange_partner_id',cr,uid,ids,*args,**argv)
|
||||
def onchange_partner_address_id(self, cr, uid, ids, *args, **argv):
|
||||
return self._map_ids('onchange_partner_address_id',cr,uid,ids,*args,**argv)
|
||||
def onchange_categ_id(self, cr, uid, ids, *args, **argv):
|
||||
return self._map_ids('onchange_categ_id',cr,uid,ids,*args,**argv)
|
||||
def case_close(self,cr, uid, ids, *args, **argv):
|
||||
return self._map_ids('case_close',cr,uid,ids,*args,**argv)
|
||||
def case_open(self,cr, uid, ids, *args, **argv):
|
||||
return self._map_ids('case_open',cr,uid,ids,*args,**argv)
|
||||
def case_cancel(self,cr, uid, ids, *args, **argv):
|
||||
return self._map_ids('case_cancel',cr,uid,ids,*args,**argv)
|
||||
def case_reset(self,cr, uid, ids, *args, **argv):
|
||||
return self._map_ids('case_reset',cr,uid,ids,*args,**argv)
|
||||
crm_job()
|
|
@ -0,0 +1,73 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
##############################################################################
|
||||
#
|
||||
# OpenERP, Open Source Management Solution
|
||||
# Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>).
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU Affero General Public License as
|
||||
# published by the Free Software Foundation, either version 3 of the
|
||||
# License, or (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU Affero General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU Affero General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
##############################################################################
|
||||
|
||||
import time
|
||||
import re
|
||||
import os
|
||||
|
||||
import mx.DateTime
|
||||
import base64
|
||||
|
||||
from tools.translate import _
|
||||
|
||||
import tools
|
||||
from osv import fields,osv,orm
|
||||
from osv.orm import except_orm
|
||||
|
||||
class crm_lead(osv.osv):
|
||||
_name = "crm.lead"
|
||||
_description = "Leads Cases"
|
||||
_order = "id desc"
|
||||
_inherits = {'crm.case':"inherit_case_id"}
|
||||
_columns = {
|
||||
'inherit_case_id':fields.many2one('crm.case','Case'),
|
||||
}
|
||||
|
||||
def _map_ids(self, method, cr, uid, ids, *args, **argv):
|
||||
case_data = self.browse(cr, uid, ids)
|
||||
new_ids = []
|
||||
for case in case_data:
|
||||
if case.inherit_case_id:
|
||||
new_ids.append(case.inherit_case_id.id)
|
||||
return getattr(self.pool.get('crm.case'),method)(cr, uid, new_ids, *args, **argv)
|
||||
|
||||
|
||||
def onchange_case_id(self, cr, uid, ids, *args, **argv):
|
||||
return self._map_ids('onchange_case_id',cr,uid,ids,*args,**argv)
|
||||
def onchange_partner_id(self, cr, uid, ids, *args, **argv):
|
||||
return self._map_ids('onchange_partner_id',cr,uid,ids,*args,**argv)
|
||||
def onchange_partner_address_id(self, cr, uid, ids, *args, **argv):
|
||||
return self._map_ids('onchange_partner_address_id',cr,uid,ids,*args,**argv)
|
||||
def onchange_categ_id(self, cr, uid, ids, *args, **argv):
|
||||
return self._map_ids('onchange_categ_id',cr,uid,ids,*args,**argv)
|
||||
def case_close(self,cr, uid, ids, *args, **argv):
|
||||
return self._map_ids('case_close',cr,uid,ids,*args,**argv)
|
||||
def case_open(self,cr, uid, ids, *args, **argv):
|
||||
return self._map_ids('case_open',cr,uid,ids,*args,**argv)
|
||||
def case_cancel(self,cr, uid, ids, *args, **argv):
|
||||
return self._map_ids('case_cancel',cr,uid,ids,*args,**argv)
|
||||
def case_reset(self,cr, uid, ids, *args, **argv):
|
||||
return self._map_ids('case_reset',cr,uid,ids,*args,**argv)
|
||||
|
||||
|
||||
|
||||
crm_lead()
|
||||
|
|
@ -83,7 +83,7 @@
|
|||
<record model="ir.actions.act_window" id="crm_case_categ_meet">
|
||||
<field name="res_model">crm.meeting</field>
|
||||
<field name="view_mode">calendar,tree,form,gantt</field>
|
||||
<field name="view_id" ref="crm_case_calendar_view"/>
|
||||
<field name="view_id" ref="crm_case_calendar_view_meet"/>
|
||||
<field name="context" eval="{'default_state':'open'}"/>
|
||||
<field name="search_view_id" ref="view_crm_case_meetings_filter"/>
|
||||
<field name="domain" eval="[('section_id.calendar','=',1)]"/>
|
||||
|
|
|
@ -0,0 +1,73 @@
|
|||
#-*- coding: utf-8 -*-
|
||||
##############################################################################
|
||||
#
|
||||
# OpenERP, Open Source Management Solution
|
||||
# Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>).
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU Affero General Public License as
|
||||
# published by the Free Software Foundation, either version 3 of the
|
||||
# License, or (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU Affero General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU Affero General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
##############################################################################
|
||||
|
||||
import time
|
||||
import re
|
||||
import os
|
||||
|
||||
import mx.DateTime
|
||||
import base64
|
||||
|
||||
from tools.translate import _
|
||||
|
||||
import tools
|
||||
from osv import fields,osv,orm
|
||||
from osv.orm import except_orm
|
||||
|
||||
|
||||
class crm_opportunity(osv.osv):
|
||||
_name = "crm.opportunity"
|
||||
_description = "Opportunity Cases"
|
||||
_order = "id desc"
|
||||
_inherits = {'crm.case':"inherit_case_id"}
|
||||
_columns = {
|
||||
'inherit_case_id': fields.many2one('crm.case','Case',ondelete='cascade'),
|
||||
}
|
||||
def _map_ids(self, method, cr, uid, ids, *args, **argv):
|
||||
case_data = self.browse(cr, uid, ids)
|
||||
new_ids = []
|
||||
for case in case_data:
|
||||
if case.inherit_case_id:
|
||||
new_ids.append(case.inherit_case_id.id)
|
||||
return getattr(self.pool.get('crm.case'),method)(cr, uid, new_ids, *args, **argv)
|
||||
|
||||
|
||||
def onchange_case_id(self, cr, uid, ids, *args, **argv):
|
||||
return self._map_ids('onchange_case_id',cr,uid,ids,*args,**argv)
|
||||
def onchange_partner_id(self, cr, uid, ids, *args, **argv):
|
||||
return self._map_ids('onchange_partner_id',cr,uid,ids,*args,**argv)
|
||||
def onchange_partner_address_id(self, cr, uid, ids, *args, **argv):
|
||||
return self._map_ids('onchange_partner_address_id',cr,uid,ids,*args,**argv)
|
||||
def onchange_categ_id(self, cr, uid, ids, *args, **argv):
|
||||
return self._map_ids('onchange_categ_id',cr,uid,ids,*args,**argv)
|
||||
def case_close(self,cr, uid, ids, *args, **argv):
|
||||
return self._map_ids('case_close',cr,uid,ids,*args,**argv)
|
||||
def case_open(self,cr, uid, ids, *args, **argv):
|
||||
return self._map_ids('case_open',cr,uid,ids,*args,**argv)
|
||||
def case_cancel(self,cr, uid, ids, *args, **argv):
|
||||
return self._map_ids('case_cancel',cr,uid,ids,*args,**argv)
|
||||
def case_reset(self,cr, uid, ids, *args, **argv):
|
||||
return self._map_ids('case_reset',cr,uid,ids,*args,**argv)
|
||||
def case_escalate(self,cr, uid, ids, *args, **argv):
|
||||
return self._map_ids('case_escalate',cr,uid,ids,*args,**argv)
|
||||
def case_pending(self,cr, uid, ids, *args, **argv):
|
||||
return self._map_ids('case_pending',cr,uid,ids,*args,**argv)
|
||||
crm_opportunity()
|
|
@ -0,0 +1,70 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
##############################################################################
|
||||
#
|
||||
# OpenERP, Open Source Management Solution
|
||||
# Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>).
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU Affero General Public License as
|
||||
# published by the Free Software Foundation, either version 3 of the
|
||||
# License, or (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU Affero General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU Affero General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
##############################################################################
|
||||
|
||||
from caldav import common
|
||||
from dateutil.rrule import *
|
||||
from osv import fields, osv
|
||||
import datetime
|
||||
import base64
|
||||
import re
|
||||
import time
|
||||
import tools
|
||||
|
||||
class crm_phonecall(osv.osv):
|
||||
_name = "crm.phonecall"
|
||||
_description = "Phonecall Cases"
|
||||
_order = "id desc"
|
||||
_inherits = {'crm.case':"inherit_case_id"}
|
||||
_columns = {
|
||||
'inherit_case_id': fields.many2one('crm.case','Case',ondelete='cascade'),
|
||||
}
|
||||
|
||||
def _map_ids(self, method, cr, uid, ids, *args, **argv):
|
||||
case_data = self.browse(cr, uid, ids)
|
||||
new_ids = []
|
||||
for case in case_data:
|
||||
if case.inherit_case_id:
|
||||
new_ids.append(case.inherit_case_id.id)
|
||||
return getattr(self.pool.get('crm.case'),method)(cr, uid, new_ids, *args, **argv)
|
||||
|
||||
|
||||
def onchange_case_id(self, cr, uid, ids, *args, **argv):
|
||||
return self._map_ids('onchange_case_id',cr,uid,ids,*args,**argv)
|
||||
def onchange_partner_id(self, cr, uid, ids, *args, **argv):
|
||||
return self._map_ids('onchange_partner_id',cr,uid,ids,*args,**argv)
|
||||
def onchange_partner_address_id(self, cr, uid, ids, *args, **argv):
|
||||
return self._map_ids('onchange_partner_address_id',cr,uid,ids,*args,**argv)
|
||||
def onchange_categ_id(self, cr, uid, ids, *args, **argv):
|
||||
return self._map_ids('onchange_categ_id',cr,uid,ids,*args,**argv)
|
||||
def case_close(self,cr, uid, ids, *args, **argv):
|
||||
return self._map_ids('case_close',cr,uid,ids,*args,**argv)
|
||||
def case_open(self,cr, uid, ids, *args, **argv):
|
||||
return self._map_ids('case_open',cr,uid,ids,*args,**argv)
|
||||
def case_cancel(self,cr, uid, ids, *args, **argv):
|
||||
return self._map_ids('case_cancel',cr,uid,ids,*args,**argv)
|
||||
def case_reset(self,cr, uid, ids, *args, **argv):
|
||||
return self._map_ids('case_reset',cr,uid,ids,*args,**argv)
|
||||
def case_escalate(self,cr, uid, ids, *args, **argv):
|
||||
return self._map_ids('case_escalate',cr,uid,ids,*args,**argv)
|
||||
def case_pending(self,cr, uid, ids, *args, **argv):
|
||||
return self._map_ids('case_pending',cr,uid,ids,*args,**argv)
|
||||
|
||||
crm_phonecall()
|
|
@ -3,7 +3,7 @@
|
|||
<data>
|
||||
<menuitem icon="terp-crm" id="menu_crm" name="CRM & SRM"/>
|
||||
<menuitem id="menu_crm_configuration" name="Configuration" parent="crm.menu_crm" sequence="0"/>
|
||||
<menuitem action="wizard_case_section_menu" id="menu_wizard_case_section_menu" parent="crm.menu_crm_configuration" type="wizard"/>
|
||||
|
||||
<wizard id="wizard_crm_send_mail" model="crm.case.history" name="crm.send.mail" string="Send Mail" menu="False"/>
|
||||
<wizard id="wizard_crm_new_send_mail" model="crm.case" name="crm.new.send.mail" string="Send New Mail" menu="False"/>
|
||||
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
#
|
||||
##############################################################################
|
||||
|
||||
import crm_wizard
|
||||
#import crm_wizard
|
||||
import wizard_crm_send_email
|
||||
import wizard_crm_new_send_email
|
||||
import wizard_fetch_mail
|
||||
|
|
|
@ -0,0 +1,25 @@
|
|||
# -*- encoding: utf-8 -*-
|
||||
##############################################################################
|
||||
#
|
||||
# OpenERP, Open Source Management Solution
|
||||
# Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>). All Rights Reserved
|
||||
# $Id$
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation, either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
##############################################################################
|
||||
|
||||
|
||||
import crm_project_bug
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
|
@ -0,0 +1,44 @@
|
|||
# -*- encoding: utf-8 -*-
|
||||
##############################################################################
|
||||
#
|
||||
# OpenERP, Open Source Management Solution
|
||||
# Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>). All Rights Reserved
|
||||
# $Id$
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation, either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
##############################################################################
|
||||
|
||||
|
||||
{
|
||||
'name': 'Customer Relationship Management',
|
||||
'version': '1.0',
|
||||
'category': 'Generic Modules/CRM & SRM',
|
||||
'description': """
|
||||
This module provide Store the project bugs with cases
|
||||
""",
|
||||
'author': 'Tiny',
|
||||
'website': 'http://www.openerp.com',
|
||||
'depends': [ 'crm','project'],
|
||||
'init_xml': [ 'crm_bugs_data.xml'
|
||||
],
|
||||
'update_xml': [ 'crm_bugs_view.xml',
|
||||
'crm_bugs_menu.xml',
|
||||
],
|
||||
'demo_xml': [],
|
||||
'installable': True,
|
||||
'active': False,
|
||||
'certificate': '',
|
||||
}
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
|
@ -5,7 +5,7 @@
|
|||
((((((((((( Demo Cases )))))))))))
|
||||
-->
|
||||
<!--For Bug Tracking-->
|
||||
<record id="crm_case_buginaccountsmodule0" model="crm.case">
|
||||
<record id="crm_case_buginaccountsmodule0" model="crm.project.bug">
|
||||
<field name="partner_address_id" ref="base.res_partner_address_8"/>
|
||||
<field eval="time.strftime('%Y-%m-08 10:15:00')" name="date"/>
|
||||
<field name="category2_id" ref="crm.category1"/>
|
||||
|
@ -29,7 +29,7 @@
|
|||
<field model="res.partner.canal" name="canal_id" search="[('name','=','website')]"/>
|
||||
</record>
|
||||
|
||||
<record id="crm_case_programnotgivingproperoutput0" model="crm.case">
|
||||
<record id="crm_case_programnotgivingproperoutput0" model="crm.project.bug">
|
||||
<field name="partner_address_id" ref="base.res_partner_address_tang"/>
|
||||
<field eval="time.strftime('%Y-%m-15 12:50:00')" name="date"/>
|
||||
<field name="category2_id" ref="crm.category2"/>
|
||||
|
@ -45,7 +45,7 @@
|
|||
<field eval=""Program not giving proper output"" name="name"/>
|
||||
</record>
|
||||
|
||||
<record id="crm_case_outputincorrect0" model="crm.case">
|
||||
<record id="crm_case_outputincorrect0" model="crm.project.bug">
|
||||
<field name="partner_address_id" ref="base.res_partner_address_9"/>
|
||||
<field eval="time.strftime('%Y-%m-18 14:30:00')" name="date"/>
|
||||
<field name="category2_id" ref="crm.category1"/>
|
||||
|
@ -61,7 +61,7 @@
|
|||
<field eval=""Output incorrect"" name="name"/>
|
||||
</record>
|
||||
|
||||
<record id="crm_case_problemloadingpage0" model="crm.case">
|
||||
<record id="crm_case_problemloadingpage0" model="crm.project.bug">
|
||||
<field name="partner_address_id" ref="base.res_partner_address_13"/>
|
||||
<field eval="time.strftime('%Y-%m-20 15:25:05')" name="date"/>
|
||||
<field name="category2_id" ref="crm.category1"/>
|
||||
|
@ -77,7 +77,7 @@
|
|||
<field eval=""Problem loading page"" name="name"/>
|
||||
</record>
|
||||
|
||||
<record id="crm_case_pagenotfound0" model="crm.case">
|
||||
<record id="crm_case_pagenotfound0" model="crm.project.bug">
|
||||
<field eval="time.strftime('%Y-%m-22 18:15:00')" name="date"/>
|
||||
<field name="category2_id" ref="crm.category1"/>
|
||||
<field eval=""3"" name="priority"/>
|
||||
|
@ -92,7 +92,7 @@
|
|||
<field eval=""Page not Found"" name="name"/>
|
||||
</record>
|
||||
|
||||
<record id="crm_case_programmingerror0" model="crm.case">
|
||||
<record id="crm_case_programmingerror0" model="crm.project.bug">
|
||||
<field name="partner_address_id" ref="base.res_partner_address_10"/>
|
||||
<field eval="time.strftime('%Y-%m-24 09:45:00')" name="date"/>
|
||||
<field name="category2_id" ref="crm.category2"/>
|
||||
|
@ -108,7 +108,7 @@
|
|||
<field eval=""Programming Error"" name="name"/>
|
||||
</record>
|
||||
|
||||
<record id="crm_case_logicalerrorinprogram0" model="crm.case">
|
||||
<record id="crm_case_logicalerrorinprogram0" model="crm.project.bug">
|
||||
<field name="partner_address_id" ref="base.res_partner_address_6"/>
|
||||
<field eval="time.strftime('%Y-%m-26 11:10:00')" name="date"/>
|
||||
<field name="category2_id" ref="crm.category1"/>
|
||||
|
@ -124,7 +124,7 @@
|
|||
<field eval=""Logical Error in Program"" name="name"/>
|
||||
</record>
|
||||
|
||||
<record id="crm_case_constrainterror0" model="crm.case">
|
||||
<record id="crm_case_constrainterror0" model="crm.project.bug">
|
||||
<field name="partner_address_id" ref="base.res_partner_address_6"/>
|
||||
<field eval="time.strftime('%Y-%m-25 13:35:00')" name="date"/>
|
||||
<field name="category2_id" ref="crm.category1"/>
|
||||
|
@ -140,7 +140,7 @@
|
|||
<field eval=""Constraint Error"" name="name"/>
|
||||
</record>
|
||||
|
||||
<record id="crm_case_errorinprogram0" model="crm.case">
|
||||
<record id="crm_case_errorinprogram0" model="crm.project.bug">
|
||||
<field name="partner_address_id" ref="base.res_partner_address_10"/>
|
||||
<field eval="time.strftime('%Y-%m-28 15:40:00')" name="date"/>
|
||||
<field name="category2_id" ref="crm.category2"/>
|
||||
|
@ -156,7 +156,7 @@
|
|||
<field eval=""Error in Program"" name="name"/>
|
||||
</record>
|
||||
|
||||
<record id="crm_case_patcheserrorinprogram0" model="crm.case">
|
||||
<record id="crm_case_patcheserrorinprogram0" model="crm.project.bug">
|
||||
<field name="partner_address_id" ref="base.res_partner_address_9"/>
|
||||
<field eval="time.strftime('%Y-%m-28 16:30:00')" name="date"/>
|
||||
<field name="category2_id" ref="crm.category2"/>
|
||||
|
@ -172,7 +172,7 @@
|
|||
<field eval=""Patches Error in Program"" name="name"/>
|
||||
</record>
|
||||
|
||||
<record id="crm_case_newfeaturestobeadded0" model="crm.case">
|
||||
<record id="crm_case_newfeaturestobeadded0" model="crm.project.bug">
|
||||
<field name="partner_address_id" ref="base.res_partner_address_wong"/>
|
||||
<field eval="time.strftime('%Y-%m-01 12:15:10')" name="date"/>
|
||||
<field name="category2_id" ref="crm.category1"/>
|
||||
|
@ -188,7 +188,7 @@
|
|||
<field eval=""New Features To Be Added"" name="name"/>
|
||||
</record>
|
||||
|
||||
<record id="crm_case_addmenustothemodule0" model="crm.case">
|
||||
<record id="crm_case_addmenustothemodule0" model="crm.project.bug">
|
||||
<field name="partner_address_id" ref="base.res_partner_address_1"/>
|
||||
<field eval="time.strftime('%Y-%m-05 18:00:00')" name="date"/>
|
||||
<field name="category2_id" ref="crm.category2"/>
|
||||
|
@ -205,7 +205,7 @@
|
|||
<field eval=""info@opensides.be"" name="email_from"/>
|
||||
</record>
|
||||
|
||||
<record id="crm_case_includeattendancesheetinproject0" model="crm.case">
|
||||
<record id="crm_case_includeattendancesheetinproject0" model="crm.project.bug">
|
||||
<field name="partner_address_id" ref="base.res_partner_address_2"/>
|
||||
<field eval="time.strftime('%Y-%m-10 17:05:30')" name="date"/>
|
||||
<field name="category2_id" ref="crm.category1"/>
|
||||
|
@ -222,7 +222,7 @@
|
|||
<field eval=""contact@tecsas.fr"" name="email_from"/>
|
||||
</record>
|
||||
|
||||
<record id="crm_case_createnewobject0" model="crm.case">
|
||||
<record id="crm_case_createnewobject0" model="crm.project.bug">
|
||||
<field model="res.partner.canal" name="canal_id" search="[('name','=','phone')]"/>
|
||||
<field name="partner_address_id" ref="base.res_partner_address_6"/>
|
||||
<field name="som" ref="base.som_happy"/>
|
||||
|
@ -240,7 +240,7 @@
|
|||
<field eval=""Create new object"" name="name"/>
|
||||
</record>
|
||||
|
||||
<record id="crm_case_improvereportsinhrms0" model="crm.case">
|
||||
<record id="crm_case_improvereportsinhrms0" model="crm.project.bug">
|
||||
<field name="partner_address_id" ref="base.res_partner_address_15"/>
|
||||
<field eval="time.strftime('%Y-%m-19 12:15:00')" name="date"/>
|
||||
<field name="category2_id" ref="crm.category1"/>
|
||||
|
@ -256,7 +256,7 @@
|
|||
<field eval=""Improve Reports in HRMS"" name="name"/>
|
||||
</record>
|
||||
|
||||
<record id="crm_case_improvereportsinpms0" model="crm.case">
|
||||
<record id="crm_case_improvereportsinpms0" model="crm.project.bug">
|
||||
<field name="partner_address_id" ref="base.res_partner_address_15"/>
|
||||
<field eval="time.strftime('%Y-%m-21 14:30:00')" name="date"/>
|
||||
<field name="category2_id" ref="crm.category1"/>
|
|
@ -1,7 +1,7 @@
|
|||
<?xml version="1.0"?>
|
||||
<openerp>
|
||||
<data noupdate="1">
|
||||
<menuitem id="menu_aftersale" name="After-Sale Services" parent="crm.menu_crm"/>
|
||||
|
||||
|
||||
<record model="crm.case.categ" id="categ1">
|
||||
<field name="name">Bugs</field>
|
||||
|
@ -35,13 +35,12 @@
|
|||
-->
|
||||
<record model="ir.actions.act_window" id="crm_case_categ_act0">
|
||||
<field name="name">Bugs</field>
|
||||
<field name="res_model">crm.case</field>
|
||||
<field name="res_model">crm.project.bug</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_mode">tree,calendar</field>
|
||||
<field name="view_id" ref="crm_case_tree_view"/>
|
||||
<field name="domain" eval="'[(\'section_id\',\'=\','+str(section_support)+')]'"/>
|
||||
<field name="context" eval="{'default_state':'open'}"/>
|
||||
<field name="search_view_id" ref="crm.view_crm_case_bugs_filter"/>
|
||||
<field name="search_view_id" ref="view_crm_case_bugs_filter"/>
|
||||
</record>
|
||||
<record model="ir.actions.act_window.view" id="action_crm_tag_tree_view0">
|
||||
<field name="sequence" eval="1"/>
|
||||
|
@ -61,7 +60,8 @@
|
|||
<field name="view_id" ref="crm_case_form_view"/>
|
||||
<field name="act_window_id" ref="crm_case_categ_act0"/>
|
||||
</record>
|
||||
<menuitem name="Bug Tracking" id="menu_crm_case_bug_track" parent="menu_aftersale" action="crm_case_categ_act0"/>
|
||||
|
||||
|
||||
<menuitem id="menu_aftertask" name="Bug" parent="project.menu_main"/>
|
||||
<menuitem name="Bug Tracking" id="menu_crm_case_bug_track" parent="menu_aftertask" action="crm_case_categ_act0"/>
|
||||
</data>
|
||||
</openerp>
|
|
@ -10,11 +10,12 @@
|
|||
|
||||
<record model="ir.ui.view" id="crm_case_form_view">
|
||||
<field name="name">CRM - Bug Tracker Form</field>
|
||||
<field name="model">crm.case</field>
|
||||
<field name="model">crm.project.bug</field>
|
||||
<field name="type">form</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Bug Tracker Form">
|
||||
<group colspan="4" col="6">
|
||||
<field name="project_id"/>
|
||||
<field name="name" string="Title" colspan="2"/>
|
||||
<field name="section_id" colspan="1" widget="selection"/>
|
||||
<label string="Resolution: " align="1.0"/>
|
||||
|
@ -36,7 +37,7 @@
|
|||
<field name="priority" string="Severity"/>
|
||||
<group colspan="2">
|
||||
<field name="case_id" select="1"/>
|
||||
<button string="Assign" name="%(crm_generic_wizard_act)d" type="action" />
|
||||
<button string="Assign" name="%(crm.crm_generic_wizard_act)d" type="action" />
|
||||
</group>
|
||||
<newline/>
|
||||
<separator string= "Description" colspan="4"/>
|
||||
|
@ -124,7 +125,7 @@
|
|||
</record>
|
||||
<record model="ir.ui.view" id="crm_case_tree_view">
|
||||
<field name="name">CRM - Bug Tracker Tree</field>
|
||||
<field name="model">crm.case</field>
|
||||
<field name="model">crm.project.bug</field>
|
||||
<field name="type">tree</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree string="Bugs Tree" colors="red:state=='open';black:state in ('draft', 'cancel','done','pending')">
|
||||
|
@ -149,32 +150,32 @@
|
|||
|
||||
<record id="view_crm_case_bugs_filter" model="ir.ui.view">
|
||||
<field name="name">crm.case.bugs.select</field>
|
||||
<field name="model">crm.case</field>
|
||||
<field name="model">crm.project.bug</field>
|
||||
<field name="type">search</field>
|
||||
<field name="arch" type="xml">
|
||||
<search string="Search Bugs">
|
||||
<group col="7" colspan="1">
|
||||
<filter icon="gtk-apply" string="Fixed Bugs"
|
||||
domain="[('section_id.name','=','Bug Tracking'),('stage_id.name','=','Fixed')]"
|
||||
domain="[('stage_id.name','=','Fixed')]"
|
||||
separator="1" help="All Fixed Bugs"
|
||||
/>
|
||||
<filter icon="gtk-media-pause" string="Waiting Bugs"
|
||||
domain="[('section_id.name','=','Bug Tracking'),('stage_id.name','=','Awaiting Response')]"
|
||||
domain="[('stage_id.name','=','Awaiting Response')]"
|
||||
separator="1" help="All Waiting Bugs"
|
||||
/>
|
||||
<filter icon="gtk-media-forward" string="Future Bugs"
|
||||
domain="[('section_id.name','=','Bug Tracking'),('stage_id.name','=','Future')]"
|
||||
domain="[('stage_id.name','=','Future')]"
|
||||
separator="1" help="All Future Bugs"
|
||||
/>
|
||||
<separator orientation="vertical"/>
|
||||
<filter icon="gtk-home" string=" Today "
|
||||
separator="1"
|
||||
domain="[('date::date','=',time.strftime('%%Y-%%m-%%d'))]"
|
||||
domain="[('date','=',time.strftime('%%Y-%%m-%%d'))]"
|
||||
help="Todays's bugs"
|
||||
/>
|
||||
<filter icon="gtk-media-rewind"
|
||||
string=" 7 Days " separator="1"
|
||||
domain="[('date::date','<', time.strftime('%%Y-%%m-%%d')), ('date::date','>=',(datetime.date.today()-datetime.timedelta(days=7)).strftime('%%Y-%%m-%%d'))]"
|
||||
domain="[('date','<', time.strftime('%%Y-%%m-%%d')), ('date','>=',(datetime.date.today()-datetime.timedelta(days=7)).strftime('%%Y-%%m-%%d'))]"
|
||||
help="Bugs during last 7 days"
|
||||
/>
|
||||
</group>
|
||||
|
@ -197,7 +198,7 @@
|
|||
|
||||
<record id="view_crm_case_feature_request_filter" model="ir.ui.view">
|
||||
<field name="name">crm.case.feature.request.select</field>
|
||||
<field name="model">crm.case</field>
|
||||
<field name="model">crm.project.bug</field>
|
||||
<field name="type">search</field>
|
||||
<field name="arch" type="xml">
|
||||
<search string="Search Feature Request">
|
||||
|
@ -218,7 +219,7 @@
|
|||
|
||||
<record model="ir.ui.view" id="crm_case_calendar_view">
|
||||
<field name="name">CRM - Bug Tracker Calendar</field>
|
||||
<field name="model">crm.case</field>
|
||||
<field name="model">crm.project.bug</field>
|
||||
<field name="type">calendar</field>
|
||||
<field name="priority" eval="2"/>
|
||||
<field name="arch" type="xml">
|
|
@ -0,0 +1,73 @@
|
|||
#-*- coding: utf-8 -*-
|
||||
##############################################################################
|
||||
#
|
||||
# OpenERP, Open Source Management Solution
|
||||
# Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>).
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU Affero General Public License as
|
||||
# published by the Free Software Foundation, either version 3 of the
|
||||
# License, or (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU Affero General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU Affero General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
##############################################################################
|
||||
|
||||
import time
|
||||
import re
|
||||
import os
|
||||
|
||||
import mx.DateTime
|
||||
import base64
|
||||
|
||||
from tools.translate import _
|
||||
|
||||
import tools
|
||||
from osv import fields,osv,orm
|
||||
from osv.orm import except_orm
|
||||
|
||||
class crm_project_bug(osv.osv):
|
||||
_name = "crm.project.bug"
|
||||
_description = "Project Bug Cases"
|
||||
_order = "id desc"
|
||||
_inherits = {'crm.case':"inherit_case_id"}
|
||||
_columns = {
|
||||
'inherit_case_id':fields.many2one('crm.case','Case'),
|
||||
'project_id':fields.many2one('project.project', 'Project '),
|
||||
}
|
||||
|
||||
def _map_ids(self, method, cr, uid, ids, *args, **argv):
|
||||
case_data = self.browse(cr, uid, ids)
|
||||
new_ids = []
|
||||
for case in case_data:
|
||||
if case.inherit_case_id:
|
||||
new_ids.append(case.inherit_case_id.id)
|
||||
return getattr(self.pool.get('crm.case'),method)(cr, uid, new_ids, *args, **argv)
|
||||
|
||||
|
||||
def onchange_case_id(self, cr, uid, ids, *args, **argv):
|
||||
return self._map_ids('onchange_case_id',cr,uid,ids,*args,**argv)
|
||||
def onchange_partner_id(self, cr, uid, ids, *args, **argv):
|
||||
return self._map_ids('onchange_partner_id',cr,uid,ids,*args,**argv)
|
||||
def onchange_partner_address_id(self, cr, uid, ids, *args, **argv):
|
||||
return self._map_ids('onchange_partner_address_id',cr,uid,ids,*args,**argv)
|
||||
def onchange_categ_id(self, cr, uid, ids, *args, **argv):
|
||||
return self._map_ids('onchange_categ_id',cr,uid,ids,*args,**argv)
|
||||
def case_close(self,cr, uid, ids, *args, **argv):
|
||||
return self._map_ids('case_close',cr,uid,ids,*args,**argv)
|
||||
def case_open(self,cr, uid, ids, *args, **argv):
|
||||
return self._map_ids('case_open',cr,uid,ids,*args,**argv)
|
||||
def case_cancel(self,cr, uid, ids, *args, **argv):
|
||||
return self._map_ids('case_cancel',cr,uid,ids,*args,**argv)
|
||||
def case_reset(self,cr, uid, ids, *args, **argv):
|
||||
return self._map_ids('case_reset',cr,uid,ids,*args,**argv)
|
||||
|
||||
|
||||
|
||||
crm_project_bug()
|
|
@ -149,7 +149,7 @@ class document_configuration_wizard(osv.osv_memory):
|
|||
})
|
||||
|
||||
# Update the action for FTP browse.
|
||||
aid = objid._get_id(cr, uid, 'document', 'action_document_browse')
|
||||
aid = objid._get_id(cr, uid, 'document_ftp', 'action_document_browse')
|
||||
aid = objid.browse(cr, uid, aid, context=context).res_id
|
||||
self.pool.get('ir.actions.url').write(cr, uid, [aid], {'url': 'ftp://'+(conf.host or 'localhost')+':8021/'})
|
||||
|
||||
|
|
|
@ -69,7 +69,12 @@ class mrp_production_workcenter_line(osv.osv):
|
|||
_inherit = 'mrp.production.workcenter.line'
|
||||
_order = "sequence, date_planned"
|
||||
_columns = {
|
||||
'state': fields.selection([('draft','Draft'),('startworking', 'In Progress'),('pause','Pause'),('cancel','Canceled'),('done','Finished')],'State', readonly=True),
|
||||
'state': fields.selection([('draft','Draft'),('startworking', 'In Progress'),('pause','Pause'),('cancel','Canceled'),('done','Finished')],'State', readonly=True,
|
||||
help="* When a work order is created it is set in 'Draft' state.\n" \
|
||||
"* When user sets work order in start mode that time it will be set in 'In Progress' state.\n" \
|
||||
"* When work order is in running mode, during that time if user wants to stop or to make changes in order then can set in 'Pause' state.\n" \
|
||||
"* When the user cancels the work order it will be set in 'Canceled' state.\n" \
|
||||
"* When order is completely processed that time it is set in 'Finished' state."),
|
||||
'date_start_date': fields.function(_get_date_date, method=True, string='Start Date', type='date'),
|
||||
'date_planned': fields.datetime('Scheduled Date'),
|
||||
'date_planned_end': fields.function(_get_date_end, method=True, string='End Date', type='datetime'),
|
||||
|
|
|
@ -87,7 +87,13 @@ class mrp_repair(osv.osv):
|
|||
('invoice_except','Invoice Exception'),
|
||||
('done','Done'),
|
||||
('cancel','Cancel')
|
||||
], 'Repair State', readonly=True, help="Gives the state of the Repair Order"),
|
||||
], 'Repair State', readonly=True,
|
||||
help=' * The \'Draft\' state is used when a user is encoding a new and unconfirmed repair order. \
|
||||
\n* The \'Confirmed\' state is used when a user confirms the repair order. \
|
||||
\n* The \'Ready to Repair\' state is used to start to repairing, user can start repairing only after repair order is confirmed. \
|
||||
\n* The \'To be Invoiced\' state is used to generate the invoice before or after repairing done. \
|
||||
\n* The \'Done\' state is set when repairing is completed.\
|
||||
\n* The \'Cancelled\' state is used when user cancel repair order.'),
|
||||
'location_id': fields.many2one('stock.location', 'Current Location', required=True, select=True, readonly=True, states={'draft':[('readonly',False)]}),
|
||||
'location_dest_id': fields.many2one('stock.location', 'Delivery Location', readonly=True, states={'draft':[('readonly',False)]}),
|
||||
'move_id': fields.many2one('stock.move', 'Move',required=True, domain="[('product_id','=',product_id)]", readonly=True, states={'draft':[('readonly',False)]}),
|
||||
|
@ -503,7 +509,15 @@ class mrp_repair_line(osv.osv, ProductChangeMixin):
|
|||
'location_id': fields.many2one('stock.location', 'Source Location', required=True, select=True),
|
||||
'location_dest_id': fields.many2one('stock.location', 'Dest. Location', required=True, select=True),
|
||||
'move_id': fields.many2one('stock.move', 'Inventory Move', readonly=True),
|
||||
'state': fields.selection([('draft','Draft'),('confirmed','Confirmed'),('done','Done'),('cancel','Canceled')], 'State', required=True, readonly=True),
|
||||
'state': fields.selection([
|
||||
('draft','Draft'),
|
||||
('confirmed','Confirmed'),
|
||||
('done','Done'),
|
||||
('cancel','Canceled')], 'State', required=True, readonly=True,
|
||||
help=' * The \'Draft\' state is set automatically as draft when repair order in draft state. \
|
||||
\n* The \'Confirmed\' state is set automatically as confirm when repair order in confirm state. \
|
||||
\n* The \'Done\' state is set automatically when repair order is completed.\
|
||||
\n* The \'Cancelled\' state is set automatically when user cancel repair order.'),
|
||||
}
|
||||
_defaults = {
|
||||
'state': lambda *a: 'draft',
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
##############################################################################
|
||||
#
|
||||
#
|
||||
# OpenERP, Open Source Management Solution
|
||||
# Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>).
|
||||
#
|
||||
|
@ -15,7 +15,7 @@
|
|||
# GNU Affero General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU Affero General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
##############################################################################
|
||||
|
||||
|
@ -177,7 +177,12 @@ class pos_order(osv.osv):
|
|||
readonly=True),
|
||||
'state': fields.selection([('cancel', 'Cancel'), ('draft', 'Draft'),
|
||||
('paid', 'Paid'), ('done', 'Done'), ('invoiced', 'Invoiced')], 'State',
|
||||
readonly=True, ),
|
||||
readonly=True,
|
||||
help=' * The \'Draft\' state is used when a user is encoding a new and unconfirmed pos order. \
|
||||
\n* The \'Paid\' state is set automatically when users makes payment for the pos order. \
|
||||
\n* The \'Invoiced\' state is set when invoice is created for pos order. \
|
||||
\n* The \'Done\' state is set automatically when user close the pos order.\
|
||||
\n* The \'Cancel\' state is used when user cancel pos order.'),
|
||||
'invoice_id': fields.many2one('account.invoice', 'Invoice', readonly=True),
|
||||
'account_move': fields.many2one('account.move', 'Account Entry', readonly=True),
|
||||
'pickings': fields.one2many('stock.picking', 'pos_order', 'Picking', readonly=True),
|
||||
|
@ -891,14 +896,14 @@ class pos_order_line(osv.osv):
|
|||
|
||||
price_line = float(qty)*float(price)
|
||||
return {'name': product_name, 'product_id': product_id[0], 'price': price, 'price_line': price_line ,'qty': qty }
|
||||
|
||||
|
||||
def unlink(self, cr, uid, ids, context={}):
|
||||
"""Allows to delete pos order lines in draft,cancel state"""
|
||||
for rec in self.browse(cr, uid, ids, context=context):
|
||||
if rec.order_id.state not in ['draft','cancel']:
|
||||
raise osv.except_osv(_('Invalid action !'), _('Cannot delete an order line which is %s !')%(rec.order_id.state,))
|
||||
return super(pos_order_line, self).unlink(cr, uid, ids, context=context)
|
||||
|
||||
|
||||
pos_order_line()
|
||||
|
||||
|
||||
|
|
|
@ -26,7 +26,11 @@ import netsvc
|
|||
class purchase_order_line(osv.osv):
|
||||
_inherit='purchase.order.line'
|
||||
_columns = {
|
||||
'state': fields.selection([('draft', 'Draft'), ('confirmed', 'Confirmed'), ('done', 'Done'), ('cancel', 'Cancelled')], 'State', required=True, readonly=True),
|
||||
'state': fields.selection([('draft', 'Draft'), ('confirmed', 'Confirmed'), ('done', 'Done'), ('cancel', 'Cancelled')], 'State', required=True, readonly=True,
|
||||
help=' * The \'Draft\' state is set automatically when purchase order in draft state. \
|
||||
\n* The \'Confirmed\' state is set automatically as confirm when purchase order in confirm state. \
|
||||
\n* The \'Done\' state is set automatically when purchase order is set as done. \
|
||||
\n* The \'Cancelled\' state is set automatically when user cancel purchase order.'),
|
||||
'invoice_lines': fields.many2many('account.invoice.line', 'purchase_order_line_invoice_rel', 'order_line_id', 'invoice_id', 'Invoice Lines', readonly=True),
|
||||
'invoiced': fields.boolean('Invoiced', readonly=True),
|
||||
'partner_id': fields.related('order_id','partner_id',string='Partner',readonly=True,type="many2one", relation="res.partner"),
|
||||
|
|
|
@ -369,7 +369,7 @@ class sale_order(osv.osv):
|
|||
journal_obj = self.pool.get('account.journal')
|
||||
journal_ids = journal_obj.search(cr, uid, [('type', '=','sale'),('company_id', '=', order.company_id.id)], limit=1)
|
||||
if not journal_ids:
|
||||
raise osv.except_osv(_('Error !'),
|
||||
raise osv.except_osv(_('Error !'),
|
||||
_('There is no sale journal defined for this company: "%s" (id:%d)') % (order.company_id.name, order.company_id.id))
|
||||
inv = {
|
||||
'name': order.client_order_ref or order.name,
|
||||
|
@ -775,7 +775,12 @@ class sale_order_line(osv.osv):
|
|||
'number_packages': fields.function(_number_packages, method=True, type='integer', string='Number Packages'),
|
||||
'notes': fields.text('Notes'),
|
||||
'th_weight': fields.float('Weight'),
|
||||
'state': fields.selection([('draft', 'Draft'), ('confirmed', 'Confirmed'), ('done', 'Done'), ('cancel', 'Cancelled'), ('exception', 'Exception')], 'State', required=True, readonly=True),
|
||||
'state': fields.selection([('draft', 'Draft'),('confirmed', 'Confirmed'),('done', 'Done'),('cancel', 'Cancelled'),('exception', 'Exception')], 'State', required=True, readonly=True,
|
||||
help=' * The \'Draft\' state is set automatically when sale order in draft state. \
|
||||
\n* The \'Confirmed\' state is set automatically when sale order in confirm state. \
|
||||
\n* The \'Exception\' state is set automatically when sale order is set as exception. \
|
||||
\n* The \'Done\' state is set automatically when sale order is set as done. \
|
||||
\n* The \'Cancelled\' state is set automatically when user cancel sale order.'),
|
||||
'order_partner_id': fields.related('order_id', 'partner_id', type='many2one', relation='res.partner', string='Customer'),
|
||||
'salesman_id':fields.related('order_id','user_id',type='many2one',relation='res.users',string='Salesman'),
|
||||
'company_id': fields.related('order_id','company_id',type='many2one',relation='res.company',string='Company',store=True),
|
||||
|
|
Loading…
Reference in New Issue