Commit Graph
109 Commits
Author SHA1 Message Date
Martin Trigaux 85423d20b2 [FIX] account: partially revert 3754280a
The changes should not have been merged in stable.
Users installing the account module before 3754280a had a not null constraint
on the field company_id.

After updating the code, the field is still required but has no default value.

If a chart of account is installed after updating the code, it would fail.

opw-1867358
2018-07-20 16:43:42 +02:00
qdp-odoo 61fe7a7820 [FIX] account: allow switching from CoA if empty moves exists
This is needed in case we open the Chart of Account step from the configuration bar, as it will silently create the opening journal entry
2018-04-24 09:21:01 +02:00
mreficent 3754280a05 [FIX] account: don't require a company in tax_templates
We want to force the tax template to be blank always, because multiple companies can potentially use this template to create taxes. We want consistency company-wise.
2018-04-04 16:16:34 +02:00
Nicolas Lempereur 87c09b8ebc [FIX] account: false complete_tax_set tax default
When setting a chart of account on a company, we have default taxes from
the default chart of account different from chosen one.

But if a chart of account is chosen, it should override them in the
onchange_chart_template_id function. This works as expected for a
truthy complete_tax_set chart of account template, but not for a falsy
complete_tax_set chart of account template.

The complete_tax_set indicates that we don't want to set default taxes
and the user should do it or modify the given tax rates himself.

opw-1824751
closes #23655
2018-03-15 09:52:13 +01:00
Christophe Simonis 4b43803dc6 [MERGE] forward port branch saas-16 up to e2ae51c4b0 2018-02-09 15:02:31 +01:00
Christophe Simonis e2ae51c4b0 [MERGE] forward port branch saas-15 up to 6d0f63ec4e 2018-02-09 12:41:15 +01:00
Christophe Simonis 9b2d3b19a6 [MERGE] forward port branch 10.0 up to df3fb9f85a 2018-02-09 12:39:43 +01:00
mreficent aac8f9730e [FIX] base: on_change_country() on res.company should return an ID
Previously, the return value was sometimes an int and sometimes a browse record.
Was PR #22810. Courtesy of Miquel Raïch (Eficent)
2018-02-09 09:53:57 +01:00
Christophe Simonis 6e25eb9b05 [MERGE] forward port branch saas-16 up to 4c410ee6a1 2018-01-09 17:03:07 +01:00
Christophe Simonis 4c410ee6a1 [MERGE] forward port branch saas-15 up to 38b201abce 2018-01-09 16:30:50 +01:00
Christophe Simonis e671cdcc44 [MERGE] forward port branch 10.0 up to 849d8ffd21 2018-01-09 15:12:51 +01:00
David Arnold ad2d34cf33 [FIX] account: ensure chart template translation in company's lang
Before this commit, in the event that the admin user has set the language
to english, but the COA's target company had a different language,
the admin user's language had been taken instead of the copany's one
for the translation of journals and other coa intialization stuff.

This is wrong as the CoA is more connected to the company, than to the
user, which could be a functional support user that just happens to prefer
the english version over the local one.

Now, we ensure in two neuralgic places, that the company's language is passed
to the context and therefore picked up by the translation's GetTextAlias.

Signed-off-by: David Arnold <dar@xoe.solutions>
2018-01-03 11:43:50 +01:00
Christophe Simonis f96a797fe6 [MERGE] forward port branch saas-16 up to b8540eefe3 2017-12-06 11:59:38 +01:00
Christophe Simonis a8d01cbf4e [MERGE] forward port branch saas-15 up to a447da75fd 2017-12-04 20:12:19 +01:00
Christophe Simonis 426e269c22 [MERGE] forward port branch 10.0 up to 067a241ea8 2017-12-04 16:24:24 +01:00
Luc De Meyer ab52c636c3 [FIX] account: use proper return format for default_get
default_get expects ids, not recordset (e.g. called by webclient)

Closes #21358
2017-12-04 10:22:35 +01:00
Christophe Simonis 42264d8dcb [MERGE] forward port branch saas-16 up to 5d7ad2b16c 2017-11-30 18:43:08 +01:00
Christophe Simonis ab084d580f [MERGE] forward port branch saas-15 up to 98539336a5 2017-11-30 15:27:59 +01:00
Nicolas Martinelli a9ede7fdfa [FIX] account: default taxes
Use `ir.default` for default taxes. Stop using `ir.config_parameter`.

