Commit Graph
16155 Commits
Author SHA1 Message Date
jbw 5ab17ff395 [FIX] account,purchase,sale: fix typo and test for accrued orders
- Fix typo in accrued_orders.py
- Remove fields.Date.today() from purchase test
- Make more use of common resources

closes odoo/odoo#79159

X-original-commit: 31570e185dcb36145e28e42cda765284dc373294
Signed-off-by: Laurent Smet <las@openerp.com>
2021-10-29 08:43:31 +00:00
Aktiv Software 9e35bcf667 [FIX] account: currency symbol not displayed in Subtotal and total amount
Under account.document_tax_totals template the subtotal and total were using the float amounts for printing.

There was the formatted currency returned from _compute_tax_totals_json but not printed.
This commit uses the formatted_amount and formatted_amount_total keys to display the amount with currency on PDF and portal view.

closes #77996

closes odoo/odoo#79153

X-original-commit: a2dbc4eb40a868860a7f8448a680a9f0e2ed16f4
Signed-off-by: Olivier Colson <oco@odoo.com>
Signed-off-by: William André (wan) <wan@odoo.com>
2021-10-28 16:08:53 +00:00
oco-odoo 86601ea9f7 [FIX] account: fiscal positions: filter tax country properly in view
In case the address of the company is in a different country as its fiscal country, the taxes available as "source tax" on the fiscal position lines were not the right ones (the country of the address was used to fetch them).

closes odoo/odoo#79144

Signed-off-by: Laurent Smet <las@openerp.com>
2021-10-28 14:37:43 +00:00
jbw 1273eb3f1e [IMP] account: set is_base_affected only visible in debug
Make tax field "Base Affected by Previous Taxes" only visible in debug mode.

closes odoo/odoo#78733

Task: 2608764
Signed-off-by: William André (wan) <wan@odoo.com>
2021-10-26 13:22:21 +00:00
Guillaume (guva) 6c35ed8346 [FIX] account: Fix unbalanced journal entry when editing payment
Steps to reproduce:

- On bank journal set the outstanding payments accounts and the
  outstanding receipts accounts, respectively to 101403 and
  101402
- In Accounting > Configuration > Settings > Default Accounts,
  let the two outstanding accounts empty.
- Customer > payment > create a payment : payment type "Receive",
  amount 5 for example. Save it.
- Edit the payment and change the payment type to "Send".
- Click on Save.

Issue

Got an UserError "Cannot create unbalanced journal entry"

Since the payment_type has changed, the computed outstanding_account_id on the payment is recomputed.
When splitting journal items using the _seek_for_lines() method, odoo is not able to retrieve the liquidity lines since outstanding_account_id has changed.

opw-2620046

closes odoo/odoo#78866

X-original-commit: 865c5d7741ca1bf003b4181d06484cc4ecaf8fcb
Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
Signed-off-by: guva-odoo <guva-odoo@users.noreply.github.com>
2021-10-23 22:00:39 +00:00
Julien Van Roy 2234f26a28 [IMP] account: replace tooltips for the 3 accounts in Tax Group
For clarity purpose, tooltips for the 3 accounts in Tax Group (Configuration > Tax Group) are added.

task-2602730

closes odoo/odoo#78453

Related: odoo/enterprise#21725
Signed-off-by: William André (wan) <wan@odoo.com>
2021-10-18 15:12:50 +00:00
Andrea Grazioso (agr-odoo) d60063e159 [FIX] account: use refund repartition line when needed when applying a reconciliation model with a tax from a button
The fix made in https://github.com/odoo/odoo/pull/74427 was mistakenly not forward-ported. We reintroduce it here together with the fix that was made for it by https://github.com/odoo/odoo/pull/77589 .

Before this fix, the wrong repartition was used, and the tax_tag_invert computed for the move lines in this case was inconsistent, leading to wrong reporting.

closes odoo/odoo#78546

X-original-commit: 663bc7c0a0c0d7d16cd754bba5cea34bdb6315bf
Related: odoo/enterprise#21756
Signed-off-by: oco-odoo <oco-odoo@users.noreply.github.com>
Signed-off-by: agr-odoo <agr-odoo@users.noreply.github.com>
2021-10-18 14:01:49 +00:00
Wolfgang Taferner be28be1eb0 [FIX] account: only display qr code if residual > 0
In case an invoice is already paid it is useless to provide
a QR Code for scanning to pay a residual of zero.

