25 Commits
Author SHA1 Message Date
moerradi fcb8af61b1 [FIX] hr_expense: Remove analytic distribution from printed expense reports
This commit addresses an issue introduced after the Analytic
distributions changes in v17 where printing expense reports with
cross-analytic distribution raises a traceback.

Given that analytic distributions offer limited value on printed expense
reports and considering that no other printed reports in Odoo currently
display the analytic distribution, they have been removed.

task-3722135

closes odoo/odoo#153569

Signed-off-by: Habib Ayob (ayh) <ayh@odoo.com>
2024-02-16 12:12:46 +00:00
moerradi 284687f9de [FIX] account: Payment terms labels not displaying correctly
This commit addresses an issue where, upon application to an invoice,
the Receivables, while accurate in terms of Amounts and Due Dates,
have incorrect labels.
The root cause of this problem was identified in the compute_name method
 of the account.move.line model. The modifications in this commit
rectify the compute_name method to ensure that payment terms labels are
computed correctly.

task-3636484

closes odoo/odoo#153364

X-original-commit: 59c0350b55b11321ba49e1ae4124eb5828d5f665
Signed-off-by: William André (wan) <wan@odoo.com>
2024-02-09 11:57:34 +00:00
moerradi 586f75687d [ADD] l10n_it_edi_website_sale: Add 'Codice Fiscale' in checkout form
Implemented 'Codice Fiscale' field in checkout address form, addressing
a key need for our Italian customers.

This enhancement:

- Adds an optional 'Codice Fiscale' field, available for both
individuals and companies.
- Ensures compliance with Italian e-invoice requirements.

This update is a step towards better adapting our system to specific
localization requirements, enhancing user experience in italy.

task-3623622

closes odoo/odoo#151484

X-original-commit: 79157cdc9396b1a84f70d455f211febbc505c66c
Signed-off-by: Josse Colpaert <jco@odoo.com>
Signed-off-by: Mohamed Erradi (moer) <moer@odoo.com>
2024-01-29 02:16:51 +00:00
moerradi bc838e8806 [FIX] account: Quantity Reset in Invoice Move Lines on Customer Change
Issue:
Invoice move lines' quantities reset to 1 on the second page when the
customer is changed after pagination.

Steps to Reproduce:
1. Create an invoice with over 40 move lines (requiring pagination).
2. Navigate to the second page of move lines and observe quantities.
3. Change the Partner (e.g., Azure -> My Company).
4. Save changes.
5. Notice that quantities on the second page are reset to 1.

Solution:
Identified the issue as stemming from the `flush_model` method, which is
called on creation and triggers re-computation. This process calls
the `compute` method for the quantity field, leading to an erroneous
reset of quantities to 1.
Modified the compute method to only reset values to 1 if they are
initially 0 or False, thereby resolving the issue of unwanted quantity
reset during pagination when customer details are updated.

opw-3483851

closes odoo/odoo#146136

X-original-commit: bb08a627528cd7402a16689c420f3013488e9a4d
Signed-off-by: de Wouters de Bouchout Jean-Benoît (jbw) <jbw@odoo.com>
Signed-off-by: Mohamed Erradi (moer) <moer@odoo.com>
2023-12-14 17:57:04 +00:00
moerradi fbdc298303 [IMP] account: make account tags unique
mplemented a uniqueness constraint for account tags name, applicability
and country_id to allow some localizations to use tags over account
codes.

Task-3497548

closes odoo/odoo#136639

Related: odoo/upgrade#5240
Signed-off-by: John Laterre (jol) <jol@odoo.com>
2023-10-23 20:07:19 +00:00
moerradi b79565785d [REF] l10n_es: Refactor mod 111, 115, 303 to use tax_tags engine
This commit replaces the outdated expressions and unsigned tags in mod 111, 115, and 303 with tax_tags expressions. This update follows the removal of the old technical decision after Reportalypse. A migration script is included to ensure proper conversion of accounting history. As a result, Spanish reports are more standardized and performance is significantly enhanced due to batching in the tax_tags engine.

closes odoo/odoo#120675

Task-id: 3126178
Related: odoo/enterprise#40777
Related: odoo/upgrade#4800
Signed-off-by: Olivier Colson (oco) <oco@odoo.com>
2023-10-13 21:11:46 +00:00
moerradi 4ede16f157 [IMP] hr_expense: Filter Payment Methods by Company + UI/UX Improvements
- Applies a domain filter to limit payment methods to those of the
running company in multi-company settings.
- Some wording adjustments for better clarity.
- UI tweak: Directly open the expense detail view when only one expense
is linked to an expense report, bypassing list view for better usability

