Skip to content

Commit

Permalink
Merge e27cdb9 into 853751a
Browse files Browse the repository at this point in the history
  • Loading branch information
nicomacr committed Apr 26, 2016
2 parents 853751a + e27cdb9 commit ec1271d
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 0 deletions.
1 change: 1 addition & 0 deletions sale_order_type/__openerp__.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@
],
"data": [
"security/ir.model.access.csv",
"security/security.xml",
"views/sale_order_view.xml",
"views/sale_order_type_view.xml",
"views/res_partner_view.xml",
Expand Down
3 changes: 3 additions & 0 deletions sale_order_type/models/sale_order_type.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,3 +69,6 @@ def default_invoice_state(self):
sequence = fields.Integer(
string='Sequence',
default=0)
company_id = fields.Many2one(
'res.company',
related='warehouse_id.company_id', store=True, readonly=True)
17 changes: 17 additions & 0 deletions sale_order_type/security/security.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<?xml version="1.0"?>
<openerp>
<data noupdate="0">

<record model="ir.rule" id="sale_order_type_comp_rule">
<field name="name">Sale Order Type multi-company</field>
<field name="model_id" ref="sale_order_type.model_sale_order_type"/>
<field name="domain_force">['|',('company_id','=',False),('company_id','child_of',[user.company_id.id])]</field>
<field name="perm_read" eval="1"/>
<field name="perm_create" eval="1"/>
<field name="perm_write" eval="1"/>
<field name="perm_unlink" eval="1"/>
</record>

</data>
</openerp>

1 change: 1 addition & 0 deletions sale_order_type/views/sale_order_type_view.xml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
<group>
<group>
<field name="warehouse_id" />
<field name="company_id" />
<field name="sequence_id" />
</group>
<group>
Expand Down

0 comments on commit ec1271d

Please sign in to comment.