[IMP] base_comment_template multi company rules

[IMP] Move comment_template_id from account_invoice_comment_template and make it company_dependant

[IMP] base_comment_template: Add test
This commit is contained in:
Ivan Todorovich
2019-04-19 13:47:37 +00:00
committed by Carlos Roca
parent 5c3453a467
commit 91c38cb852
82 changed files with 2412 additions and 13 deletions

View File

@@ -9,23 +9,35 @@ class BaseCommentTemplate(models.Model):
_name = "base.comment.template"
_description = "Base comment template"
active = fields.Boolean(default=True)
name = fields.Char(
string='Comment summary',
required=True
required=True,
)
position = fields.Selection(
selection=[
('before_lines', 'Before lines'),
('after_lines', 'After lines')
('after_lines', 'After lines'),
],
required=True,
default='before_lines',
help="Position on document"
help="Position on document",
)
text = fields.Html(
string='Comment',
translate=True,
required=True
required=True,
)
company_id = fields.Many2one(
'res.company',
string='Company',
help="If set, it'll only be available for this company",
ondelete='cascade',
index=True,
)
@api.multi