Commit Graph
15738 Commits
Author SHA1 Message Date
Mathieu Duckerts-Antoine e56a095f16 [FIX] *: disable linking on some graph views
For the graph views based on reporting models (e.g sale.report), click
on a group in the chart redirects the user to an "empty" list view. Here
we use the attribute disable_linking to avoid that redirection for those
views.

Task ID: 2336960

closes odoo/odoo#57622

X-original-commit: 0b0ae92b6bdac25843ba24d767dbcab3b75703e5
Related: odoo/enterprise#13192
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2020-09-14 10:01:49 +00:00
william 1493a01b5d [IMP] account: get default payment ref format with country
Task 2297165

Set the payment reference standard to the one of the country of the
company by default.
The module l10n_be_invoice_bba has been merged into l10n_be as it was
auto_installed, it will not be problematic not being able to uninstall
it, and the order of installation of modules made it so that the
journals were created before l10n_be_invoice_bba was installed. This
caused the value to be set to 'odoo' on a fresh database instead of 'be'
2020-09-10 11:50:53 +00:00
Florian Gilbert 272bc40d2c [FIX] account: fix traceback happened in accounting dashboard
For Odoo Fin purpose:
When you click on Synchronize Now, you get a traceback.
This traceback comes from the "_get_journal_bank_account_balance"
method which performs a "self._cr.execute(...)" and a "self._cr.fetchone()".
However, it is possible that the orm may invalidate the whole
thing in the meantime because other calls are made.
This fix corrects this by grouping the "execute" of the "fetchone".

closes odoo/odoo#57555

X-original-commit: 7ab664bd8be72add3591895ef058afe7a1a9147e
Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
2020-09-11 14:45:20 +00:00
Pierre Paridans d2d08f71f5 [FIX] account: discount field shown in form view
Before this commit, when discounts were enabled (through Sales >
Settings), they appeared on the Sale Orders but not in the corresponding
Invoice form view. Debug mode was required to see it among the form's
fields.

This commit fixes it by aligning with the Sale Order behaviour and
properly display the `discount` field in the form view (when the setting
is enabled) without relying on the debug mode.

BTW, on mobile there was no way to see the discount as it was only
visible in the list view... which is replaced by the kanban on small
screens. So this commit makes it available on mobile.

opw-2325978

closes odoo/odoo#57499

X-original-commit: 0ad60024c326adc7e25c71eaad2f9eccab26ee99
Signed-off-by: Adrien Dieudonné (adr) <adr@odoo.com>
Signed-off-by: Pierre Paridans <pparidans@users.noreply.github.com>
2020-09-11 10:31:02 +00:00
Laurent Smet a33190d831 [FIX] account: Fix '_inverse_amount_total' emptying amount_currency
In saas-13.5, 'currency_id' is always set on account.move.line and then, 'amount_currency' must always be filled.

closes odoo/odoo#57466

X-original-commit: 9382a6a14ff6cb051d12edecf81a4d3f69f9b6a5
Signed-off-by: oco-odoo <oco-odoo@users.noreply.github.com>
Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
2020-09-10 19:52:35 +00:00
oco-odoo b0bd0cc5d2 [IMP] account: reconcile model form view: hide 'amount matching' setting for write-off rules
closes odoo/odoo#57358

X-original-commit: 10f58e490f3a7b7621b3cea9ef183ba8fa53d32f
Related: odoo/enterprise#13083
Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
2020-09-09 13:15:56 +00:00
oco-odoo a22e7e4c85 [FIX] account: reconcile models: inject selected partner and write-off details in the values sent to the widget
Before that, write-off rules with partner mapping did not work properly, as the partner they selected got lost when passing the values to the widget, which later made a second rpc call to fetch the write-off details. Now, we pass all the values directly, including the selected partner. This way, we remove the need for a second rpc call when processing the results for the reconcile models, and the partner is handled properly.

X-original-commit: d74db80d11e603719eefa5799ac1f8ac2afa2540
2020-09-09 13:15:56 +00:00
wan 68eb3a988a [FIX] account: saas-13.5 release fixes
Task 2327599

* The date is not copied on duplicate of account.move
* Do not throw traceback if we remove the invoice date of an
  invoice/bill
* Add extra triggers in account_tour to ensure it is done in the right
  view
