Browse Source

New Module Into Sale Category

pull/81/head
SHEREEF PT 8 years ago
parent
commit
cb5d19c6a0
  1. 23
      sale_invoice_tag_pass/__init__.py
  2. 41
      sale_invoice_tag_pass/__openerp__.py
  3. 23
      sale_invoice_tag_pass/models/__init__.py
  4. 54
      sale_invoice_tag_pass/models/sale_invoice_tag_pass.py
  5. BIN
      sale_invoice_tag_pass/static/description/banner.jpg
  6. BIN
      sale_invoice_tag_pass/static/description/icon.png
  7. 69
      sale_invoice_tag_pass/static/description/index.html
  8. BIN
      sale_invoice_tag_pass/static/description/invoice_tag.png
  9. BIN
      sale_invoice_tag_pass/static/description/sale_order_tag.png
  10. 27
      sale_invoice_tag_pass/views/sale_invoice_tag_pass_view.xml

23
sale_invoice_tag_pass/__init__.py

@ -0,0 +1,23 @@
# -*- coding: utf-8 -*-
##############################################################################
#
# Cybrosys Technologies Pvt. Ltd.
# Copyright (C) 2009-TODAY Cybrosys Technologies(<http://www.cybrosys.com>).
# Author: Nilmar Shereef(<http://www.cybrosys.com>)
# 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 <http://www.gnu.org/licenses/>.
#
##############################################################################
import models

41
sale_invoice_tag_pass/__openerp__.py

@ -0,0 +1,41 @@
# -*- coding: utf-8 -*-
##############################################################################
#
# Cybrosys Technologies Pvt. Ltd.
# Copyright (C) 2009-TODAY Cybrosys Technologies(<http://www.cybrosys.com>).
# Author: Nilmar Shereef(<http://www.cybrosys.com>)
# 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 <http://www.gnu.org/licenses/>.
#
##############################################################################
{
'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,
}

23
sale_invoice_tag_pass/models/__init__.py

@ -0,0 +1,23 @@
# -*- coding: utf-8 -*-
##############################################################################
#
# Cybrosys Technologies Pvt. Ltd.
# Copyright (C) 2009-TODAY Cybrosys Technologies(<http://www.cybrosys.com>).
# Author: Nilmar Shereef(<http://www.cybrosys.com>)
# 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 <http://www.gnu.org/licenses/>.
#
##############################################################################
import sale_invoice_tag_pass

54
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(<http://www.cybrosys.com>).
# Author: Nilmar Shereef(<http://www.cybrosys.com>)
# 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 <http://www.gnu.org/licenses/>.
#
##############################################################################
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

BIN
sale_invoice_tag_pass/static/description/banner.jpg

Binary file not shown.

After

Width:  |  Height:  |  Size: 237 KiB

BIN
sale_invoice_tag_pass/static/description/icon.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 19 KiB

69
sale_invoice_tag_pass/static/description/index.html

@ -0,0 +1,69 @@
<section class="oe_container">
<div class="oe_row oe_spaced">
<h2 class="oe_slogan">Sales Tags To Invoice Tags</h2>
<h3 class="oe_slogan">It Gives Sales Tags To Invoice Tags</h3>
<h4 class="oe_slogan">Author : Cybrosys Techno Solutions , www.cybrosys.com</h4>
</div>
<div class="oe_row oe_spaced">
<h2 class="oe_slogan">Add Sale Invoice Tags</h2>
<div class="oe_span12">
<p class='oe_mt32'>
&#x261B;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<br/>* Invoice from Sales order<br/>* Advance Invoice<br/>* Percentage bases invoice from Sales Order.
</p>
<div class="oe_centeralign oe_websiteonly">
</div>
</div>
</div>
</section>
<section class="oe_container oe_dark">
<div class="oe_row">
<h2 class="oe_slogan">Sale Order Tags - Odoo Default</h2>
<div class="oe_span12">
<p class='oe_mt32'>
&#x261B;Tags display on Quotation/Sale Order form will be pass to respective customer invoices of that sales order. <br>
</p>
<div class="oe_row_img oe_centered">
<img class="oe_picture oe_screenshot" src="sale_order_tag.png">
</div>
</div>
</div>
</section>
<section>
<div class="oe_row">
<h2 class="oe_slogan">Tax Tags on Customer Invoice Form</h2>
<div class="oe_span12">
<p class='oe_mt32'>
&#x261B;Tags from sale order will be shown here. <br>
</p>
<div class="oe_row_img oe_centered">
<img class="oe_picture oe_screenshot" src="invoice_tag.png">
</div>
</div>
</div>
</section>
<section class="oe_container oe_dark">
<h2 class="oe_slogan">Need Any Help?</h2>
<div class="oe_slogan">
<a class="btn btn-primary btn-lg mt8"
style="color: #FFFFFF !important;" href="http://www.cybrosys.com"><i
class="fa fa-envelope"></i> Email </a> <a
class="btn btn-primary btn-lg mt8" style="color: #FFFFFF !important;"
href="http://www.cybrosys.com/contact/"><i
class="fa fa-phone"></i> Contact Us </a> <a
class="btn btn-primary btn-lg mt8" style="color: #FFFFFF !important;"
href="http://www.cybrosys.com/odoo-customization-and-installation/"><i
class="fa fa-check-square"></i> Request Customization </a>
</div>
</section>

BIN
sale_invoice_tag_pass/static/description/invoice_tag.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 140 KiB

BIN
sale_invoice_tag_pass/static/description/sale_order_tag.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 142 KiB

27
sale_invoice_tag_pass/views/sale_invoice_tag_pass_view.xml

@ -0,0 +1,27 @@
<?xml version="1.0"?>
<openerp>
<data>
<record model="ir.ui.view" id="sale_order_sale_tag">
<field name="model">sale.order</field>
<field name="name">sale.order</field>
<field name="inherit_id" ref="sale.view_order_form"/>
<field name="arch" type="xml">
<xpath expr="//field[@name='user_id']" position="after">
<field name ="sale_tag" widget="many2many_tags"/>
</xpath>
</field>
</record>
<record model="ir.ui.view" id="sale_order_sale_tag_view">
<field name="model">account.invoice</field>
<field name="name">account.invoice</field>
<field name="inherit_id" ref="account.invoice_form"/>
<field name="arch" type="xml">
<xpath expr="//field[@name='date_invoice']" position="after">
<field name = "sale_tag" widget="many2many_tags"/>
</xpath>
</field>
</record>
</data>
</openerp>
Loading…
Cancel
Save