Fixes #18943
opw-778010
2017-11-30 12:15:48 +01:00
Christophe Simonis f0a1bc81eb [MERGE] forward port branch 10.0 up to f4a54d7f66 2017-11-20 18:56:01 +01:00
Christophe Simonis f4a54d7f66 [MERGE] forward port branch 9.0 up to bab597bb47 2017-11-20 18:23:37 +01:00
Laurent Smet 9785f8bbed [FIX] account: fix migrate_tags_on_taxes not working on multi-company
-opw: see PR https://github.com/odoo/odoo/pull/20792
2017-11-16 09:11:03 +01:00
Andrew Latham 5aebc22722 [FIX] account: correct English mistakes
From #20652 taking visible strings to 11.0
2017-11-03 09:18:56 +01:00
Christophe Simonis 8f1e2044cd [MERGE] forward port branch saas-16 up to 810b6aa760 2017-10-31 16:29:07 +01:00
Christophe Simonis 810b6aa760 [MERGE] forward port branch saas-15 up to d1fcca1504 2017-10-31 15:25:01 +01:00
Christophe Simonis a0157f104f [MERGE] forward port branch 10.0 up to dcce040a63 2017-10-31 12:07:15 +01:00
Christophe Simonis dcce040a63 [MERGE] forward port branch 9.0 up to f41690538d 2017-10-31 11:47:35 +01:00
Laurent Smet c44024b50b [FIX] account, l10n_*: preserve existing tags on upgrade
Taxes tags for some localization have been rewrote in order to improve the taxes report.
However, these changes delete the existing account.tags on stable version.

These "[l10n_*] one tag per grid in tax reports" should target master instead of 9.0.

-opw: 777464
2017-10-27 13:54:31 +02:00
pro-odoo 87560ec8ec [FIX] account: show default taxes in settings
Upon generation of a CoA from templates, taxes are created by default (lowest sequence) but that wasn't reflected in the settings. Was PR#19802
2017-09-29 16:35:47 +02:00
qdp-odoo 0267b0ac50 [FIX] account: generate accounts with group_id set 2017-09-21 11:45:19 +02:00
qsm-odoo 09c35696a3 [FIX] *: dashboards automatic colors
* account, hr, hr_recruitment, maintenance, mrp, sales_team, stock

Adaptation of https://github.com/odoo/odoo/commit/a79d83e436e5e965d59663d4a06a0f8a62d8f694 for saas-18 new colors.

Also change back all color defaults to 0 instead of 1 (see
mentioned commit: they were changed from 0 to 1 as in saas-16
the color was applied to kanban headers which had to be gray
(the old color 1) by default).

Also add default violet color for 'Customer Invoices' and 'Vendor Bills'
dashboards.
2017-09-20 12:32:48 +02:00
Cédric Snauwaert 09189fa809 [IMP] l10n_de: localization package improved
* CoA up to date
* Taxes up to date
* SKR03 installed by default but users can easily switch to SKR04 while no accounting entries exists for the company
* removed unneeded things
* set tags accordingly on accounts and taxes for the reports to work (new reports in enterprise)

Was task 31826. Was PR #17447. Discussion related on #18571
2017-09-12 17:52:47 +02:00
Olivier Colson 2d1b8e9f34 [IMP] account: new setup bar
Add a setup bar on account's dashboard, so that the user can more easily enter the initial data of his Odoo installation, following the steps that are proposed to him.

Was PR #16864
Was task 32119
2017-08-31 15:58:22 +02:00
Raphael Collet 60d9f6fef9 [ADD] base: model ir.default to store user-defined defaults 2017-08-28 09:53:23 +02:00
Hareshkumar Shyara bc1b452159 [IMP] account: improve usability of Cash Basis Taxes
- Replace 'Use Cash Basis' checkbox by 'Tax Due' having two radio buttons,
    - Based on Invoice (default)
    - Based on Payment
- "Tax received account" display only when we select "Based on Payment"
- Changed the field name 'use_cash_basis' into 'tax_exigibility'.

Was PR #17326
2017-08-25 11:21:31 +02:00
Christophe Simonis 017ee5eab3 [MERGE] forward port branch saas-17 up to 877e709871 2017-08-24 13:17:53 +02:00
Olivier Dony 695716efb0 [FIX] P3: remove pycompat.{keys,items,values} helpers
Now that we're closer to switching to P3 for good, these helpers have
outlived their usefulness, and mostly add noise.

All remaining dict.iter*() or dict.view*() must be converted to the
normal keys(), values() or items() calls.

Whenever the result is likely to be used for more than the scope of a
loop, or when the dict needs to be modified during iteration, the calls
must be wrapped in a ``list()``, to protect the new P3 semantics.
Those cases are very exceptional.

Also removed some dead code or improved the API to remove unnecessary
conversions.
2017-08-20 23:25:54 +02:00
HIRAL BHAVSAR 4acec418ce [IMP] account: improve settings
* [IMP] account, account_accountant: Move 'tax_cash_basis_journal_id' field from 'account_accountant' to 'account' module.