* Update the position of some tour indicators
* Move the Product Categories in the Management menu
* The accounting onboarding is only visible on customer invoices list
  view
* Switch the position of banc and bic

closes odoo/odoo#57420

Related: odoo/enterprise#13122
Signed-off-by: oco-odoo <oco-odoo@users.noreply.github.com>
2020-09-10 12:32:29 +00:00
nie 15f0b69c8f [FIX] account: Invoice in Documents not linked to the original invoice
Steps to reproduce the bug:
- Install Accounting and Documents
- Go to Documents configuration
- Enable Files Centralization > Accounting and save
- Still in Documents configuration, into "-> Journals", create a new Journal to Synchronize with:
  - Journal: Customer Invoices (USD)
- Go to Accounting > Customers > Invoices
- Create a new invoice with any customer and product and save
- "Post" then "Send & Print"
- On the dialog, "Send & Print" (confirm the report template if necessary)
- Go to Documents

Bug:
The document is missing the "related resource" link shortcut

Cause:
The context key `default_res_id` is propagated up to:

https://github.com/odoo/enterprise/blob/a6606f000e66e72b9f89d353552950652ab2045f/documents/models/document.py#L364

Consequently, the corresponding document is created with a `res_id`, but no `res_model` as `default_res_model` is not set.

By adding the `default_res_model` context key, the document is created with the right `res_model`. Note that another solution would be to remove `default_res_id` from the context before creating the `documents.document` and leave the `_compute_res_record` do the job. However, this could have a larger impact since it would affect all document creations.

opw:2332596

closes odoo/odoo#57410

X-original-commit: 82cb5066de1081886f1e6277159248bf0d0e4330
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
Signed-off-by: backspac <backspac@users.noreply.github.com>
2020-09-10 10:50:30 +00:00
Nicolas (vin) 8a99e5f587 [FIX] account: make post all entries works again in move list
Recent changes to make post all entries works from the dashboard broke
it when used from the move list.

This commit will fix that and make sure it works in both situation

closes odoo/odoo#57249

closes odoo/odoo#57352

X-original-commit: fcadd448741d354c44a17a89819c95c7b124a3b7
Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
Signed-off-by: Nicolas Viseur <vin-odoo@users.noreply.github.com>
2020-09-09 12:32:49 +00:00
Nicolas (vin) 87e5255d9e [FIX] account: properly set up exchange accounts in the chart template
The recent changes in misc improvements broke the loading of the exchange accounts in the chart template.
This change aim to fix that by moving the setup of those accounts back where it was originally done.

Taks id #2319601

closes odoo/odoo#57351

X-original-commit: ac328eba96c6f2e34f18f3d4671290683a090c08
Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
Signed-off-by: Nicolas Viseur <vin-odoo@users.noreply.github.com>
2020-09-09 12:32:24 +00:00
Nicolas (vin) 88bae9969c [FIX] account : fix domain of accounts in the automatic entry wizard
Two account.account M2O where authorizing off-balance accounts while
they should not be selectable. This change aim to fix that.

closes odoo/odoo#57345

X-original-commit: cd25dba354b9d2a83e6b7ab45434bb2879984e33
Signed-off-by: Quentin De Paoli (qdp) <qdp@openerp.com>
Signed-off-by: Nicolas Viseur <vin-odoo@users.noreply.github.com>
2020-09-09 10:16:12 +00:00
wan eeaeaa7214 [FIX] account: order in move _compute_name
Because we are using self[0], we need to ensure the order to have
something deterministic. We want the first entry of the perdiod to have
a sample name.

closes odoo/odoo#56895

X-original-commit: 00693dc0b36bebb6b04ef8e81291486334dd4dba
Signed-off-by: Quentin De Paoli (qdp) <qdp@openerp.com>
Signed-off-by: wan <william-andre@users.noreply.github.com>
2020-09-01 13:58:27 +00:00
Nicolas (vin) 7a39bc0327 [FIX] account: hide currency field when not in multi_currency
There is a bug where the currency field is always visible/editable in the
account_move view, even when multi_currency is disabled.

This commit fix that issue.

Task id #2318610

closes odoo/odoo#57292