closes odoo/odoo#78437

X-original-commit: bfb5bcc07465240b0952e031522dd513dff8c2ab
Signed-off-by: oco-odoo <oco-odoo@users.noreply.github.com>
2021-10-15 16:13:51 +00:00
william-andre 8bbc6e7811 [FIX] account: forward port of 4c06b3c1180048b1c0db5067adf0c0bef5c02785
The method name is private since
d9287caf94

closes odoo/odoo#78317

X-original-commit: cb9ca92ae54abb707725097eecda5b12c4ad189f
Signed-off-by: oco-odoo <oco-odoo@users.noreply.github.com>
Signed-off-by: William André (wan) <wan@odoo.com>
2021-10-13 18:24:37 +00:00
Yenthe Van Ginneken c3f593db78 [FIX] account: allow overriding portal domain
Before this commit the only way to modify the domain is to completely override portal_my_invoices.
Since this function is so big this is not clean/easy to do.
By creating a separate function we can simply override it and we can reuse the function on two places.

closes odoo/odoo#77446

X-original-commit: b7effc442cd7ff47e00718adf5b1af43e9f326ee
Signed-off-by: Florian Gilbert <FlorianGilbert@users.noreply.github.com>
2021-10-13 18:24:02 +00:00
Nicolas (vin) 66b721236c [IMP] account: Log changes on bank statements
With bank synchronization, having information about changes done by
the user on the bank statements can be useful when looking into issues.

We'll now log changes in the starting/ending balance as well as the
state of the statement to keep better track of what is happening on
the statements.

Task id #2647224

closes odoo/odoo#78264

X-original-commit: 3f2379347dae2482669aded034f3a5249aececa5
Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
Signed-off-by: oco-odoo <oco-odoo@users.noreply.github.com>
2021-10-13 16:33:57 +00:00
william-andre b57b884430 [FIX] account: allow to edit some fields with Invoicing only
The only fields added in
`//page[@name='invoicing']//group[@name='accounting']`
are `unspsc_code_id`, `intrastat_id` and `email_template_id`, which
should all be available with only the rights for invoicing.

opw-2665030

closes odoo/odoo#78260

X-original-commit: 1f69445f0a7ed02030f3f16f126e34b0d507ed80
Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
Signed-off-by: William André (wan) <wan@odoo.com>
2021-10-12 18:11:56 +00:00
oco-odoo 26c2c705e4 [FIX] account: carryover lines: improve view
- allow editing the date of a carryover line manually

- don't display the tax report line the carryover line is linked to anymore, as the user goes through this line to open the carryover line anyway, and it shouldn't be editable.

- also remove a domain that made no sense on carryover lines: pointing to a related field depending on the field defining the domain

Manual forward-port of https://github.com/odoo/odoo/pull/77718

closes odoo/odoo#78213

Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
2021-10-12 12:56:55 +00:00
oco-odoo 394e24396b [IMP] account: foreign VAT fiscal positions: add a button to open the list of l10n modules to the banner for the admin
Before, when someone with settings rights created a foreign VAT fiscal position for a country in which there was no tax template yet, a banner was displayed, telling that the right l10n module needed to be installed. However, there was no link to the list of modules, and the user had to go back to the app switcher, then to the Apps menu to install the module he needed. We now display a link to this page, only for the users with setting rights. Other users will still see the same thing as before.

Manual forward-port of https://github.com/odoo/odoo/pull/77687

closes odoo/odoo#78209

Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
2021-10-12 12:56:51 +00:00
Mathieu Duckerts-Antoine 85b8a95116 [REF] *: clean some useless %% in xml files
The commit https://github.com/odoo/odoo/commit/1b40e9265f88f57aaaf311bb8fae3d1fd1966d7d
allows to get rid of most escapings %% in xmls but there were still occurences
of useless %% in some of them. We remove them.

closes odoo/odoo#78069

