# Analytic rule engine

**URL:** https://discuss.tryton.org/t/analytic-rule-engine/211
**Category:** Feature
**Tags:** accounting
**Created:** [September 26, 2016, 1:44pm UTC](https://discuss.tryton.org/t/analytic-rule-engine/211 "2016-09-26T13:44:42Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![ced](https://discuss-cdn.tryton.org/user_avatar/discuss.tryton.org/ced/32/1237_2.png) [@ced](https://discuss.tryton.org/u/ced)
#### Post date: [September 26, 2016, 1:44pm UTC](https://discuss.tryton.org/t/analytic-rule-engine/211/1 "2016-09-26T13:44:43Z")

</div>

## Rational

Some accounting moves are created automatically or with a document that does not have the analytic selections. For such moves the accountant has to create manually the analytic lines. This can be painful when there are a lot of moves and when those moves are kind of recurring.

## Proposal

We propose to add a mechanism based on `MatchMixin` design pattern that will be triggered when a move is posted and if the move does not have any analytic lines defined.  
The default criteria will be:

- account
- journal
- party

## Implementation

> **[Analytic rule engine (#6007) · Issues · Tryton / Tryton · GitLab](https://foss.heptapod.net/tryton/tryton/-/issues/6007)**
>
> From https://discuss.tryton.org/t/analytic-rule-engine/211

---

<div class="post-metadata">

### Author: ![ced](https://discuss-cdn.tryton.org/user_avatar/discuss.tryton.org/ced/32/1237_2.png) [@ced](https://discuss.tryton.org/u/ced)
#### Post date: [September 26, 2016, 1:45pm UTC](https://discuss.tryton.org/t/analytic-rule-engine/211/2 "2016-09-26T13:45:33Z")

</div>

I’m not sure if this should be in the standard `analytic_account` or if a specific module `analytic_account_rule` should be created?

---

<div class="post-metadata">

### Author: ![ced](https://discuss-cdn.tryton.org/user_avatar/discuss.tryton.org/ced/32/1237_2.png) [@ced](https://discuss.tryton.org/u/ced)
#### Post date: [November 2, 2016, 4:59pm UTC](https://discuss.tryton.org/t/analytic-rule-engine/211/3 "2016-11-02T16:59:14Z")

</div>

Indeed the implementation requires very few code, so it will not bloat the analytic\_account to have them.

---

<div class="post-metadata">

### Author: ![ced](https://discuss-cdn.tryton.org/user_avatar/discuss.tryton.org/ced/32/1237_2.png) [@ced](https://discuss.tryton.org/u/ced)
#### Post date: [October 19, 2017, 9:52am UTC](https://discuss.tryton.org/t/analytic-rule-engine/211/4 "2017-10-19T09:52:15Z")

</div>


