diff --git a/sale_invoice_tag_pass/__init__.py b/sale_invoice_tag_pass/__init__.py new file mode 100644 index 000000000..b2462eb50 --- /dev/null +++ b/sale_invoice_tag_pass/__init__.py @@ -0,0 +1,23 @@ +# -*- coding: utf-8 -*- +############################################################################## +# +# Cybrosys Technologies Pvt. Ltd. +# Copyright (C) 2009-TODAY Cybrosys Technologies(). +# Author: Nilmar Shereef() +# you can modify it under the terms of the GNU LESSER +# GENERAL PUBLIC LICENSE (LGPL v3), Version 3. +# +# It is forbidden to publish, distribute, sublicense, or sell copies +# of the Software or modified copies of the Software. +# +# 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 LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details. +# +# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE +# GENERAL PUBLIC LICENSE (LGPL v3) along with this program. +# If not, see . +# +############################################################################## +import models diff --git a/sale_invoice_tag_pass/__openerp__.py b/sale_invoice_tag_pass/__openerp__.py new file mode 100644 index 000000000..8ec9798b6 --- /dev/null +++ b/sale_invoice_tag_pass/__openerp__.py @@ -0,0 +1,41 @@ +# -*- coding: utf-8 -*- +############################################################################## +# +# Cybrosys Technologies Pvt. Ltd. +# Copyright (C) 2009-TODAY Cybrosys Technologies(). +# Author: Nilmar Shereef() +# you can modify it under the terms of the GNU LESSER +# GENERAL PUBLIC LICENSE (LGPL v3), Version 3. +# +# It is forbidden to publish, distribute, sublicense, or sell copies +# of the Software or modified copies of the Software. +# +# 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 LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details. +# +# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE +# GENERAL PUBLIC LICENSE (LGPL v3) along with this program. +# If not, see . +# +############################################################################## +{ + 'name': 'Sales Tags To Invoice Tags', + 'version': '0.1', + 'summary': """Pass the sales tags to its invoice""", + 'author': 'Cybrosys Techno Solutions', + 'company': 'Cybrosys Techno Solutions', + 'website': 'http://www.cybrosys.com', + 'category': 'Sale', + 'depends': ['account', 'base', 'sale'], + 'license': 'AGPL-3', + 'data': [ + 'views/sale_invoice_tag_pass_view.xml' + ], + 'demo': [], + 'images': ['static/description/banner.jpg'], + 'installable': True, + 'auto_install': False, + +} diff --git a/sale_invoice_tag_pass/models/__init__.py b/sale_invoice_tag_pass/models/__init__.py new file mode 100644 index 000000000..251b8ed90 --- /dev/null +++ b/sale_invoice_tag_pass/models/__init__.py @@ -0,0 +1,23 @@ +# -*- coding: utf-8 -*- +############################################################################## +# +# Cybrosys Technologies Pvt. Ltd. +# Copyright (C) 2009-TODAY Cybrosys Technologies(). +# Author: Nilmar Shereef() +# you can modify it under the terms of the GNU LESSER +# GENERAL PUBLIC LICENSE (LGPL v3), Version 3. +# +# It is forbidden to publish, distribute, sublicense, or sell copies +# of the Software or modified copies of the Software. +# +# 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 LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details. +# +# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE +# GENERAL PUBLIC LICENSE (LGPL v3) along with this program. +# If not, see . +# +############################################################################## +import sale_invoice_tag_pass diff --git a/sale_invoice_tag_pass/models/sale_invoice_tag_pass.py b/sale_invoice_tag_pass/models/sale_invoice_tag_pass.py new file mode 100644 index 000000000..ae13d7651 --- /dev/null +++ b/sale_invoice_tag_pass/models/sale_invoice_tag_pass.py @@ -0,0 +1,54 @@ +# -*- coding: utf-8 -*- +############################################################################## +# +# Cybrosys Technologies Pvt. Ltd. +# Copyright (C) 2009-TODAY Cybrosys Technologies(). +# Author: Nilmar Shereef() +# you can modify it under the terms of the GNU LESSER +# GENERAL PUBLIC LICENSE (LGPL v3), Version 3. +# +# It is forbidden to publish, distribute, sublicense, or sell copies +# of the Software or modified copies of the Software. +# +# 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 LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details. +# +# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE +# GENERAL PUBLIC LICENSE (LGPL v3) along with this program. +# If not, see . +# +############################################################################## +from openerp import models, api, fields + + +class SaleTag(models.Model): + _inherit = 'sale.order' + + def _default_category(self): + return self.env['res.partner.category'].browse(self._context.get('category_id')) + + sale_tag = fields.Many2many('res.partner.category', column1='partner_id', + column2='category_id', string='Sales Tag', default=_default_category) + + +class AccountInvoice(models.Model): + _inherit = 'account.invoice' + + sale_tag = fields.Many2many('res.partner.category', column1='partner_id', + column2='category_id', string='Sales Tag', compute='get_sales_tag') + + @api.one + @api.depends('partner_id') + def get_sales_tag(self): + if self.origin: + sale_order = self.env['sale.order'] + sale_tags = sale_order.search([('name', '=', self.origin)]) + for tag in sale_tags: + self.sale_tag = tag.sale_tag + + + + + diff --git a/sale_invoice_tag_pass/static/description/banner.jpg b/sale_invoice_tag_pass/static/description/banner.jpg new file mode 100644 index 000000000..cef2552ca Binary files /dev/null and b/sale_invoice_tag_pass/static/description/banner.jpg differ diff --git a/sale_invoice_tag_pass/static/description/icon.png b/sale_invoice_tag_pass/static/description/icon.png new file mode 100644 index 000000000..ce95223da Binary files /dev/null and b/sale_invoice_tag_pass/static/description/icon.png differ diff --git a/sale_invoice_tag_pass/static/description/index.html b/sale_invoice_tag_pass/static/description/index.html new file mode 100644 index 000000000..8ec027b0a --- /dev/null +++ b/sale_invoice_tag_pass/static/description/index.html @@ -0,0 +1,69 @@ +
+
+

