Commit Graph
29 Commits
Author SHA1 Message Date
Ivan Yelizariev 2d8a80d574 [REM] account,l10n_*: delete dead code about transfer account
`_prepare_transfer_account_for_direct_creation` is not used since https://github.com/odoo/odoo/commit/04522f01e6fdbf82a657b32b312449fd7d756f79

closes odoo/odoo#79520

Signed-off-by: William André (wan) <wan@odoo.com>
2021-11-09 14:46:05 +00:00
oco-odoo 17610e8ca9 [IMP] account, account_edi, l10n_*, purchase, sale: Generalize the use of account_fiscal_country_id
Before, account_fiscal_country_id was only use for tax operations; and country_id was used for all the other accounting stuff. Now, with the new ability to use foreign tax reports (with foreign VAT fiscal positions), we can generalize the fiscal country, sot that it is the one that needs to be used for the whole accounting. Since foreign tax reports were not supported before, account_fiscal_country_id is already set on existing database as the country for the "main" accounting, so the impact of this change is small.

closes odoo/odoo#68349

Related: odoo/upgrade#2322
Related: odoo/enterprise#17299
Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
2021-04-01 12:09:20 +00:00
Adrien Widart 567f192d98 [REV] l10n_mx: prevent MX from printing receipts
PR #66910 has been created so the MX can print their receipts.
Eventually, this needs to be reverted since printing a receipt is
actually illegal.

closes odoo/odoo#67209

X-original-commit: 7e9261cacd9f6963dca517fe7b1f3de067af1366
Signed-off-by: Adrien Widart <adwid@users.noreply.github.com>
2021-03-04 10:33:08 +00:00
Adrien Widart 286e512ff2 [FIX] l10n_mx: allow MX to print receipts
To reproduce the error:
(Need MX configuration)
1. Go to Accounting > Customers > Receipts
2. Create a Receipt
3. Post and Print it

Error: An error message is displayed: "Only invoices could be printed."
However, MX should be allowed to print the receipts.

OPW-2456374

closes odoo/odoo#66954

X-original-commit: 0f0238c64cda308098eb5b3d30e3177cfcb4bab7
Signed-off-by: Adrien Widart <adwid@users.noreply.github.com>
2021-02-26 17:24:11 +00:00
Laurent Smet 6d03583a82 [FIX] account,l10n_: Restore journal liquidity account hook
The overrides in l10n_ modules are broken since 14.0 because the hook no longer exists.

closes odoo/odoo#61610

X-original-commit: 1fe852e032876f2f3212a43fc3115e49f4de618d
Signed-off-by: oco-odoo <oco-odoo@users.noreply.github.com>
Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
2020-11-10 16:55:31 +00:00
Victor Feyens 1b67affe7d [FIX] *: avoid direct references to countries
Ensure the code works fine even if countries are deleted.

Also consider "re"-created countries after deletion, by only considering
the country code, not the data reference.

This should reduce support requests related to deleted countries, and
ease the resolution of such problems by the users themselves.

TASK ID - 2368842

closes odoo/odoo#60558

X-original-commit: 037012bc4e2935eb00a7f353529bb7ec55066733
Related: odoo/enterprise#14347
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
2020-10-22 16:17:26 +00:00
Benjamin Frantzen (bfr) e2c6a37d32 [REF] l10n_mx_edi: Refactoring of l10n_mx_edi depending account_edi
closes odoo/odoo#52407

Task: 2247368
Related: odoo/enterprise#12226
Related: odoo/upgrade#1571
Signed-off-by: oco-odoo <oco-odoo@users.noreply.github.com>
2020-08-17 10:22:02 +00:00
Nicolas (vin) 41f119d532 [IMP] account: Misc. improvements
Miscellaneous changes aiming to improve the user experience in the accounting module,
mainly in the journal model and its form view.

Also aim to improve the bank account creation wizard.

Task ID: #2250349

closes odoo/odoo#54494

Related: odoo/upgrade#1546
Related: odoo/enterprise#11862
Signed-off-by: oco-odoo <oco-odoo@users.noreply.github.com>
2020-08-11 12:41:13 +00:00
Luis Torres cb787377b9 [IMP] l10n_mx: Completed data for Mexican banks
This module provide you a data from Mexican Bank data extracted
from `SAT Bank catalog
<http://www.sat.gob.mx/fichas_tematicas/buzon_tributario/Documents/catalogo_bancos.pdf>`_.

Additionally was added the following fields:
- ASM code in Banks: to identify banking institutions by ASM standard
- CLABE code in Bank Accounts: required to the sending and receiving
of domestic inter-bank electronic funds transfer.

closes odoo/odoo#35742

Signed-off-by: Josse Colpaert <jco@openerp.com>
2019-08-15 06:14:03 +00:00
Adrian Torres 4b38cc6590 [REM] *: calls to @api.multi
Multi is the default api for methods, it is not necessary to explicitly
decorate methods with it, adds clutter and most people use it because
they see that the rest of the code uses it.

