Commit Graph
15231 Commits
Author SHA1 Message Date
Adrien Dieudonne 464968de36 [FIX] account, hr_expense: amounts on multiple lines in the dashboard
Before this commit, the amount currency could be wrapped on a
second line (on mobile).

To fix this, we had to find a way to have more space:
- Buttons are now displayed at the top (mobile only).
- Amounts can grow (col-auto) and the other column will take the
  space left (col) and add "..." when there is not enough space.
  (mobile + desktop)

We also had to remove a button from a div tag in order to display
the buttons next to each other on mobile (buttons are "inline-block"
but div is a "block").
The main flow tour has been adapted accordingly and the typo has
been fixed too...

closes odoo/odoo#46680

Task-id: 2184243
X-original-commit: 159e3d4cb8a301c908f7718a56138528033e75d4
Related: odoo/enterprise#8963
Signed-off-by: Adrien Dieudonné (adr) <adr@odoo.com>
2020-03-03 08:09:49 +00:00
Humberto Arocha 39c4d122a2 [FIX] account: extract code into method to allow changing the date of the tax
Before this commit, when two lines belonging to a period that is already
closed a cash basis entry is created at the present date. There are
localizations that could not allow creating the cash basis entry in a
date other than the maximum between the Journal Items being reconciled.

Now, the localizations are able to override and chose the date without
having to override the whole 'create_tax_cash_basis_entry' method.

opw-2195016

closes odoo/odoo#46661

X-original-commit: 2d3ab28c22c8ad5f9ed379e6b49697822e01a002
Signed-off-by: Jorge Pinna Puissant (jpp) <jpp@odoo.com>
2020-03-02 15:19:04 +00:00
Nisha patel 159699b09c [IMP] various: set boolean_toggle on 'active' fields in form view
Currently, to activate/deactivate records with the 'active' checkbox
user has to switch to edit mode of the form.
So the purpose of the task is to allow the user to activate/deactivate
records from the readonly mode of the form view.

In this commit, we  set widget='boolean_toggle' on the 'active' field in form
view.

closes odoo/odoo#46567

Taskid: 2206794
Related: https://github.com/odoo/enterprise/pull/8918
Related: odoo/enterprise#8918
Closes: #46567
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2020-03-02 06:26:02 +00:00
Andrea Grazioso (agr-odoo) e3cd416dde [FIX] account: fix automatic fiscal position detection
Create a demo fiscal position with automatic detection enabled and
country group assigned (ex. Europe).
Create a new Vendor with such fiscal position assigned.
Create a product in which the product category has an account which can
be mapped with the demo fiscal position
Create a new Vendor Bill, select the partner, create an invoice line,
fill in the product: no fiscal position will apply

In the process of auto detecting fiscal position the company_id may be
enforced by the context and this would conflict when the fiscal position
company is unset. Adding a default False condition fix
the issue

opw-2192733

closes odoo/odoo#46508

X-original-commit: 57a4038554b00a487bf7b176dd780192654b136a
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2020-02-28 08:49:12 +00:00
Mitali Patel 2c7a5840d3 [FIX] account: interchange the sequence subtotal not display properly in invoice report so fixed it
closes odoo/odoo#46507

X-original-commit: 040b885d565ba6ddeb23bd0f3e6752a92619a1b7
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2020-02-28 08:47:08 +00:00
Victor Feyens 7187f21b09 [FIX] account: ensure properties are read with the correct company. 2020-02-27 12:19:24 +00:00
Raphael Collet 232a00f116 [FIX] account: wrong computation of line.company_id in tests
closes odoo/odoo#46345

X-original-commit: 666df909aaadf20dbac131a8970331779d6e045c
Signed-off-by: Raphael Collet (rco) <rco@openerp.com>
2020-02-26 12:57:06 +00:00
Goffin Simon 6e1121c30d [FIX] account: Partner on move created from statement line
Steps to reproduce the bug:

- Let's consider a customer C
- Create a customer invoice I for C for 100€ and reference R
- Create a bank statement with a line L for C and the reference R
- Reconcile I and L and go in the jouranl entries

Bug:

The account move created for the reconciliation had no partner set.

opw:2200679

closes odoo/odoo#46332

X-original-commit: c454b661668a54240ff32ede78f0ad963e3fcd25
Signed-off-by: Simon Goffin (sig) <sig@openerp.com>
2020-02-26 11:35:48 +00:00
wan 3091089fd5 [FIX] account: journal group multicompany rules
The xml id was duplicated, leading to a missing rule.