Related: odoo/enterprise#21553
Signed-off-by: Géry Debongnie (ged) <ged@openerp.com>
2021-10-11 12:34:47 +00:00
kir-odoo d4fb97e655 [IMP] account: align the label of fields narration in both
Purpose of the task is to:
1) Label becomes "Notes" rather than "Terms & Conditions".
2) Fields reorganization from left to right.

So in this commit, Updated Label "Terms & Conditions" to "Notes", Fields
reorganization from left to right in 'account.bank.statement' and
'accont.bank.statement.line' model and make group_by bank statement.

Links
Task - 2613132

closes odoo/odoo#77454

X-original-commit: ce4234c98a701c0071228827187471db167a3bdb
Related: odoo/enterprise#21287
Signed-off-by: Florian Gilbert <FlorianGilbert@users.noreply.github.com>
Signed-off-by: Quentin De Paoli (qdp) <qdp@openerp.com>
2021-10-11 11:27:37 +00:00
Laurent Smet e4926a24da [FW][IMP] account: partner_id not required in payment form view
Create a payment without a partner for a receipt
Go to the form view
Click on the stats button.
=> Error, 'partner_id' is required

In some cases, having the partner not required on the view is needed.

closes odoo/odoo#78124

Task: 2610780
Forward-port-of: https://github.com/odoo/odoo/pull/77727
Signed-off-by: Quentin De Paoli (qdp) <qdp@openerp.com>
2021-10-11 09:02:37 +00:00
Goffin Simon bddb892817 [FIX] account: es_BO missing translations
es_BO is not available in Transifex and some translations are different from es.

opw:2571715

closes odoo/odoo#77978

X-original-commit: 2f33bb580c5445b0fd77bd0ed8c55d5d4b298ff9
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2021-10-11 05:35:57 +00:00
Swapnesh Shah 96720339d5 [FIX] account: disable group create from AML Kanban
This commit removes `Add a column` from Grouped
Kanban view of Journal Items.

Creating new Records from `Add a column` should not be supported
from Journal Items and also it is not working for Journal/Account
as required fields are not set. (and also gives Traceback)

closes odoo/odoo#78074

X-original-commit: 21fe5c65fd3170ebfa01ea9a6b530d158f6c0c8e
Signed-off-by: Quentin De Paoli (qdp) <qdp@openerp.com>
2021-10-08 16:09:41 +00:00
Joseph Caburnay 7eb742f6b8 [FIX] point_of_sale: post diff on bank payment methods when closing the session
1. When the diff amount is for "combine" bank payment method, the
account.move record used to represent the combine amount is modified
to contain the diff amount. The journal entry is modified:

FROM:
```
                Debit                           Credit
Outstanding     combine_amount
Receivable                                      combine_amount
```

TO:
```
		Debit				Credit
Outstanding 	combine_amount - diff_amount
Receivable					combine_amount
Diff account	diff_amount
```

2. When the diff amount is for "split" bank payment method, an
account.move moving the diff amount from Outstanding to Diff account
is created. The journal entry is like:

```
                Debit                           Credit
Outstanding     diff_amount
Diff account    				diff_amount
```

closes odoo/odoo#77859

Signed-off-by: pimodoo <pimodoo@users.noreply.github.com>
2021-10-08 11:46:44 +00:00
Victor Feyens ab022ec12d [FIX] *: target v15.0 documentation with doc links
X-original-commit: acc95ec204baa1dddbe292c379a1768fe1deccbf
Part-of: odoo/odoo#77923
2021-10-07 17:59:52 +00:00
Martin Trigaux e132c36ee6 [I18N] *: export 15.0 source terms
closes odoo/odoo#77898

X-original-commit: ad5afb1d18661784bfcf51bca66e576de1f6c49b
Related: odoo/enterprise#21478
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2021-10-05 16:54:21 +00:00
oco-odoo eabb144fc6 [IMP] account: reconciliation models: make use of the fact currency_id is always set on move lines
In older versions, currency_id was left empty on move lines in domestic currency (as well as amount_currency and amount_residual_currency). It's not the case anymore, so we can simplify the code a little bit.

closes odoo/odoo#77260

closes odoo/odoo#77801

