@ -1,10 +0,0 @@ |
|||||
Account Payment Receipt v9 |
|
||||
========================== |
|
||||
This module will print payment receipts with paid details. |
|
||||
|
|
||||
Credits |
|
||||
======= |
|
||||
Cybrosys Techno Solutions |
|
||||
Author |
|
||||
------ |
|
||||
* Cybrosys Techno Solutions<http://www.cybrosys.com> |
|
@ -1,23 +0,0 @@ |
|||||
# -*- coding: utf-8 -*- |
|
||||
############################################################################## |
|
||||
# |
|
||||
# Cybrosys Technologies Pvt. Ltd. |
|
||||
# Copyright (C) 2009-TODAY Cybrosys Technologies(<http://www.cybrosys.com>). |
|
||||
# Author: Niyas Raphy(<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 |
|
@ -1,42 +0,0 @@ |
|||||
# -*- coding: utf-8 -*- |
|
||||
############################################################################## |
|
||||
# |
|
||||
# Cybrosys Technologies Pvt. Ltd. |
|
||||
# Copyright (C) 2009-TODAY Cybrosys Technologies(<http://www.cybrosys.com>). |
|
||||
# Author: Niyas Raphy(<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': 'Account Payment Receipt', |
|
||||
'version': '0.1', |
|
||||
'description': """Payment Receipt With Paid Details""", |
|
||||
'summary': 'Payment Receipt With Paid Details', |
|
||||
'author': 'Cybrosys Techno Solutions', |
|
||||
'company': 'Cybrosys Techno Solutions', |
|
||||
'website': 'http://www.cybrosys.com', |
|
||||
'category': 'Accounting', |
|
||||
'depends': ['base', 'account'], |
|
||||
'data': [ |
|
||||
'views/receipt_print_template.xml', |
|
||||
'views/account_payment_print.xml', |
|
||||
], |
|
||||
'demo': [], |
|
||||
'images': ['static/description/project_banner.jpg'], |
|
||||
'license': 'AGPL-3', |
|
||||
'installable': True, |
|
||||
'auto_install': False, |
|
||||
} |
|
@ -1,23 +0,0 @@ |
|||||
# -*- coding: utf-8 -*- |
|
||||
############################################################################## |
|
||||
# |
|
||||
# Cybrosys Technologies Pvt. Ltd. |
|
||||
# Copyright (C) 2009-TODAY Cybrosys Technologies(<http://www.cybrosys.com>). |
|
||||
# Author: Niyas Raphy(<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 account_receipt_parser |
|
@ -1,62 +0,0 @@ |
|||||
# -*- coding: utf-8 -*- |
|
||||
############################################################################## |
|
||||
# |
|
||||
# Cybrosys Technologies Pvt. Ltd. |
|
||||
# Copyright (C) 2009-TODAY Cybrosys Technologies(<http://www.cybrosys.com>). |
|
||||
# Author: Niyas Raphy(<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 odoo.report import report_sxw |
|
||||
from odoo.osv import osv |
|
||||
from odoo import api |
|
||||
from odoo.http import request |
|
||||
import json |
|
||||
|
|
||||
|
|
||||
class AccountReceiptParser(report_sxw.rml_parse): |
|
||||
|
|
||||
def __init__(self, cr, uid, name, context=None): |
|
||||
super(AccountReceiptParser, self).__init__(cr, uid, name, context=context) |
|
||||
self.localcontext.update({ |
|
||||
'get_details': self.get_details, |
|
||||
}) |
|
||||
self.context = context |
|
||||
|
|
||||
@api.multi |
|
||||
def get_details(self, doc): |
|
||||
lines = [] |
|
||||
acc_inv = request.env['account.invoice'] |
|
||||
acc_inv_rec = acc_inv.search([('number', '=', doc.number)]) |
|
||||
d = json.loads(acc_inv_rec.payments_widget) |
|
||||
for payment in d['content']: |
|
||||
vals = { |
|
||||
'memo': payment['name'], |
|
||||
'amount': payment['amount'], |
|
||||
'method': payment['journal_name'], |
|
||||
'date': payment['date'], |
|
||||
} |
|
||||
lines.append(vals) |
|
||||
return lines |
|
||||
|
|
||||
|
|
||||
class PrintReport(osv.AbstractModel): |
|
||||
_name = 'report.account_payment_receipt.report_payment' |
|
||||
_inherit = 'report.abstract_report' |
|
||||
_template = 'account_payment_receipt.report_payment' |
|
||||
_wrapped_report_class = AccountReceiptParser |
|
||||
|
|
||||
|
|
Before Width: | Height: | Size: 108 KiB |
Before Width: | Height: | Size: 30 KiB |
Before Width: | Height: | Size: 48 KiB |
Before Width: | Height: | Size: 50 KiB |
Before Width: | Height: | Size: 10 KiB |
@ -1,103 +0,0 @@ |
|||||
<section class="oe_container"> |
|
||||
<div class="oe_row"> |
|
||||
<h2 class="oe_slogan">Payment Receipt Report</h2> |
|
||||
<h3 class="oe_slogan">Customer Receipts & Vendor Payment Report</h3> |
|
||||
<h4 class="oe_slogan">Cybrosys Techno Solutions, www.cybrosys.com</h4> |
|
||||
</div> |
|
||||
</section> |
|
||||
<section> |
|
||||
<div class="row oe_row oe_spaced"> |
|
||||
<div class="col-md-12"> |
|
||||
☀ Generate Customer invoice receipt with payment details.<br> |
|
||||
☀ Generate Vendor receipt with payment details.<br> |
|
||||
</div> |
|
||||
</div> |
|
||||
<div class="oe_row"> |
|
||||
<h2 class="oe_slogan">Customer Receipts</h2> |
|
||||
<h4 class="oe_slogan">Customer Receipts Form View</h4> |
|
||||
<div class="oe_span12"> |
|
||||
<p class='oe_mt32'> |
|
||||
<br> |
|
||||
</p> |
|
||||
<div class="oe_row_img oe_centered"> |
|
||||
<img class="oe_picture oe_screenshot" src="customer_invoice_form_view.png"> |
|
||||
</div> |
|
||||
</div> |
|
||||
</div> |
|
||||
<div class="oe_row oe_spaced"> |
|
||||
<h4 class="oe_slogan">Customer Receipt Print</h4> |
|
||||
<div class="oe_span12"> |
|
||||
<p class='oe_mt32'> |
|
||||
<br> |
|
||||
</p> |
|
||||
<div class="oe_row_img oe_centered"> |
|
||||
<img class="oe_picture oe_screenshot" src="receipt_print_customer.png"> |
|
||||
</div> |
|
||||
</div> |
|
||||
</div> |
|
||||
<div class="oe_row oe_spaced"> |
|
||||
<h4 class="oe_slogan">Customer Receipt Report</h4> |
|
||||
<div class="oe_span12"> |
|
||||
<p class='oe_mt32'> |
|
||||
<br> |
|
||||
</p> |
|
||||
<div class="oe_row_img oe_centered"> |
|
||||
<img class="oe_picture oe_screenshot" src="customer_receipt.png"> |
|
||||
</div> |
|
||||
</div> |
|
||||
</div> |
|
||||
</section> |
|
||||
<section> |
|
||||
<div class="oe_row oe_spaced"> |
|
||||
<h2 class="oe_slogan">Vendor Receipts</h2> |
|
||||
<h4 class="oe_slogan">Vendor Receipts Form View</h4> |
|
||||
<div class="oe_span12"> |
|
||||
<p class='oe_mt32'> |
|
||||
<br> |
|
||||
</p> |
|
||||
<div class="oe_row_img oe_centered"> |
|
||||
<img class="oe_picture oe_screenshot" src="vendor_invoice_form.png"> |
|
||||
</div> |
|
||||
</div> |
|
||||
</div> |
|
||||
<div class="oe_row oe_spaced"> |
|
||||
<h4 class="oe_slogan">Vendor Receipt Print</h4> |
|
||||
<div class="oe_span12"> |
|
||||
<p class='oe_mt32'> |
|
||||
<br> |
|
||||
</p> |
|
||||
<div class="oe_row_img oe_centered"> |
|
||||
<img class="oe_picture oe_screenshot" src="vendor_print_button.png"> |
|
||||
</div> |
|
||||
</div> |
|
||||
</div> |
|
||||
<div class="oe_row oe_spaced"> |
|
||||
<h4 class="oe_slogan">Vendor Receipt Report</h4> |
|
||||
<div class="oe_span12"> |
|
||||
<p class='oe_mt32'> |
|
||||
<br> |
|
||||
</p> |
|
||||
<div class="oe_row_img oe_centered"> |
|
||||
<img class="oe_picture oe_screenshot" src="vendor_receipt.png"> |
|
||||
</div> |
|
||||
</div> |
|
||||
</div> |
|
||||
</section> |
|
||||
|
|
||||
<section class="oe_container oe_dark"> |
|
||||
<h3 class="oe_slogan">Need Any Help?</h3> |
|
||||
<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> |
|
||||
<img src="cybro_logo.png" style="width: 190px; margin-bottom: 20px;" class="center-block"> |
|
||||
</section> |
|
||||
|
|
||||
|
|
Before Width: | Height: | Size: 27 KiB |
Before Width: | Height: | Size: 26 KiB |
Before Width: | Height: | Size: 16 KiB |
Before Width: | Height: | Size: 45 KiB |
@ -1,22 +0,0 @@ |
|||||
<?xml version="1.0" encoding="utf-8"?> |
|
||||
<odoo> |
|
||||
<data> |
|
||||
<report |
|
||||
id="report_payment_receipt" |
|
||||
string="Payment Receipt" |
|
||||
model="account.invoice" |
|
||||
report_type="qweb-pdf" |
|
||||
file="account_payment_receipt.report_payment" |
|
||||
name="account_payment_receipt.report_payment" |
|
||||
/> |
|
||||
|
|
||||
<template id="report_payment"> |
|
||||
<t t-call="report.html_container"> |
|
||||
<t t-foreach="docs" t-as="doc"> |
|
||||
<t t-call="account_payment_receipt.report_payment_print" t-lang="doc.partner_id.lang"/> |
|
||||
</t> |
|
||||
</t> |
|
||||
</template> |
|
||||
|
|
||||
</data> |
|
||||
</odoo> |
|
@ -1,83 +0,0 @@ |
|||||
<?xml version="1.0" encoding="utf-8"?> |
|
||||
<odoo> |
|
||||
<template id="report_payment_print"> |
|
||||
<t t-call="report.html_container"> |
|
||||
<t t-set="doc" t-value="doc.with_context({'lang':doc.partner_id.lang})" /> |
|
||||
<t t-call="report.internal_layout"> |
|
||||
<div class="page" > |
|
||||
<t t-call="report.external_layout"> |
|
||||
<div class="header" style="text-align:center;"><h1><strong>Payment Receipt</strong></h1></div> |
|
||||
<div class="row mt32 mb32" style="text-align:center;"> |
|
||||
</div> |
|
||||
<div class="row mt32 mb32" > |
|
||||
<div class="col-xs-12" style="text-align:left;"> |
|
||||
<span style="float:left;"><strong>Partner:</strong><span t-field="doc.partner_id.name"/></span> |
|
||||
<span style="float:left; padding-left:50px;"><strong>Invoice Date:</strong><span t-field="doc.date_invoice"/></span> |
|
||||
<span style="float:left; padding-left:50px;"><strong>Due Date:</strong><span t-field="doc.date_due"/></span> |
|
||||
</div> |
|
||||
</div> |
|
||||
|
|
||||
<table class="table table-condensed"> |
|
||||
<thead> |
|
||||
<tr > |
|
||||
<th style="background-color:#9b9da0 !important;">INVOICE TOTAL</th> |
|
||||
<th style="background-color:#9b9da0 !important;">PAID</th> |
|
||||
<th style="background-color:#9b9da0 !important;">DUE</th> |
|
||||
</tr> |
|
||||
</thead> |
|
||||
<tbody> |
|
||||
<t t-set="balance" t-value='0'></t> |
|
||||
<t t-set="balance" t-value = "doc.amount_total-doc.residual"></t> |
|
||||
<tr> |
|
||||
<td> |
|
||||
<p t-field="doc.amount_total"/> |
|
||||
</td> |
|
||||
<td><strong><t t-esc="balance"></t></strong></td> |
|
||||
<td> |
|
||||
<p t-field="doc.residual"/> |
|
||||
</td> |
|
||||
</tr> |
|
||||
</tbody> |
|
||||
</table> |
|
||||
|
|
||||
<div class="row mt32 mb32" style="text-align:center;"> |
|
||||
<div class="col-xs-12"> |
|
||||
<h3><strong>Payment Details</strong></h3> |
|
||||
</div> |
|
||||
</div> |
|
||||
<t t-if="doc.amount_total != doc.residual"> |
|
||||
<table class="table table-condensed"> |
|
||||
<thead> |
|
||||
<tr > |
|
||||
<th style="background-color:#9b9da0 !important;">MEMO</th> |
|
||||
<th style="background-color:#9b9da0 !important;">PAYMENT DATE</th> |
|
||||
<th style="background-color:#9b9da0 !important;">METHOD</th> |
|
||||
<th style="background-color:#9b9da0 !important;">AMOUNT</th> |
|
||||
</tr> |
|
||||
</thead> |
|
||||
<tbody> |
|
||||
<t t-foreach="get_details(doc)" t-as="b"> |
|
||||
<tr> |
|
||||
<td> |
|
||||
<span t-att-style="style" t-esc="b['memo']"/> |
|
||||
</td> |
|
||||
<td> |
|
||||
<span t-att-style="style" t-esc="b['date']"/> |
|
||||
</td> |
|
||||
<td> |
|
||||
<span t-att-style="style" t-esc="b['method']"/> |
|
||||
</td> |
|
||||
<td> |
|
||||
<span t-att-style="style" t-esc="b['amount']"/> |
|
||||
</td> |
|
||||
</tr> |
|
||||
</t> |
|
||||
</tbody> |
|
||||
</table> |
|
||||
</t> |
|
||||
</t> |
|
||||
</div> |
|
||||
</t> |
|
||||
</t> |
|
||||
</template> |
|
||||
</odoo> |
|
@ -1 +0,0 @@ |
|||||
import models |
|
@ -1,44 +0,0 @@ |
|||||
# -*- coding: utf-8 -*- |
|
||||
############################################################################## |
|
||||
# |
|
||||
# Cybrosys Technologies Pvt. Ltd. |
|
||||
# Copyright (C) 2009-TODAY Cybrosys Technologies(<http://www.cybrosys.com>). |
|
||||
# Author: Sreejith P(<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': 'Available Stock in Product', |
|
||||
'version': '0.3', |
|
||||
'author': 'Cybrosys Techno Solutions', |
|
||||
'company': 'Cybrosys Techno Solutions', |
|
||||
'website': 'http://www.cybrosys.com', |
|
||||
'summary': 'Estimate Inventory Levels By Warehouses in Product Form', |
|
||||
'depends': [ |
|
||||
'product', |
|
||||
'stock' |
|
||||
], |
|
||||
'category': 'Warehouse', |
|
||||
'data': [ |
|
||||
'views/product_internal_stock.xml', |
|
||||
'security/ir.model.access.csv', |
|
||||
], |
|
||||
'demo': [], |
|
||||
'license': 'AGPL-3', |
|
||||
'images': ['static/description/banner.jpg'], |
|
||||
'installable': True, |
|
||||
'auto_install': False |
|
||||
} |
|
@ -1,24 +0,0 @@ |
|||||
# -*- coding: utf-8 -*- |
|
||||
############################################################################## |
|
||||
# |
|
||||
# Cybrosys Technologies Pvt. Ltd. |
|
||||
# Copyright (C) 2009-TODAY Cybrosys Technologies(<http://www.cybrosys.com>). |
|
||||
# Author: Sreejith P(<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 product_internal_master |
|
@ -1,61 +0,0 @@ |
|||||
# -*- coding: utf-8 -*- |
|
||||
############################################################################## |
|
||||
# |
|
||||
# Cybrosys Technologies Pvt. Ltd. |
|
||||
# Copyright (C) 2009-TODAY Cybrosys Technologies(<http://www.cybrosys.com>). |
|
||||
# Author: Sreejith P(<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 fields, models, api |
|
||||
|
|
||||
|
|
||||
class ProductForm(models.Model): |
|
||||
_inherit = 'product.template' |
|
||||
|
|
||||
internal_location = fields.One2many('stock.quantity', 'product_id', compute='get_product_qty') |
|
||||
|
|
||||
def get_product_qty(self): |
|
||||
location_list = [] |
|
||||
product_list = [] |
|
||||
obj_location = self.env['stock.location'].search([('usage', '=', 'internal')]) |
|
||||
for i in obj_location: |
|
||||
location_list.append(i.id) |
|
||||
obj_product = self.env['product.product'].search([('product_tmpl_id', '=', self.id)]) |
|
||||
for i in obj_product: |
|
||||
obj_quant = self.env['stock.quant'].search([('product_id', '=', i.id), |
|
||||
('location_id', 'in', location_list)]) |
|
||||
for obj in obj_quant: |
|
||||
print obj.location_id.id |
|
||||
move_line = {'product_id': obj.product_id.id, |
|
||||
'stock_location': obj.location_id.id, |
|
||||
'qty_on_hand': obj.qty, |
|
||||
} |
|
||||
product_list.append(move_line) |
|
||||
for i in product_list: |
|
||||
self.internal_location |= self.env['stock.quantity'].create(i) |
|
||||
|
|
||||
|
|
||||
class InternalLocation(models.Model): |
|
||||
_name = 'stock.quantity' |
|
||||
|
|
||||
stock_location = fields.Many2one('stock.location', string='Location Name') |
|
||||
qty_on_hand = fields.Float('On Hand') |
|
||||
forecast = fields.Float('Forecast') |
|
||||
incoming_qty = fields.Float('Incoming Quantity') |
|
||||
outgoing_qty = fields.Float('Outgoing Quantity') |
|
||||
product_id = fields.Many2one('product.template', string='Product') |
|
|
Before Width: | Height: | Size: 338 KiB |
Before Width: | Height: | Size: 50 KiB |
Before Width: | Height: | Size: 24 KiB |
Before Width: | Height: | Size: 14 KiB |
@ -1,56 +0,0 @@ |
|||||
<section class="oe_container"> |
|
||||
<div class="oe_row oe_spaced"> |
|
||||
<div class="oe_span12"> |
|
||||
<h2 class="oe_slogan">Stock Balance by Locations</h2> |
|
||||
<h3 class="oe_slogan">Estimate inventory levels by warehouses in Product Form</h3> |
|
||||
<h4 class="oe_slogan">Author : Cybrosys Techno Solutions , www.cybrosys.com</h4> |
|
||||
<br/> |
|
||||
</div> |
|
||||
<div class="oe_span6"> |
|
||||
<div class="oe_demo oe_picture oe_screenshot"> |
|
||||
<img src="dev.png"> |
|
||||
</div> |
|
||||
</div> |
|
||||
<div class="oe_span6"> |
|
||||
<p class="oe_mt32"> |
|
||||
<p>☀ The app goal is to provide you with instant outlook of how many units of this product are stocked at internal location.</p> |
|
||||
</p> |
|
||||
</div> |
|
||||
</div> |
|
||||
</section> |
|
||||
|
|
||||
<section class="oe_container"> |
|
||||
<div class="oe_row oe_spaced"> |
|
||||
<div class="oe_span6"> |
|
||||
<p class="oe_mt32"> |
|
||||
<p>☛ The estimation is provided right on a product form (the tab Inventory) as a table, where each line represents an internal location</p> |
|
||||
</p> |
|
||||
</div> |
|
||||
<div class="oe_span6"> |
|
||||
<div class="oe_demo oe_picture oe_screenshot"> |
|
||||
<img src="product_master.jpg"> |
|
||||
</div> |
|
||||
</div> |
|
||||
</div> |
|
||||
</section> |
|
||||
|
|
||||
<section class="oe_container oe_dark"> |
|
||||
<h2 class="oe_slogan" style="margin-top:20px;" >Need Any Help?</h2> |
|
||||
<div class="oe_slogan" style="margin-top:10px !important;"> |
|
||||
<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> |
|
||||
<img src="cybro_logo.png" style="width: 190px; margin-bottom: 20px;" class="center-block"> |
|
||||
</section> |
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
Before Width: | Height: | Size: 160 KiB |
@ -1,21 +0,0 @@ |
|||||
<?xml version="1.0" encoding="utf-8" ?> |
|
||||
<openerp> |
|
||||
<data> |
|
||||
<record id="product_form_location" model="ir.ui.view"> |
|
||||
<field name="name">Product Locations</field> |
|
||||
<field name="model">product.template</field> |
|
||||
<field name="inherit_id" ref="product.product_template_only_form_view"/> |
|
||||
<field name="arch" type="xml"> |
|
||||
<xpath expr="//group[@name='inventory']" position="after"> |
|
||||
<separator string="Stock Balance By Locations" attrs="{'invisible':[('type', '!=', 'product')]}"/> |
|
||||
<field name="internal_location" attrs="{'invisible':[('type', '!=', 'product')]}"> |
|
||||
<tree> |
|
||||
<field name="stock_location"/> |
|
||||
<field name="qty_on_hand"/> |
|
||||
</tree> |
|
||||
</field> |
|
||||
</xpath> |
|
||||
</field> |
|
||||
</record> |
|
||||
</data> |
|
||||
</openerp> |
|