opw:2198528

closes odoo/odoo#46064

X-original-commit: 896784b547cc3556b28b51978a5b7de03dbaf3e8
Signed-off-by: wan <william-andre@users.noreply.github.com>
2020-02-24 10:55:56 +00:00
Adrien Dieudonne c70e7ebeca [FIX] account: invoice outstanding wrong displayed on mobile
Steps to reproduce:
- Go to Invoicing
- Select an invoice
- Add credit note
- Click on "Post"
- Invoice footer is overlapped on mobile

This bug occured because of "float: right".
Get rid of this is too much work (oe_subtotal_footer is already floating),
so we decided to keep it with a "clear: both".
In desktop, this element is on the right of the screen but
on mobile we take the whole horizontal space.

closes odoo/odoo#46007

Task-id: 2184243
X-original-commit: 986152405a0ba6038df7d93c9264a46ee4207dd8
Signed-off-by: Adrien Dieudonné (adr) <adr@odoo.com>
2020-02-22 15:48:18 +00:00
Christophe Monniez 952c668b82 [FIX] account, l10n_latam_invoice_document: fix move_type typo
Two typos were introduced with d675dbaa4c.

closes odoo/odoo#45926

Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
2020-02-21 12:18:32 +00:00
mreficent 3dffce34bf [IMP] fields: log warning for ignored selection
When a field is related, defining a selection or selection_add will
have no effect and the paramater is ignored.

Log a warning and fix all fields badly definied

Closes odoo/odoo#45716

closes odoo/odoo#45832

Related: odoo/enterprise#8613
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2020-02-20 14:58:33 +00:00
oco-odoo 4b629c7243 [FIX] account, hr_expense: incorrect forward-port
Incorrect forward-port of e09798098679f made in 51d49517a8b5af2d1c85d9c6.

closes odoo/odoo#45775

X-original-commit: 099d0d6785b85dd67ef091fdaef084713fafb3c0
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2020-02-20 08:55:15 +00:00
Anang Aji Rahmawan 06d98c2031 [FIX] account: fix long memo text is not wrapped correctly
closes odoo/odoo#45706

X-original-commit: 2cae50a70505b5a93f7fabb6623a135bda163781
Signed-off-by: Quentin De Paoli (qdp) <qdp@openerp.com>
2020-02-19 11:54:41 +00:00
Ankita Raval 933b21e2c5 [IMP] account,*: rename tag_ids to tax_ids in account.move
closes odoo/odoo#44835

Note: Many2many table name and columns name is not changed so no change in report's query
Task-id: 2028813
Related: odoo/enterprise#8261
Related: odoo/upgrade#745
Signed-off-by: Quentin De Paoli (qdp) <qdp@openerp.com>
2020-02-19 09:09:20 +00:00
Ankita Raval d675dbaa4c [IMP] account,* : Change type field to move_type in account.move
task-id: 2028z813
2020-02-19 09:09:20 +00:00
Laurent Smet a7009100a6 [FIX] account: Fix traceback when creating a new currency.
Introduced by:
https://github.com/odoo/odoo/commit/31e1322b40ab33bf81d4c000f2b2a3f3eb8d0958

closes odoo/odoo#45688

X-original-commit: 12b17a20586c6b3c1069879557f5a169d5d85667
Signed-off-by: oco-odoo <oco-odoo@users.noreply.github.com>
2020-02-19 10:25:00 +00:00
qdp-odoo e6d2b8e782 [FIX] account: allow invoices with a 0 total to be saved.
fixes #44687

closes odoo/odoo#45648

X-original-commit: 17fdda67e17ace6dc088aa33bddfd85aeac546bd
Signed-off-by: Quentin De Paoli (qdp) <qdp@openerp.com>
2020-02-18 14:39:04 +00:00
qdp-odoo a2489f7c59 [REV] account: reverse entry when account move line contains 0 in credit or debit
This reverts commit db691dbebf because the appropriate solution was to filter lines with 0 debit and credit during the reverse_move before the reconciliation (which apparently has already been done by another patch).

This patch, however, was causing the followup report to show lines on a receivable account with a partner and 0 balance with 0 way to remove them.