X-original-commit: 93b02ae2ddc7d71b8bbfe82bceededa13ef70e0e
Signed-off-by: Quentin De Paoli (qdp) <qdp@openerp.com>
2020-09-08 21:56:12 +00:00
Goffin Simon 613752e051 [FIX] account: Error message creating journal
- Let's create a new company C with the name = "Company.name"
- Create a new journal in C

Bug:

A UserError was raised saying:

You cannot use anything else than unaccented latin characters in the alias address.

opw:2321023

closes odoo/odoo#57018

X-original-commit: 953389546f191e3fdb5e9dd994ab663ea9228b5d
Signed-off-by: Simon Goffin (sig) <sig@openerp.com>
2020-09-03 10:42:22 +00:00
Victor Feyens 2da7bc2adb [REM] portal, *: remove archive_groups dead code
PURPOSE

Clean code and be and more performance oriented.

SPECIFICATIONS

Various portal pages hold references to archive_groups. It was a summary
of customer documents for portal, containing a count of all documents split
by model.

Currently its computation is not used. Indeed archive_groups is displayed
only in 'my_details' page that does not hold any document-based reference
or code call. Other calls to archive_groups are dead code as the result is
not used. Since 13.0 it is even not computed on standard pages to speedup
their load (as it was not used).

It is not used anymore and its computation and references can be removed
safely, especially with v14 in mind for which we want to remove dead code
to maintain.

Followup of odoo/odoo#55228

LINKS

Task ID-2329081
PR odoo/odoo#55800
PR #12368

closes odoo/odoo#56859

X-original-commit: e75086000ee4317b2ad2994db5d906fbcbd5081f
Related: odoo/enterprise#12830
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
2020-09-01 10:30:32 +00:00
Andrea Grazioso (agr-odoo) 4c46615e6a [FIX] account: revert "avoid traceback when reversing archived values"
This reverts commit d949cb88abbf8f64b383bceba07105df578a4a14 in favor of
https://github.com/odoo/odoo/commit/f4162a75bdc47cd94610ee7626cc68e078313329
To avoid misleading users into thinking that "everything is allright"
while actually there are missing tax_id on the credit note lines

closes odoo/odoo#56845

X-original-commit: 96b5ccb4fa8bafd536f880ba7ff03218c1fe1e1b
Signed-off-by: agr-odoo <agr-odoo@users.noreply.github.com>
2020-09-01 08:53:27 +00:00
Nicolas (vin) 62d0bdf5db [FIX] account: fix invoice register payment wizard
The register payment wizard for invoices is fetching a default account
for the partner in a compute, without verifying the company.
This can cause the wizard to load an bank account from another company
and block the user to finish the payment.

This commit will make sure the account loaded is from the current company.

Task id #2308032

closes odoo/odoo#57072

Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
2020-08-21 12:30:41 +00:00
Nicolas (vin) 524ba8fefc [FIX] account: fix accounts requirement
Since the misc. improvements, the default_account is required on all journals,
while it should not.

Task id #2322643

closes odoo/odoo#56193

Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
2020-08-20 09:16:45 +00:00
Victor Feyens 40fb37b943 [FIX] various: enforce currency presence for monetary widgets
When a field is specified as widget="monetary" it makes sense to have the
currency actually shows. It won't happen if currency field is not present
within the view.

An heuristic to detect missing currency field presence when using monetary
fields or monetary widget tag will land soon in master. As this commit targets
a stable version only view fixes are provided.

Task ID-2329114
PR #56946

X-original-commit: 9c1c848ad1e8fef11320e2a162b008de7e304bcb
2020-09-03 08:45:22 +00:00
Victor Feyens f9f2c561bd [FIX] various: remove duplicate fields definition in kanban views preface
Remove duplicate fields in tree views / kanban (outside of templates).

A field should not be present twice in a kanban view. If one of the nodes
has custom attributes behavior of other nodes is somehow unpredicatable.

Having field present only once gives a more coherent behavior. Xpaths
could also lead to weird results if fields are present several times.
Notably adding a field in the view preface instead of inside the view
template itself (see b63043e for example of fix).

An heuristic to detect duplicate fields will land soon in master. As this
commit targets a stable version only view fixes are provided.

Task ID-2329114
PR odoo/odoo#56946

