Skip to content
Health
77/100
good
  • Security25/25
    No findings
  • Activity25/25
    Human commit this month
  • Required by15/25
    1 module depends on it
  • Maturity12/25
    In 2 Odoo series since 18.0

Heuristic over the facts below, not an audit · How it's computed

Security findings
Grave / minor (static analysis)
Required by
1
Modules depending on it
External deps
1 pip · 0 bin
Python packages / system binaries
License
AGPL-3
No conflicts with its dependencies
Folder size
0.11 MB
Module directory on disk
Code analysis 0 migration notes 7 models 8 views 0 HTTP endpoints

Description

Manufacturing (MRP) integration for Paraguay's Maquila regime (Ley 7547/2025):

  • BOM INTN coefficients: gross quantity (requirement factor), net quantity and loss percentage, plus the origin type of each component (temporary admission, national, Mercosur, imported). The net-quantity fields are derived from GRAP's mrp_bom_line_net_qty.
  • Maquila program on manufacturing orders (computed from the BOM) with BOM, production and waste counters.
  • Waste management (scrap, byproduct, defective) with destruction / nationalization / re-export destinations; destruction drafts a stock scrap.
  • VAN wizard: national added value for a period, computed from the program's analytic cost minus foreign-origin inputs; it requires completed production to determine the origin split.

Known gap (Phase 2): Ley 7547/2025 Art. 37 defines the national added value as the sum of (a) goods acquired in the national territory, (b) services hired in the country, (c) salaries and social security paid in the country, (d) depreciation of the capital goods owned by the maquiladora and (e) the remuneration received for the maquila or sub-maquila services. The VAN wizard does not compute these five components: it takes the cost booked to the program's analytic account and subtracts the inputs of imported and Mercosur origin. It is only as complete as the analytic bookings (depreciation and the remuneration of the maquila service, items (d) and (e), are not identified) and must be checked against the Art. 37 components before filing the sworn statement.

Dependencies

Odoo dependencies
Python dependencies
python-stdnum
System dependencies
None
Required by
l10n_py_maquila_report

Code analysis

Extracted from the source by best-effort static analysis (no code is executed); details may be incomplete.

Views touched 8

XML IDNameModelTypeStatus
mrp_bom_form_view_inherit_maquila mrp.bom.form.inherit.maquila mrp.bom form Inherits mrp.mrp_bom_form_view
mrp_production_form_view_inherit_maquila mrp.production.form.inherit.maquila mrp.production form Inherits mrp.mrp_production_form_view
view_maquila_program_form_inherit_mrp l10n_py.maquila.program.form.inherit.mrp l10n_py.maquila.program form Inherits l10n_py_maquila_base.view_maquila_program_form
view_maquila_program_form_inherit_mrp_stats l10n_py.maquila.program.form.inherit.mrp.stats l10n_py.maquila.program form Inherits l10n_py_maquila_base.view_maquila_program_form
view_maquila_van_wizard_form l10n_py.maquila.van.wizard.form l10n_py.maquila.van.wizard form New
view_maquila_waste_form l10n_py.maquila.waste.form l10n_py.maquila.waste form New
view_maquila_waste_search l10n_py.maquila.waste.search l10n_py.maquila.waste search New
view_maquila_waste_tree l10n_py.maquila.waste.tree l10n_py.maquila.waste list New

HTTP endpoints 0

No HTTP endpoints found for this module.

Models touched 7

New fields (6)
  • bom_count Integer
    compute='_compute_bom_count'
  • bom_ids One2many → mrp.bom
    string='Bills of Materials' args: 'mrp.bom', 'l10n_py_maquila_program_id'
  • production_count Integer
    compute='_compute_production_count'
  • production_ids One2many → mrp.production
    string='Productions' args: 'mrp.production', 'l10n_py_maquila_program_id'
  • waste_count Integer
    compute='_compute_waste_count'
  • waste_ids One2many → l10n_py.maquila.waste
    string='Waste Records' args: 'l10n_py.maquila.waste', 'program_id'
Public methods (3)
  • action_view_boms(self)
  • action_view_productions(self)
  • action_view_waste(self)

New fields (1)
  • bom_id Many2one → mrp.bom
    string='Bill of Materials' args: 'mrp.bom'
Public methods (0)

No public methods.