* [IMP] account: Few improvements in accounting settings,
    - Set 'Invoicing' section as a last section.
    - Add checkbox 'Cash Basis' in settings and make it company dependent and add multi company's icon to it.
    - Disable the 'Tax Cash Basis Journal' field if 'Cash Basis' not active. Also add tooltip on 'Cash Basis'.
    - Visible/Invisible 'Use Cash Basis' field in 'Taxes' form view based on 'Cash Basis' settings from accounting settings.
    - Don't allow untick 'Cash Basis' settings if there are taxes using the configuration.
    - When any CoA is installed which is creating taxes with configuration 'Use Cash Basis' set then make the 'Cash Basis' option in accounting settings checked by default.

Was PR #16516
2017-08-09 10:45:57 +02:00
Mehta Kinjal 41d806eebf [IMP] account: Add stat button on taxes to archive them
+ set some taxes inactive for l10n_be

Was PR #18130
2017-08-09 10:19:45 +02:00
Mehul Patel 64df882627 [IMP] account_check_printing: Disable Check payments on Cash journals import
Purpose
=======

When generating `Cash` bank journal on CoA import, it doesn't makes sense to have the `Check` payment method enabled by default

Specification
=============

When system automatically creates journals of bank and cash type when CoA is being installed,
1) type = "Bank"
     - Manual -> Checked
     - Check --> Checked
2) type = "Cash"
     - Manual -> Checked
     - Check --> Unchecked
2017-07-17 10:04:19 +02:00
qdp-odoo 3073bf0f54 [IMP] account: allow to switch accounting packages (CoA...)
We can now select a new localization module in place of the existing one, if no accounting has been done yet.

This allows to set a default CoA for Germany and China, by choosing arbitrary one of the existing localization package at the installation since they can directly switch if needed.

Was PR #16605.
2017-07-13 17:01:04 +02:00
qdp-odoo 5967600296 [IMP] account: implement account.account hierarchies
This information will be used by account.report to render accounts in hierarchies.

Was PR #17367
2017-06-29 17:05:19 +02:00
Yannick Tivisse 2132178f1f [REF] base: Remove some fields on ir.actions.todo
All our ir.actions.todo records are automatic.
2017-06-19 17:37:38 +02:00
xmo-odoo 6659d5a7d2 [FIX] P3: metaclasses handling
* cross-version metaclass spec
* more formally deprecate browse_record and browse_null since they
  were using metaclasses anyway
* update docstrings referencing the latter
2017-05-11 15:25:36 +02:00
xmo-odoo fffaf735f5 [FIX] P3: list -> iterable builtins (#16811)
In Python 3:

* various builtins and dict methods were changed to return
  view/iterable objects rather than lists
* and the separate Python 2 view/iterable builtins and methods were
  removed altogether

This is problematic when using these items as list (which the happens
repeatedly in Odoo), but more viciously when iterating *multiple times*
over them (which also happens, which I've messed up multiple times while
writing this, and which is a pain to debug even when you've just created
the issue).

Convert all code using these to semantics-matching cross-version
helper functions to get the LCD behaviour between P2 and P3, and
forbid the builtins via lint.

issue #8530
2017-05-10 09:39:55 +02:00
qdp-odoo 3bb774d6de [IMP] account: add a default 'cash basis tax journal' upon chart template installation.
This is probably needed by all countries that use caseh basis taxes, and will save them the journal creation + save of the settings.
2017-05-03 16:59:01 +02:00
qdp-odoo a78389546b [FIX] account: fix consistency for fiscal positions and reconcile model with their respective templates.
- Some fields were simply missing on templates, making impossible to give them a value on chart template installation.
- Added a real link between account.reconcile.model.template and its chart template instead of using account_id.chart_template_id
- Added tests for checking the consistency of those objects in the future.
2017-05-02 10:12:04 +02:00
Lucas Perais (lpe) 446eae3ba6 [FIX] account: tax_template: tax template should expect a account.template as its cash_basis_account 2017-02-22 15:32:19 +01:00
qdp-odoo 45d338afe9 [FIX] l10n_jp: fix installation crash (at the second install)
* The module was not loading the fiscal position templates before executing the template generation.
* Also, as reported in #15384, at the second installation it was crashing because of a missing xml id (which is not supported currently). This last bug was fixed by giving specific xml_ids instead of skipping the data.

This reverts commit 929d983575.
2017-02-15 17:20:56 +01:00
Goffin Simon 929d983575 [FIX] account: create_record_with_xmlid
In some cases, the records have no xml_id like

in module l10n_jp, the way the account.fiscal.position.tax.template
are declared in account.fiscal.position.template.csv doesn't set
an xml_id for these records. So when using, the function create_record_with_xmlid
it raised an error if the record has no xml_id because it tried to concate
a string with a boolean with "str(company.id)+'_'+template_xmlid.name".

Fixes: #15384

opw:707704
2017-02-15 15:21:35 +01:00