Skip to content
This repository has been archived by the owner on Dec 21, 2021. It is now read-only.

Commit

Permalink
[ADD] Module which adds an overall delivery address selection to Deli…
Browse files Browse the repository at this point in the history
…very Orders.
  • Loading branch information
Tom Pickering committed Aug 21, 2014
1 parent 82b2863 commit f53ed42
Show file tree
Hide file tree
Showing 4 changed files with 70 additions and 0 deletions.
1 change: 1 addition & 0 deletions stock_delivery_address_selection/__init__.py
@@ -0,0 +1 @@
import stock
39 changes: 39 additions & 0 deletions stock_delivery_address_selection/__openerp__.py
@@ -0,0 +1,39 @@
# -*- encoding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2014 credativ Ltd (<http://credativ.co.uk>).
# 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/>.
#
##############################################################################

{
'name' : 'Select Address on Delivery Orders',
'version' : '0.1',
'author' : 'credativ Ltd',
'description' : """
This module allows users to specify a delivery address on Delivery Orders.
""",
'website' : 'http://credativ.co.uk',
'depends' : [
'stock',
],
'init_xml' : [
],
'update_xml' : [
'stock_view.xml',
],
'installable' : True,
'active' : False,
}
13 changes: 13 additions & 0 deletions stock_delivery_address_selection/stock.py
@@ -0,0 +1,13 @@
from osv import osv, fields

class stock_picking_out(osv.osv):

_name = 'stock.picking.out'
_inherit = 'stock.picking.out'

_columns = {
'delivery_address' : fields.many2one('res.partner', 'Delivery Address', help='Address to which the products will be delivered.')
}


stock_picking_out()
17 changes: 17 additions & 0 deletions stock_delivery_address_selection/stock_view.xml
@@ -0,0 +1,17 @@
<?xml version="1.0" encoding="utf-8"?>
<openerp>
<data>

<record id="view_picking_form_delivery_address_selection" model="ir.ui.view">
<field name="name">stock.picking.form.delivery.address.selection</field>
<field name="model">stock.picking.out</field>
<field name="inherit_id" ref="stock.view_picking_form"/>
<field name="arch" type="xml">
<field name="partner_id" position="after">
<field name="delivery_address" domain="['|',('parent_id','=',partner_id),('id','=',partner_id)]"/>
</field>
</field>
</record>

</data>
</openerp>

0 comments on commit f53ed42

Please sign in to comment.