Sales Tags To Invoice Tags

+

It Gives Sales Tags To Invoice Tags

+

Author : Cybrosys Techno Solutions , www.cybrosys.com

+
+ +
+

Add Sale Invoice Tags

+
+

+ ☛This module enables the feature to add tags on invoice form and allow user to pass tags from sales order to customer invoice form. + Supporting for
* Invoice from Sales order
* Advance Invoice
* Percentage bases invoice from Sales Order. +

+
+
+
+
+
+ +
+
+

Sale Order Tags - Odoo Default

+
+

+ ☛Tags display on Quotation/Sale Order form will be pass to respective customer invoices of that sales order.
+ +

+
+ +
+
+
+
+ +
+
+

Tax Tags on Customer Invoice Form

+
+

+ ☛Tags from sale order will be shown here.
+ +

+
+ +
+
+
+
+ +
+

Need Any Help?

+ +
+ + + + + diff --git a/sale_invoice_tag_pass/static/description/invoice_tag.png b/sale_invoice_tag_pass/static/description/invoice_tag.png new file mode 100644 index 000000000..90f34a0e7 Binary files /dev/null and b/sale_invoice_tag_pass/static/description/invoice_tag.png differ diff --git a/sale_invoice_tag_pass/static/description/sale_order_tag.png b/sale_invoice_tag_pass/static/description/sale_order_tag.png new file mode 100644 index 000000000..35cd33a74 Binary files /dev/null and b/sale_invoice_tag_pass/static/description/sale_order_tag.png differ diff --git a/sale_invoice_tag_pass/views/sale_invoice_tag_pass_view.xml b/sale_invoice_tag_pass/views/sale_invoice_tag_pass_view.xml new file mode 100644 index 000000000..8f8060a0a --- /dev/null +++ b/sale_invoice_tag_pass/views/sale_invoice_tag_pass_view.xml @@ -0,0 +1,27 @@ + + + + + + sale.order + sale.order + + + + + + + + + account.invoice + account.invoice + + + + + + + + + + \ No newline at end of file