diff --git a/crm_claim_categ_as_name/__init__.py b/crm_claim_categ_as_name/__init__.py new file mode 100644 index 00000000..0170dbc3 --- /dev/null +++ b/crm_claim_categ_as_name/__init__.py @@ -0,0 +1,23 @@ +# -*- encoding: utf-8 -*- +############################################################################### +# # +# crm_claim_categ_as_name for OpenERP # +# Copyright (C) 2012 Akretion Benoît GUILLOT # +# # +# 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 . # +# # +############################################################################### + +import crm_claim_rma + diff --git a/crm_claim_categ_as_name/__openerp__.py b/crm_claim_categ_as_name/__openerp__.py new file mode 100644 index 00000000..99685c2e --- /dev/null +++ b/crm_claim_categ_as_name/__openerp__.py @@ -0,0 +1,43 @@ +# -*- encoding: utf-8 -*- +############################################################################### +# # +# crm_claim_categ_as_name for OpenERP # +# Copyright (C) 2012 Akretion Benoît GUILLOT # +# # +# 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 . # +# # +############################################################################### + + +{ + 'name': 'crm_claim_categ_as_name', + 'version': '1.0', + 'category': 'Generic Modules/CRM & SRM', + 'license': 'AGPL-3', + 'description': """ + + """, + 'author': 'akretion', + 'website': 'http://www.akretion.com/', + 'depends': ['crm_claim_rma'], + 'init_xml': [], + 'update_xml': [ + 'crm_claim_rma_view.xml', + ], + 'demo_xml': [], + 'installable': True, + 'active': False, +} + +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/crm_claim_categ_as_name/crm_claim_rma.py b/crm_claim_categ_as_name/crm_claim_rma.py new file mode 100644 index 00000000..6fd0a13e --- /dev/null +++ b/crm_claim_categ_as_name/crm_claim_rma.py @@ -0,0 +1,33 @@ +# -*- encoding: utf-8 -*- +############################################################################### +# # +# crm_claim_categ_as_name for OpenERP # +# Copyright (C) 2012 Akretion Benoît GUILLOT # +# # +# 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 . # +# # +############################################################################### + +from osv import fields, osv + +class crm_claim(osv.osv): + _inherit = 'crm.claim' + + _columns = { + 'name': fields.related('categ_id', 'name', relation='crm.case.categ', type='char', string='Claim Subject', size=128, store=True), + 'categ_id': fields.many2one('crm.case.categ', 'Category', \ + domain="[('section_id','=',section_id),\ + ('object_id.model', '=', 'crm.claim')]", required=True), + } + \ No newline at end of file diff --git a/crm_claim_categ_as_name/crm_claim_rma_view.xml b/crm_claim_categ_as_name/crm_claim_rma_view.xml new file mode 100644 index 00000000..a140b384 --- /dev/null +++ b/crm_claim_categ_as_name/crm_claim_rma_view.xml @@ -0,0 +1,23 @@ + + + + + + + CRM - Claim product return Form + crm.claim + + + + + + + + + + +