TIP: You can type at any time to perform a new search.
Sustainability Purchase
sustainability_purchase · OCA/sustainability
🛠 Migration considerations
- Raw `cr.execute()` INSERT/UPDATE/DELETE bypasses the ORM (no compute/constrains/tracking/mail): `UPDATE res_partner SET carbon_in_mode = 'auto', carbon_out_mode = 'auto'` - re-check the table/column names still match after upgrading. migration-raw-sql-write · source
Found by automated static analysis: patterns worth a look before/after upgrading this module to a newer Odoo version.
- Repository
- OCA/sustainability · module folder · Try on Runboat
- Module version
- 1.0.0
- Category
- Accounting/Sustainability
- Folder size
- 0.06 MB
- License
- AGPL-3
- Application
- No
- Auto-installable
- No
- Website
- https://github.com/sustainability-suite/sustainability-odoo
- Last tracking update
- 2026-09-21 11:33:45
- Authors
- Open Net Sàrl, MCO2
- Maintainers
- Open Net Sàrl, MCO2
- Committers
- Julien Guenat, SustainabilityBot
- Odoo dependencies
- Python dependencies
- odoo_upgrade @ git+https://github.com/odoo/upgrade-util@master, openupgradelib, packaging
- System dependencies
- None
- Required by
- None
- Description
Code Analysis ⓘ
Views touched (3)
| XML ID | Name | Model | Type | Status |
|---|---|---|---|---|
carbon_line_origin_tree |
carbon_line_origin_tree | carbon.line.origin | tree | Inherits sustainability.carbon_line_origin_tree |
purchase_order_form |
purchase.order.form | purchase.order | form | Inherits purchase.purchase_order_form |
sustainability_product_supplierinfo_tree_view |
sustainability.product.supplierinfo.list.view | product.supplierinfo | list | Inherits purchase.product_supplierinfo_tree_view2 |
HTTP endpoints (0)
No HTTP endpoints found for this module.
Models touched (5)
New fields (1)
-
purchase_line_idMany2one → purchase.order.linecompute='_compute_many2one_lines'store=Truestring='Purchase Line' args: 'purchase.order.line'
No public methods.
New fields (0)
No new fields.
Public methods (0)No public methods.
New fields (2)
-
carbon_currency_idMany2one → res.currencycompute='_compute_carbon_currency_id' args: 'res.currency' -
carbon_debtMonetarycompute='_compute_carbon_debt'currency_field='carbon_currency_id'store=Truestring='CO2'
-
action_recompute_carbon(self) -> dictForce re-computation of carbon values for PO lines.
New fields (1)
-
carbon_supplier_idMany2one → product.supplierinfocomodel_name='product.supplierinfo'compute='_compute_carbon_supplier_id'string='Supplier Info'
-
can_use_carbon_supplier_id_carbon_value(self) -> bool -
can_use_product_id_carbon_value(self) -> bool -
get_carbon_supplier_id_carbon_compute_values(self) -> dict -
get_product_id_carbon_compute_values(self) -> dict
New fields (0)
No new fields.
Public methods (0)No public methods.
Loading…
Loading…
Loading…