X-original-commit: 90f8e9255fa46c408763346ed135d9e561ae7fd5
2020-09-03 08:45:22 +00:00
Victor Feyens e261cddd73 [FIX] various: remove duplicate fields in tree views
Remove duplicate fields in tree views / kanban (outside of templates).

A field should not be present twice in a tree view. If one of the nodes has
custom attributes then behavior of other nodes is somehow unpredictable.

Having field present only once gives a more coherent behavior. Xpaths
could also lead to weird results if fields are present several times as
developers generally do not expect fields to be present several times in a
view.

An heuristic to detect duplicate fields will land soon in master. As this
commit targets a stable version only view fixes are provided.

Task ID-2329114
PR odoo/odoo#56946

X-original-commit: 977c2b9d12419fba3bada1ebefcca15f051ca565
2020-09-03 08:45:21 +00:00
Victor Feyens f9e7b5130b [REM] account: remove empty files
Simply remove dead files.

Task ID-2329114
PR odoo/odoo#56946

X-original-commit: c8910e20f633b6bccc5aeb122144c1a08aaf41da
2020-09-03 08:45:21 +00:00
Laurent Smet ca815e9a10 [FIX] account,stock_account: Fix bad bug fixes
https://github.com/odoo/odoo/commit/5309c252f6d0bc4994265a4c39259b70e7507fb1

This fix isn't working when using the 'modify' refund_method.
Also, you can't change the behavior of the whole invoices when there is only one move dealing with the auto_post feature.

https://github.com/odoo/odoo/commit/c9cd83e538a0be9d626d7587c465924146327cb2

This fix is only fixing the reversal wizard but must be done everytime a journal entry is duplicated.

closes odoo/odoo#56904

X-original-commit: 3057ee6cdd63c0adb5037041492427268b5e7549
Signed-off-by: oco-odoo <oco-odoo@users.noreply.github.com>
Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
2020-09-02 07:25:57 +00:00
Laurent Smet f25e0f1737 [FIX] account: Fix currency of tax_base_amount
The tax_base_amount field on account.move.line is expressed using the company currency but the current code is storing an amount expressed using the move currency.

closes odoo/odoo#56905

X-original-commit: 09c59012bf80d2ccbafe21c39e604d6cfda72924
Signed-off-by: oco-odoo <oco-odoo@users.noreply.github.com>
Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
2020-09-01 16:43:39 +00:00
Martin Trigaux 90d85eb9c5 [I18N] export saas-13.5 source terms
Without demo data

closes odoo/odoo#56869

X-original-commit: 33f251b6489455cd7221f2c62dee0400a69784b8
Related: odoo/enterprise#12836
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2020-09-01 11:18:00 +00:00
wan 55acd311c4 [IMP] account: reduce number of queries of customer/supplier rank
By counting the number of customers/suppliers before doing the query and
updating all at once, we can reduce the number of queries done quite a
lot for big batches of invoices.

closes odoo/odoo#56848

X-original-commit: b0e0035b585f976e912e97e7f95f66b525bc8e43
Signed-off-by: Quentin De Paoli (qdp) <qdp@openerp.com>
Signed-off-by: wan <william-andre@users.noreply.github.com>
2020-09-01 09:11:01 +00:00
wan aaf0b65448 [IMP] account: improve perf of sequencing account.move
The peformances were bad when posting a lot of moves at the same time.
This is because a SQL query was executed for each document to retrieve
the last sequence used to build the new one.

By batching the documents to sequence, we can reduce drasticaly the
number of SQL queries done.

X-original-commit: ff26e093c98a5b933620642e242530a8931c1471
2020-09-01 09:11:01 +00:00
Victor Feyens c482fdbf05 [IMP] various: improve code style and performance by improve `all()` usage
PURPOSE

Clean code. Be more performance oriented.

SPECIFICATIONS

Improvements applied in this commit

  * not all() --> any(not) for earlier returns;
  * all([generator]) --> all(generator) to avoid unnecessary list casting.
    This code construct is better managed by all;

This commit will probably not have a big performance effect on standard
production databases. However each performance and cleaning improvement
is welcomed.

LINKS

Task ID-2328619

closes odoo/odoo#56810