Task-3500674

closes odoo/odoo#136503

Signed-off-by: William André (wan) <wan@odoo.com>
2023-10-09 13:25:27 +00:00
moerradi f5b4e61314 [FIX] l10n_latam_check: Prevent Multiple Uses of Same Third-Party Check
there is a loophole that allows the same third-party check to be used
for multiple outbound payments. This issue causes data inconsistencies
and disrupts the expected behavior of the financial workflow, thereby
undermining the integrity of the accounting processes.

In order to address it a  constraint was introduced on the
l10n_latam_check_id field. This constraint is triggered whenever
a payment transaction involves the use of 'out_third_party_checks' as
the payment method. The system now conducts a search to identify any
pre-existing payments that might be using the same third-party check.
If a duplicate use of a check is detected, a ValidationError is promptly
raised, effectively blocking the transaction.

Task-3503556

closes odoo/odoo#136202

X-original-commit: 462614774e0134b805a87e45c7327f7359736bee
Signed-off-by: de Wouters de Bouchout Jean-Benoît (jbw) <jbw@odoo.com>
Signed-off-by: Mohamed Erradi (moer) <moer@odoo.com>
2023-09-21 23:54:32 +00:00
moerradi c7a664b810 [IMP] account: Exclude Off Balance Accounts from tax repartition lines
This commit excludes off-balance accounts from appearing in tax
repartition lines.
Previously, off-balance accounts were included in the selection, which
was causing confusion and unnecessary clutter in the interface.

The need for this change was raised due to the observation
that off-balance accounts are never actually used in tax repartition
scenarios.
Including them only complicates the account selection process without
adding any functional value

closes odoo/odoo#136196

X-original-commit: 77871dd434a912fab41e6cec674c272fe37bcf1d
Signed-off-by: Brice Bartoletti (bib) <bib@odoo.com>
Signed-off-by: Mohamed Erradi (moer) <moer@odoo.com>
2023-09-21 23:54:31 +00:00
moerradi 360a658978 [ADD] account_bacs: Added UK BACS Direct Credit and Direct Debit
Implemented support for the BACS payment scheme as per the latest
technical specifications, enabling the processing of BACS Direct Credits
and Direct Debits. Included the mandatory requirement of a Service User
Number (SUN) for businesses conducting transactions via BACS.

closes odoo/odoo#135696

Task-id: 3326945
X-original-commit: 2e6aeffd7ae9116d3445aa53265919cc29afafc7
Related: odoo/enterprise#47487
Signed-off-by: Quentin De Paoli <qdp@odoo.com>
Signed-off-by: Mohamed Erradi (moer) <moer@odoo.com>
2023-09-18 22:17:11 +00:00
moerradi 7e8185ba20 [FIX] account: Resolve foreign key constraint failure on PML deletion
- Added ondelete='cascade' to account_payment_method_line's
field definition.
- Fixes the foreign key constraint failure during module uninstallation
by automatically deleting dependent records.

task-3326945

X-original-commit: 9c10cf4dc1da36a2ef826962887a6538d0c522a2
Part-of: odoo/odoo#135696
2023-09-18 22:17:11 +00:00
moerradi 6dba17d461 [FIX] account: Client Traceback on Payment Terms
Removed the `ListRenderer` overload in `payment_term_line_ids.js` to fix
an issue where trying to set `this.props.list.editedRecord` to null was
causing a stack trace error when navigating away from a Payment Term
lines.

The original intention was to prevent the discard of new records when
clicking outside of the list, especially when the user is not required
to edit something on the newly created record.

It has been replaced by an overload `X2ManyField` component making the
`AddInLine` method mark all the new records as `dirty` by calling the
`update` mehod on them with an empty object to prevent them from being
discarded.

closes odoo/odoo#132257

Task-id: 3460696
Signed-off-by: Habib Ayob (ayh) <ayh@odoo.com>
2023-09-08 13:45:32 +00:00
moerradi de368ba9b4 [FIX] account: Make generated follow-up reports accessible in menu
Resolved an issue where follow-up reports linked to a partner weren't
visible in the follow-up menu due to 'partner_rank' not incrementing
after a misc entry. The commit ensures the correct update of
'partner_rank', making all relevant reports accessible.

