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
=== added directory 'stock_location_ownership'
=== added file 'stock_location_ownership/__init__.py'
--- stock_location_ownership/__init__.py 1970-01-01 00:00:00 +0000
+++ stock_location_ownership/__init__.py 2013-12-11 20:02:32 +0000
@@ -0,0 +1,22 @@
1# -*- coding: utf-8 -*-
2##############################################################################
3#
4# Author: Guewen Baconnier
5# Copyright 2013 Camptocamp SA
6#
7# This program is free software: you can redistribute it and/or modify
8# it under the terms of the GNU Affero General Public License as
9# published by the Free Software Foundation, either version 3 of the
10# License, or (at your option) any later version.
11#
12# This program is distributed in the hope that it will be useful,
13# but WITHOUT ANY WARRANTY; without even the implied warranty of
14# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15# GNU Affero General Public License for more details.
16#
17# You should have received a copy of the GNU Affero General Public License
18# along with this program. If not, see <http://www.gnu.org/licenses/>.
19#
20##############################################################################
21
22from . import model
023
=== added file 'stock_location_ownership/__openerp__.py'
--- stock_location_ownership/__openerp__.py 1970-01-01 00:00:00 +0000
+++ stock_location_ownership/__openerp__.py 2013-12-11 20:02:32 +0000
@@ -0,0 +1,44 @@
1# -*- coding: utf-8 -*-
2##############################################################################
3#
4# Author: Guewen Baconnier
5# Copyright 2013 Camptocamp SA
6#
7# This program is free software: you can redistribute it and/or modify
8# it under the terms of the GNU Affero General Public License as
9# published by the Free Software Foundation, either version 3 of the
10# License, or (at your option) any later version.
11#
12# This program is distributed in the hope that it will be useful,
13# but WITHOUT ANY WARRANTY; without even the implied warranty of
14# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15# GNU Affero General Public License for more details.
16#
17# You should have received a copy of the GNU Affero General Public License
18# along with this program. If not, see <http://www.gnu.org/licenses/>.
19#
20##############################################################################
21
22{'name': 'Stock Location Ownership',
23 'version': '0.1',
24 'author': 'Camptocamp',
25 'category': 'Warehouse',
26 'license': 'AGPL-3',
27 'complexity': 'normal',
28 'images': [],
29 'website': "http://www.camptocamp.com",
30 'description': """
31Stock Location Ownership
32========================
33
34Adds an ownership on the stock locations
35""",
36 'depends': ['stock',
37 ],
38 'demo': [],
39 'data': ['view/stock_view.xml',
40 ],
41 'test': [],
42 'auto_install': False,
43 'installable': True,
44 }
045
=== added directory 'stock_location_ownership/i18n'
=== added directory 'stock_location_ownership/model'
=== added file 'stock_location_ownership/model/__init__.py'
--- stock_location_ownership/model/__init__.py 1970-01-01 00:00:00 +0000
+++ stock_location_ownership/model/__init__.py 2013-12-11 20:02:32 +0000
@@ -0,0 +1,22 @@
1# -*- coding: utf-8 -*-
2##############################################################################
3#
4# Author: Guewen Baconnier
5# Copyright 2013 Camptocamp SA
6#
7# This program is free software: you can redistribute it and/or modify
8# it under the terms of the GNU Affero General Public License as
9# published by the Free Software Foundation, either version 3 of the
10# License, or (at your option) any later version.
11#
12# This program is distributed in the hope that it will be useful,
13# but WITHOUT ANY WARRANTY; without even the implied warranty of
14# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15# GNU Affero General Public License for more details.
16#
17# You should have received a copy of the GNU Affero General Public License
18# along with this program. If not, see <http://www.gnu.org/licenses/>.
19#
20##############################################################################
21
22from . import stock
023
=== added file 'stock_location_ownership/model/stock.py'
--- stock_location_ownership/model/stock.py 1970-01-01 00:00:00 +0000
+++ stock_location_ownership/model/stock.py 2013-12-11 20:02:32 +0000
@@ -0,0 +1,34 @@
1# -*- coding: utf-8 -*-
2##############################################################################
3#
4# Author: Guewen Baconnier
5# Copyright 2013 Camptocamp SA
6#
7# This program is free software: you can redistribute it and/or modify
8# it under the terms of the GNU Affero General Public License as
9# published by the Free Software Foundation, either version 3 of the
10# License, or (at your option) any later version.
11#
12# This program is distributed in the hope that it will be useful,
13# but WITHOUT ANY WARRANTY; without even the implied warranty of
14# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15# GNU Affero General Public License for more details.
16#
17# You should have received a copy of the GNU Affero General Public License
18# along with this program. If not, see <http://www.gnu.org/licenses/>.
19#
20##############################################################################
21
22from openerp.osv import orm, fields
23
24
25class stock_location(orm.Model):
26 _inherit = 'stock.location'
27
28 _columns = {
29 'owner_id': fields.many2one(
30 'res.partner',
31 'Owner',
32 help="Owner of the location if different from the company "
33 "or address."),
34 }
035
=== added directory 'stock_location_ownership/test'
=== added directory 'stock_location_ownership/view'
=== added file 'stock_location_ownership/view/stock_view.xml'
--- stock_location_ownership/view/stock_view.xml 1970-01-01 00:00:00 +0000
+++ stock_location_ownership/view/stock_view.xml 2013-12-11 20:02:32 +0000
@@ -0,0 +1,15 @@
1<?xml version="1.0" encoding="utf-8"?>
2<openerp>
3 <data noupdate="0">
4 <record id="view_stock_location_form" model="ir.ui.view">
5 <field name="name">stock.location.form</field>
6 <field name="model">stock.location</field>
7 <field name="inherit_id" ref="stock.view_location_form"/>
8 <field name="arch" type="xml">
9 <field name="partner_id" position="after">
10 <field name="owner_id"/>
11 </field>
12 </field>
13 </record>
14 </data>
15</openerp>

Subscribers

People subscribed via source and target branches