Merge lp:~camptocamp/stock-logistic-warehouse/add-stock_ownership_nbi into lp:stock-logistic-warehouse

Proposed by Nicolas Bessi - Camptocamp
Status: Merged
Merged at revision: 33
Proposed branch: lp:~camptocamp/stock-logistic-warehouse/add-stock_ownership_nbi
Merge into: lp:stock-logistic-warehouse
Diff against target: 166 lines (+137/-0)
5 files modified
stock_location_ownership/__init__.py (+22/-0)
stock_location_ownership/__openerp__.py (+44/-0)
stock_location_ownership/model/__init__.py (+22/-0)
stock_location_ownership/model/stock.py (+34/-0)
stock_location_ownership/view/stock_view.xml (+15/-0)
To merge this branch: bzr merge lp:~camptocamp/stock-logistic-warehouse/add-stock_ownership_nbi
Reviewer Review Type Date Requested Status
Yannick Vaucher @ Camptocamp Approve
Lionel Sausin - Initiatives/Numérigraphe (community) Needs Information
Romain Deheele - Camptocamp (community) code review and test Approve
Review via email: mp+196530@code.launchpad.net

Description of the change

To post a comment you must log in.
Revision history for this message
Romain Deheele - Camptocamp (romaindeheele) wrote :

Guewen,

Changes about sale and sale order line (_prepare methods on sale order, field location_id on sale order line, sale views and sale tests)
are already in sale_sourced_by_line addon proposed here :
https://code.launchpad.net/~camptocamp/sale-wkfl/7.0-add-sale_sourced_and_stock_ownership/+merge/194527

It seems to me that the best location is sale_sourced_by_line because pointed changes concern sale objects.

What do you think about it?

Regards,

Romain

review: Needs Information (code review)
Revision history for this message
Guewen Baconnier @ Camptocamp (gbaconnier-c2c) wrote :

> Guewen,
>
> Changes about sale and sale order line (_prepare methods on sale order, field
> location_id on sale order line, sale views and sale tests)
> are already in sale_sourced_by_line addon proposed here :
> https://code.launchpad.net/~camptocamp/sale-wkfl/7.0-add-
> sale_sourced_and_stock_ownership/+merge/194527
>
> It seems to me that the best location is sale_sourced_by_line because pointed
> changes concern sale objects.
>
> What do you think about it?
>
> Regards,
>
> Romain

Hello Romain,

Despite my name on the revision, I'm not the author of the rev. 37. I don't understand exactly how does work this extraction script regarding the authorship... Well, though I'm the author of the original module, and the thing you point is correct: the sale.py module is not supposed to exist (not imported BTW), it has been removed in the original module. I guess this is a extraction error.

40. By Guewen Baconnier @ Camptocamp

[FIX] remove python modules and views related to sale, added by error during extraction

Revision history for this message
Guewen Baconnier @ Camptocamp (gbaconnier-c2c) wrote :

I removed the superfluous files.

Revision history for this message
Guewen Baconnier @ Camptocamp (gbaconnier-c2c) wrote :

@Romain, can you recheck please?

Revision history for this message
Romain Deheele - Camptocamp (romaindeheele) wrote :

Thanks Guewen,

It's ok.

Romain

review: Approve (code review and test)
Revision history for this message
Lionel Sausin - Initiatives/Numérigraphe (ls-initiatives) wrote :

The link you refer to in your description is broken.

review: Needs Information
Revision history for this message
Lionel Sausin - Initiatives/Numérigraphe (ls-initiatives) wrote :

Will you please ask for review from the stock core team again?
I didn't intend to claim the review in their name. I didn't remember I was part of the team, sorry.
I'm leaving the team for now as I'm only just discovering the branches.

Revision history for this message
Lionel Sausin - Initiatives/Numérigraphe (ls-initiatives) wrote :

Would you be so kind as to explain the use case for this ?

Revision history for this message
Guewen Baconnier @ Camptocamp (gbaconnier-c2c) wrote :

> Would you be so kind as to explain the use case for this ?

It is for companies (seems to happen more often in NGO) that have one or several locations in a warehouse where the goods are not theirs, but are the goods of a supplier. Hence the ownership on the location.

Then, the workflow may vary but an example is that a sales order with a location having a different ownership could generate a dropship purchase order to the owner or generate an invoice.

This is used in https://code.launchpad.net/openerp-humanitarian-ngo

