Fix wizard view, and allow to add tags

This commit is contained in:
Akim Juillerat
2017-09-29 17:16:49 +02:00
parent e8d0bf7a68
commit 5d6ed75d84
3 changed files with 10 additions and 3 deletions

View File

@@ -1,3 +1,4 @@
"id","name","model_id:id","group_id:id","perm_read","perm_write","perm_create","perm_unlink"
access_account_account_tag_category_user,access_account_account_tag_category_user,model_account_account_tag_category,account.group_account_user,1,0,0,0
access_account_account_tag_category_manager,access_account_account_tag_category_manager,model_account_account_tag_category,account_tag_category.group_account_tag_category,1,1,1,1
access_account_account_tag_manager,account.account.tag,account.model_account_account_tag,account_tag_category.group_account_tag_category,1,1,1,1
1 id name model_id:id group_id:id perm_read perm_write perm_create perm_unlink
2 access_account_account_tag_category_user access_account_account_tag_category_user model_account_account_tag_category account.group_account_user 1 0 0 0
3 access_account_account_tag_category_manager access_account_account_tag_category_manager model_account_account_tag_category account_tag_category.group_account_tag_category 1 1 1 1
4 access_account_account_tag_manager account.account.tag account.model_account_account_tag account_tag_category.group_account_tag_category 1 1 1 1

View File

@@ -18,7 +18,12 @@
<form string="Update tags">
<group>
<field name="tag_category_id" />
<field name="tag_ids" />
<field name="tag_ids">
<tree string="Tags" editable="bottom" >
<field name="name" />
<field name="tag_category_id" />
</tree>
</field>
</group>
<footer>
<button name='save_tags_to_category' string='Save tags' class='oe_highlight' type='object' />

View File

@@ -12,11 +12,12 @@ class AccountTagCategoryUpdateTags(models.TransientModel):
_description = 'Update account tags on account tag category'
tag_ids = fields.Many2many('account.account.tag',
tag_ids = fields.Many2many('account.account.tag', string='Tags'
domain=[('applicability', '=', 'accounts')])
# TODO support applicability for taxes in domain
tag_category_id = fields.Many2one('account.account.tag.category')
tag_category_id = fields.Many2one('account.account.tag.category',
string='Tag category')
@api.model
def default_get(self, fields):