From 97a89675035a9e20bde3dea340ea0a3278f833f4 Mon Sep 17 00:00:00 2001 From: Marc Cassuto Date: Mon, 28 Jul 2014 22:41:14 -0400 Subject: [PATCH] bill_of_lading_webkit: initialize module --- bill_of_lading_webkit/__init__.py | 23 +++ bill_of_lading_webkit/__openerp__.py | 58 ++++++++ .../i18n/bill_of_lading_webkit.pot | 103 ++++++++++++++ bill_of_lading_webkit/i18n/fr.po | 103 ++++++++++++++ bill_of_lading_webkit/report.xml | 26 ++++ bill_of_lading_webkit/report/__init__.py | 21 +++ bill_of_lading_webkit/report/bol_in.mako | 106 ++++++++++++++ bill_of_lading_webkit/report/bol_out.mako | 133 ++++++++++++++++++ bill_of_lading_webkit/report/stock_report.py | 93 ++++++++++++ bill_of_lading_webkit/static/src/img/icon.png | Bin 0 -> 8262 bytes bill_of_lading_webkit/stock.py | 70 +++++++++ bill_of_lading_webkit/stock_view.xml | 36 +++++ 12 files changed, 772 insertions(+) create mode 100644 bill_of_lading_webkit/__init__.py create mode 100644 bill_of_lading_webkit/__openerp__.py create mode 100644 bill_of_lading_webkit/i18n/bill_of_lading_webkit.pot create mode 100644 bill_of_lading_webkit/i18n/fr.po create mode 100644 bill_of_lading_webkit/report.xml create mode 100644 bill_of_lading_webkit/report/__init__.py create mode 100644 bill_of_lading_webkit/report/bol_in.mako create mode 100644 bill_of_lading_webkit/report/bol_out.mako create mode 100644 bill_of_lading_webkit/report/stock_report.py create mode 100644 bill_of_lading_webkit/static/src/img/icon.png create mode 100644 bill_of_lading_webkit/stock.py create mode 100644 bill_of_lading_webkit/stock_view.xml diff --git a/bill_of_lading_webkit/__init__.py b/bill_of_lading_webkit/__init__.py new file mode 100644 index 0000000..491d2eb --- /dev/null +++ b/bill_of_lading_webkit/__init__.py @@ -0,0 +1,23 @@ +# -*- coding: utf-8 -*- +############################################################################## +# +# Copyright (c) 2011-2013 Camptocamp SA (http://www.camptocamp.com) +# @author Nicolas Bessi +# +# 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 stock +from . import report diff --git a/bill_of_lading_webkit/__openerp__.py b/bill_of_lading_webkit/__openerp__.py new file mode 100644 index 0000000..3eb7cb1 --- /dev/null +++ b/bill_of_lading_webkit/__openerp__.py @@ -0,0 +1,58 @@ +# -*- encoding: utf-8 -*- +############################################################################### +# +# OpenERP, Open Source Management Solution +# This module copyright (C) 2014 Savoir-faire Linux +# (). +# +# 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 Affero 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': 'Bill of Lading using Webkit Library', + 'version': '1.0', + 'category': 'Reports/Webkit', + 'description': """ + +A Bill of Lading is a document issued by a carrier to a shipper of goods. +It is a negotiable instrument, and it serves three purposes: + - it is a receipt for the goods shipped; + - it evidences the contract of carriage; + - it serves as a document of title (i.e. ownership). + +This document could be different from a Delivery Order as it has some legal issues. + +Two reports are provided in this module + - Bill of Lading for Delivey Orders; + - Bill of Lading for Incoming Shipment (the use-case is shipment from an international Warehouse +to the local Warehouse). + +This module also add a new field for a warehouse to pick form or deliver to; +this field will be used if the default warehouse_id is not set (normally from a PO). + +Contributors +------------ +* Marc Cassuto (marc.cassuto@savoirfairelinux.com) +* Mathieu Benoit (mathieu.benoit@savoirfairelinux.com) +* Camptocamp with its original module stock_picking_webkit + """, + 'author': 'Savoir-faire Linux', + 'website': 'http://www.savoirfairelinux.com', + 'depends': ['base', 'report_webkit', 'base_headers_webkit', 'stock', 'delivery'], + 'data': ['report.xml', 'stock_view.xml'], + 'installable': True, + 'auto_install': False, +} diff --git a/bill_of_lading_webkit/i18n/bill_of_lading_webkit.pot b/bill_of_lading_webkit/i18n/bill_of_lading_webkit.pot new file mode 100644 index 0000000..43e5140 --- /dev/null +++ b/bill_of_lading_webkit/i18n/bill_of_lading_webkit.pot @@ -0,0 +1,103 @@ +# Translation of OpenERP Server. +# This file contains the translation of the following modules: +# * bill_of_lading_webkit +# +msgid "" +msgstr "" +"Project-Id-Version: OpenERP Server 7.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2014-05-09 15:06+0000\n" +"PO-Revision-Date: 2014-05-09 15:06+0000\n" +"Last-Translator: <>\n" +"Language-Team: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: \n" + +#. module: bill_of_lading_webkit +#: report:addons/bill_of_lading_webkit/report/bol_in.mako:58 +#: report:addons/bill_of_lading_webkit/report/bol_out.mako:56 +msgid "Origin" +msgstr "" + +#. module: bill_of_lading_webkit +#: report:addons/bill_of_lading_webkit/report/bol_in.mako:59 +#: report:addons/bill_of_lading_webkit/report/bol_out.mako:57 +msgid "Scheduled Date" +msgstr "" + +#. module: bill_of_lading_webkit +#: report:addons/bill_of_lading_webkit/report/bol_in.mako:76 +#: report:addons/bill_of_lading_webkit/report/bol_out.mako:74 +msgid "Description" +msgstr "" + +#. module: bill_of_lading_webkit +#: report:addons/bill_of_lading_webkit/report/bol_out.mako:20 +msgid "Ship to:" +msgstr "" + +#. module: bill_of_lading_webkit +#: report:addons/bill_of_lading_webkit/report/bol_in.mako:61 +#: report:addons/bill_of_lading_webkit/report/bol_out.mako:59 +msgid "Delivery Method" +msgstr "" + +#. module: bill_of_lading_webkit +#: report:addons/bill_of_lading_webkit/report/bol_in.mako:53 +#: report:addons/bill_of_lading_webkit/report/bol_out.mako:51 +msgid "Delivery Order" +msgstr "" + +#. module: bill_of_lading_webkit +#: report:addons/bill_of_lading_webkit/report/bol_in.mako:75 +#: report:addons/bill_of_lading_webkit/report/bol_out.mako:73 +msgid "Item" +msgstr "" + +#. module: bill_of_lading_webkit +#: report:addons/bill_of_lading_webkit/report/bol_in.mako:77 +#: report:addons/bill_of_lading_webkit/report/bol_out.mako:75 +msgid "Serial Number" +msgstr "" + +#. module: bill_of_lading_webkit +#: report:addons/bill_of_lading_webkit/report/bol_in.mako:57 +#: report:addons/bill_of_lading_webkit/report/bol_out.mako:55 +msgid "Contact" +msgstr "" + +#. module: bill_of_lading_webkit +#: report:addons/bill_of_lading_webkit/report/bol_in.mako:78 +#: report:addons/bill_of_lading_webkit/report/bol_out.mako:76 +msgid "Weight (kg)" +msgstr "" + +#. module: bill_of_lading_webkit +#: report:addons/bill_of_lading_webkit/report/bol_in.mako:40 +msgid "Ship to :" +msgstr "" + +#. module: bill_of_lading_webkit +#: report:addons/bill_of_lading_webkit/report/bol_in.mako:79 +#: report:addons/bill_of_lading_webkit/report/bol_out.mako:77 +msgid "Quantity" +msgstr "" + +#. module: bill_of_lading_webkit +#: report:addons/bill_of_lading_webkit/report/bol_in.mako:21 +msgid "From :" +msgstr "" + +#. module: bill_of_lading_webkit +#: report:addons/bill_of_lading_webkit/report/bol_in.mako:60 +#: report:addons/bill_of_lading_webkit/report/bol_out.mako:58 +msgid "Total Weight" +msgstr "" + +#. module: bill_of_lading_webkit +#: report:addons/bill_of_lading_webkit/report/bol_out.mako:38 +msgid "Customer name & address:" +msgstr "" + diff --git a/bill_of_lading_webkit/i18n/fr.po b/bill_of_lading_webkit/i18n/fr.po new file mode 100644 index 0000000..c1e4027 --- /dev/null +++ b/bill_of_lading_webkit/i18n/fr.po @@ -0,0 +1,103 @@ +# Translation of OpenERP Server. +# This file contains the translation of the following modules: +# * bill_of_lading_webkit +# +msgid "" +msgstr "" +"Project-Id-Version: OpenERP Server 7.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2014-05-09 15:06+0000\n" +"PO-Revision-Date: 2014-05-09 11:14-0500\n" +"Last-Translator: Marc Cassuto \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: bill_of_lading_webkit +#: report:addons/bill_of_lading_webkit/report/bol_in.mako:58 +#: report:addons/bill_of_lading_webkit/report/bol_out.mako:56 +msgid "Origin" +msgstr "Origine" + +#. module: bill_of_lading_webkit +#: report:addons/bill_of_lading_webkit/report/bol_in.mako:59 +#: report:addons/bill_of_lading_webkit/report/bol_out.mako:57 +msgid "Scheduled Date" +msgstr "Date prévue" + +#. module: bill_of_lading_webkit +#: report:addons/bill_of_lading_webkit/report/bol_in.mako:76 +#: report:addons/bill_of_lading_webkit/report/bol_out.mako:74 +msgid "Description" +msgstr "Description" + +#. module: bill_of_lading_webkit +#: report:addons/bill_of_lading_webkit/report/bol_out.mako:20 +msgid "Ship to:" +msgstr "Livré à:" + +#. module: bill_of_lading_webkit +#: report:addons/bill_of_lading_webkit/report/bol_in.mako:61 +#: report:addons/bill_of_lading_webkit/report/bol_out.mako:59 +msgid "Delivery Method" +msgstr "Méthode de livraison" + +#. module: bill_of_lading_webkit +#: report:addons/bill_of_lading_webkit/report/bol_in.mako:53 +#: report:addons/bill_of_lading_webkit/report/bol_out.mako:51 +msgid "Delivery Order" +msgstr "Ordre de livraison" + +#. module: bill_of_lading_webkit +#: report:addons/bill_of_lading_webkit/report/bol_in.mako:75 +#: report:addons/bill_of_lading_webkit/report/bol_out.mako:73 +msgid "Item" +msgstr "Item" + +#. module: bill_of_lading_webkit +#: report:addons/bill_of_lading_webkit/report/bol_in.mako:77 +#: report:addons/bill_of_lading_webkit/report/bol_out.mako:75 +msgid "Serial Number" +msgstr "N° lot / N° série" + +#. module: bill_of_lading_webkit +#: report:addons/bill_of_lading_webkit/report/bol_in.mako:57 +#: report:addons/bill_of_lading_webkit/report/bol_out.mako:55 +msgid "Contact" +msgstr "Contact" + +#. module: bill_of_lading_webkit +#: report:addons/bill_of_lading_webkit/report/bol_in.mako:78 +#: report:addons/bill_of_lading_webkit/report/bol_out.mako:76 +msgid "Weight (kg)" +msgstr "Poids (kg)" + +#. module: bill_of_lading_webkit +#: report:addons/bill_of_lading_webkit/report/bol_in.mako:40 +msgid "Ship to :" +msgstr "Livré à:" + +#. module: bill_of_lading_webkit +#: report:addons/bill_of_lading_webkit/report/bol_in.mako:79 +#: report:addons/bill_of_lading_webkit/report/bol_out.mako:77 +msgid "Quantity" +msgstr "Quantité" + +#. module: bill_of_lading_webkit +#: report:addons/bill_of_lading_webkit/report/bol_in.mako:21 +msgid "From :" +msgstr "De :" + +#. module: bill_of_lading_webkit +#: report:addons/bill_of_lading_webkit/report/bol_in.mako:60 +#: report:addons/bill_of_lading_webkit/report/bol_out.mako:58 +msgid "Total Weight" +msgstr "Poid total" + +#. module: bill_of_lading_webkit +#: report:addons/bill_of_lading_webkit/report/bol_out.mako:38 +msgid "Customer name & address:" +msgstr "Nom et adresse du client:" + diff --git a/bill_of_lading_webkit/report.xml b/bill_of_lading_webkit/report.xml new file mode 100644 index 0000000..a3fbe26 --- /dev/null +++ b/bill_of_lading_webkit/report.xml @@ -0,0 +1,26 @@ + + + + + + + + + + diff --git a/bill_of_lading_webkit/report/__init__.py b/bill_of_lading_webkit/report/__init__.py new file mode 100644 index 0000000..6f89be9 --- /dev/null +++ b/bill_of_lading_webkit/report/__init__.py @@ -0,0 +1,21 @@ +# -*- coding: utf-8 -*- +############################################################################## +# +# Copyright (c) 2011-2013 Camptocamp SA (http://www.camptocamp.com) +# @author Nicolas Bessi +# +# 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 stock_report diff --git a/bill_of_lading_webkit/report/bol_in.mako b/bill_of_lading_webkit/report/bol_in.mako new file mode 100644 index 0000000..46d31ae --- /dev/null +++ b/bill_of_lading_webkit/report/bol_in.mako @@ -0,0 +1,106 @@ +## -*- coding: utf-8 -*- + + + + + + + <%page expression_filter="entity"/> + <% + def carriage_returns(text): + return text.replace('\n', '
') + %> + %for picking in objects: + <% setLang(picking.partner_id.lang) %> +
+ <% + warehouse_addr = warehouse_address(picking) + %> + + + + %if warehouse_addr.contact_address: + <% address_lines = warehouse_addr.contact_address.split("\n") %> + %for part in address_lines: + %if part: + + %endif + %endfor + %endif +
${_("Ship to :")}
${warehouse_addr.title and warehouse_addr.title.name or ''} ${warehouse_addr.name }
${part}
+ + %if picking.partner_id: + + %if picking.partner_id.parent_id: + + + <% address_lines = picking.partner_id.contact_address.split("\n")[1:] %> + %else: + + <% address_lines = picking.partner_id.contact_address.split("\n") %> + %endif + %for part in address_lines: + %if part: + + %endif + %endfor + %endif +
${_("From :")}
${picking.partner_id.parent_id.name or ''}
${picking.partner_id.title and picking.partner_id.title.name or ''} ${picking.partner_id.name }
${picking.partner_id.title and picking.partner_id.title.name or ''} ${picking.partner_id.name }
${part}
+
+ +