X-original-commit: 1cc6bb1231401ea7f501d2f5b5e9641ec8734850
Related: odoo/enterprise#12802
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
2020-08-31 13:59:27 +00:00
Jorge Pinna Puissant 86221d1f71 [FIX] account: show taxes when they are zero on invoices print
Before this commit, the taxes with amount of zero are not shown on
invoice print. For instance, the 15% tax of a product with value of
€0.01 will not be show on invoice print.

This previous commit 37a0f7acae8aebef35577b178f8aeefed11c9105 allows
showing zero percent taxes on invoice print. This commit, will
fine-tuning the previous commit to also show taxes with zero amount.

opw-2307761

closes odoo/odoo#55665

X-original-commit: b8bb1e12a10477bb31addc6d3cecefa046dd09fe
Signed-off-by: Jorge Pinna Puissant (jpp) <jpp@odoo.com>
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
2020-08-28 16:23:42 +00:00
Jorge Pinna Puissant 812436e588 [FIX] account: tax's widget error
- Create a new purchase tax with 0 as amount (Tax 0%);
- Create a new Bill, add a new line with the new Tax 0%;
- Use the tax's widget to modify the tax amount.

Before this commit, an error message was shown.

Now, only taxes values bigger than zero can be modified with the widget.

opw-2307761

X-original-commit: 03ee8036b3ea344372736beeefe6c4d74e4e62be
2020-08-28 16:23:42 +00:00
Anh Thao Pham (pta) 12e0e6092d [FIX] account: fix traceback on credit note after editing Group of Taxes
- Go to Accounting > Configuration > Taxes and create a new Group of Taxes:
  * Tax Name: TaxGroup
  * Tax Computation: Group of Taxes
  * Add 2 taxes (i.e. T1 15% and T2 20%)
- Go to Accounting > Customers > Invoices and create a new Invoice:
  * Add a Product and select TaxGroup as Taxes
- Post the invoice
- Go to TaxGroup edition and remove T2 20%
- Go back to create Invoice and add a Credit Note
At Credit Note creation, a KeyError is triggered.

opw-2321199

closes odoo/odoo#56729

X-original-commit: 816c0fa0f74d6126aecd663183361e53a1d8b460
Signed-off-by: Anh Thao PHAM <kitan191@users.noreply.github.com>
2020-08-28 11:58:51 +00:00
Dharmraj Jhala 610ba98539 [FIX] mail, crm: do not display body in creation message when having a subtype
Right now on few business objects (like leads, invoices, tasks, helpdesk
tickets etc) creation message contains
  * subtype description;
  * generic creation message;

This looks like multiple creation message on chatter after creation of the
record as you generally have "Task Created - Task created" (subtype description
then generic message).

This happens when we provide custom subtype on creation by by overriding
`_creation_subtype` method.

This commit fixes the issue by only using provided creation subtype and
removing default body. If creation subtype is not provided default creation
message is posted as before.

In this commit we also fix subtype for Lead/Opportunity creation and make
it generic ('Lead/Opportunity created') to avoid inconsistent behavior.

Finally some cleaning is made in method naming. Semi followup of 92e9e84b63

LINKS

Task ID-2288458
PR odoo/odoo#56631
PR odoo/enterprise#12707

closes odoo/odoo#56688

X-original-commit: 2ebbeb4b5443c6405dd9a3b202a1eee9c5c67ebb
Related: odoo/enterprise#12728
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2020-08-28 07:59:24 +00:00
Thibault Delavallée f5c6f14bb1 [REF] mail: move generic methods from thread to BaseModel
PURPOSE

Since v13 some commits added code in mail thread file. This file is already
quite long and keeping it organized allow to understand its content.

SPECIFICATIONS

Some methods defined on mail.thread may actually be called on models
not inheriting from mail.thread . Instead of having model methods on mail
thread receiving a records parameter it seems better to have those available
directly on BaseModel.

Move static_message_track on BaseModel in models.py. This method is now called
_mail_track, to be coherent with othe rmail-related naming. It is used in
accounting to track values in line model that does not inherit from mail.
thread. Update accounting accordingly (followup of d862965).

Move _message_get_default_recipients_on_records in models.py. Renaming it
_message_get_default_recipients() allow to be compatible with current behavior
and current override available in some addons (like CRM, event, ...).

Move _notify_get_reply_to_on_records in models.py. Renaming it
_notify_get_reply_to() allows to be shorter and coherent.

