Merge pull request #41 from vauxoo-dev/8.0-squash_crm_claim_rma_number_module_between_oca_vauxoo

[ADD] New module crm_claim_code
This commit is contained in:
Alexandre Fayolle
2015-09-29 10:19:08 +02:00
12 changed files with 369 additions and 0 deletions

View File

@@ -0,0 +1,67 @@
.. image:: https://img.shields.io/badge/licence-AGPL--3-blue.svg
:alt: License: AGPL-3
==================
CRM Claim RMA Code
==================
This module was written to include different code sequences for RMA Claims based on the claim types and also it defines a RMA Number to track and manage claims for company partners
Installation
============
To install this module, you need to install it from availables modules
Configuration
=============
To configure this module, you need to:
#. Go to Settings > Sequence & Identifiers and then add/edit sequences and sequences codes to use.
#. Then go to Sales > Configuration > Claim > Claim Types and set the sequence codes for the claim types.
Usage
=====
To use this module, you need to create new claims based on the configuration set before.
.. image:: https://odoo-community.org/website/image/ir.attachment/5784_f2813bd/datas
:alt: Try me on Runbot
:target: https://runbot.odoo-community.org/runbot/145/8.0
For further information, please visit:
* https://www.odoo.com/forum/help-1
Bug Tracker
===========
Bugs are tracked on `GitHub Issues <https://github.com/OCA/rma/issues>`_.
In case of trouble, please check there if your issue has already been reported.
If you spotted it first, help us smashing it by providing a detailed and welcomed feedback
`here <https://github.com/OCA/rma/issues/new?body=module:%20crm_claim_rma_code%0Aversion:%208.0.1.0.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
Credits
=======
Contributors
------------
* Yanina Aular <yani@vauxoo.com>
* Osval Reyes <osval@vauxoo.com>
Maintainer
----------
.. image:: https://odoo-community.org/logo.png
:alt: Odoo Community Association
:target: https://odoo-community.org
This module is maintained by the OCA.
OCA, or the Odoo Community Association, is a nonprofit organization whose
mission is to support the collaborative development of Odoo features and
promote its widespread use.
To contribute to this module, please visit http://odoo-community.org.

View File

@@ -0,0 +1,22 @@
# -*- coding: utf-8 -*-
##############################################################################
#
# Copyright 2015 Vauxoo
# Author: Osval Reyes, Yanina Aular
#
# 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 . import models

View File

@@ -0,0 +1,39 @@
# -*- coding: utf-8 -*-
##############################################################################
#
# Copyright 2015 Vauxoo
# Author: Osval Reyes, Yanina Aular
#
# 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/>.
#
##############################################################################
{
'name': 'CRM Claim RMA Code',
'version': '8.0.1.0.0',
'category': 'Generic Modules/CRM & SRM',
'author': 'Vauxoo,Odoo Community Association (OCA)',
'website': 'http://www.vauxoo.com/',
'license': 'AGPL-3',
'depends': [
'crm_claim_type',
'crm_claim_code',
],
'data': [
'data/ir_sequence_type.xml',
'views/crm_claim_type.xml',
],
'active': True,
'installable': True,
}

View File

@@ -0,0 +1,69 @@
<?xml version="1.0"?>
<openerp>
<data noupdate="1">
<!-- Claims Sequence n° -->
<record id="seq_type_claim_supplier" model="ir.sequence.type">
<field name="name">CRM Claim Supplier</field>
<field name="code">crm.claim.rma.supplier</field>
</record>
<record id="seq_claim_supplier" model="ir.sequence">
<field name="name">CRM Claim Supplier</field>
<field name="code">crm.claim.rma.supplier</field>
<field name="padding">5</field>
<field name="prefix">RMA-V/%(year)s/</field>
</record>
<record id="seq_type_claim_customer" model="ir.sequence.type">
<field name="name">CRM Claim Client</field>
<field name="code">crm.claim.rma.customer</field>
</record>
<record id="seq_claim_customer" model="ir.sequence">
<field name="name">CRM Claim Client</field>
<field name="code">crm.claim.rma.customer</field>
<field name="padding">5</field>
<field name="prefix">RMA-C/%(year)s/</field>
</record>
<record id="seq_type_claim_basic" model="ir.sequence.type">
<field name="name">CRM Claim</field>
<field name="code">crm.claim.rma.basic</field>
</record>
<record id="seq_claim_basic" model="ir.sequence">
<field name="name">CRM Claim</field>
<field name="code">crm.claim.rma.basic</field>
<field name="padding">5</field>
<field name="prefix">RMA/%(year)s/</field>
</record>
<record id="seq_type_claim_line" model="ir.sequence.type">
<field name="name">Claim Line</field>
<field name="code">claim.line</field>
</record>
<record id="seq_claim_line" model="ir.sequence">
<field name="name">Claim Line</field>
<field name="code">claim.line</field>
<field eval="5" name="padding"/>
<field name="implementation">no_gap</field>
<field name="prefix">RMA-R/</field>
</record>
<!-- Claims Type -->
<record id="crm_claim_type.crm_claim_type_supplier" model="crm.claim.type">
<field name="ir_sequence_id"
search="[('code', '=', 'crm.claim.rma.supplier')]"
model="ir.sequence"
/>
</record>
<record id="crm_claim_type.crm_claim_type_customer" model="crm.claim.type">
<field name="ir_sequence_id"
search="[('code', '=', 'crm.claim.rma.customer')]"
model="ir.sequence"
/>
</record>
</data>
</openerp>

View File

@@ -0,0 +1,22 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * crm_claim_rma_number
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 8.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2015-07-17 19:13+0000\n"
"PO-Revision-Date: 2015-07-17 19:13+0000\n"
"Last-Translator: <>\n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: \n"
#. module: crm_claim_rma_code
#: field:crm.claim.type,ir_sequence_id:0
msgid "Sequence Number"
msgstr ""

View File

@@ -0,0 +1,22 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * crm_claim_rma_number
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 8.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2015-07-17 19:13+0000\n"
"PO-Revision-Date: 2015-07-17 19:13+0000\n"
"Last-Translator: <>\n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: \n"
#. module: crm_claim_rma_code
#: field:crm.claim.type,ir_sequence_id:0
msgid "Sequence Number"
msgstr "Número de secuencia"

View File

@@ -0,0 +1,16 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * crm_claim_rma_number
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 8.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2015-07-17 19:13+0000\n"
"PO-Revision-Date: 2015-07-17 19:13+0000\n"
"Last-Translator: <>\n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: \n"

View File

@@ -0,0 +1,16 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * crm_claim_rma_number
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 8.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2015-07-17 19:13+0000\n"
"PO-Revision-Date: 2015-07-17 19:13+0000\n"
"Last-Translator: <>\n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: \n"

View File

@@ -0,0 +1,16 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * crm_claim_rma_number
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 8.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2015-07-17 19:13+0000\n"
"PO-Revision-Date: 2015-07-17 19:13+0000\n"
"Last-Translator: <>\n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: \n"

View File

@@ -0,0 +1,22 @@
# -*- coding: utf-8 -*-
##############################################################################
#
# Copyright 2015 Vauxoo
# Author: Osval Reyes, Yanina Aular
#
# 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 . import crm_claim_type

View File

@@ -0,0 +1,33 @@
# -*- coding: utf-8 -*-
##############################################################################
#
# Copyright 2015 Vauxoo
# Author: Osval Reyes, Yanina Aular
#
# 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 openerp import fields, models
class CrmClaimType(models.Model):
_inherit = 'crm.claim.type'
ir_sequence_id = \
fields.Many2one('ir.sequence',
string='Sequence Code',
default=lambda self: self.env['ir.sequence'].
search([('code', '=', 'crm.claim.rma.basic')])
)

View File

@@ -0,0 +1,25 @@
<?xml version="1.0" encoding="UTF-8"?>
<openerp>
<data>
<record id="crm_claim_type_form_sequence" model="ir.ui.view">
<field name="name">crm.claim.type.form</field>
<field name="model">crm.claim.type</field>
<field name="inherit_id" ref="crm_claim_type.crm_claim_type_form"/>
<field name="arch" type="xml">
<xpath expr="//field[@name='active']" position="before">
<field name="ir_sequence_id" attrs="{'required': True}"/>
</xpath>
</field>
</record>
<record id="crm_claim_type_tree_sequence" model="ir.ui.view">
<field name="name">crm.claim.type.tree</field>
<field name="model">crm.claim.type</field>
<field name="inherit_id" ref="crm_claim_type.crm_claim_type_tree"/>
<field name="arch" type="xml">
<xpath expr="//field[@name='active']" position="before">
<field name="ir_sequence_id"/>
</xpath>
</field>
</record>
</data>
</openerp>