${_(u'Delivery Order') } ${picking.name}

+ + + + + + + + + + + + + + + + +
${_("Contact")}${_("Origin")}${_("Scheduled Date")}${_('Total Weight')}${_('Delivery Method')}
${user.name}${picking.origin or ''}${formatLang(picking.min_date, date=True)}${picking.weight}${picking.carrier_id and picking.carrier_id.name or ''}
+ + + + + + + + + + + + + %for line in picking.move_lines: + <% + weight = line.product_id.weight * line.product_qty + %> + + + + + + + + %endfor +
${_("Item")}${_("Description")}${_("Serial Number")}${_("Weight (kg)")}${_("Quantity")}
${ line.product_id.name }${ line.product_id.description or '' }${ line.prodlot_id and line.prodlot_id.name or ''}${ formatLang(weight) }${ formatLang(line.product_qty) } ${line.product_uom.name}
+ +
+ %if picking.note : +

${picking.note | carriage_returns}

+ %endif + +

+
+ %endfor + + diff --git a/bill_of_lading_webkit/report/bol_out.mako b/bill_of_lading_webkit/report/bol_out.mako new file mode 100644 index 0000000..07b9187 --- /dev/null +++ b/bill_of_lading_webkit/report/bol_out.mako @@ -0,0 +1,133 @@ +## -*- coding: utf-8 -*- + + + + + + + <%page expression_filter="entity"/> + <% + def carriage_returns(text): + return text.replace('\n', '
') + %> + %for picking in objects: + <% setLang(picking.partner_id.lang) %> +

