diff --git a/stock_valued_picking_report/__init__.py b/stock_valued_picking_report/__init__.py deleted file mode 100644 index 01ebe5c..0000000 --- a/stock_valued_picking_report/__init__.py +++ /dev/null @@ -1,20 +0,0 @@ -# -*- encoding: utf-8 -*- -############################################################################## -# -# OpenERP, Open Source Management Solution -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU 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 General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program. If not, see . -# -############################################################################## -from . import models diff --git a/stock_valued_picking_report/__openerp__.py b/stock_valued_picking_report/__openerp__.py deleted file mode 100644 index 0c4c9aa..0000000 --- a/stock_valued_picking_report/__openerp__.py +++ /dev/null @@ -1,54 +0,0 @@ -# -*- encoding: utf-8 -*- -############################################################################## -# -# OpenERP, Open Source Management Solution -# Copyright (c) 2014 Serv. Tecnol. Avanzados (http://www.serviciosbaeza.com) -# Pedro M. Baeza -# -# 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 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 . -# -############################################################################## - -{ - "name" : "Valued picking list", - "version" : "1.0", - "author" : "Serv. Tecnol. Avanzados - Pedro M. Baeza", - "website" : "www.serviciosbaeza.com", - "category": "Warehouse Management", - "description": """ -Valued pickings -=============== - -Add amount information to picking list report and delivery order view. - -You can select at partner level if picking list report must be valued or not. - -Inspired in stock_valued 6.x module by Acysos S.L., Pablo Rocandio, NaN·tic and -Zikzakmedia SL.""", - "license" : "GPL-3", - "depends" : [ - "base", - "account", - "stock", - "sale", - "delivery", - ], - "data" : [ - 'views/res_partner_view.xml', - 'views/stock_picking_view.xml', - 'report/stock_valued_report.xml', - ], - "installable": True -} - diff --git a/stock_valued_picking_report/i18n/es.po b/stock_valued_picking_report/i18n/es.po deleted file mode 100644 index dba6cd3..0000000 --- a/stock_valued_picking_report/i18n/es.po +++ /dev/null @@ -1,102 +0,0 @@ -# Translation of OpenERP Server. -# This file contains the translation of the following modules: -# * stock_valued_picking -# -msgid "" -msgstr "" -"Project-Id-Version: OpenERP Server 7.0\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2014-04-29 10:48+0000\n" -"PO-Revision-Date: 2014-05-29 09:18+0000\n" -"Last-Translator: Pedro Manuel Baeza \n" -"Language-Team: \n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"X-Launchpad-Export-Date: 2014-10-21 07:24+0000\n" -"X-Generator: Launchpad (build 17203)\n" - -#. module: stock_valued_picking -#: code:_description:0 -#: model:ir.model,name:stock_valued_picking.model_stock_picking_out -#, python-format -msgid "Delivery Orders" -msgstr "Albaranes de salida" - -#. module: stock_valued_picking -#: code:_description:0 -#: model:ir.model,name:stock_valued_picking.model_res_partner -#, python-format -msgid "Partner" -msgstr "Empresa" - -#. module: stock_valued_picking -#: code:_description:0 -#: model:ir.model,name:stock_valued_picking.model_stock_picking -#, python-format -msgid "Picking List" -msgstr "Albarán" - -#. module: stock_valued_picking -#: field:stock.move,sale_price_subtotal:0 -msgid "Price subtotal" -msgstr "Subtotal" - -#. module: stock_valued_picking -#: field:stock.picking,currency_id:0 -#: field:stock.picking.out,currency_id:0 -msgid "Sale currency" -msgstr "Moneda de la venta" - -#. module: stock_valued_picking -#: field:stock.move,sale_discount:0 -msgid "Sale discount (%)" -msgstr "Descuento de la venta (%)" - -#. module: stock_valued_picking -#: field:stock.move,sale_price_unit:0 -msgid "Sale price unit" -msgstr "Precio unitario de la venta" - -#. module: stock_valued_picking -#: code:_description:0 -#: model:ir.model,name:stock_valued_picking.model_stock_move -#, python-format -msgid "Stock Move" -msgstr "Movimiento de existencias" - -#. module: stock_valued_picking -#: field:stock.picking,amount_tax:0 -#: field:stock.picking.out,amount_tax:0 -#: report:sale.shipping:0 -msgid "Taxes" -msgstr "Impuestos" - -#. module: stock_valued_picking -#: field:stock.picking,amount_total:0 -#: field:stock.picking.out,amount_total:0 -#: report:sale.shipping:0 -msgid "Total" -msgstr "Total" - -#. module: stock_valued_picking -#: field:stock.picking,amount_untaxed:0 -#: field:stock.picking.out,amount_untaxed:0 -#: report:sale.shipping:0 -msgid "Untaxed amount" -msgstr "Base imponible" - -#. module: stock_valued_picking -#: field:res.partner,valued_picking:0 -msgid "Valued picking" -msgstr "Albarán valorado" - -#. module: stock_valued_picking -#: report:sale.shipping:0 -msgid "Unit price" -msgstr "Precio unitario" - -#. module: stock_valued_picking -#: report:sale.shipping:0 -msgid "Subtotal" -msgstr "Subtotal" diff --git a/stock_valued_picking_report/i18n/stock_valued_picking.pot b/stock_valued_picking_report/i18n/stock_valued_picking.pot deleted file mode 100644 index 1545f5c..0000000 --- a/stock_valued_picking_report/i18n/stock_valued_picking.pot +++ /dev/null @@ -1,102 +0,0 @@ -# Translation of OpenERP Server. -# This file contains the translation of the following modules: -# * stock_valued_picking -# -msgid "" -msgstr "" -"Project-Id-Version: OpenERP Server 7.0\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2014-04-29 10:48+0000\n" -"PO-Revision-Date: 2014-04-29 12:49+0100\n" -"Last-Translator: Pedro Manuel Baeza \n" -"Language-Team: \n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Plural-Forms: \n" - -#. module: stock_valued_picking -#: code:_description:0 -#: model:ir.model,name:stock_valued_picking.model_stock_picking_out -#, python-format -msgid "Delivery Orders" -msgstr "" - -#. module: stock_valued_picking -#: code:_description:0 -#: model:ir.model,name:stock_valued_picking.model_res_partner -#, python-format -msgid "Partner" -msgstr "" - -#. module: stock_valued_picking -#: code:_description:0 -#: model:ir.model,name:stock_valued_picking.model_stock_picking -#, python-format -msgid "Picking List" -msgstr "" - -#. module: stock_valued_picking -#: field:stock.move,sale_price_subtotal:0 -msgid "Price subtotal" -msgstr "" - -#. module: stock_valued_picking -#: field:stock.picking,currency_id:0 -#: field:stock.picking.out,currency_id:0 -msgid "Sale currency" -msgstr "" - -#. module: stock_valued_picking -#: field:stock.move,sale_discount:0 -msgid "Sale discount (%)" -msgstr "" - -#. module: stock_valued_picking -#: field:stock.move,sale_price_unit:0 -msgid "Sale price unit" -msgstr "" - -#. module: stock_valued_picking -#: code:_description:0 -#: model:ir.model,name:stock_valued_picking.model_stock_move -#, python-format -msgid "Stock Move" -msgstr "" - -#. module: stock_valued_picking -#: field:stock.picking,amount_tax:0 -#: field:stock.picking.out,amount_tax:0 -#: report:sale.shipping:0 -msgid "Taxes" -msgstr "" - -#. module: stock_valued_picking -#: field:stock.picking,amount_total:0 -#: field:stock.picking.out,amount_total:0 -#: report:sale.shipping:0 -msgid "Total" -msgstr "" - -#. module: stock_valued_picking -#: field:stock.picking,amount_untaxed:0 -#: field:stock.picking.out,amount_untaxed:0 -#: report:sale.shipping:0 -msgid "Untaxed amount" -msgstr "" - -#. module: stock_valued_picking -#: field:res.partner,valued_picking:0 -msgid "Valued picking" -msgstr "" - -#. module: stock_valued_picking -#: report:sale.shipping:0 -msgid "Unit price" -msgstr "" - -#. module: stock_valued_picking -#: report:sale.shipping:0 -msgid "Subtotal" -msgstr "" - diff --git a/stock_valued_picking_report/models/__init__.py b/stock_valued_picking_report/models/__init__.py deleted file mode 100644 index e7621b0..0000000 --- a/stock_valued_picking_report/models/__init__.py +++ /dev/null @@ -1,22 +0,0 @@ -# -*- encoding: utf-8 -*- -############################################################################## -# -# OpenERP, Open Source Management Solution -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU 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 General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program. If not, see . -# -############################################################################## -from . import res_partner -from . import stock_move -from . import stock_picking diff --git a/stock_valued_picking_report/models/res_partner.py b/stock_valued_picking_report/models/res_partner.py deleted file mode 100644 index 6de00a2..0000000 --- a/stock_valued_picking_report/models/res_partner.py +++ /dev/null @@ -1,31 +0,0 @@ -# -*- encoding: utf-8 -*- -############################################################################## -# -# OpenERP, Open Source Management Solution -# Copyright (c) 2014 Serv. Tecnol. Avanzados (http://www.serviciosbaeza.com) -# Pedro M. Baeza -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU 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 General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program. If not, see . -# -############################################################################## -from openerp.osv import fields, orm - -class ResPartner(orm.Model): - _inherit = 'res.partner' - _columns = { - 'valued_picking': fields.boolean('Valued picking'), - } - _defaults = { - 'valued_picking': True, - } diff --git a/stock_valued_picking_report/models/stock_move.py b/stock_valued_picking_report/models/stock_move.py deleted file mode 100644 index 07f6c5b..0000000 --- a/stock_valued_picking_report/models/stock_move.py +++ /dev/null @@ -1,52 +0,0 @@ -# -*- encoding: utf-8 -*- -############################################################################## -# -# OpenERP, Open Source Management Solution -# Copyright (c) 2014 Serv. Tecnol. Avanzados (http://www.serviciosbaeza.com) -# Pedro M. Baeza -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU 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 General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program. If not, see . -# -############################################################################## -from openerp.osv import fields, orm - -class StockMove(orm.Model): - _inherit = "stock.move" - - def _get_sale_price_subtotal(self, cr, uid, ids, field_name, arg, - context=None): - res = {} - cur_obj = self.pool['res.currency'] - for move in self.browse(cr, uid, ids, context=context): - res[move.id] = False - if move.sale_line_id: - subtotal = move.sale_price_unit * move.product_qty * \ - (1 - (move.sale_discount or 0.0) / 100.0) - # Round by currency precision - cur = move.sale_line_id.order_id.currency_id - res[move.id] = cur_obj.round(cr, uid, cur, subtotal) - return res - - _columns = { - 'sale_price_unit': fields.related('sale_line_id', 'price_unit', - type="float", readonly=True, - string="Sale price unit"), - 'sale_discount': fields.related('sale_line_id', 'discount', - type="float", readonly=True, - string="Sale discount (%)"), - 'sale_price_subtotal': fields.function(_get_sale_price_subtotal, - string='Price subtotal', - type='float', method=True, - readonly=True), - } diff --git a/stock_valued_picking_report/models/stock_picking.py b/stock_valued_picking_report/models/stock_picking.py deleted file mode 100644 index f576d3c..0000000 --- a/stock_valued_picking_report/models/stock_picking.py +++ /dev/null @@ -1,103 +0,0 @@ -# -*- encoding: utf-8 -*- -############################################################################## -# -# OpenERP, Open Source Management Solution -# Copyright (c) 2014 Serv. Tecnol. Avanzados (http://www.serviciosbaeza.com) -# Pedro M. Baeza -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU 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 General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program. If not, see . -# -############################################################################## -from openerp.osv import fields, orm -from openerp.addons.decimal_precision import decimal_precision as dp - -class StockPicking(orm.Model): - _inherit = "stock.picking" - - def _get_currency_id(self, cr, uid, ids, field_name, arg, context=None): - res = {} - for picking in self.browse(cr, uid, ids, context=context): - res[picking.id] = False - total_tax = 0.0 - for move in picking.move_lines: - if not move.sale_line_id: - continue - # Take one of the sale order lines currencies (it would be - # alwaysthe same for all) - res[picking.id] = move.sale_line_id.order_id.currency_id.id - break - return res - - def _amount_untaxed(self, cr, uid, ids, field_name, arg, context=None): - res = {} - for picking in self.browse(cr, uid, ids, context=context): - res[picking.id] = 0.0 - for move in picking.move_lines: - res[picking.id] += move.sale_price_subtotal - return res - - def _amount_tax(self, cr, uid, ids, field_name, arg, context=None): - res = {} - tax_obj = self.pool['account.tax'] - cur_obj = self.pool['res.currency'] - for picking in self.browse(cr, uid, ids, context=context): - cur = False - total_tax = 0.0 - for move in picking.move_lines: - if not move.sale_line_id: - continue - price_unit = (move.sale_price_unit * - (100 - move.sale_discount or 0.0) / 100.0) - for c in tax_obj.compute_all(cr, uid, move.sale_line_id.tax_id, - price_unit, - move.product_qty, move.product_id, - move.sale_line_id.order_id.partner_id - )['taxes']: - total_tax += c.get('amount', 0.0) - res[picking.id] = (picking.currency_id and - cur_obj.round(cr, uid, picking.currency_id, - total_tax) - or 0.0) - return res - - def _amount_total(self, cr, uid, ids, field_name, arg, context=None): - res = {} - for picking in self.browse(cr, uid, ids, context=context): - res[picking.id] = picking.amount_untaxed + picking.amount_tax - return res - - _columns = { - 'currency_id': fields.related('sale_id', 'currency_id', - type="many2one", relation="res.currency", - store=True, string='Sale currency', readonly=True), - 'amount_untaxed': fields.function(_amount_untaxed, type="float", - digits_compute=dp.get_precision('Account'), - method=True, string='Untaxed amount', readonly=True), - 'amount_tax': fields.function(_amount_tax, type="float", - digits_compute=dp.get_precision('Account'), - method=True, string='Taxes', readonly=True), - 'amount_total': fields.function(_amount_total, type="float", - digits_compute=dp.get_precision('Account'), - method=True, string='Total', readonly=True), - } - -class StockPickingOut(orm.Model): - _inherit = "stock.picking.out" - - def __init__(self, pool, cr): - super(StockPickingOut, self).__init__(pool, cr) - picking_obj = self.pool['stock.picking'] - for field_name in ('currency_id', 'amount_untaxed', 'amount_tax', - 'amount_total'): - self._columns[field_name] = picking_obj._columns[field_name] \ No newline at end of file diff --git a/stock_valued_picking_report/report/shipping.rml b/stock_valued_picking_report/report/shipping.rml deleted file mode 100644 index 0ae0875..0000000 --- a/stock_valued_picking_report/report/shipping.rml +++ /dev/null @@ -1,302 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - [[repeatIn(objects,'o')]] - - - - [[ (not(o.sale_id) and o.type== 'out') and 'Error, no sale order attached to this picking !' or removeParentNode('para') ]] - - - - Invoiced to - [[ o.sale_id and o.sale_id.partner_invoice_id and o.sale_id.partner_invoice_id.name or '']] - [[ o.sale_id and o.sale_id.partner_invoice_id and display_address(o.sale_id.partner_invoice_id) ]] - - - [[ o.partner_id and o.partner_id and o.partner_id.name or '' ]] - [[ o.partner_id and o.partner_id and display_address(o.partner_id) ]] - - - - Delivery Order : [[ o.name ]] - - - - - - - Order Ref. - - - Order Date - - - Shipping Date - - - Carrier - - - Weight - - - - - - - [[ o.sale_id and o.sale_id.name ]] - - - [[ formatLang(o.date,date_time=True) ]] - - - [[ formatLang(o.min_date,date_time = True) ]] - - - [[ o.carrier_id and o.carrier_id.name or '' ]] - - - [[ formatLang(o.weight) ]] - - - - - - - - - - - - - [[ o.sale_id and o.sale_id.partner_id and o.sale_id.partner_id.valued_picking and ' ' or removeParentNode('tr') ]] Description - - - Unit price - - - Quantity - - - Subtotal - - - - - Description - - - [[ o.sale_id and o.sale_id.partner_id and not o.sale_id.partner_id.valued_picking and ' ' or removeParentNode('tr') ]] - - - Lot - - - Quantity - - - -
- [[repeatIn(o.move_lines,'line')]] - - - - [[line.product_id.code ]] [[ line.product_id and line.product_id.name or '']] - - - [[ o.sale_id and o.sale_id.partner_id and o.sale_id.partner_id.valued_picking and formatLang(line.sale_price_unit, dp='Product Price', currency_obj=o.sale_id.currency_id) or removeParentNode('tr') ]] - - - [[ formatLang(line.product_qty) ]] [[ line.product_uom and line.product_uom.name ]] - - - [[ formatLang(line.sale_price_subtotal, dp='Account', currency_obj=o.sale_id.currency_id) ]] - - - - - [[line.product_id.code ]] [[ line.product_id and line.product_id.name or '']] - - - [[ o.sale_id and o.sale_id.partner_id and not o.sale_id.partner_id.valued_picking and ' ' or removeParentNode('tr') ]] - - - [[ (line.prodlot_id and (line.prodlot_id.name + (line.prodlot_id.ref and ('/' + line.prodlot_id.ref) or ''))) or ' ' ]] - - - [[ formatLang(line.product_qty) ]] [[ line.product_uom and line.product_uom.name ]] - - - -
- - - - [[ o.sale_id and o.sale_id.partner_id and o.sale_id.partner_id.valued_picking and ' ' or removeParentNode('tr') ]] - - - Untaxed amount - - - [[ formatLang(o.amount_untaxed, dp='Account', currency_obj=o.sale_id.currency_id) ]] - - - - - [[ o.sale_id and o.sale_id.partner_id and o.sale_id.partner_id.valued_picking and ' ' or removeParentNode('tr') ]] - - - Taxes - - - [[ formatLang(o.amount_tax, dp='Account', currency_obj=o.sale_id.currency_id) ]] - - - - - [[ o.sale_id and o.sale_id.partner_id and o.sale_id.partner_id.valued_picking and ' ' or removeParentNode('tr') ]] - - - Total - - - [[ formatLang(o.amount_total, dp='Account', currency_obj=o.sale_id.currency_id) ]] - - - - - - - - - - - - - - - - - - - - - - - -
-
- diff --git a/stock_valued_picking_report/report/shipping.sxw b/stock_valued_picking_report/report/shipping.sxw deleted file mode 100644 index 98e751b..0000000 Binary files a/stock_valued_picking_report/report/shipping.sxw and /dev/null differ diff --git a/stock_valued_picking_report/report/shipping_convert.sh b/stock_valued_picking_report/report/shipping_convert.sh deleted file mode 100755 index f503dc4..0000000 --- a/stock_valued_picking_report/report/shipping_convert.sh +++ /dev/null @@ -1 +0,0 @@ -python /opt/openerp/v7/ocb-addons/base_report_designer/openerp_sxw2rml/openerp_sxw2rml.py ./shipping.sxw > ./shipping.rml diff --git a/stock_valued_picking_report/report/stock_valued_report.xml b/stock_valued_picking_report/report/stock_valued_report.xml deleted file mode 100644 index b04cb5a..0000000 --- a/stock_valued_picking_report/report/stock_valued_report.xml +++ /dev/null @@ -1,11 +0,0 @@ - - - - - - stock_valued_picking/report/shipping.rml - - - - - diff --git a/stock_valued_picking_report/views/res_partner_view.xml b/stock_valued_picking_report/views/res_partner_view.xml deleted file mode 100644 index 1f7957b..0000000 --- a/stock_valued_picking_report/views/res_partner_view.xml +++ /dev/null @@ -1,18 +0,0 @@ - - - - - - Partner view (Valued picking) - res.partner - - - - - - - - - - diff --git a/stock_valued_picking_report/views/stock_picking_view.xml b/stock_valued_picking_report/views/stock_picking_view.xml deleted file mode 100644 index ccd27f9..0000000 --- a/stock_valued_picking_report/views/stock_picking_view.xml +++ /dev/null @@ -1,28 +0,0 @@ - - - - - - stock.picking.out - - - - - - - - -
- - - - - -