[14.0][IMP]account_move_template: Archive account move templates
This commit is contained in:
parent
3c595d7a11
commit
3a70b073d2
@ -23,6 +23,7 @@ class AccountMoveTemplate(models.Model):
|
||||
line_ids = fields.One2many(
|
||||
"account.move.template.line", inverse_name="template_id", string="Lines"
|
||||
)
|
||||
active = fields.Boolean(default=True)
|
||||
|
||||
_sql_constraints = [
|
||||
(
|
||||
|
@ -19,6 +19,7 @@ Module Contributors
|
||||
|
||||
* Harald Panten <harald.panten@sygel.es>
|
||||
* Valentin Vinagre <valentin.vinagre@sygel.es>
|
||||
* Manuel Regidor <manuel.regidor@sygel.es>
|
||||
|
||||
* `Ecosoft <http://ecosoft.co.th>`_:
|
||||
|
||||
|
@ -128,11 +128,30 @@
|
||||
class="btn-primary"
|
||||
type="object"
|
||||
/>
|
||||
<button
|
||||
type="object"
|
||||
name="toggle_active"
|
||||
string="Archive"
|
||||
attrs="{'invisible': [('active', '=', False)]}"
|
||||
/>
|
||||
<button
|
||||
type="object"
|
||||
name="toggle_active"
|
||||
string="Restore"
|
||||
attrs="{'invisible': [('active', '=', True)]}"
|
||||
/>
|
||||
</header>
|
||||
<sheet>
|
||||
<widget
|
||||
name="web_ribbon"
|
||||
title="Archived"
|
||||
bg_color="bg-danger"
|
||||
attrs="{'invisible': [('active', '=', True)]}"
|
||||
/>
|
||||
<div class="oe_title">
|
||||
<label for="name" class="oe_edit_only" />
|
||||
<h1>
|
||||
<field name="active" invisible="1" />
|
||||
<field name="name" />
|
||||
</h1>
|
||||
</div>
|
||||
@ -179,6 +198,11 @@
|
||||
<field name="model">account.move.template</field>
|
||||
<field name="arch" type="xml">
|
||||
<search string="Journal Entry Template">
|
||||
<filter
|
||||
string="Archived"
|
||||
name="inactive"
|
||||
domain="[('active','=',False)]"
|
||||
/>
|
||||
<field name="name" />
|
||||
<group name="groupby">
|
||||
<filter
|
||||
|
Loading…
Reference in New Issue
Block a user