X-original-commit: 6a5271b7f4109a4f2a20378698fbe479d73ed9cb
2020-02-18 14:39:03 +00:00
Thibault Francois bd7b36aa5a [FIX] account: allow salesman to send and print posted invoice
Issue: as salesman you want to send and print the invoice of your customer
but you don't have the access to write on the invoice
and thus you don't have access to create a mail.message and
set the flag invoice_sent to True

Allow to post message on an invoice when you have read access

closes odoo/odoo#45629

X-original-commit: d23d872f885f34bbbd747471e35e6914ac79b6cf
Signed-off-by: Quentin De Paoli (qdp) <qdp@openerp.com>
2020-02-18 13:15:04 +00:00
Meghna Jaswani 7b9e13e091 [IMP] account: sale or purchase receipt active from account settings
Purpose:
If the user is not using receipt functionality in his organization then it's can be hidden.

Current behavior before PR:
Sale and purchase receipt by default show when the account module is instaled.

Desired behavior after PR is merged:

Now users can activate Sale or purchase receipt from accounting settings.

closes odoo/odoo#44464

Task: 2028813
Signed-off-by: Quentin De Paoli (qdp) <qdp@openerp.com>
2020-02-03 10:32:13 +00:00
jerome hanke (jhk) 12c3fd2649 [FIX] account: reconciliation model buttons leak out of the screen
Steps to reproduce:

- install accounting
- go to accounting > accounting > reconciliation (you need at least
one unpaid invoice and one unreconciled payment for the proper screen
to show)
- manual operations > click the cog icon > create model
- create a model with a long name and duplicate it 5-10 times
- go back to the reconciliation tool > manual operations

Previous behavior:
the model buttons leak out of the right of the screen

Current behavior:
An horizontal scrollbar appears if necessary

opw-2185355

closes odoo/odoo#45431

X-original-commit: e24d971ad8d1bfdef8fc55710d99fc29c29a9c31
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
2020-02-14 18:15:59 +00:00
Damien Bouvy 0ab7da57ab [FIX] sale, account: correct multi-company invoicing
During a forward port, a regression was introduced that broke the
multi-company invoicing flow in Sales.

Create a SO in company 1, use the web client with company 2 as the main
one. The invoice should be in company 1.

This commit fixes that by providing the journal_id in the invoice values
(the company of the account move comes from the journal).

While making this fix (and adding a test for it), I stumbled upon
another multi-company issue when fetching the accounts of the product
where the property field was not accessed with the correct company. I
fixed it as well.

closes odoo/odoo#45551

X-original-commit: 07dbc197007c78633decccef2200a628b7d4a363
Related: odoo/enterprise#8498
Signed-off-by: Damien Bouvy (dbo) <dbo@odoo.com>
2020-02-17 17:06:05 +00:00
Martin Trigaux ec4f4d0704 [I18N] *: translate NIT in es_BO
VAT, NIF in Spanish, is translated NIT in Spanish from Bolivia
Clean and translate the files with the correct translation.

opw-2197155

closes odoo/odoo#45533

X-original-commit: 641c14f08435b1df1d89184cc00855416bf40bc5
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2020-02-17 15:47:16 +00:00
alt-odooandJorge Pinna Puissant 86b9106482 [FIX] account: prevent group payment if multiple receivable/payable accounts
When creating a payment, we are expecting only one destination account.
However, when grouping payment by customer, it can happen that there are
more than one receivable or payable accounts, which can create
reconciliation issues afterward.

opw-2188632
opw-2166551

closes odoo/odoo#45396

X-original-commit: 779699297b9767438797ae3678eb9da1db0ce609
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
Co-authored-by: Jorge Pinna Puissant <jpp@odoo.com>
2020-02-14 12:48:20 +00:00
wan f56c74c434 [IMP] account: hide the readonly group
The recently added group "Show Full Accounting Features - Readonly" was
shown in the selection of groups of accounting, but the "Show Full
Accounting Feature" wasn't. It was inconsistent and allowed to see the
features too easily (not debug mode needed)

closes odoo/odoo#45419

X-original-commit: ed3adb320c6680bb213965c84b6b7fd5654c8121
Signed-off-by: Quentin De Paoli (qdp) <qdp@openerp.com>
2020-02-14 16:22:41 +00:00
wan cddbd7bf94 [FIX] account: no next activity on invoice for OdooBot
We don't want a next activity for an invoice to be created for OdooBot
if he is the Salesperson. We also don't want a traceback if the
salesperson and the next activity user are not set.