Related: odoo/enterprise#21354
Related: odoo/enterprise#21437
Signed-off-by: William André (wan) <wan@odoo.com>
2021-10-05 15:41:03 +00:00
oco-odoo 2df6107cd7 [IMP] account: reconciliation models: don't suggest too many matches in case of partial mathing
- Create a statement line for partner A, amounting to 90€
- Make 5 invoices for partner A, of 10, 50, 100, 500 and 100 €
- create a reconciliation model (make sure it's the only one active for testing), with
>>> "invoice matching" selected
>>> "payment tolerance" disabled
>>> "partner should be set" enabled
>>> "same currency" enabled
>>> "auto-validate" disabled

Try to reconcile your statement. The reconciliation model associates your statement line to the 5 invoices, showing a partial match of 30 for the line of 100€, as only 30€ remain after matching 10 and 50. The following lines (500 and 100) are useless in the reconciliation and confusing for the user. They shouldn't be there.

After this commit, no useless line will be proposed anymore. In our example, only lines 10, 50 and 100 will be proposed.

Task 2652915

Part-of: odoo/odoo#77801
2021-10-05 15:41:03 +00:00
oco-odoo fc1a860b3e [IMP] account: better default reconciliation models
Task 2652915

Part-of: odoo/odoo#77801
2021-10-05 15:41:03 +00:00
william-andre c03924bfbb [FIX] account: manage multiple ids in _is_end_of_seq_chain
`_deduce_sequence_number_reset` should be used on maximum one record.
That function is called from `_get_sequence_format_param` in
`_is_end_of_seq_chain` but that function was possibly calling it on
multiple ids.

https://runbot.odoo.com/runbot/build/10315612

closes odoo/odoo#77811

X-original-commit: 10b880ae999643a4e3e9328d96196a19b0cf7ac6
Signed-off-by: oco-odoo <oco-odoo@users.noreply.github.com>
Signed-off-by: William André (wan) <wan@odoo.com>
2021-10-05 14:16:50 +00:00
Nicolas (vin) 9812d135af [ADD] Added VAT report for Italy and simplify tax templates
The Italian VAT report is needed to help Italian customers fill in
their VAT report.

Task id #2079462

X-original-commit: 570afc9f237ce6048bd412dd6f3cd7ad38ffb17a
[ADD] Added VAT report for Italy and simplify tax templates

The Italian VAT report is needed to help Italian customers fill in
their VAT report.

Task id #2079462

closes odoo/odoo#77565

X-original-commit: 616839df835283b5d682323cf96bbae579d3900a
Related: odoo/enterprise#21330
Signed-off-by: Florian Gilbert <FlorianGilbert@users.noreply.github.com>
Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
2021-10-05 07:27:20 +00:00
Guillaume (guva) 5490d4eb94 [FIX] accounting: have the right order for bank statement
Steps to reproduce:

- Go to Accounting -> Cash Registers
- Create a first statement named E, add a line with amount 100,
  set the Ending Balance (balance_end) to 100.
- Create a second statement named H, add a line with amount 50,
  set the Ending Balance (balance_end) to 150.
- Create a third statement named C, add a line with amount 1,
  set the Ending Balance (balance_end) to 151.
- Create a last statement named as you want.

Issue:

The Starting Balance of the last statement is compute from the
Ending Balance of statement H instead of statement C.

Cause:

Because of the _order = 'date desc, name desc, id desc', if several
statements have the same date, the name is taking into account to
classify the statements, which cause issue because the name doesn't
always reflect the chronological order of creation.

Solution:

Change the order to 'date desc, id desc' when we get the previous
statement.

opw-2635092

closes odoo/odoo#77757

X-original-commit: 8a9982856318068f64e5bbdbe2c120e8c6d52097
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
Signed-off-by: guva-odoo <guva-odoo@users.noreply.github.com>
2021-10-05 06:11:07 +00:00
Akim Juillerat 18e805d0e6 [FIX] account: usage of self in loop of payment register compute
closes odoo/odoo#77699

X-original-commit: 7936736f208cd7483ae8b9a508cf7387cd504b83
Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
Signed-off-by: Xavier Morel (xmo) <xmo@odoo.com>
2021-10-04 14:12:19 +00:00
oco-odoo 80e8f11796 [IMP] account: forbid creating multiple foreign VAT fiscal positions for the same region
Having the same VAT fiscal position for the same region multiple times doesn't make sense and is not supported by the report enfinge. We should prevent that.

closes odoo/odoo#77663

X-original-commit: d9dfeeb498dab359df52db87ff601d68fcf0ad7c
Signed-off-by: Quentin De Paoli (qdp) <qdp@openerp.com>
2021-10-04 09:16:25 +00:00
oco-odoo e4f9859722 [IMP] account: improve fiscal positions' form view
The 'Country Group' field should be displayed under the 'foreign VAT' one, so that it its grouped together with 'Country' and 'Federal states'.

X-original-commit: 302586c6b35825e19945b92faa48ccc892179ea6
Part-of: odoo/odoo#77663
2021-10-04 09:16:25 +00:00
oco-odoo dfce5361a0 [IMP] account: add preceding_subtotal as optional field in tax groups' tree view
For usability.

closes odoo/odoo#77662

X-original-commit: 360ed18185a420eaccfa1c47aaeee931c7f1fa55
Signed-off-by: Quentin De Paoli (qdp) <qdp@openerp.com>
Signed-off-by: oco-odoo <oco-odoo@users.noreply.github.com>
2021-10-04 07:57:18 +00:00
oco-odoo ba126f6af6 [IMP] account: add debug menu to see tax groups
No menu allowed viewing all tax groups at once before. With the new subtotals features, it could become painful for the user if he wanted to change the groups' sequence in order reorder subtotals on his invoices (he had to change the sequence manually on each group, accessing their form view through taxes using them). It is now possible in the tree view opened by our new menu, with the sequence widget.

X-original-commit: 708899fc0e1a793f29884d82b34ba6c492461737
Part-of: odoo/odoo#77662
2021-10-04 07:57:18 +00:00
b63ee52552 [FIX] *: remove scss 'extend' from dropdown components
This commit removes all the 'extend' initially introduced to avoid code
repetition and ensure visual consistency across Bootstrap and Owl dropdowns.

Despite achieving the desired results, using 'extend' in this context
was seriously impacting the bundle generation time, probably due to an
underestimated amount of Apps' legacy-code applied on these elements.

In order to achieve the same results, the chosen strategy is to add
Bootstrap default classes directly into Owl dropdowns.
Also, it moves code related to bootstrap dropdown in 'webclient.scss',
leaving 'core/dropdown/dropdown.scss' for Owl code only.

Due to the discrepancies between Bootstrap and Owl html
structure, the '.dropdown-item' class could not have been added
directly to Owl's '.o_dropdown_item' itself, without refactoring
the Dropdown component structure.

// ==== Bootstrap 4.6 default Structure ================================
<div class="dropdown-menu">
  <button class="dropdown-item" type="button">Action</button>
  <a class="dropdown-item" href="#">Another action</a>
</div>

// ==== OWL default Structure before this commit =======================
<ul class="o_dropdown_menu">
  <li class="o_dropdown_item">
     <span>Action</span>
  </li>
  <li class="o_dropdown_item">
     <a href="#">Another action</a>
  </li>
</ul>

// ==== OWL Structure after this commit ================================
<div class="o-dropdown--menu dropdown-menu">
  <span class="dropdown-item">Action</span>
  <a class="dropdown-item" href="#">Another action</a>
</div>

// ==== web.assets_backend.css Bundle Generation Comparison ============
With all modules installed (enterprise edition over runbot):
Before this commit, bundle took ~2.5s and ~4s to generate and weighted ~322kB (~2.5MB uncompressed)
After this commit, it takes between ~1.2s and ~1.6s and weights ~257kB (~1.6MB uncompressed)

closes odoo/odoo#77649

X-original-commit: 84715436d87bb05b421bc9ccaacda67d07571690
Related: odoo/enterprise#21370
Signed-off-by: Géry Debongnie (ged) <ged@openerp.com>
Co-authored-by: Stefano Rigano <sri@odoo.com>
Co-authored-by: François Georis <fge@odoo.com>
Co-authored-by: Bruno Boi <boi@odoo.com>
2021-10-04 07:57:00 +00:00
Paolo (pgi) 5121385772 [FIX] account: Fixing AccountTestInvoicingCommon's setup_armageddon_tax
Armageddon tax being created should include mandatory country_id,
which should be the fiscal country of the test company.

closes odoo/odoo#77295

Related: odoo/enterprise#21208
Signed-off-by: Quentin De Paoli (qdp) <qdp@openerp.com>
2021-10-01 12:40:55 +00:00
Paolo (pgi) b248adeaa4 [FIX] account: Fixing AccountTestInvoicingCommon
Default parameters should be None instead of empty dict {} or list []
because such types are mutable.

See: https://docs.python-guide.org/writing/gotchas/
Part-of: odoo/odoo#77295
2021-10-01 12:40:53 +00:00
Nicolas (vin) eab2a5ce54 [IMP] account: hide journals without payment method line
When registering/creating payments, filter out from the selection
the journals that do not have any relevant payment method lines.

Also, always show payment method lines even when there are only
one of them.

closes odoo/odoo#74741

Related: odoo/upgrade#2861
Signed-off-by: Quentin De Paoli (qdp) <qdp@openerp.com>
2021-09-30 18:27:49 +00:00
wan 57e714d8d1 [FIX] account: empty string is an empty sequence
The empty string, the forward slash `/` and NULL are all to be
considered as without a sequence set on `account.move`.

While this is just true, it was detected because of non deterministic
bugs at the end of the month because the tax closing move was
explicitly set to an empty string on version 14.3 and higher.
See: https://github.com/odoo/enterprise/commit/4641825daa0ed3b8e407fb3817c582cb541e88a4
Most of the tests posting an entry in the MISC journal could then
randomly fail on the last day of the month.

closes odoo/odoo#77532

X-original-commit: 9ed77eb3eee660a77a90c231258b69968e3b8df2
Signed-off-by: Quentin De Paoli (qdp) <qdp@openerp.com>
Signed-off-by: William André (wan) <wan@odoo.com>
2021-09-30 15:57:55 +00:00
Nicolas Bayet 4813f42997 [IMP] mail,*: replace jinja with qweb
Jinja as a templating engine was problematic in differents respect:
- introduce external dependency to Odoo (less controll)
- add another templating mechanism in the stack
- specific feature in qweb cannot be reused
- difficulty in rendering easily editable templates
- more knowledge required with no betterment

By replacing jinja with qweb we can now build tools to edit a qweb
that will work with the previously jinja encoded document
(essentially `mail.template` records).

There is a catch however. Some email fields (eg. email_to) used jinja
syntax for rendering dynamic variables (ie. ${object.something} and
${object.something_that_should_not_be_escaped | safe}).

We still want user to use dynamic variables for some char fields (eg.
subject, from, to, ...). We made a new rendering engine called
"inline_template" that will render an expression enclosed by `{{` and
`}}`.

To be able to edit the templates from the backend interface, a
plugin to the Odoo editor has been made for seamlessly edit the
document.

This qweb plugin includes:
- make dynamic variables (eg. `<t t-out="variable"/>`) not editable
  (for preventing the user to shoot himself in the foot)
- group and hide related logical branching (ie. t-if, t-elif, and t-else)
  in order to see only one at once
- a floating select input to switch visibility of a particular logical
  branching

Task-27033

X-original-commit: odoo/odoo@68182baff4
Part-of: odoo/odoo#77377
2021-09-28 23:42:54 +00:00
Swapnesh Shah 81d26dcee6 [FIX] account: disable aml creation from kanban
Steps:
- Go to Journal Items
- Switch to Kanban View
- Click on create

Issue:
- Traeback due to unknow currency

Fix:
Journal Items are not created individually so we have disabled
`Create` button in Kanban view.

closes odoo/odoo#77262

Fixes: odoo#76543
X-original-commit: fa29cd974a9d024349e937b547abe5a6ca522c6d
Signed-off-by: Florian Gilbert <FlorianGilbert@users.noreply.github.com>
Signed-off-by: William André (wan) <wan@odoo.com>
2021-09-28 09:29:14 +00:00
oco-odoo 8873e2015f [IMP] account: make use of fiscal positions in write-offs created by reconciliation models
Before, the taxes assigned by the reconciliation models in their write-offs weren't mapped by fiscal positions. This could cause confusion, and essentially required the user to always fix by hand the cases that weren't matched.

Task 2645280

closes odoo/odoo#77204

X-original-commit: e75184459a7d47df86aa72efa36c06462d7ee9ea
Related: odoo/enterprise#21187
Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
Signed-off-by: oco-odoo <oco-odoo@users.noreply.github.com>
2021-09-27 16:56:42 +00:00
oco-odoo 8b51e483ae [FIX] account: fix outdated docstring
X-original-commit: 26ec76ce8a4759ff7006d58f609e64bf0fbda410
Part-of: odoo/odoo#77112
2021-09-27 16:56:34 +00:00
qdp-odoo 65dec306b9 [FIX] account: usability fix when no partner and journal set
when an account.payment object had no partner and no journal, the computation of is_internal_transfer was wrongly computed as True... and the information banner was displayed accordingly

closes odoo/odoo#77122

Signed-off-by: Quentin De Paoli (qdp) <qdp@openerp.com>
2021-09-24 15:49:58 +00:00
qdp-odoo bb61168f7e [FIX] account: prevent crash in account.payment
when removing the bank in an account.payment, the method _get_available_payment_method_lines() was called on an empty recordset which wasn't supported.

Part-of: odoo/odoo#77122
2021-09-24 15:49:57 +00:00
oco-odoo 46ab490c5d [FIX] account: fix wrong call to super()
closes odoo/odoo#76898

Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
2021-09-24 14:00:00 +00:00
Swapnesh Shah 37d1eba7ad [FIX] account: remove upgrade_boolean from community module
Module `account_check_printing` exist on community edition so
It doesn't makes sense to apply `upgrade_boolean` widget on that.

However, It is necessary to have supported modules installed to
use Check Layout.

closes odoo/odoo#77145

X-original-commit: adc24d9082933f801f972fa93e1866be194c8b7a
Signed-off-by: Florian Gilbert <FlorianGilbert@users.noreply.github.com>
2021-09-24 12:35:13 +00:00
jbw 631440e567 [FIX] account: fix 'upload bill tour' bill layout
- add outer shadow to bill in wizard preview
- move address block to right in generated pdf, same as in wizard preview
- set invoice date & due date on one line in pdf, same as in wizard preview

closes odoo/odoo#77093

Task: 2581377
X-original-commit: ecf2bba66782cd8b2455bf656cdf2a41fafecf89
Signed-off-by: Quentin De Paoli (qdp) <qdp@openerp.com>
Signed-off-by: jbw-odoo <jbw-odoo@users.noreply.github.com>
2021-09-24 11:08:44 +00:00
dbkosky 516c414683 [FIX] account: typo, change active to activate
closes odoo/odoo#76904

Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
2021-09-23 11:25:53 +00:00
Goffin Simon 9550789604 [FIX] account, mail: Using alias with journals in multi comapnies
Steps to reproduce the bug:

- Let's consider two companies A, B
- Let's consider two contact with the same email E, C1 in A and  C2 in B
- Let's create an alias AL for the vendor bill journal of B
- Send a vendor bill VB from E to AL

Bug:

A new bill is created in B with C1 as partner instead of C2
So an access error was raised when trying to open the bill in company B

opw:2495870

closes odoo/odoo#76963

X-original-commit: 1a58be583629af80af00f288dc5925c3940be1ef
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2021-09-22 13:47:08 +00:00
william-andre 33ae8b76f5 [IMP] account: allow batch deletion of account.sequence.mixin
In order to prevent holes in the sequence, a constraint is checking that
only the last number of the chain is removed.

This commit extends that to a batch of records by checking that:
* the last number of the sequence is part of the batch
* the batch is sequential (there are no holes in it)

closes odoo/odoo#76870

X-original-commit: 7883900e3b615c632dab2b02c792f6d8c1045a15
Signed-off-by: oco-odoo <oco-odoo@users.noreply.github.com>
2021-09-21 11:09:57 +00:00