| Availability |
Odoo Online
Odoo.sh
On Premise
|
| Odoo Apps Dependencies |
•
Invoicing (account)
• Discuss (mail) |
| Community Apps Dependencies | Show |
| Lines of code | 1491 |
| Technical Name |
l10n_mx_edi_advance |
| License | OPL-1 |
| Website | http://www.vauxoo.com |
| Versions | 19.0 |
EDI Advance Improvements for the Mexican Localization
This module allows managing advances in an easier way. With this module you can:
- Create advances from a payment difference or create an invoice using one invoice line with the advance product.
- See a notification when there are available advances.
- Add an advance to an invoice as an outstanding credit.
- Apply the corresponding credit note when you validate an invoice with advances.
How to generate an advance (anticipo)
- Manual invoice + payment: Create a customer invoice manually (using the product configured for advances). This invoice should contain only one line (quantity = 1), and the total must match the amount you receive. Then register its payment.
- Manual payment + generate after posting: Register a payment manually (e.g., from the Payments menu). Once posted, if there is an unreconciled remainder, you can use the option (button) to generate the advance.
- Payment of one or more invoices with overpayment: If the payment amount exceeds the total due on the selected invoices, in the Payment wizard select "Generate Advance". The system will reconcile the invoices and automatically create an advance invoice for the extra amount.
- Payment with overpayment (without selecting “Generate Advance”): Similar to the previous scenario, but if you choose not to select “Generate Advance,” you can still create the advance from the resulting payment later—provided there is an unreconciled remainder after reconciling the invoice(s).
Important: An advance will always be generated as long as there is a remainder in the payment, regardless of whether the customer has other open invoices. Therefore, if you prefer to apply the leftover to open invoices first, perform those reconciliations before generating the advance.
Configure
Create the account for advance operations. That account must be configured in the product "Application of advance" in this way:
The Income Account should be a Current Liabilities account, sub-account of "206 Anticipo de cliente" (206.XX.XX).
In accounting settings, assign the process that will be used to apply the advances on the invoices. Note: If you use process B, you need a Python tax with the following code on the invoice for the total amount: result = base_amount * 0.16
In the same accounting settings, assign the product "Application of advance" that will be used to mark a document as an advance.
In the same accounting settings, you can configure the Advances Journal for credit notes. This journal will be used when creating credit notes for advances. If left empty, the journal from the original invoice will be used.
If you do not want to automatically create an advance invoice from a payment, create a system parameter with the name "l10n_mx_edi_advance_avoid_advance_on_payment" and the value "True".
In the same Accounting settings, you can set the Default CFDI Usage for advance credit notes.
- If a value is selected, every credit note generated while applying an advance will use that Uso CFDI.
- If left empty, the credit note inherits the Uso CFDI from the original invoice.
Usage
Create an advance:
Option 1 (manual): Create and pay a customer invoice by selecting the product "Application of Advance" and setting the correct amount. The invoice must have only one line with quantity = 1, and the total must equal the amount received.
Option 2 (Automatically): From a payment or payment difference (overpayment). When a new payment is posted or if a payment difference exists, the system can automatically create an advance invoice for the outstanding credit if “Generate Advance” is selected in the wizard.
Advance application:
Once the sale is finalized and you have a customer invoice in draft:
When there are available advances, a notification is shown for that customer, allowing you to add/edit advances.
In the wizard, you can specify which advances to apply and how much of each one to use.
The UUID of the advance will be included in the CFDI origin, linking it to the invoice.
You can remove, edit, or add advances if needed while the invoice is still in draft.
Validate (sign) the invoice. A credit note is automatically created and reconciled with the invoice to apply the advance(s).
Validate (sign) the invoice. When you post the invoice, the module automatically creates the corresponding credit note, reconciles it with the invoice, and then schedules a one-shot cron to stamp the refund five minutes later.
- Why the delay?
The invoice must be stamped first so its UUID can be written in the CFDI Origin field of the credit note.
Opt-out: manual stamping instead of cron
If you prefer to stamp the credit note manually, follow these steps:
Create a system parameter
- Key: l10n_mx_edi_advance.avoid_refund_cron
- Value: Any Value
Enable the server action
Open the action "Advances: Send Credit Note for Stamping" and click Create contextual action. This will add it to the Action menu on every credit-note form.
Manual flow
After each credit note is generated, open the document and trigger the server action to send it to the PAC for stamping.
For more information, you can read the Guia de llenado Anexo20 (Apéndice 6) or the Use case of advances.
Bug Tracker
Bugs are tracked on GitLab Issues. In case of trouble, please check there if your issue has already been reported. If you spotted it first, help us smashing it by providing a detailed and welcomed feedback.
Credits
Contributors
- Nhomar Hernandez <nhomar@vauxoo.com> (Designer)
- Gabriela Mogollón <gmogollon@vauxoo.com> (Developer)
- Luis Torres <luis_t@vauxoo.com> (Developer)
Maintainer
Odoo Proprietary License v1.0 This software and associated files (the "Software") may only be used (executed, modified, executed after modifications) if you have purchased a valid license from the authors, typically via Odoo Apps, or if you have received a written agreement from the authors of the Software (see the COPYRIGHT file). You may develop Odoo modules that use the Software as a library (typically by depending on it, importing it and using its resources), but without copying any source code or material from the Software. You may distribute those modules under the license of your choice, provided that this license is compatible with the terms of the Odoo Proprietary License (For example: LGPL, MIT, or proprietary licenses similar to this one). It is forbidden to publish, distribute, sublicense, or sell copies of the Software or modified copies of the Software. The above copyright notice and this permission notice must be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Please log in to comment on this module