closes odoo/odoo#45417

X-original-commit: 8bf1b72e2b2bdf026b8eff28a554301a598012be
Signed-off-by: Quentin De Paoli (qdp) <qdp@openerp.com>
2020-02-14 15:12:09 +00:00
jerome hanke (jhk) 05e13f456c [FIX] account: dashboard graphs proper float rounding
Steps to reproduce:
- install accounting
- go to the accounting main view and hover some of the graphs

Previous behavior:
rounding was inconsistent and would lead to weird js floats
like 65.00000000000001

Current behavior:
floats are rounded to 2 digits after

opw-2172686

closes odoo/odoo#45336

X-original-commit: c00f4962eb790787fffef99595ac14dbef026055
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2020-02-13 16:35:09 +00:00
Martin Trigaux 0cc8610923 [I18N] export saas-12.3 source terms
closes odoo/odoo#45285

X-original-commit: bb281e98f52a2716f00d43a07446a08df698c1dd
Related: odoo/enterprise#8413
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2020-02-13 11:45:39 +00:00
Florian Gilbert 8b344883a6 [IMP] account: Remove t-if condition with "online_sync" for accounting dashboard.
The t-if condition using "online_sync" couldn't be there...
"online_sync" condition must be present in
account_online_sync module and not account module.

closes odoo/odoo#45263

Related: odoo/enterprise#8404
Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
2020-02-13 08:35:49 +00:00
wan 4d311c09a2 [FIX] account: writeoff_account_id not required if no difference
opw-2152644
Do not set the field writeoff_account_id as required if the
payment_difference is zero because there is no writeoff in that case and
the field is invisible.

closes odoo/odoo#45257

X-original-commit: b0939529de5cd4273e64cfe729f1b5f532bbd859
Signed-off-by: wan <william-andre@users.noreply.github.com>
2020-02-13 08:01:10 +00:00
Adrian Torres 97a5093117 [FIX] *: specify at least one field in search views
Without at least one field, performing a search in these models' search
view is outright impossible.

closes odoo/odoo#45177

X-original-commit: 0aabfbff3ce5d68bf37e1734ba7aa43f62803f3a
Related: odoo/enterprise#8379
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2020-02-12 11:09:05 +00:00
Xavier Morel e95ccf0908 [FIX] *: domains should not have as many binary operator as there are terms
* modify client-side domain normalisation to error if the domain is
  invalid (not enough terms / segments for the number of operators)
* add better error reporting to attrs / modifiers parsing
* add a few layered error augmentation to provide clearer context
  e.g. "error: invalid domain <thing>" is helpful but "error while
  parsing modifiers for field foo: modifier invisible: invalid domain
  <thing>" is much more helpful
* rework _evalModifiers to deduplicate it in order to more easily
  implement this contextual augmentation
* test that improper domains are properly found improper
* fix a bunch of incorrect attrs domains
* also removed an apparently undefined (& unused) "options" argument
  to a _applyModifiers call

closes odoo/odoo#44642

Related: odoo/enterprise#8175
Signed-off-by: Xavier Morel (xmo) <xmo@odoo.com>
2020-02-12 09:32:17 +00:00
Victor Feyens 25d70fc5c9 [FIX] account: account.bank.statement.cashbox multi record creation
account.bank.statement.cashbox model is verified at create/write
and updated accordingly but may crash on multiple record creation/update.

The `for` loop on `self` didn't use the specific records yielded but the `self` recordset.

closes odoo/odoo#45116

X-original-commit: af8367734c69dfeb0a1e1f029009f6da98449d0b
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
2020-02-11 16:16:05 +00:00
mcm-odooandThibault Delavallée de1743ab12 [REF] mail, various: remove user_signature field from mail.template
RATIONALE

Mail template model holds a field telling odoo mail engine to automatically
add the current user's signature to the body. Its use depends on the use
case

  * using the template in the composer on a single record: it is displayed
    in the rendered template in the composer, meaning people could change it.
    This behavior is interesting as it allows to see the email content;
  * using the template in the composer in mass mail mode: it is not displayed
    as only the raw jinja is displayed. It is therefore not obvious that it
    will be appended to the body of the mail. People could add it manually and
    have 2 signatures as a result;

A mechanism automatically adding a signature to sent emails when posting a
message is already implemented and is based on template existence. If a
template has been used when posting, no signature is added in sent emails.
Otherwise it is automatically added. This behavior should not change.

