Conversation
2505440 to
56d3520
Compare
pabi_direct_sql/models/analytic.py
Outdated
| related = { | ||
| # From account.account_analytic_line.py | ||
| 'currency_id': ('move_id', 'currency_id', 'account_move_line'), | ||
| 'account_currency': ('move_id', 'amount_currency', |
There was a problem hiding this comment.
| 'account_currency': ('move_id', 'amount_currency', | |
| 'amount_currency': ('move_id', 'amount_currency', |
56d3520 to
13d633e
Compare
pabi_direct_sql/models/analytic.py
Outdated
|
|
||
| @api.model | ||
| def _prepare_orm_defaults(self, vals): | ||
| today = vals.get('write_date', fields.Date.context_today(self)) |
|
@Saran440 thanks for your review. Can you ping me when you finish the review? I will do it once. |
|
@kittiu Reviewed done. but I have a question. |
|
Thanks for the review, it was very helpful. Many things that I have to fix. |
edeea9a to
5544c70
Compare
I tested with supplier invoice, using USD for $1, and it works fine. amount = 30 and amount_currency = 1 |
|
All fixed, please try again. Note: only the decimal still .0 for some tech reason, but if there more digits, i.e., 1.1232939, I can round it to 1.12 |
|
@Saran440 good news, I found that the main problem of performance issue is just this file, |
|
แก้จบแล้ว ยกเว้น doctype = adjustment, I think the old system was wrong. But may be no lone notice because no report against it. In summary, considered these are fixed so far. |
Let's pause this for now, let's try to fix problem by index only first |











By using direct SQL on some key models.
From initial test, to "Confirm Oder" of a draft purchase order with 10 lines, speed up from 60 secs to 5 secs
But this should boost performance of overall budget commitment and actuals.
Note: This will need a lot of test, as we use sql instead of orm.
For this PR, it is for create() method of account_analytic_line, of which logics includes,
To use this, please add system param pabi_direct_sql.analytic_create = True