Skip to content

Commit

Permalink
Merge pull request OCA#208 from OpenCode/8.0-ddt-type-multy-company
Browse files Browse the repository at this point in the history
8.0 ddt type multy company
  • Loading branch information
tafaRU committed Mar 22, 2016
2 parents c8f89c2 + 4a4968b commit 1d0d493
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 0 deletions.
3 changes: 3 additions & 0 deletions l10n_it_ddt/models/stock_picking_package_preparation.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,9 @@ class StockDdtType(models.Model):
name = fields.Char(required=True)
sequence_id = fields.Many2one('ir.sequence', required=True)
note = fields.Text(string='Note')
company_id = fields.Many2one(
'res.company', string='Company',
default=lambda self: self.env.user.company_id, )


class StockPickingPackagePreparation(models.Model):
Expand Down
12 changes: 12 additions & 0 deletions l10n_it_ddt/security/security.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<?xml version="1.0" encoding="utf-8"?>
<openerp>
<data noupdate="1">

<record model="ir.rule" id="stock_ddt_type_comp_rule">
<field name="name">Stock DDT Type multi-company</field>
<field name="model_id" ref="model_stock_ddt_type"/>
<field name="domain_force">['|',('company_id','=',False),('company_id','child_of',[user.company_id.id])]</field>
</record>

</data>
</openerp>
1 change: 1 addition & 0 deletions l10n_it_ddt/views/stock_picking_package_preparation.xml
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,7 @@
<group>
<field name="name"/>
<field name="sequence_id"/>
<field name="company_id" groups="base.group_multi_company"/>
<field name="note"/>
</group>
</form>
Expand Down

0 comments on commit 1d0d493

Please sign in to comment.