Behavior will therefore be

  * use a template -> specify signature usage in it manually through jinja;
  * do not use a template -> signature added in sent emails;

SPECIFICATIONS

Remove user_signature.

Update template body accordingly. In customer oriented templates that are using
it and do not already contain it, manually add a call to user.signature within
the jinja code. When set to False, just remove its declaration.

Quickly clean some signature integration.

LINKS

Task ID 2089252
Community PR odoo/odoo#39482
Enterprise PR odoo/enterprise#6459
Upgrade PR odoo/upgrate#761

Related: odoo/enterprise#6459
Related: odoo/upgrade#761
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Co-authored-by: Michaël Mattiello <mcm@odoo.com>
Co-authored-by: Thibault Delavallée <tde@odoo.com>
2020-02-11 14:01:13 +00:00
oco-odoo b7ade94c30 [FIX] account: correctly round amounts to compute matched percentage
Before that, depending on rounding errors on floats, it was possible to end up with a matched percentage of 0.999999999 instead of 1.0 on an account move in case of full reconciliation. This could in turn cause problems with cash basis taxes, when checking what proportion of the move is reconciled.

closes odoo/odoo#45094

X-original-commit: 958bee9cf9f770351fbc346a081cfe059a911b3f
Signed-off-by: oco-odoo <oco-odoo@users.noreply.github.com>
2020-02-11 13:08:38 +00:00
Victor Feyens a247d64377 [MOV] account,sale --> (account,sale)_intrastat: intrastat code.
closes odoo/odoo#44858

Related: odoo/enterprise#8277
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
2020-02-11 09:25:20 +00:00
Andrea Grazioso (agr-odoo) 825b227d5c [FIX] account: fix invoice report total incorrect
Go to Accounting / Reporting / Management / Invoices
Select Pivot view
Add "Total" measure
expand results adding "invoice #" and product

Total will be incorrect because it is summing up the value reported from
several lines of the query in which the total is taken as the invoice
total, so it will display total * # lines.

Using the price retrieved from the single lines fix the issue, but it
needs to be converted according to the currency rate of the invoice.

Moreover the test need to be modified because the amount_total variable
of the report should NOT be the move amount_total but the amount from
all the lines converted in company currency

opw-2187369

closes odoo/odoo#45050

X-original-commit: 1558bb2a62cf169e6b19a2aa4dd92fcd8ff1b25a
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2020-02-11 09:16:03 +00:00
Ernesto Tejeda ef4bf7c936 [FIX] account: call method with expected singleton recordset
closes odoo/odoo#44877

X-original-commit: 4c5aea410577fab3166d3f05951ac0886406bd24
Signed-off-by: oco-odoo <oco-odoo@users.noreply.github.com>
2020-02-07 14:29:44 +00:00
Laurent Smet ddfb12d063 [IMP] account: Improve fixes https://github.com/odoo/odoo/commit/ab1ae1a854eab4a38aa2866bfc9d8ca9aa4013be
Explanation about flushing in action_switch_invoice_into_refund_credit_note:
Because the 'type' is set before 'amount_total', 'amount_total' is recomputed with the
wrong type and then make the condition badly evaluated.
For some reason, the field wasn't badly recomputed before:
https://github.com/odoo/odoo/commit/020e2a5e85036976b309b439582d70b5b775e54f

closes odoo/odoo#44868

X-original-commit: a82e62d1925ebfd4f49360fdc5f3a8d28de5a0d9
Signed-off-by: oco-odoo <oco-odoo@users.noreply.github.com>
2020-02-07 13:48:22 +00:00
wan e77015011c [FIX] account: find reference move for sequence domain
We only want journal entries with an actual sequence to be used as
reference, otherwise we can't deduce the reset periodicity of the
journal.

closes odoo/odoo#44833

X-original-commit: a57a0edae27a93aadf8fe8c95ae45ab91ec9aa31
Signed-off-by: wan <william-andre@users.noreply.github.com>
2020-02-07 09:34:20 +00:00
Nicolas Martinelli 95300401ab [FIX] account: 100% tax
- Create the following tax:
  Tax Computation: Percentage of Price Tax Included
  Amount: 100 %
  Included in price
- Create an invoice, add a product with this tax
- Save

A ZeroDivision error is raised.

opw-2186998

closes odoo/odoo#44810