+ <% + invoice_addr = invoice_address(picking) + %> + + + %if invoice_addr.phone: + + %endif + %if invoice_addr.mobile: + + %endif + %if invoice_addr.email: + + %endif +
${_("Contact info:")}
${_("Phone:")} ${invoice_addr.phone }
${_("Cell:")} ${invoice_addr.mobile }
${_("Email:")} ${invoice_addr.email }
+ + + + %if invoice_addr.contact_address: + <% address_lines = invoice_addr.contact_address.split("\n") %> + %for part in address_lines: + %if part: + + %endif + %endfor + %endif +
${_("Customer name & address:")}
${invoice_addr.title and invoice_addr.title.name or ''} ${invoice_addr.name }
${part}
+
+
+ <% + picking_addr = picking_address(picking) + %> + + + %if picking.partner_id.parent_id: + + + <% address_lines = picking.partner_id.contact_address.split("\n")[1:] %> + %else: + + <% address_lines = picking.partner_id.contact_address.split("\n") %> + %endif + %for part in address_lines: + %if part: + + %endif + %endfor +
${_("Ship to:")}
${picking.partner_id.parent_id.name or ''}
${picking.partner_id.title and picking.partner_id.title.name or ''} ${picking.partner_id.name }
${picking.partner_id.title and picking.partner_id.title.name or ''} ${picking.partner_id.name }
${part}
+ + + + %if picking_addr.contact_address: + <% address_lines = picking_addr.contact_address.split("\n") %> + %for part in address_lines: + %if part: + + %endif + %endfor + %endif +
${_("Pick from:")}
${picking_addr.title and picking_addr.title.name or ''} ${picking_addr.name }
${part}
+
+ +