Revision history for this message
Pedro Manuel Baeza (pedro.baeza) wrote :

Reading your explanation, I wonder if you can't use already present functionality of partner locations, that allows to link an address (and thus, a partner or ownership).

Regards.

Revision history for this message
Pedro Manuel Baeza (pedro.baeza) wrote :

I think this one has been merged too fast, with only one approval, and two information requested.

For the moment, I see that there's no pot file.

Could you please ellaborate why this merge?

Regards.

Revision history for this message
Yannick Vaucher @ Camptocamp (yvaucher-c2c) wrote :

Well it kinda have the whole c2c approval, developped by Guewen proposed by Nicolas, approved by Romain, commited by Alexandre and authored Joël (ok perhaps there it bugged a little here ^^)

If we do an other MP for the pot file will it be ok for you ?

By the way I give my approval for this one that way

review: Approve
Revision history for this message
Pedro Manuel Baeza (pedro.baeza) wrote :

My information request was about the convenience of the module, but anyways, it's only an opinion. Please put an MP with the pot file, or better.

Regards.

Revision history for this message
Guewen Baconnier @ Camptocamp (gbaconnier-c2c) wrote :

Pedro, I agree that it would have been better if the question was answered before the merge.
Now, I'm sure there was an excellent reason why the existing field couldn't be used, even if I can't remember what it is; Joël thought about this module and I remember asking him the exact same question, so there was a reason. Joël if you can answer...

I suggest that we propose a merge with the .pot and maybe improve the description of the module so it shows what it brings compared to the existing field.

Revision history for this message
Yannick Vaucher @ Camptocamp (yvaucher-c2c) wrote :

The proper refered MP was in Romain's comment https://code.launchpad.net/~camptocamp/sale-wkfl/7.0-add-sale_sourced_and_stock_ownership/+merge/194527

Wrong team was set I fixed the link

Revision history for this message
Pedro Manuel Baeza (pedro.baeza) wrote :

Hi, Guewen, thank you very much for the explanation. Improved description will certainly help others like me to understand the purpose of the module.

Regards.

Revision history for this message
Alexandre Fayolle - camptocamp (alexandre-fayolle-c2c) wrote :

my most sincere apologies to Pedro and the rest of the community.