Move _alias_check_contact_on_record in models.py. Renaming it
_alias_check_contact_() allows to be shorter and coherent. Its override in
hr is also moved on BaseModel.

LINKS

Task ID-2327096 (code cleaning)
PR #56631

X-original-commit: f5df1ed912455e5ed52a65df3149f30a9d424de0
2020-08-28 07:59:23 +00:00
wan b9d088fedd [FIX] account: remove skip tour
We  want the users to do the tour, and account was the only one allowing
to skip.

closes odoo/odoo#56379

X-original-commit: 680f16eb1a57a4ef77f2095744d3cb3b53371dd1
Related: odoo/enterprise#12605
Signed-off-by: Cedric Snauwaert (csn) <csn@openerp.com>
Signed-off-by: wan <william-andre@users.noreply.github.com>
2020-08-24 10:18:27 +00:00
oco-odoo 3fbcdf1b91 [FIX] 13.0: Fix account domain on account.move.line
A deprecated account should not be selectable by the user when creating a new move.

Related issue: https://github.com/odoo/odoo/issues/56586

closes odoo/odoo#56696

X-original-commit: 114b9d2c7b858b9cc8bc8d82239f6fe53290d58f
Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
2020-08-27 17:37:03 +00:00
Andrea Grazioso (agr-odoo) 9fa270c70b [FIX] account: avoid long recomputation recursion
when creating the first bank statement on a journal. It will trigger
manual field recomputations:
https://github.com/odoo/odoo/blob/d19477f982e046ba563ce18706f0eab2b250738d/addons/account/models/account_bank_statement.py#L288-L297

previous_statement_id will correctly be False
The manual recomputation in create will recalculate all bank
statements that have a False previous_statement_id.
These bank statements are usually the first ones in a journal. When they get
recomputed it triggers recomputations for every bank statement that
follows it.

This commit try to limit this behavior by recomputing statements only in
the same journal

opw-2311173

closes odoo/odoo#56648

X-original-commit: e932df3b356752eb9c42164821acb6e2db7fe317
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
Signed-off-by: agr-odoo <agr-odoo@users.noreply.github.com>
2020-08-27 10:59:31 +00:00
Swapnesh Shah 9f609565a2 [FIX] account: use correct creation message on refunds
Before this commit, Creating a new Credit Note will log `Refund Created` into the chatter, and creating a new Vendor Refund will log `Credit Note Created` chatter due to wrong types given in `_get_creation_message` method.

With this commit, We use the correct type in this method.

closes odoo/odoo#56618

X-original-commit: 4d2d9f030d6a5a56657d30586ba6fc0bbd688fca
Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
2020-08-26 16:27:31 +00:00
william d1391314d9 [FIX] account: name of invoices sent by mail
The name set by the mail gateway was the title of the mail. The name
should be set with the journal sequence when posting instead.
This behavior was broken by 5d24244f417cb8f221f8d418663f4544adcd5613

closes odoo/odoo#56065

Related: odoo/enterprise#12492
Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
Signed-off-by: wan <william-andre@users.noreply.github.com>
2020-08-25 08:54:11 +00:00
william 3f97f8ee5b [REV] account: change the type of name field in 'account.move.line'
This commit reverts 0c075552f7

Task 2306265

This had the side effect of blocking the group by label in the Journal
Entry list view.
2020-08-25 08:54:11 +00:00
Andrea Grazioso (agr-odoo) 4fd328b3e3 [FIX] account: avoid traceback when reversing archived values
Create an invoice I with a tax T on an invoice line. Validate
Archive T
Create the credit note from I

Traceback will occur because the archived value is not copied on the
reversal, causing issue when matching data

opw-2320472

closes odoo/odoo#56407

X-original-commit: d949cb88abbf8f64b383bceba07105df578a4a14
Signed-off-by: agr-odoo <agr-odoo@users.noreply.github.com>
2020-08-24 12:56:03 +00:00
Dharmraj Jhala f49dbf595c [IMP] account, purchase, sale: allow sending email to self
Currently, if users try to send invoices / quotations / purchase orders to
themselves in order to look at final result, they can't do so because our
default chatter protection prevents sending mails to authors themselves.

This commit uses 'mail_notify_author' context key and allows users to send
mails from the header buttons available on SO / PO / invoices to themselves
if they are in recipients.

This commit targets only those buttons as this is the main case where we
want to allow people to send emails to themselves. In order to avoid
side effects no other use case is supported.

Task ID-2294130

closes odoo/odoo#56370

X-original-commit: 08c0dc929da38595e29a9d1db93065547cd98ad1
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2020-08-24 08:14:44 +00:00
Juan Jose Scarafia 6d52f3646c [FIX] account: update account and payment term
- Create 2 customers A & B
- On A, set a Payment Term for Sales and Purchases
- Create a customer invoice
- Add a line
- Set Partner A
  => the payment term is selected
- Set Partner B
  => the payment term is kept

Moreover, the term account is set only if the customer has a payment
term set, which is not logical.

Since the partner is not mandatory, we keep an intermediate behavior: we
set the info of the partner only if there is a partner defined.

opw-2304436

closes odoo/odoo#55632

X-original-commit: 68d470ee832ea7999ebcb58109d249d7d463c83d
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
Signed-off-by: Christophe Monniez (moc) <moc@odoo.com>
2020-08-07 13:36:06 +00:00
oco-odoo 847fb3d342 [IMP] account: taxes: replace "repartition" by "distribution"
The latter is more usual.

closes odoo/odoo#56273

Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
2020-08-21 09:38:04 +00:00
wan 8129aa40db [IMP] account{,_check_printing}: usability
Task 2005940

account:
* Use stored compute methods instead of default for
  {out,in}bound_payment_method_ids
* Track is_move_sent in the chatter
* Split 'Invoices' and 'Bills' in the smart button of payment form
* Because account.payment.method can be shown on the res.partner form,
  we need to relax the security level to readonly for all users

account_check_printing:
* Add the preferred payment method for partners, with a related on
  account move allowing to do a group by and doing payments in batch
* Add a constraint to forbid twice the same check number in the same
  journal
* The amount in words is now readonly to prevent typos and mismatches
  with the amount in digits
* Remove the field `check_number_int`. The check number is kept as Char
  so that '000012345' is not displayed (and printed) as '12,345' but it
  is parsed so that comparison and incrementation are possible.

closes odoo/odoo#56179

Related: odoo/upgrade#1669
Related: odoo/enterprise#12527
Signed-off-by: oco-odoo <oco-odoo@users.noreply.github.com>
2020-08-21 07:46:07 +00:00
Fabrice Henrion 24d58dbfc5 [IMP] account: rephrase to improve the grammar
closes odoo/odoo#48149

Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2020-08-21 05:24:54 +00:00
SEINLET Nicolas 48ccbe67c6 [IMP] account: make sequence indexable
the search for sequence include a criteria `date_trunc('year', date) =
date_trunc('year', '2017-10-01'::date)` Which is translated by query
planner in `date_trunc('year'::text, date::timestamp with time zone)`.
As it's mutable thanks to the time zone, it's not indexable. Enforcing
the `without timezone` makes the query planner use an immutable
`date_trunc('year'::text, date::timestamp without time zone)`. As it's
immutable, it's indexable.

closes odoo/odoo#56244

X-original-commit: 70f671a32a504c6aa92fd19e38e6151c10b2325b
Signed-off-by: Quentin De Paoli (qdp) <qdp@openerp.com>
2020-08-20 16:40:23 +00:00
Raphael Collet 4e7161a12c [FIX] account: compute methods do not always assign value 2020-08-20 14:23:15 +00:00
Laurent Smet 538b7f22cf [FIX] account: Fix constraint on bank/cash journals
Such stuff must be limited to bank/cash journals.

closes odoo/odoo#56184

X-original-commit: c1caf6a705c7ca02ef1c75fc36632af5055eda7a
Signed-off-by: oco-odoo <oco-odoo@users.noreply.github.com>
Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
2020-08-20 12:49:26 +00:00
wan 4cf9fa928e [IMP] account: redo the tour
The tour has been updated
Task 2306134

closes odoo/odoo#55624

Related: odoo/enterprise#12378
Related: odoo/upgrade#1659
Signed-off-by: Cedric Snauwaert (csn) <csn@openerp.com>
2020-08-19 16:04:01 +00:00