Done with `find . -type f -name '*.py' | xargs sed -i '/@api.multi/d'`
2019-07-17 14:13:12 +02:00
Olivier Colson db21ef7578 [FIX] l10n_de, l10n_mx, l10n_nl: isolate account.tag creation by country
Before that, the specific account tags created in l10n modules were not only assigned when the company was in the right country.

closes odoo/odoo#29030
2018-11-26 13:17:10 +00:00
Christophe Simonis a12c4d284c [MERGE] forward port branch saas-11.4 up to a1b384d66b 2018-09-18 11:42:52 +02:00
Christophe Simonis a1b384d66b [MERGE] forward port branch saas-11.3 up to 2de573440e 2018-09-17 19:40:47 +02:00
Martin Trigaux a47f7ee0e4 [FIX] product: do not translate at code import
Defined as this, the label of the selection field were translated during code
import, when building the python model, not when a user access the field values
as it should (and is already the case thanks to the ORM).

Trying to translate a string when no user-context is available is not only
useless but may cause bug on services with multiple databases (e.g. a SaaS).

In a multi-worker environment, when the code is imported, the _ method will use
multiple scenarios to detect the language and get a cursor.

As we have no available cursor in the frame (method _get_cr from GettextAlias),
the fallback is made on the cursor of the request.
In a multi-worker environment, this could be a cursor linked to a database in
another language than English.
In such scenario, the selections would be translated in the language of the
other database instead of displaying it in English

opw-1881956
2018-09-14 11:20:38 +02:00
Toufik Benjaa 0c67985023 [FIX] l10n_de, l10n_mx, l10n_nl: bad command sent to ORM
When we get the existing tags to append them a new id, we don't get a
list of id but a list of tuple with one id, this only append if you have
more than one accounting of these country installed, as the first time
it will return an empty list. So the command sent to the ORM, is not
built correctly.

To fix this we just append commands '4' that will be append in a list.
2018-09-11 17:54:40 +02:00
Yanina (Vauxoo) 384f6a6254 [FIX] l10n_mx: bad function renaming in COA creation
_prepare_transfer_account had been renamed _get_default_bank_journals_data instead of _prepare_transfer_account_for_direct_creation, by mistake. The original renaming was made at https://github.com/odoo/odoo/commit/87f0d2eefb77bfc6a9a0fa7f7dcd1475c7c34639#diff-ce53c5491cb2c9ab3dbbd41ecabf594f
2018-08-21 10:28:08 +02:00
Olivier Colson 87f0d2eefb [REF] account, account_check_printing, payment, l10n_do, l10n_de, l10n_fr, l10n_nl, l10n_mx: chart templates installation: remove old useless wizards and move everything to account.chart.template
Was task 1858974
Was PR https://github.com/odoo/odoo/pull/25243
2018-08-07 17:11:08 +02:00
Laurent Smet 7a31a92afa [ADD] account, l10n_*: create transfer account based on prefix.
This commit changes the mechanism to get the transfer account.
As the bank/cash accounts, the transfer account is now created automatically based on
a prefix.

-task: https://www.odoo.com/web#id=35857&action=333&active_id=967&model=project.task&view_type=form&menu_id=4720
2018-05-23 15:43:39 +02:00
Christophe Simonis 66ca687324 [MERGE] forward port branch saas-17 up to ed901bedcb 2017-09-15 18:09:39 +02:00
Christophe Simonis ed901bedcb [MERGE] forward port branch saas-16 up to 80f916e8e0 2017-09-15 17:20:01 +02:00
Jose Suniaga [Vauxoo] 27edcaafd6 [FIX] l10n_mx: company in the journal cash basis configuration
When have more than one company, for all companies, the cash
basis journal  set in accounting configuration will be
always the related to first company.

This issue cause the followiong error trying to validate an
invoice for a company different to fisrt one:

'Cannot create moves for different companies.'

Because exist a 'cross-configuration' in the cash basis
journal.

The solution to this issue is include the company in domain
that does the search for cash basis journal.
2017-09-15 10:39:32 +02:00
Yannick Tivisse 781a03b2bc [IMP] res_config: Update file names, xmlids, class names according to guidelines
Now that we only have one model (res.config.settings). Uniformize everything according to the guidelines.
2017-09-01 13:03:18 +02:00
Deep Patel 898224f110 [IMP] web,account,...: Regroup settings, add a nav and search bar
Purpose
=======

Settings are often way too long and hard to scan and sometimes you don't know where to find the settings you're looking for.
By adding a left navigation, you can already have an overview of the settings, and switch easily between them.

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

- Add a search bar on all the apps that have settings which can search results from all the installed apps.
  (If i'm on sales settings,and I search anything then it shows results from sales settings and also shows
  all the other matching results from all the other apps such as, Inventory...etc) with app name.