${_(u'Delivery Order') } ${picking.name}

+ + + + + + + + + + + + + + + + +
${_("Customer Ref")}${_("Origin")}${_("Scheduled Date")}${_('Total Weight')}${_('Delivery Method')}
${picking.sale_id.client_order_ref if picking.sale_id else ''}${picking.origin or ''}${formatLang(picking.min_date, date=True)}${picking.weight}${picking.carrier_id and picking.carrier_id.name or ''}
+ + + + + + + + + + + + + %for line in picking.move_lines: + <% + weight = line.product_id.weight * line.product_qty + %> + + + + + + + + %endfor +
${_("Item")}${_("Description")}${_("Serial Number")}${_("Weight (kg)")}${_("Quantity")}
${ line.product_id.name }${ line.product_id.description or ''}${ line.prodlot_id and line.prodlot_id.name or ''}${ formatLang(weight) }${ formatLang(line.product_qty) } ${line.product_uom.name}
+ +
+ %if picking.note : +

${picking.note | carriage_returns}

+ %endif + +

+
+ %endfor + + diff --git a/bill_of_lading_webkit/report/stock_report.py b/bill_of_lading_webkit/report/stock_report.py new file mode 100644 index 0000000..ffade9c --- /dev/null +++ b/bill_of_lading_webkit/report/stock_report.py @@ -0,0 +1,93 @@ +# -*- coding: utf-8 -*- +############################################################################## +# +# Copyright (c) 2011-2013 Camptocamp SA (http://www.camptocamp.com) +# @author Nicolas Bessi +# Copyright (c) 2013 Agile Business Group (http://www.agilebg.com) +# @author Lorenzo Battistini +# +# 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 report import report_sxw +import pooler +import time + + +class BillOfLadingOut(report_sxw.rml_parse): + def _get_invoice_address(self, picking): + if picking.sale_id: + return picking.sale_id.partner_invoice_id + partner_obj = self.pool.get('res.partner') + invoice_address_id = picking.partner_id.address_get( + adr_pref=['invoice'] + )['invoice'] + return partner_obj.browse( + self.cr, self.uid, invoice_address_id) + + def _get_picking_address(self, picking): + # By default, print the warehouse selected manually + if picking.manual_warehouse_id: + return picking.manual_warehouse_id.partner_id + # if not set, print the shipping address of the default company's warehouse + partner_obj = self.pool.get('res.partner') + warehouse_address_id = picking.company_id.partner_id.address_get( + adr_pref=['shipping'] + )['shipping'] + return partner_obj.browse( + self.cr, self.uid, warehouse_address_id) + + def __init__(self, cr, uid, name, context): + super(BillOfLadingOut, self).__init__(cr, uid, name, context=context) + self.localcontext.update({ + 'time': time, + 'invoice_address': self._get_invoice_address, + 'picking_address': self._get_picking_address, + }) + +report_sxw.report_sxw('report.webkit.bill_of_lading_out', + 'stock.picking', + 'addons/bill_of_lading_webkit/report/bol_out.mako', + parser=BillOfLadingOut) + + +class BillOfLadingIn(report_sxw.rml_parse): + def _get_warehouse_address(self, picking): + # By default, print the warehouse selected from the related purchase order + if picking.purchase_id: + return picking.purchase_id.warehouse_id.partner_id + # else, print the warehouse selected manually + if picking.manual_warehouse_id: + return picking.manual_warehouse_id.partner_id + # if none of the above, print the shipping address of the default company's warehouse + partner_obj = self.pool.get('res.partner') + warehouse_address_id = picking.company_id.partner_id.address_get( + adr_pref=['shipping'] + )['shipping'] + return partner_obj.browse( + self.cr, self.uid, warehouse_address_id) + + def __init__(self, cr, uid, name, context): + super(BillOfLadingIn, self).__init__(cr, uid, name, context=context) + self.localcontext.update({ + 'time': time, + 'warehouse_address': self._get_warehouse_address, + }) + + +report_sxw.report_sxw('report.webkit.bill_of_lading_in', + 'stock.picking', + 'addons/bill_of_lading_webkit/report/bol_in.mako', + parser=BillOfLadingIn) diff --git a/bill_of_lading_webkit/static/src/img/icon.png b/bill_of_lading_webkit/static/src/img/icon.png new file mode 100644 index 0000000000000000000000000000000000000000..0dc49cddce5c465ea760900bb64418783bf1af22 GIT binary patch literal 8262 zcmV-MAi3X(P)~?k4S5;qqRrS5Px<^=+C4~^EAf=>Uo(|`JV7u)-Z2U&sYNXv-_=Z{_ zr39$Ud@EYywe(;@gl_zQ)l~$Dx_kw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ms 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 Affero 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 . +# +############################################################################## +from openerp.osv import fields, orm + + +class stock_picking_out_warehouse(orm.Model): + _inherit = "stock.picking.out" + _columns = { + 'manual_warehouse_id': fields.many2one( + 'stock.warehouse', + 'Picking from', + readonly=True, + states={ + 'draft': [('readonly', False)], + 'confirmed': [('readonly', False)], + 'assigned': [('readonly', False)], + } + ), + } + + +class stock_picking_in_warehouse(orm.Model): + _inherit = "stock.picking.in" + _columns = { + 'manual_warehouse_id': fields.many2one( + 'stock.warehouse', + 'Deliver to', + readonly=True, + states={ + 'draft': [('readonly', False)], + 'confirmed': [('readonly', False)], + 'assigned': [('readonly', False)], + } + ), + } + + +class stock_picking_warehouse(orm.Model): + _inherit = "stock.picking" + _columns = { + 'manual_warehouse_id': fields.many2one( + 'stock.warehouse', + 'Warehouse', + readonly=True, + states={ + 'draft': [('readonly', False)], + 'confirmed': [('readonly', False)], + 'assigned': [('readonly', False)], + } + ), + } diff --git a/bill_of_lading_webkit/stock_view.xml b/bill_of_lading_webkit/stock_view.xml new file mode 100644 index 0000000..db79cef --- /dev/null +++ b/bill_of_lading_webkit/stock_view.xml @@ -0,0 +1,36 @@ + + + + + + stock.picking + + + + + + + + + + stock.picking.out + + + + + + + + + + stock.picking.in + + + + + + + + + +