X-original-commit: 0b11474a168037b5469176433256759916e8276b
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2020-02-06 19:25:09 +00:00
Goffin Simon 43af0c73b6 [FIX] account: Default account and partner when creating aml
Steps to reproduce the bug:

- Create a journal entry
- Create a line L1 with an account A and a partner P
- Create a second line L2 with an account A and a partner P
- Create a third line by clicking on 'Add line'

Bug:

The account A and partner P was not suggested as in saas-12.3

opw:2188921,2152827

closes odoo/odoo#44784

X-original-commit: 31890c4e676f7f4f65221ca66bfd66cc0ceedecc
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2020-02-06 17:30:26 +00:00
Goffin Simon a4d46ec55c [FIX] account, sale: Default payment term when creating an invoice
Steps to reproduce the bug:

- Let's consider a partner P without property_payment_term_id
- Create a SO for P, confirm it and create an invoice I
- In debug mode, on the SO click on the smart button 'invoice'
- On I, click on the 'Set Default' in the debug menu
- Set a payment term PT as default value (ir.default) for all users
- From this view, create a new invoice

Bug:

The default payment term PT was not set on the new invoice

opw:2184367

closes odoo/odoo#44781

X-original-commit: c258b8a0427bd5aface891ed1f4420174f4afde4
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2020-02-06 17:25:20 +00:00
fw-bot 7954594d12 [FW][REF] account: new method _prepare_default_reversal
to be able to inherit these methods to make it easier to
add fields in the refund wizard e.g.

closes odoo/odoo#44629

X-original-commit: e814374a20de096fd795aec34ab0e3de4977fc85
Signed-off-by: Josse Colpaert <jco@openerp.com>
2020-02-06 10:02:56 +00:00
wan b2feb8b7f4 [FIX] account: change CoA even if one already installed
Because the tax closing entry is created (empty) at the creation of the
CoA, it is not possible anymore to change it later, even if the user
didn't create any journal entry.
By checking that there are no account.move.line instead of account.move,
and also there are no entries with a name different from '/' (to ensure
that the sequences are untouched) we can change the CoA if needed.

closes odoo/odoo#44659

X-original-commit: 8928dfe70867da3e40fa47f50bffa5dfd1976090
Signed-off-by: wan <william-andre@users.noreply.github.com>
2020-02-05 14:10:11 +00:00
wan 2370c875ce [IMP] account: create next activity on post
Task 2093179

Today, there is nothing that reminds a salesperson that an invoice
becomes overdue.

I propose that activities get created automatically on an invoice based
on the ‘due date’ of the journal items as soon as an invoice gets
validated.

This would greatly help the collection effort and be proactive rather
than reactive.

closes odoo/odoo#44129

Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
2020-02-06 08:28:44 +00:00
Raphael Collet 42078c745a [FIX] account: flush() all fields of model to satisfy SQL constraint
closes odoo/odoo#41554

Related: odoo/enterprise#7146
Signed-off-by: Raphael Collet (rco) <rco@openerp.com>
2020-02-05 15:15:03 +00:00
Raphael Collet ab1ae1a854 [FIX] account: missing flush() 2020-02-05 15:15:03 +00:00
wan dfd01b8c5c [IMP] account: rework name sequences
Task 2146469

Rework the name computation:
* It doesn't use ir.sequence anymore
* It is an editable computed field
* Add a renaming tool

This allows the user to tweak the sequences more easily than having to
get through the ir.sequence settings.

The sequence depends on a parameter of the journal: continuous, montly
and yearly restart of the sequence. Everytime a new period is started,
try to make a pattern form another period.

The incrementing is done by taking the previous name, ordered
lexicographically, splitting it by taking the digits at the end, adding
1 and re contstruct with the prefix.

** This means there could be cases where the prefix has a big importance
on the next number. For instance, if you have
INVOICE/2019/0001
INVOICE/2019/0002
and then rename the last one to INV/2019/0002, don't expect the next
number to be INV/2019/0003. It will be INVOICE/2019/0002 (again) because
the highest number was INVOICE/2019/0001.
You will then end up with
INVOICE/2019/0001
INV/2019/0002
INVOICE/2019/0002

closes odoo/odoo#41485

Related: odoo/enterprise#7189
Signed-off-by: Quentin De Paoli (qdp) <qdp@openerp.com>
2020-02-05 13:59:43 +00:00