mirror of
https://github.com/OCA/stock-logistics-reporting.git
synced 2025-02-16 17:13:21 +02:00
[MIG] stock_picking_valued_report: Migrating to v8
Bugfixes Don't show amounts if picking don't belongs to a sale.order Propused fixes done Cambios sugeridos No mostrar el albaran valorado si el partner está configurado para que no se valoren
This commit is contained in:
committed by
Pedro M. Baeza
parent
924c01e4fc
commit
89bfbe1f9d
13
stock_valued_picking_report/README.rst
Normal file
13
stock_valued_picking_report/README.rst
Normal file
@@ -0,0 +1,13 @@
|
||||
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.
|
||||
|
||||
Credits
|
||||
=======
|
||||
|
||||
Contributors
|
||||
------------
|
||||
* Pedro M. Baeza <pedro.baeza@serviciosbaeza.com>
|
||||
* Antonio Espinosa <antonioea@antiun.com>
|
||||
20
stock_valued_picking_report/__init__.py
Normal file
20
stock_valued_picking_report/__init__.py
Normal file
@@ -0,0 +1,20 @@
|
||||
# -*- 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 <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
##############################################################################
|
||||
from . import models
|
||||
53
stock_valued_picking_report/__openerp__.py
Normal file
53
stock_valued_picking_report/__openerp__.py
Normal file
@@ -0,0 +1,53 @@
|
||||
# -*- encoding: utf-8 -*-
|
||||
##############################################################################
|
||||
#
|
||||
# OpenERP, Open Source Management Solution
|
||||
# Copyright (c) 2014 Serv. Tecnol. Avanzados (http://www.serviciosbaeza.com)
|
||||
# Pedro M. Baeza <pedro.baeza@serviciosbaeza.com>
|
||||
# Copyright (c) 2015 Antiun Ingenieria (http://www.antiun.com)
|
||||
# Antonio Espinosa <antonioea@antiun.com>
|
||||
#
|
||||
# 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 <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
##############################################################################
|
||||
|
||||
{
|
||||
"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.
|
||||
""",
|
||||
"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
|
||||
}
|
||||
102
stock_valued_picking_report/i18n/es.po
Normal file
102
stock_valued_picking_report/i18n/es.po
Normal file
@@ -0,0 +1,102 @@
|
||||
# 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 <pedro.baeza@gmail.com>\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"
|
||||
102
stock_valued_picking_report/i18n/stock_valued_picking.pot
Normal file
102
stock_valued_picking_report/i18n/stock_valued_picking.pot
Normal file
@@ -0,0 +1,102 @@
|
||||
# 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 <pedro.baeza@serviciosbaeza.com>\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 ""
|
||||
|
||||
22
stock_valued_picking_report/models/__init__.py
Normal file
22
stock_valued_picking_report/models/__init__.py
Normal file
@@ -0,0 +1,22 @@
|
||||
# -*- 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 <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
##############################################################################
|
||||
from . import res_partner
|
||||
from . import stock_move
|
||||
from . import stock_picking
|
||||
30
stock_valued_picking_report/models/res_partner.py
Normal file
30
stock_valued_picking_report/models/res_partner.py
Normal file
@@ -0,0 +1,30 @@
|
||||
# -*- encoding: utf-8 -*-
|
||||
##############################################################################
|
||||
#
|
||||
# OpenERP, Open Source Management Solution
|
||||
# Copyright (c) 2014 Serv. Tecnol. Avanzados (http://www.serviciosbaeza.com)
|
||||
# Pedro M. Baeza <pedro.baeza@serviciosbaeza.com>
|
||||
# Copyright (c) 2015 Antiun Ingenieria (http://www.antiun.com)
|
||||
# Antonio Espinosa <antonioea@antiun.com>
|
||||
#
|
||||
# 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 <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
##############################################################################
|
||||
from openerp import fields, models
|
||||
|
||||
|
||||
class ResPartner(models.Model):
|
||||
_inherit = 'res.partner'
|
||||
# You can select which partners has valued pickings
|
||||
valued_picking = fields.Boolean(string='Valued picking', default=True)
|
||||
58
stock_valued_picking_report/models/stock_move.py
Normal file
58
stock_valued_picking_report/models/stock_move.py
Normal file
@@ -0,0 +1,58 @@
|
||||
# -*- encoding: utf-8 -*-
|
||||
##############################################################################
|
||||
#
|
||||
# OpenERP, Open Source Management Solution
|
||||
# Copyright (c) 2014 Serv. Tecnol. Avanzados (http://www.serviciosbaeza.com)
|
||||
# Pedro M. Baeza <pedro.baeza@serviciosbaeza.com>
|
||||
# Copyright (c) 2015 Antiun Ingenieria (http://www.antiun.com)
|
||||
# Antonio Espinosa <antonioea@antiun.com>
|
||||
#
|
||||
# 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 <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
##############################################################################
|
||||
from openerp import fields, models, api
|
||||
|
||||
|
||||
class StockMove(models.Model):
|
||||
_inherit = "stock.move"
|
||||
|
||||
sale_price_unit = fields.Float(
|
||||
string="Sale price unit", readonly=True,
|
||||
related='procurement_id.sale_line_id.price_unit')
|
||||
sale_discount = fields.Float(
|
||||
string="Sale discount (%)", readonly=True,
|
||||
related='procurement_id.sale_line_id.discount')
|
||||
sale_price_subtotal = fields.Float(
|
||||
string="Price subtotal", readonly=True,
|
||||
compute='_get_sale_price_subtotal')
|
||||
|
||||
@api.one
|
||||
@api.depends(
|
||||
'sale_price_unit',
|
||||
'sale_discount',
|
||||
'product_qty',
|
||||
'procurement_id.sale_line_id.order_id.currency_id',
|
||||
)
|
||||
def _get_sale_price_subtotal(self):
|
||||
subtotal = (self.sale_price_unit * self.product_qty *
|
||||
(1 - (self.sale_discount or 0.0) / 100.0))
|
||||
# Only get subtotal if this stock.move belongs to a
|
||||
# stock.picking created from a sale.order
|
||||
if self.procurement_id and self.procurement_id.sale_line_id:
|
||||
# Round by currency precision
|
||||
currency = self.procurement_id.sale_line_id.order_id.currency_id
|
||||
if currency:
|
||||
subtotal = currency.round(subtotal)
|
||||
# Write subtotal into record (cache because this field is store=False)
|
||||
self.sale_price_subtotal = subtotal
|
||||
76
stock_valued_picking_report/models/stock_picking.py
Normal file
76
stock_valued_picking_report/models/stock_picking.py
Normal file
@@ -0,0 +1,76 @@
|
||||
# -*- encoding: utf-8 -*-
|
||||
##############################################################################
|
||||
#
|
||||
# OpenERP, Open Source Management Solution
|
||||
# Copyright (c) 2014 Serv. Tecnol. Avanzados (http://www.serviciosbaeza.com)
|
||||
# Pedro M. Baeza <pedro.baeza@serviciosbaeza.com>
|
||||
# Copyright (c) 2015 Antiun Ingenieria (http://www.antiun.com)
|
||||
# Antonio Espinosa <antonioea@antiun.com>
|
||||
#
|
||||
# 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 <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
##############################################################################
|
||||
from openerp import fields, models, api
|
||||
from openerp.addons.decimal_precision import decimal_precision as dp
|
||||
|
||||
|
||||
class StockPicking(models.Model):
|
||||
_inherit = "stock.picking"
|
||||
|
||||
valued = fields.Boolean(
|
||||
string='Valued', related='partner_id.valued_picking', store=True,
|
||||
readonly=True)
|
||||
currency_id = fields.Many2one(
|
||||
string='Sale currency', related='sale_id.currency_id', store=True,
|
||||
readonly=True)
|
||||
amount_untaxed = fields.Float(
|
||||
string='Untaxed amount', compute='_compute_amounts',
|
||||
digits=dp.get_precision('Account'), store=True, readonly=True)
|
||||
amount_tax = fields.Float(
|
||||
string='Taxes', compute='_compute_amounts',
|
||||
digits=dp.get_precision('Account'), store=True, readonly=True)
|
||||
amount_total = fields.Float(
|
||||
string='Total', compute='_compute_amounts',
|
||||
digits=dp.get_precision('Account'), store=True, readonly=True)
|
||||
|
||||
@api.one
|
||||
@api.depends(
|
||||
'move_lines.sale_price_subtotal',
|
||||
'move_lines.product_id',
|
||||
'move_lines.procurement_id.sale_line_id.tax_id',
|
||||
'move_lines.procurement_id.sale_line_id.order_id.partner_id',
|
||||
)
|
||||
def _compute_amounts(self):
|
||||
# Calculate untaxed amount
|
||||
untaxed = 0.0
|
||||
for move in self.move_lines:
|
||||
untaxed += move.sale_price_subtotal
|
||||
# Calculate taxed amount
|
||||
tax = 0.0
|
||||
for move in self.move_lines:
|
||||
if not (move.procurement_id and
|
||||
move.procurement_id.sale_line_id):
|
||||
continue
|
||||
sale_line = move.procurement_id.sale_line_id
|
||||
for c in sale_line.tax_id.compute_all(
|
||||
move.sale_price_subtotal, move.product_qty,
|
||||
move.product_id, sale_line.order_id.partner_id)['taxes']:
|
||||
tax += c.get('amount', 0.0)
|
||||
currency = self.currency_id
|
||||
if currency:
|
||||
tax = currency.round(tax)
|
||||
# Write calculated amounts into recorrd
|
||||
self.amount_untaxed = untaxed
|
||||
self.amount_tax = tax
|
||||
self.amount_total = untaxed + tax
|
||||
302
stock_valued_picking_report/report/shipping.rml
Normal file
302
stock_valued_picking_report/report/shipping.rml
Normal file
@@ -0,0 +1,302 @@
|
||||
<?xml version="1.0"?>
|
||||
<document filename="test.pdf">
|
||||
<template pageSize="(595.0,842.0)" title="Test" author="Martin Simon" allowSplitting="20">
|
||||
<pageTemplate id="first">
|
||||
<frame id="first" x1="30.0" y1="27.0" width="508" height="815"/>
|
||||
</pageTemplate>
|
||||
</template>
|
||||
<stylesheet>
|
||||
<blockTableStyle id="Standard_Outline">
|
||||
<blockAlignment value="LEFT"/>
|
||||
<blockValign value="TOP"/>
|
||||
</blockTableStyle>
|
||||
<blockTableStyle id="Tableau1">
|
||||
<blockAlignment value="LEFT"/>
|
||||
<blockValign value="TOP"/>
|
||||
</blockTableStyle>
|
||||
<blockTableStyle id="Table1">
|
||||
<blockAlignment value="LEFT"/>
|
||||
<blockValign value="TOP"/>
|
||||
<lineStyle kind="LINEBEFORE" colorName="#e6e6e6" start="0,0" stop="0,-1"/>
|
||||
<lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="0,0" stop="0,0"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="0,-1" stop="0,-1"/>
|
||||
<lineStyle kind="LINEBEFORE" colorName="#e6e6e6" start="1,0" stop="1,-1"/>
|
||||
<lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="1,0" stop="1,0"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="1,-1" stop="1,-1"/>
|
||||
<lineStyle kind="LINEBEFORE" colorName="#e6e6e6" start="2,0" stop="2,-1"/>
|
||||
<lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="2,0" stop="2,0"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="2,-1" stop="2,-1"/>
|
||||
<lineStyle kind="LINEBEFORE" colorName="#e6e6e6" start="3,0" stop="3,-1"/>
|
||||
<lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="3,0" stop="3,0"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="3,-1" stop="3,-1"/>
|
||||
<lineStyle kind="LINEBEFORE" colorName="#e6e6e6" start="4,0" stop="4,-1"/>
|
||||
<lineStyle kind="LINEAFTER" colorName="#e6e6e6" start="4,0" stop="4,-1"/>
|
||||
<lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="4,0" stop="4,0"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="4,-1" stop="4,-1"/>
|
||||
</blockTableStyle>
|
||||
<blockTableStyle id="Table2">
|
||||
<blockAlignment value="LEFT"/>
|
||||
<blockValign value="TOP"/>
|
||||
<lineStyle kind="LINEBEFORE" colorName="#e6e6e6" start="0,0" stop="0,-1"/>
|
||||
<lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="0,0" stop="0,0"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="0,-1" stop="0,-1"/>
|
||||
<lineStyle kind="LINEBEFORE" colorName="#e6e6e6" start="1,0" stop="1,-1"/>
|
||||
<lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="1,0" stop="1,0"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="1,-1" stop="1,-1"/>
|
||||
<lineStyle kind="LINEBEFORE" colorName="#e6e6e6" start="2,0" stop="2,-1"/>
|
||||
<lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="2,0" stop="2,0"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="2,-1" stop="2,-1"/>
|
||||
<lineStyle kind="LINEBEFORE" colorName="#e6e6e6" start="3,0" stop="3,-1"/>
|
||||
<lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="3,0" stop="3,0"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="3,-1" stop="3,-1"/>
|
||||
<lineStyle kind="LINEBEFORE" colorName="#e6e6e6" start="4,0" stop="4,-1"/>
|
||||
<lineStyle kind="LINEAFTER" colorName="#e6e6e6" start="4,0" stop="4,-1"/>
|
||||
<lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="4,0" stop="4,0"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="4,-1" stop="4,-1"/>
|
||||
</blockTableStyle>
|
||||
<blockTableStyle id="Tabla2">
|
||||
<blockAlignment value="LEFT"/>
|
||||
<blockValign value="TOP"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#666666" start="0,-1" stop="0,-1"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#666666" start="1,-1" stop="1,-1"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#666666" start="2,-1" stop="2,-1"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#666666" start="3,-1" stop="3,-1"/>
|
||||
</blockTableStyle>
|
||||
<blockTableStyle id="Tabla4">
|
||||
<blockAlignment value="LEFT"/>
|
||||
<blockValign value="TOP"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="0,-1" stop="0,-1"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="1,-1" stop="1,-1"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="2,-1" stop="2,-1"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="3,-1" stop="3,-1"/>
|
||||
</blockTableStyle>
|
||||
<blockTableStyle id="Tabla3">
|
||||
<blockAlignment value="LEFT"/>
|
||||
<blockValign value="TOP"/>
|
||||
<lineStyle kind="LINEABOVE" colorName="#000000" start="1,0" stop="1,0"/>
|
||||
<lineStyle kind="LINEABOVE" colorName="#000000" start="2,0" stop="2,0"/>
|
||||
</blockTableStyle>
|
||||
<initialize>
|
||||
<paraStyle name="all" alignment="justify"/>
|
||||
</initialize>
|
||||
<paraStyle name="Standard" fontName="Helvetica"/>
|
||||
<paraStyle name="Text body" fontName="Helvetica" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="Footer" fontName="Helvetica"/>
|
||||
<paraStyle name="Table Contents" fontName="Helvetica"/>
|
||||
<paraStyle name="Table Heading" fontName="Helvetica" alignment="CENTER"/>
|
||||
<paraStyle name="Horizontal Line" fontName="Helvetica" fontSize="6.0" leading="8" spaceBefore="0.0" spaceAfter="14.0"/>
|
||||
<paraStyle name="Heading" fontName="Helvetica" fontSize="15.0" leading="19" spaceBefore="12.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="List" fontName="Helvetica" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="Caption" fontName="Helvetica-Oblique" fontSize="9.0" leading="11" spaceBefore="6.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="Index" fontName="Helvetica"/>
|
||||
<paraStyle name="terp_header" fontName="Helvetica-Bold" fontSize="12.0" leading="15" alignment="LEFT" spaceBefore="12.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="Heading 9" fontName="Helvetica-Bold" fontSize="75%" leading="NaN" spaceBefore="12.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="terp_tblheader_General" fontName="Helvetica-Bold" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="6.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="terp_tblheader_Details" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="LEFT" spaceBefore="6.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="terp_default_8" fontName="Helvetica" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<paraStyle name="terp_default_Bold_8" fontName="Helvetica-Bold" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<paraStyle name="terp_tblheader_General_Centre" fontName="Helvetica-Bold" fontSize="8.0" leading="10" alignment="CENTER" spaceBefore="6.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="terp_tblheader_General_Right" fontName="Helvetica-Bold" fontSize="8.0" leading="10" alignment="RIGHT" spaceBefore="6.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="terp_tblheader_Details_Centre" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="CENTER" spaceBefore="6.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="terp_tblheader_Details_Right" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="RIGHT" spaceBefore="6.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="terp_default_Right_8" fontName="Helvetica" fontSize="8.0" leading="10" alignment="RIGHT" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<paraStyle name="terp_default_Centre_8" fontName="Helvetica" fontSize="8.0" leading="10" alignment="CENTER" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<paraStyle name="terp_header_Right" fontName="Helvetica-Bold" fontSize="15.0" leading="19" alignment="LEFT" spaceBefore="12.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="terp_header_Centre" fontName="Helvetica-Bold" fontSize="12.0" leading="15" alignment="CENTER" spaceBefore="12.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="terp_default_address" fontName="Helvetica" fontSize="10.0" leading="13" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<paraStyle name="terp_default_9" fontName="Helvetica" fontSize="9.0" leading="11" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<paraStyle name="terp_default_Bold_9" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<paraStyle name="terp_default_Centre_9" fontName="Helvetica" fontSize="9.0" leading="11" alignment="CENTER" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<paraStyle name="terp_default_Right_9" fontName="Helvetica" fontSize="9.0" leading="11" alignment="RIGHT" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<paraStyle name="terp_default_1" fontName="Helvetica" fontSize="2.0" leading="3" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<paraStyle name="terp_default_Right_9_Bold" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="RIGHT" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<images/>
|
||||
</stylesheet>
|
||||
<story>
|
||||
<para style="terp_default_9">[[repeatIn(objects,'o')]]</para>
|
||||
<para style="terp_default_8">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
<para style="terp_default_9">[[ (not(o.sale_id) and o.type== 'out') and 'Error, no sale order attached to this picking !' or removeParentNode('para') ]]</para>
|
||||
<blockTable colWidths="287.0,254.0" repeatRows="1" style="Tableau1">
|
||||
<tr>
|
||||
<td>
|
||||
<para style="terp_default_Bold_9">Invoiced to</para>
|
||||
<para style="terp_default_9">[[ o.sale_id and o.sale_id.partner_invoice_id and o.sale_id.partner_invoice_id.name or '']]</para>
|
||||
<para style="terp_default_9">[[ o.sale_id and o.sale_id.partner_invoice_id and display_address(o.sale_id.partner_invoice_id) ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_9">[[ o.partner_id and o.partner_id and o.partner_id.name or '' ]]</para>
|
||||
<para style="terp_default_9">[[ o.partner_id and o.partner_id and display_address(o.partner_id) ]]</para>
|
||||
</td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
<para style="terp_header">Delivery Order : [[ o.name ]]</para>
|
||||
<para style="terp_default_8">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
<blockTable colWidths="126.0,103.0,103.0,103.0,103.0" style="Table1">
|
||||
<tr>
|
||||
<td>
|
||||
<para style="terp_tblheader_General_Centre">Order Ref.</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_tblheader_General_Centre">Order Date</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_tblheader_General_Centre">Shipping Date</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_tblheader_General_Centre">Carrier</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_tblheader_General_Centre">Weight</para>
|
||||
</td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
<blockTable colWidths="126.0,103.0,103.0,103.0,103.0" style="Table2">
|
||||
<tr>
|
||||
<td>
|
||||
<para style="terp_default_Centre_8">[[ o.sale_id and o.sale_id.name ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Centre_8">[[ formatLang(o.date,date_time=True) ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Centre_8">[[ formatLang(o.min_date,date_time = True) ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Centre_8">[[ o.carrier_id and o.carrier_id.name or '' ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Centre_8">[[ formatLang(o.weight) ]]</para>
|
||||
</td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
<para style="Standard">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
<para style="Standard">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
<blockTable colWidths="283.0,88.0,94.0,73.0" repeatRows="1" style="Tabla2">
|
||||
<tr>
|
||||
<td>
|
||||
<para style="terp_tblheader_Details">[[ o.sale_id and o.sale_id.partner_id and o.sale_id.partner_id.valued_picking and ' ' or removeParentNode('tr') ]] Description</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_tblheader_Details_Centre">Unit price</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_tblheader_Details_Centre">Quantity</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_tblheader_Details_Right">Subtotal</para>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<para style="terp_tblheader_Details">Description</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_tblheader_Details">[[ o.sale_id and o.sale_id.partner_id and not o.sale_id.partner_id.valued_picking and ' ' or removeParentNode('tr') ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_tblheader_Details_Centre">Lot</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_tblheader_Details_Right">Quantity</para>
|
||||
</td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
<section>
|
||||
<para style="terp_default_1">[[repeatIn(o.move_lines,'line')]]</para>
|
||||
<blockTable colWidths="283.0,88.0,94.0,72.0" style="Tabla4">
|
||||
<tr>
|
||||
<td>
|
||||
<para style="terp_default_9">[[line.product_id.code ]] [[ line.product_id and line.product_id.name or '']]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Centre_9">[[ 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') ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Right_9">[[ formatLang(line.product_qty) ]] [[ line.product_uom and line.product_uom.name ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Right_9">[[ formatLang(line.sale_price_subtotal, dp='Account', currency_obj=o.sale_id.currency_id) ]]</para>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<para style="terp_default_9">[[line.product_id.code ]] [[ line.product_id and line.product_id.name or '']]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="Standard">[[ o.sale_id and o.sale_id.partner_id and not o.sale_id.partner_id.valued_picking and ' ' or removeParentNode('tr') ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Centre_9">[[ (line.prodlot_id and (line.prodlot_id.name + (line.prodlot_id.ref and ('/' + line.prodlot_id.ref) or ''))) or ' ' ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Right_9">[[ formatLang(line.product_qty) ]] [[ line.product_uom and line.product_uom.name ]]</para>
|
||||
</td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
</section>
|
||||
<blockTable colWidths="371.0,94.0,74.0" style="Tabla3">
|
||||
<tr>
|
||||
<td>
|
||||
<para style="Standard">[[ o.sale_id and o.sale_id.partner_id and o.sale_id.partner_id.valued_picking and ' ' or removeParentNode('tr') ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_tblheader_Details_Right">Untaxed amount</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_tblheader_Details_Right">[[ formatLang(o.amount_untaxed, dp='Account', currency_obj=o.sale_id.currency_id) ]]</para>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<para style="Standard">[[ o.sale_id and o.sale_id.partner_id and o.sale_id.partner_id.valued_picking and ' ' or removeParentNode('tr') ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_tblheader_Details_Right">Taxes</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_tblheader_Details_Right">[[ formatLang(o.amount_tax, dp='Account', currency_obj=o.sale_id.currency_id) ]]</para>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<para style="Standard">[[ o.sale_id and o.sale_id.partner_id and o.sale_id.partner_id.valued_picking and ' ' or removeParentNode('tr') ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_tblheader_Details_Right">Total</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_tblheader_Details_Right">[[ formatLang(o.amount_total, dp='Account', currency_obj=o.sale_id.currency_id) ]]</para>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<para style="Standard">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_tblheader_Details_Right">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_tblheader_Details_Right">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
</td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
<para style="Standard">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
</story>
|
||||
</document>
|
||||
|
||||
BIN
stock_valued_picking_report/report/shipping.sxw
Normal file
BIN
stock_valued_picking_report/report/shipping.sxw
Normal file
Binary file not shown.
1
stock_valued_picking_report/report/shipping_convert.sh
Executable file
1
stock_valued_picking_report/report/shipping_convert.sh
Executable file
@@ -0,0 +1 @@
|
||||
python /opt/openerp/v7/ocb-addons/base_report_designer/openerp_sxw2rml/openerp_sxw2rml.py ./shipping.sxw > ./shipping.rml
|
||||
14
stock_valued_picking_report/report/stock_valued_report.xml
Normal file
14
stock_valued_picking_report/report/stock_valued_report.xml
Normal file
@@ -0,0 +1,14 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<openerp>
|
||||
<data>
|
||||
|
||||
<record model="ir.actions.report.xml" id="delivery.report_shipping">
|
||||
<field name="name">Valued delivery order</field>
|
||||
<field name="model">stock.picking</field>
|
||||
<field name="report_name">stock_valued_picking_report.report_shipping</field>
|
||||
<field name="report_file">stock_valued_picking/report/shipping.rml</field>
|
||||
</record>
|
||||
|
||||
</data>
|
||||
</openerp>
|
||||
|
||||
18
stock_valued_picking_report/views/res_partner_view.xml
Normal file
18
stock_valued_picking_report/views/res_partner_view.xml
Normal file
@@ -0,0 +1,18 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<openerp>
|
||||
<data>
|
||||
|
||||
<record model="ir.ui.view" id="view_partner_valued_pickimg">
|
||||
<field name="name">Partner view (Valued picking)</field>
|
||||
<field name="model">res.partner</field>
|
||||
<field name="inherit_id" ref="base.view_partner_form"/>
|
||||
<field name="arch" type="xml">
|
||||
<field name="active" position="after">
|
||||
<field name="valued_picking"
|
||||
attrs="{'invisible': [('customer', '=', False)]}"/>
|
||||
</field>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
</data>
|
||||
</openerp>
|
||||
34
stock_valued_picking_report/views/stock_picking_view.xml
Normal file
34
stock_valued_picking_report/views/stock_picking_view.xml
Normal file
@@ -0,0 +1,34 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<openerp>
|
||||
<data>
|
||||
|
||||
<!-- Inherited from : /addons/stock/stock_view.xml -->
|
||||
<record model="ir.ui.view" id="view_picking_form_valued">
|
||||
<field name="name">Valued Stock Picking</field>
|
||||
<field name="model">stock.picking</field>
|
||||
<field name="inherit_id" ref="stock.view_picking_form"/>
|
||||
<field name="arch" type="xml">
|
||||
<field name="move_lines" position="after">
|
||||
<group class="oe_subtotal_footer oe_right"
|
||||
attrs="{'invisible': ['|', ('sale_id', '=', False),
|
||||
('valued', '=', False)]}">
|
||||
<field name="sale_id" invisible="1"/>
|
||||
<field name="valued" invisible="1"/>
|
||||
<field name="amount_untaxed"
|
||||
widget="monetary"
|
||||
options="{'currency_field': 'currency_id'}"/>
|
||||
<field name="amount_tax"
|
||||
widget="monetary"
|
||||
options="{'currency_field': 'currency_id'}"/>
|
||||
<field name="amount_total"
|
||||
class="oe_subtotal_footer_separator"
|
||||
widget="monetary"
|
||||
options="{'currency_field': 'currency_id'}"/>
|
||||
</group>
|
||||
<div class="oe_clear"/>
|
||||
</field>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
</data>
|
||||
</openerp>
|
||||
Reference in New Issue
Block a user