mirror of
https://github.com/OCA/rma.git
synced 2025-02-16 17:11:47 +02:00
[ADD] new module crm_claim_product_supplier
This commit is contained in:
75
crm_claim_product_supplier/README.rst
Normal file
75
crm_claim_product_supplier/README.rst
Normal file
@@ -0,0 +1,75 @@
|
||||
.. image:: https://img.shields.io/badge/licence-AGPL--3-blue.svg
|
||||
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
|
||||
:alt: License: AGPL-3
|
||||
|
||||
==========================
|
||||
CRM Claim Product Supplier
|
||||
==========================
|
||||
|
||||
This module adds information in claim lines to keep supplier and supplier
|
||||
invoice when creating/editing a claim.
|
||||
|
||||
As this module shows, this is not used directly be the end user, it may be used
|
||||
as complementary for another modules to explode information stored by this one.
|
||||
|
||||
Installation
|
||||
============
|
||||
|
||||
To install this module, just select it from available modules
|
||||
|
||||
Configuration
|
||||
=============
|
||||
|
||||
Aditional configuration is not needed
|
||||
|
||||
Usage
|
||||
=====
|
||||
|
||||
* End-user direct usage is not possible, all the functionality contained in this
|
||||
module is done under the hood and no view is included
|
||||
|
||||
.. 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
|
||||
|
||||
Known issues / Roadmap
|
||||
======================
|
||||
|
||||
No issues exists yet
|
||||
|
||||
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_product_supplier%0Aversion:%208.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
|
||||
|
||||
|
||||
Credits
|
||||
=======
|
||||
|
||||
Contributors
|
||||
------------
|
||||
|
||||
* Yanina Aular <yanina.aular@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.
|
||||
22
crm_claim_product_supplier/__init__.py
Normal file
22
crm_claim_product_supplier/__init__.py
Normal file
@@ -0,0 +1,22 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
##############################################################################
|
||||
#
|
||||
# Copyright 2015 Vauxoo
|
||||
# Author: 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
|
||||
34
crm_claim_product_supplier/__openerp__.py
Normal file
34
crm_claim_product_supplier/__openerp__.py
Normal file
@@ -0,0 +1,34 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
##############################################################################
|
||||
#
|
||||
# Copyright 2015 Vauxoo
|
||||
# Author: 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 Product Supplier',
|
||||
'version': '8.0.1.0.0',
|
||||
'author': 'Vauxoo, Odoo Community Association (OCA)',
|
||||
'website': 'http://www.vauxoo.com/',
|
||||
'license': 'AGPL-3',
|
||||
'category': 'Generic Modules/CRM & SRM',
|
||||
'depends': [
|
||||
'crm_rma_lot_mass_return',
|
||||
],
|
||||
'installable': True,
|
||||
'auto_install': False,
|
||||
}
|
||||
@@ -0,0 +1,42 @@
|
||||
# Translation of Odoo Server.
|
||||
# This file contains the translation of the following modules:
|
||||
# * crm_claim_product_supplier
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: Odoo Server 8.0\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2015-08-14 19:24+0000\n"
|
||||
"PO-Revision-Date: 2015-08-14 19:24+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_product_supplier
|
||||
#: model:ir.model,name:crm_claim_product_supplier.model_claim_line
|
||||
msgid "List of product to return"
|
||||
msgstr ""
|
||||
|
||||
#. module: crm_claim_product_supplier
|
||||
#: field:claim.line,supplier_id:0
|
||||
msgid "Supplier"
|
||||
msgstr ""
|
||||
|
||||
#. module: crm_claim_product_supplier
|
||||
#: field:claim.line,supplier_invoice_id:0
|
||||
msgid "Supplier Invoice"
|
||||
msgstr ""
|
||||
|
||||
#. module: crm_claim_product_supplier
|
||||
#: help:claim.line,supplier_invoice_id:0
|
||||
msgid "Supplier invoice with the purchase of goods sold to customer"
|
||||
msgstr ""
|
||||
|
||||
#. module: crm_claim_product_supplier
|
||||
#: help:claim.line,supplier_id:0
|
||||
msgid "Supplier of good in claim"
|
||||
msgstr ""
|
||||
|
||||
42
crm_claim_product_supplier/i18n/es.po
Normal file
42
crm_claim_product_supplier/i18n/es.po
Normal file
@@ -0,0 +1,42 @@
|
||||
# Translation of Odoo Server.
|
||||
# This file contains the translation of the following modules:
|
||||
# * crm_claim_product_supplier
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: Odoo Server 8.0\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2015-07-17 18:01+0000\n"
|
||||
"PO-Revision-Date: 2015-07-17 18:01+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_product_supplier
|
||||
#: model:ir.model,name:crm_claim_product_supplier.model_claim_line
|
||||
msgid "List of product to return"
|
||||
msgstr "Lista de productos a retornar"
|
||||
|
||||
#. module: crm_claim_product_supplier
|
||||
#: field:claim.line,supplier_id:0
|
||||
msgid "Supplier"
|
||||
msgstr "Proveedor"
|
||||
|
||||
#. module: crm_claim_product_supplier
|
||||
#: field:claim.line,supplier_invoice_id:0
|
||||
msgid "Supplier Invoice"
|
||||
msgstr "Factura de proveedor"
|
||||
|
||||
#. module: crm_claim_product_supplier
|
||||
#: help:claim.line,supplier_invoice_id:0
|
||||
msgid "Supplier invoice with the purchase of goods sold to customer"
|
||||
msgstr "Factura de proveedor con la orden de compra de materiales vendidos al cliente"
|
||||
|
||||
#. module: crm_claim_product_supplier
|
||||
#: help:claim.line,supplier_id:0
|
||||
msgid "Supplier of good in claim"
|
||||
msgstr "Proveedor de productos en el reclamación"
|
||||
|
||||
21
crm_claim_product_supplier/i18n/es_MX.po
Normal file
21
crm_claim_product_supplier/i18n/es_MX.po
Normal file
@@ -0,0 +1,21 @@
|
||||
# Translation of Odoo Server.
|
||||
# This file contains the translation of the following modules:
|
||||
# * crm_claim_product_supplier
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: Odoo Server 8.0\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2015-07-17 18:01+0000\n"
|
||||
"PO-Revision-Date: 2015-07-17 18:01+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_product_supplier
|
||||
#: help:claim.line,supplier_id:0
|
||||
msgid "Supplier of good in claim"
|
||||
msgstr "Proveedor de productos en el reclamo"
|
||||
16
crm_claim_product_supplier/i18n/es_PA.po
Normal file
16
crm_claim_product_supplier/i18n/es_PA.po
Normal file
@@ -0,0 +1,16 @@
|
||||
# Translation of Odoo Server.
|
||||
# This file contains the translation of the following modules:
|
||||
# * crm_claim_product_supplier
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: Odoo Server 8.0\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2015-07-17 18:01+0000\n"
|
||||
"PO-Revision-Date: 2015-07-17 18:01+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"
|
||||
21
crm_claim_product_supplier/i18n/es_VE.po
Normal file
21
crm_claim_product_supplier/i18n/es_VE.po
Normal file
@@ -0,0 +1,21 @@
|
||||
# Translation of Odoo Server.
|
||||
# This file contains the translation of the following modules:
|
||||
# * crm_claim_product_supplier
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: Odoo Server 8.0\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2015-07-17 18:01+0000\n"
|
||||
"PO-Revision-Date: 2015-07-17 18:01+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_product_supplier
|
||||
#: help:claim.line,supplier_id:0
|
||||
msgid "Supplier of good in claim"
|
||||
msgstr "Proveedor de productos en el reclamo"
|
||||
21
crm_claim_product_supplier/models/__init__.py
Normal file
21
crm_claim_product_supplier/models/__init__.py
Normal file
@@ -0,0 +1,21 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
##############################################################################
|
||||
#
|
||||
# Copyright 2015 Vauxoo
|
||||
# Author: 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 claim_line
|
||||
46
crm_claim_product_supplier/models/claim_line.py
Normal file
46
crm_claim_product_supplier/models/claim_line.py
Normal file
@@ -0,0 +1,46 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
##############################################################################
|
||||
#
|
||||
# Copyright 2015 Vauxoo
|
||||
# Author: 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 api, fields, models
|
||||
|
||||
|
||||
class ClaimLine(models.Model):
|
||||
|
||||
_inherit = 'claim.line'
|
||||
|
||||
supplier_id = \
|
||||
fields.Many2one('res.partner', string='Supplier', store=True,
|
||||
compute='_compute_supplier_and_supplier_invoice',
|
||||
help="Supplier of good in claim")
|
||||
supplier_invoice_id = \
|
||||
fields.Many2one('account.invoice',
|
||||
string='Supplier Invoice', store=True,
|
||||
compute='_compute_supplier_and_supplier_invoice',
|
||||
help="Supplier invoice with the "
|
||||
"purchase of goods sold to "
|
||||
"customer")
|
||||
|
||||
@api.depends('prodlot_id')
|
||||
def _compute_supplier_and_supplier_invoice(self):
|
||||
for claim_line in self:
|
||||
if claim_line.prodlot_id:
|
||||
claim_line.supplier_id = claim_line.prodlot_id.supplier_id.id
|
||||
claim_line.supplier_invoice_id = claim_line.prodlot_id.\
|
||||
supplier_invoice_line_id.invoice_id.id
|
||||
Reference in New Issue
Block a user