New fields (11)
  • currency_id Many2one → res.currency
    default=<expr> args: 'res.currency'
  • imported_cost Monetary
    readonly=True
  • mercosul_content Float
    compute='_compute_van' string='Mercosul Content %'
  • mercosul_cost Monetary
    readonly=True
  • national_cost Monetary
    readonly=True string='National Cost (PY)'
  • period_end Date
    required=True
  • period_start Date
    required=True
  • program_id Many2one → l10n_py.maquila.program
    domain="[('state', '=', 'active')]" required=True args: 'l10n_py.maquila.program'
  • total_cost Monetary
    readonly=True
  • van_amount Monetary
    compute='_compute_van' string='VAN Amount'
  • van_percentage Float
    compute='_compute_van' string='VAN %'
Public methods (1)
  • action_compute(self)
    Compute the VAN via the shared program method so the wizard and the CNIME report always report the same figure.

New fields (16)
  • company_id Many2one
    related='program_id.company_id' store=True
  • date Date
    default=fields.Date.today required=True
  • destination Selection
    required=True args: [('destruction', 'Destruction'), ('nationalization', 'Nationalization'), ('reexport', 'Re-export')]
  • destruction_certificate Char
    string='INTN Destruction Certificate'
  • justification Text
  • lot_id Many2one → stock.lot
    string='Lot/Serial' args: 'stock.lot'
  • name Char
    compute='_compute_name' store=True
  • nationalization_move_id Many2one → account.move
    string='Nationalization Entry' args: 'account.move'
  • product_id Many2one → product.product
    required=True string='Waste Product' args: 'product.product'
  • production_id Many2one → mrp.production
    args: 'mrp.production'
  • program_id Many2one → l10n_py.maquila.program
    required=True args: 'l10n_py.maquila.program'
  • quantity Float
    digits='Product Unit of Measure' required=True
  • scrap_id Many2one → stock.scrap
    args: 'stock.scrap'
  • seam_approval Char
    help='Environmental clearance (MADES, ex-SEAM per Ley 6123/2018)' string='MADES Dictamen'
  • state Selection
    default='pending' required=True tracking=True args: [('pending', 'Pending'), ('in_process', 'In Process'), ('completed', 'Completed')]
  • waste_type Selection
    required=True args: [('scrap', 'Scrap'), ('byproduct', 'Byproduct'), ('defective', 'Defective')]
Public methods (3)
  • action_complete(self)
    Complete the waste disposal. For destruction, draft a stock scrap so the physical write-off is traceable; nationalization and re-export keep their own document references (entry / dispatch).
  • action_pending(self)
  • action_process(self)

New fields (4)
  • l10n_py_intn_certificate Char
    string='INTN Certificate Number'
  • l10n_py_intn_certified Boolean
    string='INTN Certified'
  • l10n_py_intn_date Date
    string='INTN Certification Date'
  • l10n_py_maquila_program_id Many2one → l10n_py.maquila.program
    string='Maquila Program' args: 'l10n_py.maquila.program'
Public methods (0)

No public methods.

New fields (5)
  • diff_product_qty_gross_net Float
    compute='_compute_diff_product_qty_gross_net' digits='Product Price' string='Gross/Net Difference'
  • l10n_py_origin_country Many2one → res.country
    string='Origin Country' args: 'res.country'
  • l10n_py_origin_type Selection
    string='Origin Type' args: [('temporary_admission', 'Temporary Admission'), ('national_py', 'National (Paraguay)'), ('national_mercosul', 'National (Mercosul)'), ('imported', 'Imported (Other)')]
  • loss_percentage Float
    digits=(16, 2) help='Percentage loss during process (INTN waste coefficient)' string='Loss %'
  • product_qty_net Float
    digits='Product Unit of Measure' help='Quantity after process (INTN net coefficient)' string='Net Quantity'
Public methods (3)
  • calculate_qty_net_theoretical(self, product_qty_gross, loss_percentage)
  • set_product_qty_gross(self)
  • set_product_qty_net(self)

New fields (1)
  • l10n_py_maquila_program_id Many2one → l10n_py.maquila.program
    compute='_compute_maquila_program' help='Defaults to the program of the bill of materials; can be set by hand for productions without a BoM.' precompute=True readonly=False store=True string='Maquila Program' args: 'l10n_py.maquila.program'
Public methods (0)

No public methods.

Loading…

Status
Open migration PR — not merged yet for this version
CI status
checks failing
Open since
7 days ago
Last activity
7 days ago
Repository
OCA/l10n-paraguay
Pull request
[20.0][MIG] l10n_py_maquila_mrp: Migration to 20.0 (#81)