Merge lp:~wiz-keed/openobject-addons/trunk-multicompany-aware-delivery-method-fix into lp:openobject-addons

Proposed by Paul Catinean on 2014-04-05
Status: Needs review
Proposed branch: lp:~wiz-keed/openobject-addons/trunk-multicompany-aware-delivery-method-fix
Merge into: lp:openobject-addons
Diff against target: 52 lines (+15/-0)
4 files modified
delivery/__openerp__.py (+1/-0)
delivery/delivery.py (+1/-0)
delivery/delivery_view.xml (+1/-0)
delivery/security/delivery_security.xml (+12/-0)
To merge this branch: bzr merge lp:~wiz-keed/openobject-addons/trunk-multicompany-aware-delivery-method-fix
Reviewer Review Type Date Requested Status
OpenERP Core Team 2014-04-05 Pending
Review via email: mp+214384@code.launchpad.net
To post a comment you must log in.

Unmerged revisions

9285. By Paul Catinean on 2014-04-05

[FIX] Added company field to delivery.carrier model for company awareness of delivery methods

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'delivery/__openerp__.py'
2--- delivery/__openerp__.py 2013-12-09 10:17:38 +0000
3+++ delivery/__openerp__.py 2014-04-05 10:34:35 +0000
4@@ -35,6 +35,7 @@
5 'depends': ['sale_stock'],
6 'data': [
7 'security/ir.model.access.csv',
8+ 'security/delivery_security.xml',
9 'delivery_report.xml',
10 'delivery_view.xml',
11 'partner_view.xml',
12
13=== modified file 'delivery/delivery.py'
14--- delivery/delivery.py 2014-01-30 21:49:44 +0000
15+++ delivery/delivery.py 2014-04-05 10:34:35 +0000
16@@ -64,6 +64,7 @@
17 _columns = {
18 'name': fields.char('Delivery Method', size=64, required=True),
19 'partner_id': fields.many2one('res.partner', 'Transport Company', required=True, help="The partner that is doing the delivery service."),
20+ 'company_id': fields.many2one('res.company', 'Company'),
21 'product_id': fields.many2one('product.product', 'Delivery Product', required=True),
22 'grids_id': fields.one2many('delivery.grid', 'carrier_id', 'Delivery Grids'),
23 'price' : fields.function(get_price, string='Price'),
24
25=== modified file 'delivery/delivery_view.xml'
26--- delivery/delivery_view.xml 2012-12-21 16:48:08 +0000
27+++ delivery/delivery_view.xml 2014-04-05 10:34:35 +0000
28@@ -32,6 +32,7 @@
29 <field name="product_id"/>
30 </group>
31 <group>
32+ <field name="company_id" groups="base.group_multi_company"/>
33 <field name="active"/>
34 </group>
35 </group>
36
37=== added file 'delivery/security/delivery_security.xml'
38--- delivery/security/delivery_security.xml 1970-01-01 00:00:00 +0000
39+++ delivery/security/delivery_security.xml 2014-04-05 10:34:35 +0000
40@@ -0,0 +1,12 @@
41+<?xml version="1.0" encoding="utf-8"?>
42+<openerp>
43+<data noupdate="1">
44+
45+ <record model="ir.rule" id="delivery_carrier_rule">
46+ <field name="name">delivery_carrier multi-company</field>
47+ <field name="model_id" search="[('model','=','delivery.carrier')]" model="ir.model"/>
48+ <field name="domain_force">['|','|',('company_id.child_ids','child_of',[user.company_id.id]),('company_id','child_of',[user.company_id.id]),('company_id','=',False)]</field>
49+ </record>
50+
51+</data>
52+</openerp>

Subscribers

People subscribed via source and target branches

to all changes: