Commit Graph
16020 Commits
Author SHA1 Message Date
Laurent Smet 17b42902ae [IMP] account: Remove 'Take money in/out' button
closes odoo/odoo#73708

Task: 2596069
Signed-off-by: William André (wan) <wan@odoo.com>
2021-07-14 12:13:13 +00:00
Habib (ayh) b0de4f7cef [IMP] account: make account move chatter log more odoo standard
Remove the custom messages and replace with the default odoo tracking message that uses tracking_value_ids as parameters
Journal Items will log all changes of tracked fields in the chatter of the associated Entry - including one2many and many2many fields (by overriding _mail_track)

references original task 2061399
closes task 2469621

closes odoo/odoo#72023

Signed-off-by: William André (wan) <wan@odoo.com>
2021-07-27 16:45:09 +00:00
Benjamin Frantzen (bfr) 3416c596d9 [IMP] account: auto_install l10n_it_edi_sdicoop if main company is Italian
Task ID: 2613031

closes odoo/odoo#74508

X-original-commit: a7a4552b6cd9d1992d854c7f79e12ea172f98d81
Signed-off-by: Josse Colpaert <jco@openerp.com>
2021-07-30 15:06:19 +00:00
Touati Djamel (otd) 8f6e85f752 [FIX] account, hr_expense: fix reconciliation function
Steps to reproduce the bug:
- Install Accounting and Expense app
- Go to accounting settings > enable cash basis option
- Go to accounting > configuration > accounting > taxes
- Create a new tax or choose an existing one e.g “Tax abc”:
Tax Computation = `”Percentage of Price”`
Tax Type = `”Purchases”`
Choose any value for amount
Select "Based on Payment" in tax due
choose an account with the "Allow Reconciliation" option activated in the Cash Basis Transition Account field
Save

- Go to expenses > Expense Reports > All reports > Create a new one :
	- Add 2 expense and for both set up the taxes to "Tax abc" and unit price > 0
- Submit to manager
- Approve
- Post journal entries
- Register a payment

Problem:
A user error with the following message is triggered: “You are trying to reconcile some entries that are already reconciled”

In the use case we have two expenses and for each, an `" account.partial.reconcile "` will be created,
so we will loop twice and therefore add twice all the `”account.move.line”` linked to the taxes
in the dict `" to_reconcile_after "`: https://github.com/odoo/odoo/blob/beccf82e09d536255d9d9cb9bfe58ebae2559843/addons/account/models/account_partial_reconcile.py#L585

Then we loop to reconcile all the `" account.move.line "` which are in the dict `" to_reconcile_after "`,
but since we added them all twice, at each turn of the loop we give them all as a parameter
of the “reconcile” function without checking whether they are already reconciled or not.

opw-2565934

closes odoo/odoo#74432

X-original-commit: fb2b1482f5d3dec924b08e08dc915d6608c7d6b3
Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
Signed-off-by: Djamel Touati <DjamelTouati@users.noreply.github.com>
2021-07-29 16:04:32 +00:00
Anjali 7c5bfb42d4 [IMP] various: add list views for some important reporting models
Currently, there are many useful pivot views on reporting models but most
of them lacks the dedicated list view. Dedicated list views will allow users
to see useful information when one directly drill down to the records from
the pivot table in odoo spreadsheet [1].

With this commit

  1. we remove 'disabled_linking' attribute from the very important pivot
     and graph views (see the full list on task pad);
  2. we added dedicated list views for the following reporting models

    - account.invoice.report
    - fleet.vehicle.cost.report
    - hr.timesheet.attendance.report
    - purchase.report
    - project.profitability.report
    - report.membership
    - report.pos.order
    - report.project.task.user
    - sale.report

Task-2547881

[1] See task-2506116

closes odoo/odoo#72394

Related: odoo/enterprise#19122
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2021-07-29 09:33:56 +00:00
Laurent Smet bd7ed78902 [FIX] account: Allow editing bank statement balances in 'processing' state
When using the online synchronization, you could have a wrong balance in 'processing' state.
In that case, don't force the user to reset the whole statement to 'open' and allow him to edit balances directly.

closes odoo/odoo#74387

Task: 2606857
X-original-commit: 03f83eb87da00938b9d2df78651c1e06cf8a6d58
Signed-off-by: William André (wan) <wan@odoo.com>
Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
2021-07-28 17:45:26 +00:00
Laurent Smet c171f9d2aa [FIX] account: Fix tag_ids when refunding an invoice with tax affecting base
A tax line affecting the base of subsequent taxes is a line having some values in 'tax_ids' & 'tag_ids'.
When creating a refund, tags was wrongly computed in this case.

closes odoo/odoo#74307

Issue: 2596368
X-original-commit: 49d1dbbb74ea97e4337fe1af3b8074dc9146143c
Signed-off-by: William André (wan) <wan@odoo.com>
Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
2021-07-29 07:26:02 +00:00
wan 5bc37418bf [IMP] account: warn when the sequence format changed
Explain the situation when a manual change has been done to the sequence
of `account.move`. This was needed because some user didn't realize that
they changed the sequence, and when they realized it, it had polluted
multiple numbers after that.

closes odoo/odoo#74326

X-original-commit: 56f7afb253da6560cddae121f5b6cdab3e3b1c6e
Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
Signed-off-by: William André (wan) <wan@odoo.com>
2021-07-28 10:25:04 +00:00
Jeremy Kersten 040b49bef9 [FIX] account: remove dead css
This class has been removed in commit d201a39357
2021-07-27 07:54:42 +00:00
jbw d5ba4e032b [IMP] account: improve invoice/bills view
- Group filters into less technical/more functional approach
- Small tree view change

closes odoo/odoo#73723

Task: 2541366
Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
2021-07-27 08:47:34 +00:00
jbw cef3f87321 [IMP] account: Allow batching vendor bills and refunds for same partner
Improve usability of payments. Allow selecting multiple Vendor Bills AND Refunds
and pay them all together in one single payment.

E.g. When running server action “Register Payment” for :
 - one 100€ Vendor Bill
 - one 50€ Vendor Bill
- one 80€ Refund
Previous result = one 150€ outgoing payment + one 80€ incoming payment
New result = one 70€ outgoing payment

closes odoo/odoo#69578

Task: 2475598
Related: odoo/enterprise#19902
Signed-off-by: William André (wan) <wan@odoo.com>
2021-07-27 09:06:18 +00:00
Achraf (abz) d3faed9d9f [FIX] account: Add layout to action send and print
When sending the same invoice from Invoices > list view > select an invoice > action > Send and print, the email received by the client does not contain the header and the link to the invoice

This PR adds the custom_layout attribute to the context of "Send & Print" action

opw-2544654

closes odoo/odoo#74311

X-original-commit: 8bb27b88326d6298a03a5fa3978ac99b0e1ee7e0
Signed-off-by: Josse Colpaert <jco@openerp.com>
Signed-off-by: Achraf <abz-odoo@users.noreply.github.com>
2021-07-27 11:48:14 +00:00
John (jol) 67dac2ad3a [IMP] account,sale: move tour bubbles on invoice view
The bubble on the invoice view, made the list slightly difficult to read.

It is a little bit better on the right.

closes odoo/odoo#73768

Task: 2476548
Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
2021-07-27 08:56:53 +00:00
Nicolas (vin) ae7a0c3b9b [IMP] account: account account form view improvement
The account name field may be a bit too small when
having accounts with a longer name.
Change it to take more of the available space for
this field.

Task id #2608446

closes odoo/odoo#74006

Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
2021-07-27 08:20:21 +00:00
dasa-odoo 90d23eb3e2 [IMP] account: only generate email and pdf once on send&print invoice
action_invoice_sent() triggers two onchanges which normally don't happen at the same time. Added a check to one of them (onchange_is_email()), so that on action_invoice_sent(), only one of them calls the computationally expensive onchange_template_id_wrapper(), effectively halving the time taken.

Time for executing the action for one invoice dropped from over 3 seconds to a bit over 1.

closes odoo/odoo#74160

Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
2021-07-23 11:22:19 +00:00
Xavier-Do 288595f558 [FIX] *: add explicit license to all manifest
The license is missing in most enterprise manifest so
the decision was taken to make it explicit in all cases.
When not defined, a warning will be triggered starting from
14.0 when falling back on the default LGPL-3.

closes odoo/odoo#74245

Related: odoo/design-themes#48
Related: odoo/enterprise#19862
Signed-off-by: Xavier Dollé (xdo) <xdo@odoo.com>
2021-07-26 13:09:57 +00:00
stefanorigano (SRI) a10089523f [FIX] web, account: review dashboard dropdown design
task-2579123
2021-07-23 06:54:18 +00:00
Goffin Simon 1e430dc614 [FIX] account: Wrong currency symbol in payment receipt report
Steps to reproduce the bug:

Enable Multi Currency > Accounting > Create Customer Invoice in USD > Pay Invoice in EUR > click on payment and print payment receipt

Bug:

The currency symbol next to "Amount Paid" was in $ instead €

opw:2506868

closes odoo/odoo#73998

X-original-commit: f08bcbf90257d632f7258251059a5390bf3eafa4
Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
2021-07-19 19:10:06 +00:00
Kevin Baptiste 86aa7b78aa [IMP] *: introduce data-hotkey on form and modal views
Define `data-hotkey` on most used action buttons.

For the modals, the following keys are dedicated for "special"
actions:
 - Alt+G: add
 - Alt+V: save
 - Alt+Z: cancel

closes odoo/odoo#73275

Taskid: 2588233
Related: odoo/enterprise#19464
Signed-off-by: Kevin Baptiste <kba@odoo.com>
2021-07-15 08:39:49 +00:00
Roopam Rathod 7aef86fa69 [FIX] account:Auto Post scheduler action threads killed by timeout.
Before this commit:

  When there is too much records to post and it's take time more than 15 minutes then server was restarted.
  So scheduler action will do the process with the same records again and again.

After this commit:

  post record in batch of 1000

opw-2451446

closes odoo/odoo#70831

X-original-commit: 819321c3a129613890ce49e3efe9a903c3218070
Signed-off-by: rrt-odoo <rrt-odoo@users.noreply.github.com>
2021-05-17 06:38:08 +00:00
Xavier Morel 0e552b96da [FIX] *: convert tip contents to t-out
Requires markup every markup-using tip content as Markup. Would be a
nice occasion to migrate everything to a markup-safe markdown I think,
especially if we could migrate the translations so we don't lose them.
2021-07-20 05:40:55 +00:00
Xavier Morel 27b02d2ec9 [FIX] web, *: de-t-raw kanban views
Add HTML fields support to kanban view (currently bespoke but maybe it
should be done via `format`), and remove t-raw for HTML fields there.

Also just strip some t-raws which were completely unnecessary to start with
2021-07-20 05:40:55 +00:00
Nicolas (vin) eada83dc83 [FIX] account: fix payment method lines order
Currently, the payment method lines are only ordered
base on their sequences. This could lead an issue if
the sequences are all the same, where they would be
returned in a random order.

Add a second ordering on the id to avoid such random
issues.

closes odoo/odoo#73984

X-original-commit: ac700908a80f67e5fd15fa242cc111d57abd4aa9
Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
Signed-off-by: Nicolas Viseur <vin-odoo@users.noreply.github.com>
2021-07-19 15:17:33 +00:00
Nicolas (vin) 9e432ed243 [FIX] account, payment: Various fixes for account payments/method lines
There is an issue when computing the suitable payment token ids making it impossible to
open a payment for a user without access to payment acquirers.

Also, the default computation of payment token was wrong and would never set it
correctly.

The compute for the method lines in payment would not filter unavailable acquirers
line and thus select them by default if they were first in line.

Also fix an issue with the ordering of payment method lines

X-original-commit: 73410a0fd76a70e1730883d35b79fc603741b59c
2021-07-19 15:17:32 +00:00
Laurent Smet 9581b97c18 [FIX] account: Fix 'amount_by_group' field of invoices
When dealing with multiple taxes per line being on the same tax group, the base wasn't well computed.

closes odoo/odoo#73970

X-original-commit: b04a336c7516486e598bc69b4fee156d17f1b349
Signed-off-by: oco-odoo <oco-odoo@users.noreply.github.com>
Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
2021-07-19 13:32:40 +00:00
william-andre 502f74c1a7 [FIX] account: do not put empty narration
Having a field with an empty string makes EDIs put an empty node
Followup of
https://github.com/odoo/odoo/commit/48592a6b7548c0b2af03e0cc49180ff02943cca9
2021-07-19 10:14:24 +00:00
wan 6ad65b2ccb [IMP] account: add country to all_l10n test 2021-07-19 10:14:24 +00:00
Nicolas (vin) dca79a966a [IMP] account: Update journal accounts tooltips on config
To bring more clarity to the uses of the accounts
that can be set in the accounting settings, update
their tooltips.

Task id #2573145

closes odoo/odoo#73844

X-original-commit: 5367fc1a4faa0cae1e4e3125aa7ab7d3022be72b
Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
Signed-off-by: Nicolas Viseur <vin-odoo@users.noreply.github.com>
2021-07-16 10:57:27 +00:00
Anh Thao Pham (pta) 23ebf96cb6 [FIX] account: fix account resequence for "other" lines
Linked to commit https://github.com/odoo/odoo/commit/3e6b7dfd4854069724dde2df43ab2eb7d850e9b5

Resequence wizard will not show if "other" lines are generated to reduce the set
to display in preview, because those lines don't have "id" to be used as t-key in
the resequence template.

opw-2590273
opw-2581306

closes odoo/odoo#73811

X-original-commit: 70baff1aac1ab39c4e27f8078d404e8fdfa325db
Signed-off-by: William André (wan) <wan@odoo.com>
Signed-off-by: Anh Thao PHAM <kitan191@users.noreply.github.com>
2021-07-15 23:58:36 +00:00
Laurent Smet e2fdac55f6 [FIX] payment: Fix payment access rights for not admin users
The journal needs to access the payment acquirers to determine with payment method is still available.
Since the acquirers can't be accessed only for admin users, an accountant doesn't any right to read them, and then, an access error was raised when opening the journal form view.

Also, the 'payment.acquirer' was accessed from the 'account' module instead of being overridden in 'payment'.

closes odoo/odoo#73761

X-original-commit: 7b4580c3756657c902eceb9840984dde76429dcd
Signed-off-by: William André (wan) <wan@odoo.com>
Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
2021-07-15 10:50:14 +00:00
Nicolas (vin) 3a98bf80ec [FIX] account: payment method dependencies
Change dependencies of a few computed fields in order
to avoid triggering them wrongly when migrating.

Also add a company check on the constrains blocking
deletion of payment method lines linked to an active
acquirer.

closes odoo/odoo#73731

X-original-commit: e94b4f09a4c5664360594bee6475cb2ef756be47
Related: odoo/enterprise#19663
Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
2021-07-14 15:22:31 +00:00
Anh Thao Pham (pta) 892087c71b [FIX] account: fix invoices/bills resequence with same name
- Create 2 invoices (or 2 bills) but let them in draft
- In invoices list view, select all invoices
- Execute Action > Resequence
Resequence wizard will not show.

It comes from a template in resequence renderer using account move name as t-key
that silently crashes because both draft invoices have the same name ("/").

opw-2590273

closes odoo/odoo#73724

X-original-commit: 3e6b7dfd4854069724dde2df43ab2eb7d850e9b5
Signed-off-by: William André (wan) <wan@odoo.com>
2021-07-14 13:43:20 +00:00
william-andre 439ea50f8a [FIX] account: get accounting date from invoicing date for vendor bills
In the first days of the month, many of the previous month's invoices
could still to be posted since the lock date is not yet set to the last
day of the previous month. To avoid the user having to modify the
default accounting date on each such bill, detect whether the conditions
allow the invoice to be posted on the very last day of the oldest
possible month, and then adapt the accounting date to the last day of
that month.

task-2575560

closes odoo/odoo#73701

X-original-commit: 2c5c1a4478505688f35e47ca20e7977b134d0fdb
Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
Signed-off-by: William André (wan) <wan@odoo.com>
2021-07-14 11:56:47 +00:00
jbw fd471c7096 [FIX] account: fix partner mapping with notes on reconcile models
On reconcile models, a rule can be set to map a partner to a bstline if
the bstline "Notes" matches a regex. This "Notes" field is actually
the "narration" field inherited from move. In commit 0f3c7f153e8bd20f83b7d1df031634996d36935b
this field is converted from Text to Html. This breaks the regex match.
The fix converts back the field value to text for the regex check.

closes odoo/odoo#73618

Task: 2427089
X-original-commit: 8e9616034678a627f92740487f20cf66e60c0f30
Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
Signed-off-by: jbw-odoo <jbw-odoo@users.noreply.github.com>
2021-07-13 10:16:02 +00:00
jbw 4aa41f54a4 [FIX] account: Prevent editing bst line values when bst not new
One could edit bank statement line values with new from a bstline modal. This
is due to new quick edit behaviour. This prevent the editiing of bst lin values
if bst is not new.

closes odoo/odoo#73617

Task: 2427089
X-original-commit: c9e220d0276f59834baeae3196560a7f893ff337
Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
Signed-off-by: jbw-odoo <jbw-odoo@users.noreply.github.com>
2021-07-13 10:15:29 +00:00
william-andre 934b8b09ba [FIX] account: allow to change currency when posted before
There is no reason to forbid changing the currency when a move has been
posted before.
Was introduced in [1] without reason.

[1] https://github.com/odoo/odoo/commit/d1bbf11af27e4ce12b025ef22e397302ee6336c2

closes odoo/odoo#73623

X-original-commit: 9b0578766709b27c91d85bf6246b4bc5e43ca27d
Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
Signed-off-by: William André (wan) <wan@odoo.com>
2021-07-13 11:18:26 +00:00
jbw 6adaec714a [IMP] account: Reversal on same journal type as original AccountMove
For data quality purposes and bug prevention, when I reverse an entry,
the reversal should always be postable on a journal having the same type
as the initial Journal Entry's journal.

closes odoo/odoo#72431

Task: 2497529
Related: odoo/enterprise#19543
Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
2021-07-13 10:00:38 +00:00
Nicolas (vin) c1693581d7 [IMP] account: payment method improvements
To improve the payment method system, proceed to a few changes
such as changing the view a bit, making sure payment acquirers are not
linked to a journal by default and that only the manual payment method
type can be used multiple times in a single journal.

Task id #2573145

closes odoo/odoo#73596

X-original-commit: 9122b367baea10e59b66e45bf7c458a6f1e82efb
Related: odoo/enterprise#19623
Signed-off-by: Xavier Dollé (xdo) <xdo@odoo.com>
2021-07-12 18:10:36 +00:00
Martin Trigaux 6758868731 [I18N] *: export saas-14.4 source terms
Without demo data

closes odoo/odoo#73560

X-original-commit: 802e46541117573e028b711ea33dad9df9075a39
Related: odoo/enterprise#19602
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2021-07-12 10:57:37 +00:00
Arnaud Joset 48592a6b75 [FIX] account,l10n_be_edi,point_of_sale,sale: improve terms and conditions
Before this commit, the narration field was not filled with default terms and conditions when it was defined in the company settigns.

closes odoo/odoo#73501

Taskid: 2587051
X-original-commit: 49ca71337c8e0f00a5f200d5e97c1c246a6ccd03
Signed-off-by: William André (wan) <wan@odoo.com>
Signed-off-by: Arnaud Joset <arj-odoo@users.noreply.github.com>
2021-07-09 13:07:05 +00:00
Alvaro Fuentes d25b4b020d [FIX] account: fix tuple domain
Domains must be lists on calls to `_where_calc`.
```
 Traceback (most recent call last):
   File "/tmp/tmpjmcn3gby/migrations/base/tests/test_mock_crawl.py", line 162, in crawl_menu
    self.mock_action(action_vals)
   File "/tmp/tmpjmcn3gby/migrations/base/tests/test_mock_crawl.py", line 253, in mock_action
    mock_method(model, view, fields_list, domain, group_by)
   File "/tmp/tmpjmcn3gby/migrations/base/tests/test_mock_crawl.py", line 366, in mock_view_tree
    self.mock_web_read_group(model, view, domain, group_by, fields_list, limit_group=5)
   File "/tmp/tmpjmcn3gby/migrations/base/tests/test_mock_crawl.py", line 442, in mock_web_read_group
    self.mock_web_search_read(model, view, [group["__domain"]], fields_list)
   File "/tmp/tmpjmcn3gby/migrations/base/tests/test_mock_crawl.py", line 402, in mock_web_search_read
    data = model.search_read(domain=domain, fields=fields_list, limit=80)
   File "/home/odoo/src/odoo/14.0/addons/account/models/account_move.py", line 3645, in search_read
    return super(AccountMoveLine, self.with_context(domain_cumulated_balance=to_tuple(domain or []), order_cumulated_balance=order)).search_read(domain, fields, offset, limit, order)
   File "/home/odoo/src/odoo/14.0/odoo/models.py", line 4839, in search_read
    result = records.read(fields)
   File "/home/odoo/src/odoo/14.0/odoo/models.py", line 3020, in read
    return self._read_format(fnames=fields, load=load)
   File "/home/odoo/src/odoo/14.0/odoo/models.py", line 3040, in _read_format
    vals[name] = convert(record[name], record, use_name_get)
   File "/home/odoo/src/odoo/14.0/odoo/models.py", line 5666, in __getitem__
    return self._fields[key].__get__(self, type(self))
   File "/home/odoo/src/odoo/14.0/odoo/fields.py", line 1019, in __get__
    self.compute_value(recs)
   File "/home/odoo/src/odoo/14.0/odoo/fields.py", line 1175, in compute_value
    records._compute_field_value(self)
   File "/home/odoo/src/odoo/14.0/odoo/models.py", line 4061, in _compute_field_value
    getattr(self, field.compute)()
   File "/home/odoo/src/odoo/14.0/addons/account/models/account_move.py", line 3655, in _compute_cumulated_balance
    query = self._where_calc(self.env.context.get('domain_cumulated_balance'))
   File "/home/odoo/src/odoo/14.0/odoo/models.py", line 4247, in _where_calc
    domain = [(self._active_name, '=', 1)] + domain
 TypeError: can only concatenate list (not "tuple") to list
```

Observed on upgrade request 11722
Ref 9d28c71a71 since saas-13.2

closes odoo/odoo#73522

X-original-commit: e24295da8436b4d24cd03f6ac1f22e86465f950d
Signed-off-by: Christophe Simonis <chs@odoo.com>
2021-07-09 20:50:24 +00:00
william-andre 10db78c7a5 [IMP] account: yearly sequence for sales journals
PURPOSE
Align default sequence numbering on customer's expectation per journal.
Because of some feedbacks received, we acknowledge that most users will
want an annual sequence on sales documents and a monthly sequence for
the rest.

SPECIFICATION
By default, on customer invoices/credit notes (the default sequence
should be annual.)
We don't want an option and therefore, we make a decision ; user can
change it by resequencing if he doesn't like it.

task-2591145

closes odoo/odoo#73278

Related: odoo/enterprise#19565
Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
2021-07-09 08:43:59 +00:00
Touati Djamel (otd) 511a87b488 [FIX] account: Fix clearing of the accounting date
Steps to reproduce the bug:
- Go to Accounting > Vendors > Bills
- Create a new Bills
- Delete the contents of the 'Accounting Date' field.
- Click off that field.

Problem:
-An AttributeError is triggered because we try to recalculate a new name via the function `"_compute_name"`
and we base ourselves on the date field, but we do not check if it is null or not before accessing it.

This field is only used for purchase receipts, vendor bills, vendor credit notes, payments
and regular journal entries. Other move types are unaffected here.

opw-2511799

closes odoo/odoo#73490

X-original-commit: f830efa1af28de4a4cc3b861643ac9b6fb352c8d
Signed-off-by: oco-odoo <oco-odoo@users.noreply.github.com>
Signed-off-by: Djamel Touati <DjamelTouati@users.noreply.github.com>
2021-07-09 11:06:11 +00:00
Nicolas (vin) d2964e1a6f [IMP] account: change revert button icon on account.move.lines
The current icon used by the revert button on account.move.lines
group by view is a refresh icon. Change it by an undo icon like
on the bank statement lines.

Task id #2585445

closes odoo/odoo#73163

Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
2021-07-02 13:59:48 +00:00
wan 44b3c07224 [IMP] account: adjust chart_template_id width in settings
Lots of unused space and the values can be long sometimes

task-2526878

closes odoo/odoo#71853

Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
2021-06-08 08:51:51 +00:00
wan 6fa3923c69 [IMP] account: prevent posting an entry in an archived journal
* Raise an exception if posting an entry in an archived journal.
* Do not copy the journal of an account.move if it is archived.

task-2516060

closes odoo/odoo#71851

Related: odoo/enterprise#18954
Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
2021-06-11 11:57:57 +00:00
Laurent Smet 0a2ec2f6d5 [FIX] account,point_of_sale: Fix 'fixed' price-included tax with negative quantity
closes odoo/odoo#73324

Ticket: 2585188
X-original-commit: 1417a34c6e3dc6f2826e605ad60de1030c80b186
Signed-off-by: oco-odoo <oco-odoo@users.noreply.github.com>
Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
2021-07-06 15:19:06 +00:00
oco-odoo 9e503fa5d8 [FIX] account: tags form view: make country readonly only when necessary
https://github.com/odoo/odoo/pull/71872 made country_id readonly in every circumstance. This made it impossible to create an account.account.tag targetting taxes from scratch in the UI. We only want to prevent edition of this field when the tag has been generated by a tax.report.line.

closes odoo/odoo#73142

X-original-commit: 8f0ae54cd24e9a6299d86c47ed37aea2a7fa4ad8
Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
Signed-off-by: oco-odoo <oco-odoo@users.noreply.github.com>
2021-07-02 11:36:31 +00:00
Habib (ayh) 79e17df6f9 [IMP] l10n_eu_service: OSS - Automatic Tax and Fiscal Position Mapping for EU Countries
Due to EU e-commerce 'One-Stop Shop' which becomes available on 1 July 2021, EU companies involved in distance sales are able to file their taxes using the new OSS process. Adopting OSS is now simplified in Odoo.

On installation of the module, all companies having a fiscal country in the EU will be processed.
For all existing domestic taxes in the company, an associated foreign tax (standard rate, reduced rate, etc) is found in the `EU_TAX_MAP`. This mapping will be created in a fiscal position that is automatically detected based on the customers' country.

All that is required from the user, is to review the tax mappings according to the products and services sold by the company.

A refresh button is also available in the odoo settings to redo/update the fiscal positions. This might be useful after adding a new tax.

Note: The tax mapping herein is not intended to cover all possible tax mappings between EU countries, but rather, the most commonly used ones. It is advised that users with special tax cases update the created Fiscal Positions according to their requirements.

Closes [Task 2579615]

closes odoo/odoo#73042

X-original-commit: 9c548c423614d1305542ebdffdbcd0da3cf09899
Signed-off-by: oco-odoo <oco-odoo@users.noreply.github.com>
Signed-off-by: Habib Ayob <h4818@users.noreply.github.com>
2021-07-01 12:22:15 +00:00
mhabboush bd497d5296 [FIX] account: inv. report price_average
When converting a price (average price in this case) the price should be multiplied by the source uom factor (uom_line.factor)
https://github.com/odoo/odoo/blob/72fea2fe11244a55e9a630049fc75f147e26e473/addons/uom/models/uom_uom.py#L172

closes odoo/odoo#72944

X-original-commit: 7f3dd371fc00df2d9e7b88ae2425e33db91966f7
Signed-off-by: William André (wan) <wan@odoo.com>
2021-06-29 14:41:41 +00:00