I could see no objection myself, the MP was old and I felt the information had been provided, but I may have been to quick indeed. My intent was not to hijack the process.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== added directory 'stock_location_ownership'
2=== added file 'stock_location_ownership/__init__.py'
3--- stock_location_ownership/__init__.py 1970-01-01 00:00:00 +0000
4+++ stock_location_ownership/__init__.py 2013-12-11 20:02:32 +0000
5@@ -0,0 +1,22 @@
6+# -*- coding: utf-8 -*-
7+##############################################################################
8+#
9+# Author: Guewen Baconnier
10+# Copyright 2013 Camptocamp SA
11+#
12+# This program is free software: you can redistribute it and/or modify
13+# it under the terms of the GNU Affero General Public License as
14+# published by the Free Software Foundation, either version 3 of the
15+# License, or (at your option) any later version.
16+#
17+# This program is distributed in the hope that it will be useful,
18+# but WITHOUT ANY WARRANTY; without even the implied warranty of
19+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20+# GNU Affero General Public License for more details.
21+#
22+# You should have received a copy of the GNU Affero General Public License
23+# along with this program. If not, see <http://www.gnu.org/licenses/>.
24+#
25+##############################################################################
26+
27+from . import model
28
29=== added file 'stock_location_ownership/__openerp__.py'
30--- stock_location_ownership/__openerp__.py 1970-01-01 00:00:00 +0000
31+++ stock_location_ownership/__openerp__.py 2013-12-11 20:02:32 +0000
32@@ -0,0 +1,44 @@
33+# -*- coding: utf-8 -*-
34+##############################################################################
35+#
36+# Author: Guewen Baconnier
37+# Copyright 2013 Camptocamp SA
38+#
39+# This program is free software: you can redistribute it and/or modify
40+# it under the terms of the GNU Affero General Public License as
41+# published by the Free Software Foundation, either version 3 of the
42+# License, or (at your option) any later version.
43+#
44+# This program is distributed in the hope that it will be useful,
45+# but WITHOUT ANY WARRANTY; without even the implied warranty of
46+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
47+# GNU Affero General Public License for more details.
48+#
49+# You should have received a copy of the GNU Affero General Public License
50+# along with this program. If not, see <http://www.gnu.org/licenses/>.
51+#
52+##############################################################################
53+
54+{'name': 'Stock Location Ownership',
55+ 'version': '0.1',
56+ 'author': 'Camptocamp',
57+ 'category': 'Warehouse',
58+ 'license': 'AGPL-3',
59+ 'complexity': 'normal',
60+ 'images': [],
61+ 'website': "http://www.camptocamp.com",
62+ 'description': """
63+Stock Location Ownership
64+========================
65+
66+Adds an ownership on the stock locations
67+""",
68+ 'depends': ['stock',
69+ ],
70+ 'demo': [],
71+ 'data': ['view/stock_view.xml',
72+ ],
73+ 'test': [],
74+ 'auto_install': False,
75+ 'installable': True,
76+ }
77
78=== added directory 'stock_location_ownership/i18n'
79=== added directory 'stock_location_ownership/model'
80=== added file 'stock_location_ownership/model/__init__.py'
81--- stock_location_ownership/model/__init__.py 1970-01-01 00:00:00 +0000
82+++ stock_location_ownership/model/__init__.py 2013-12-11 20:02:32 +0000
83@@ -0,0 +1,22 @@
84+# -*- coding: utf-8 -*-
85+##############################################################################
86+#
87+# Author: Guewen Baconnier
88+# Copyright 2013 Camptocamp SA
89+#
90+# This program is free software: you can redistribute it and/or modify
91+# it under the terms of the GNU Affero General Public License as
92+# published by the Free Software Foundation, either version 3 of the
93+# License, or (at your option) any later version.
94+#
95+# This program is distributed in the hope that it will be useful,
96+# but WITHOUT ANY WARRANTY; without even the implied warranty of
97+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
98+# GNU Affero General Public License for more details.
99+#
100+# You should have received a copy of the GNU Affero General Public License
101+# along with this program. If not, see <http://www.gnu.org/licenses/>.
102+#
103+##############################################################################
104+
105+from . import stock
106
107=== added file 'stock_location_ownership/model/stock.py'
108--- stock_location_ownership/model/stock.py 1970-01-01 00:00:00 +0000
109+++ stock_location_ownership/model/stock.py 2013-12-11 20:02:32 +0000
110@@ -0,0 +1,34 @@
111+# -*- coding: utf-8 -*-
112+##############################################################################
113+#
114+# Author: Guewen Baconnier
115+# Copyright 2013 Camptocamp SA
116+#
117+# This program is free software: you can redistribute it and/or modify
118+# it under the terms of the GNU Affero General Public License as
119+# published by the Free Software Foundation, either version 3 of the
120+# License, or (at your option) any later version.
121+#
122+# This program is distributed in the hope that it will be useful,
123+# but WITHOUT ANY WARRANTY; without even the implied warranty of
124+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
125+# GNU Affero General Public License for more details.
126+#
127+# You should have received a copy of the GNU Affero General Public License
128+# along with this program. If not, see <http://www.gnu.org/licenses/>.
129+#
130+##############################################################################
131+
132+from openerp.osv import orm, fields
133+
134+
135+class stock_location(orm.Model):
136+ _inherit = 'stock.location'
137+
138+ _columns = {
139+ 'owner_id': fields.many2one(
140+ 'res.partner',
141+ 'Owner',
142+ help="Owner of the location if different from the company "
143+ "or address."),
144+ }
145
146=== added directory 'stock_location_ownership/test'
147=== added directory 'stock_location_ownership/view'
148=== added file 'stock_location_ownership/view/stock_view.xml'
149--- stock_location_ownership/view/stock_view.xml 1970-01-01 00:00:00 +0000
150+++ stock_location_ownership/view/stock_view.xml 2013-12-11 20:02:32 +0000
151@@ -0,0 +1,15 @@
152+<?xml version="1.0" encoding="utf-8"?>
153+<openerp>
154+ <data noupdate="0">
155+ <record id="view_stock_location_form" model="ir.ui.view">
156+ <field name="name">stock.location.form</field>
157+ <field name="model">stock.location</field>
158+ <field name="inherit_id" ref="stock.view_location_form"/>
159+ <field name="arch" type="xml">
160+ <field name="partner_id" position="after">
161+ <field name="owner_id"/>
162+ </field>
163+ </field>
164+ </record>
165+ </data>
166+</openerp>

Subscribers

People subscribed via source and target branches