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