- Able to activate feature from the current page results (no matter if the searched result is from another apps).
- Highlight searched word in results
- Delete the sheet, have a full white background
- Add left navigation bar on setting
- Left navigation bar fixed
- List displayed based on installed apps
- On right panel, by default display current app setting and change accordingly
- [Mobile] Left navigation bar displayed on top
- Add Breadcrumb on top of the page: have the name "Settings" + Save / discard CTA + Search
- Add General Settings on the nav bar
- remove "save this page..." notif in all settings
- Delete all recommanded apps section + all checkbox that install app should disappear:
	payroll: https://drive.google.com/a/odoo.com/file/d/0B1uIL9E_zXrrSkMzWVpuZ0ZoaFE/view?usp=drivesdk
	Events: https://drive.google.com/a/odoo.com/file/d/0B1uIL9E_zXrrYXlHMHd2NTM2blE/view?usp=drivesdk
	Manufacturing: Delete Repair - Quality Control - Maintenance - Product Lifecycle Management [LAP][ok]
	Timesheets: https://drive.google.com/a/odoo.com/file/d/0B1uIL9E_zXrrdFg5XzNydkd2TlU/view?usp=drivesdk
	project: https://drive.google.com/a/odoo.com/file/d/0B1uIL9E_zXrraWo3NE04TktwcTQ/view?usp=drivesdk
	inventory: https://drive.google.com/a/odoo.com/file/d/0B1uIL9E_zXrrQkRaVUR5ekFQYTQ/view?usp=drivesdk
	recruitment: https://drive.google.com/a/odoo.com/file/d/0B1uIL9E_zXrrbDdqLWQweF80UkE/view?usp=drivesdk
	purchase: https://drive.google.com/a/odoo.com/file/d/0B1uIL9E_zXrrRlAyUDBnb0trQWs/view?usp=drivesdk
	email marketing: https://drive.google.com/a/odoo.com/file/d/0B1uIL9E_zXrrOUZONjhvX2k3Y2s/view?usp=drivesdk
	expenses: https://drive.google.com/a/odoo.com/file/d/0B1uIL9E_zXrrR0JpN1ZpQmtxU3M/view?usp=drivesdk
	attendances: https://drive.google.com/a/odoo.com/file/d/0B1uIL9E_zXrralpjZ1VJclNpMWs/view?usp=drivesdk
- About duplicate settings:
	Docsaway: Delete from Sales + delete Default Print Provider
	Attributs & Variants: Delete from Purchases - Manufacturing
	Multi-currencies: delete from Sales
	Unit Of Measures: Delete from Purchase & Expenses
- Add a scroll bar on the left bar when there's too many apps
- Keep the navbar visible even when you search
- Move General Settings to the bottom of the list
- Update on Settings:
    - Accounting:
        - rename automatic rates
        - Anglo Saxon Account: Should be in technical feature
        - Place Accounting Reports section before Taxes section
    - CRM:
        - Phone Validation: Enforce international format becomes
        - Local Numbers: (2 radio buttons proposals) Add international prefix / No prefix
    - Fleet: typo " ... a new car if ..." + text is too long <br>
    - project: fix tooltip for colab pads
2017-09-01 13:02:54 +02:00
Yannick Tivisse a38a3e93c2 [MOV] *: Reorganize configuration files according to guidelines 2017-06-19 17:37:38 +02:00
Luis Torres 8bb9869812 [FIX] l10n_mx: set cash basis configuration in taxes.
Courtesy of Vauxoo. Was PR #17055
2017-05-23 11:35:50 +02:00
Laurent Smet 3b774ee329 [FIX] l10n_mx: fix bad reference to account.account skiping the mapping to templates
Hardcoded reference skips the mapping (company, template) -> account.account leading to key error.
2017-03-21 10:13:11 +01:00
Laurent Smet 450bdd95da [IMP] l10n_mx: add settings to install l10n_mx_edi 2017-01-05 17:39:38 +01:00
qdp-odoo 4f29b77e3d [MERGE] foward port of 10.0 up to revision 84a650e33a 2016-12-30 17:21:25 +01:00
Nhomar Hernandez 9a0e3a11db [IMP] l10n_mx: Completely refactored Mexican CoA Template. Courtesy of Vauxoo.
* Added accounts provided following the structure provided by the SAT
this accounts are only the minimal necessary ones, with the objective
to set the first easiest engagement to new users and tags will represent the actual information
from the document linked.

* The name of the tag is the concatenation of tag.code + tag.name, because the account.tag
model have not the code field.

Note: we will need more accounts but some of them for special operations
which are not basic at all, then it is better just propose the operational accounts
once we understand a proper closing process.

* Set the proper user-types on accounts in order to be able to use it with the official reports this CoA
for operational purpose.

* Added nature field and data in tags to allow set this value in electronic account report, and
set this value with data pre loaded, we did not use user.type for this due to the fact that the same user type can have different nature (if it grows for credit or debit), I do not know if this field brakes the stable rule we can discuse about that.

* Assign the account tags with in the Mexican CoA template installation, and with an onchange(account.code) when manually modifying/creating accounts.

Rationale: If the code of the accounts follows the pattern 111.00.00 or 111-00-00 then it will
set the tag 111.00 if the tag exists, if not then this will be ignored.

* Generate an account tag by each second level account in SAT catalog, and assign to the corresponding account.
2016-12-09 13:59:09 +01:00