closes odoo/odoo#132082

Task-id: 3437930
X-original-commit: fd97480760f5f02c0b25fd39d86c4f0d3e36308e
Signed-off-by: Laurent Smet (las) <las@odoo.com>
Signed-off-by: Mohamed Erradi (moer) <moer@odoo.com>
2023-08-16 19:05:02 +02:00
moerradi ee578df21b [IMP] account: Exclude Off Balance Accounts from Account Mapping
Implemented domain exclusion to remove Off Balance Accounts from Account
Mapping in Belgian CoA. This decision was motivated by the rarity of use
of these accounts by our target audience, and their potentially
confusing placement at the top of the list due to their prefix '0'. Now,
the Account on Product and Account to use instead fields will not
display these seldom-used accounts, improving usability and efficiency.

closes odoo/odoo#129576

Task-id: 3431420
Signed-off-by: Brice Bartoletti (bib) <bib@odoo.com>
2023-08-03 19:31:18 +02:00
moerradi b528b3f6cc [IMP] website: Show "Edit in Website Builder" for terms and conditions
Prveiously the "Edit in Website Builder" button was not shown for terms
and conditions if website is installed, it was shown only if the
website_sale module was installed. This commit fixes that.

task-3342876

closes odoo/odoo#127735

X-original-commit: 079704a2a5ed42ed774318fd8520d108f17222bd
Related: odoo/upgrade#4912
Signed-off-by: Brice Bartoletti (bib) <bib@odoo.com>
2023-07-18 14:30:08 +02:00
moerradi d032664770 [FIX] l10n_es: Resolve Issue of Duplicate Tax Names
In the Spanish localization module l10n_es, duplicate tax names are
preventing the installation of demo data. This issue affects the
functionality and testing of the application for the Spanish locale.
This commit fixes it by renaming the duplicate tax names.

closes odoo/odoo#129942

Task-id: 3441003
X-original-commit: fae4a6189a02cae4cf17a28f9f2a013125a638c5
Signed-off-by: Brice Bartoletti (bib) <bib@odoo.com>
Signed-off-by: Mohamed Erradi (moer) <moer@odoo.com>
2023-07-27 20:32:39 +02:00
moerradi bb2b878d4d [IMP] l10n_de: merge SKR03 and SKR04
Refactor CoA modules and maintain separate tax and fiscal position data
- Combine multiple CoA modules into a single module for each country,
as support for multiple CoA support has been improved
- Keep tax declarations and fiscal position templates in separate files
for better organization and maintainability

closes odoo/odoo#116274

Task-id: 3180738
Related: odoo/upgrade#4529
Signed-off-by: Quentin De Paoli <qdp@odoo.com>
2023-07-07 10:52:21 +02:00
moerradi 838f764ef5 [FIX] l10n_in: Remove unwanted Indian fields from non-Indian companies
This commit removes the E-waybill tab in account.move for non-Indian
running companies. The E-waybill field is specific to Indian regulatory
requirements and is not applicable for companies operating outside of
India. By removing this tab, we provide a cleaner and more focused user
interface for our non-Indian users, enhancing their overall experience

closes odoo/odoo#127138

Task-id: 3208950
X-original-commit: 1a0b304a9ad006b54bec438fdc36319da21e08ec
Signed-off-by: Quentin De Paoli <qdp@odoo.com>
Signed-off-by: Mohamed Erradi (moer) <moer@odoo.com>
2023-07-04 14:02:22 +02:00
moerradi faaf07bbf6 [IMP] account: Reconciliation models UX
- Add group bys, columns, and filters to Bank Reconciliation models for better navigation and organization
- Trigger auto-validate cron on saving Reconciliation model with auto-validate enabled
- Restore pre-filled elements when creating Reconciliation model through bank reconciliation widget (V15.2 functionality)
- Remove text ellipsis from Reconciliation model buttons in bank reconciliation widget for better readability

closes odoo/odoo#122657

Task-id: 3253304
X-original-commit: 6d0ffce1390d9c73042e39ab637c4c88ccb0e711
Related: odoo/enterprise#41570
Signed-off-by: Laurent Smet <las@odoo.com>
Signed-off-by: Erradi Mohammed (moer) <moer@odoo.com>
2023-05-26 16:16:12 +02:00
moerradi 5881af92d8 [IMP] account: Enable saving bank account for new partners
This PR resolves an issue where it was impossible to save a bank account for a newly created partner (customer/vendor) without saving the partner details first. The solution implemented is to automatically save the partner when the user clicks on "add a bank account", thus ensuring a smoother user experience.

Problem Description:
When creating a new customer or vendor, users encountered difficulty when trying to add a bank account without saving the partner details first. The account holder field was required to save a bank account, but it didn't exist yet, creating a frustrating experience for users.

Solution Implemented:
We have implemented an auto-save feature for the partner when the user clicks on "add a bank account". This will force the save of the partner details before proceeding with the bank account addition, ensuring the account holder field exists and can be filled in.

closes odoo/odoo#120599

Task-id: 3266820
X-original-commit: d4defd079508e14b6a74c01a41868d3b57b2e0c0
Signed-off-by: William André (wan) <wan@odoo.com>
Signed-off-by: Erradi Mohammed (moer) <moer@odoo.com>
2023-05-05 00:39:50 +02:00
moerradi 56315dd6b9 [IMP] l10n_*: Update manifests to redirect to own documentation
Removing external links from localization manifests and redirect to our own documentation. Ensure that users can learn about our standard localization modules from a source of information that we have authorship on.

closes odoo/odoo#117005

Task-id: 3248632
Signed-off-by: Quentin De Paoli <qdp@odoo.com>
2023-04-12 16:33:11 +02:00
moerradi 87821818ee [REM] account: remove tax_audit field
the tax_audit field was introduced in v13 and it served the purpose of providing users with improved visibility regarding the impact of move lines on report lines. The computation of the sign for each move line when resolving tax grid amounts has now been simplified using the formula (tax_tag_invert * sign of the tag * balance). Consequently, the tax_audit field has become redundant and is no longer required.

closes odoo/odoo#114616

Task-id: 3196711
Related: odoo/upgrade#4442
Signed-off-by: Quentin De Paoli <qdp@odoo.com>
2023-03-21 18:56:01 +01:00
moerradi 49e2a5b995 [ADD] l10n_mz: add COA, taxes and tax report
Add chart of accounts, taxes and tax report for Mozambican localization

closes odoo/odoo#115710

Task-id: 3162293
X-original-commit: a794b29d84eefc91c037112b44293698c7db4d49
Related: odoo/enterprise#38348
Signed-off-by: Quentin De Paoli <qdp@odoo.com>
Signed-off-by: Erradi Mohammed (moer) <moer@odoo.com>
2023-03-18 02:14:39 +01:00
Mohammed Erradi (moer) 94d6e8b474 [FIX] l10n_ch: Correct export fiscal position for LI
The aim of this commit is to fix the export fiscal position for invoices between Switzerland and the Principality of Liechtenstein in the Swiss localization.

context:
This commit corrects the Swiss national fiscal position, in accordance with legislation that considers Switzerland and Liechtenstein to be a common fiscal territory of application for VAT.

Previous to this commit:
- When the use create an invoice with a customer from Liechtenstein, the correct VAT is not applied because transactions to Liechtenstein were considered as export transactions.

After this commit:
- When the use create an invoice with a customer from Liechtenstein, the correct VAT is applied because transactions to Liechtenstein are considered as domestic transactions.

closes odoo/odoo#111578

Task-id: 3151891
X-original-commit: 773ad35af4b4d6d8ec608875ded6b5f22ecad1dd
Signed-off-by: Erradi Mohammed (moer) <moer@odoo.com>
Signed-off-by: John Laterre (jol) <jol@odoo.com>
2023-02-01 14:38:18 +01:00
Mohammed Erradi (moer) 9a84fe3520 [FIX] l10n_id_efaktur: Fix option fields visibility in multi-company
The aim of this commit is to fix an issue where the settings fields for the Indonesian localization were visible in all companies of a database.

Context:
In a multi-company environment, a company may have its fiscal country set to Indonesia and have the Indonesian localization activated, but this should only affect the options shown in the accounting settings for that specific company.

Previous to this commit:
When a user activates the Indonesian localization, the settings fields for the localization would be visible in the accounting settings for all companies of the database.

After this commit:
The settings fields for the Indonesian localization will now only be visible in the accounting settings for the specific companies located in Indonesia.

closes odoo/odoo#111285

Task-id: 2854025
X-original-commit: 045e18a624e9261b8650c71cc9999126320648ff
Signed-off-by: Brice Bartoletti (bib) <bib@odoo.com>
2023-01-27 23:17:50 +01:00