Repository
OCA/sustainability · module folder · Try on Runboat
Module version
1.0.1
Category
Accounting/Sustainability
Folder size
1.81 MB
License
LGPL-3
Application
Yes
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
sustainability_purchase, sustainability_spreadsheet_dashboard
Description

Code Analysis

Views touched (42)
XML IDNameModelTypeStatus
carbon_distribution_template_form carbon.distribution.template.form carbon.distribution.template form New
carbon_factor_contributor_tree carbon.factor.contributor.list carbon.factor.contributor list New
carbon_factor_database_form carbon.factor.database.form carbon.factor.database form New
carbon_factor_database_tree carbon.factor.database.list carbon.factor.database list New
carbon_factor_filter carbon.factor.select carbon.factor search New
carbon_factor_form carbon.factor.form carbon.factor form New
carbon_factor_hierarchy carbon.factor.hierarchy carbon.factor New
carbon_factor_tree carbon.factor.list carbon.factor list New
carbon_factor_type_tree carbon.factor.type.list carbon.factor.type list New
carbon_factor_value_report_search carbon.factor.value.report.search carbon.factor.value.report search New
carbon_factor_view_graph carbon.factor.graph.view carbon.factor graph New
carbon_factor_view_kanban carbon.factor.kanban.view carbon.factor kanban New
carbon_factor_view_pivot carbon.factor.pivot.view carbon.factor pivot New
carbon_line_origin_filter carbon.line.origin.select carbon.line.origin search New
carbon_line_origin_tree carbon.line.origin.list carbon.line.origin list New
carbon_line_origin_view_graph carbon.line.origin.graph.view carbon.line.origin graph New
carbon_line_origin_view_pivot carbon.line.origin.pivot.view carbon.line.origin pivot New
report_invoice_document report_invoice_document ir.ui.view qweb Inherits account.report_invoice_document
res_config_settings_view_form res.config.settings.view.form.inherit.co2 res.config.settings form Inherits base.res_config_settings_view_form
sustainability_action_filter sustainability.action.select sustainability.action search New
sustainability_action_form sustainability.action.form sustainability.action form New
sustainability_action_plan_filter sustainability.action.plan.select sustainability.action.plan search New
sustainability_action_plan_form sustainability.action.plan.form sustainability.action.plan form New
sustainability_action_plan_tree sustainability.action.plan.list sustainability.action.plan list New
sustainability_action_tree sustainability.action.list sustainability.action list New
sustainability_scenario_filter sustainability.scenario.select sustainability.scenario search New
sustainability_scenario_form sustainability.scenario.form sustainability.scenario form New
sustainability_scenario_tree sustainability.scenario.list sustainability.scenario list New
view_account_analytic_line_form account.analytic.line.form account.analytic.line form Inherits analytic.view_account_analytic_line_form
view_account_analytic_line_tree account.analytic.line.list account.analytic.line list Inherits analytic.view_account_analytic_line_tree
view_approach_characterization_list sustainability.approach.characterization.list sustainability.approach.characterization list New
view_approach_list sustainability.approach.list sustainability.approach list New
view_carbon_factor_value_report_graph carbon.factor.value.report.graph.view carbon.factor.value.report graph New
view_invoice_tree_inherit account.move.list.inherit.tree.sustainability account.move tree Inherits account.view_invoice_tree
view_move_form view_move_form account.move form Inherits account.view_move_form
view_move_line_tree view_move_line_tree account.move.line tree Inherits account.view_move_line_tree
view_move_tree view_move_tree account.move tree Inherits account.view_move_tree
view_nomenclature_category_list sustainability.nomenclature.category.list sustainability.nomenclature.category list New
view_nomenclature_list sustainability.nomenclature.list sustainability.nomenclature list New
view_nomenclature_reporting_list sustainability.nomenclature.reporting.list sustainability.nomenclature.reporting list New
view_nomenclature_sub_category_form sustainability.nomenclature.sub_category.form sustainability.nomenclature.sub_category form New
view_nomenclature_sub_category_list sustainability.nomenclature.sub_category.list sustainability.nomenclature.sub_category list New
HTTP endpoints (0)

No HTTP endpoints found for this module.

Models touched (35)

New fields (2)
  • carbon_in_factor_id Many2one
    tracking=True
  • carbon_line_origin_ids One2many → carbon.line.origin
    comodel_name='carbon.line.origin' inverse_name='move_line_account_id' string='Origins'
Public methods (0)

No public methods.

New fields (2)
  • carbon_currency_id Many2one → res.currency
    related='move_line_id.carbon_currency_id' args: 'res.currency'
  • carbon_debt Monetary
    currency_field='carbon_currency_id' string='CO2'
Public methods (0)

No public methods.

New fields (3)
  • carbon_balance Monetary
    compute='_compute_carbon_balance' currency_field='carbon_currency_id' store=True string='CO2 Equivalent' tracking=True
  • carbon_currency_id Many2one → res.currency
    compute='_compute_carbon_currency_id' args: 'res.currency'
  • carbon_uncertainty_value Monetary
    compute='_compute_carbon_uncertainty_value' currency_field='carbon_currency_id' store=True string='CO2 Uncertainty' tracking=True
Public methods (1)
  • action_recompute_carbon(self) -> dict
    Force re-computation of carbon values for lines

New fields (7)
  • carbon_balance Monetary
    compute='_compute_carbon_balance' currency_field='carbon_currency_id' store=True string='CO2 Balance'
  • carbon_credit Monetary
    compute='_compute_carbon_debit_credit' currency_field='carbon_currency_id' store=True string='CO2 Credit'
  • carbon_debit Monetary
    compute='_compute_carbon_debit_credit' currency_field='carbon_currency_id' store=True string='CO2 Debit'
  • carbon_is_date_locked Boolean
    compute='_compute_carbon_is_date_locked' store=False
  • carbon_supplier_id Many2one → product.supplierinfo
    comodel_name='product.supplierinfo' compute='_compute_carbon_supplier_id' string='Supplier Info'
  • is_carbon_positive Boolean
    compute='_compute_is_carbon_positive' readonly=True store=False
  • is_invoice_line Boolean
    compute='_compute_is_invoice_line' default=False
Public methods (11)
  • action_recompute_carbon(self) -> dict
  • can_use_account_id_carbon_value(self) -> bool
  • can_use_carbon_supplier_id_carbon_value(self) -> bool
  • can_use_partner_id_carbon_value(self) -> bool
  • can_use_product_id_carbon_value(self) -> bool
  • get_account_id_carbon_compute_values(self) -> dict
  • get_carbon_sign(self) -> int
  • get_carbon_supplier_id_carbon_compute_values(self) -> dict
  • get_product_id_carbon_compute_values(self) -> dict
  • is_credit(self) -> bool
  • is_debit(self) -> bool

New fields (3)
  • carbon_line_origin_qty Integer
    compute='_compute_carbon_line_origin_qty'
  • carbon_origin_child_ids One2many → carbon.line.origin
    comodel_name='carbon.line.origin' compute='_compute_carbon_origin_child_ids'
  • carbon_origin_child_qty Integer
    compute='_compute_carbon_origin_child_qty'
Public methods (2)
  • action_see_carbon_line_origin_ids(self)
  • action_see_clo_child_ids(self)
    Open a new window to display the carbon.line.origin records from the child field for smart button.

New fields (0)

No new fields.

Public methods (1)
  • copy(self, default=None)

New fields (8)
  • carbon_type Selection
    required=True args: [('in', 'In'), ('out', 'Out'), ('template', 'Template')]
  • factor_id Many2one → carbon.factor
    comodel_name='carbon.factor' domain="[('recent_value_id', '!=', False)]" required=True string='Carbon Factor'
  • percentage Float
    required=True
  • res_id Many2oneReference
    index=True model_field='res_model'
  • res_in_id Many2oneReference
    compute='_compute_res_in_out_id' index=True inverse='_inverse_res_in_out_id' model_field='res_model' store=True
  • res_model Char
    index=True precompute=True readonly=True related='res_model_id.model' store=True
  • res_model_id Many2one → ir.model
    index=True ondelete='cascade' required=True args: 'ir.model'
  • res_out_id Many2oneReference
    compute='_compute_res_in_out_id' index=True inverse='_inverse_res_in_out_id' model_field='res_model' store=True
Public methods (2)
  • create(self, vals_list)
    @api.model_create_multi
  • get_record(self)

New fields (5)
  • carbon_distribution_line_ids One2many → carbon.distribution.line
    bypass_search_access=True domain="[('carbon_type', '=', 'template')]" required=True args: 'carbon.distribution.line', 'res_id', 'Distribution lines'
  • carbon_has_valid_distribution Boolean
    compute='_compute_carbon_has_valid_distribution'
  • name Char
    required=True
  • product_product_qty Integer
    compute='_compute_product_product_qty'
  • product_template_qty Integer
    compute='_compute_product_template_qty'
Public methods (3)
  • action_see_product_product_ids(self)
  • action_see_product_template_ids(self)
  • has_valid_carbon_distribution(self)

New fields (44)
  • account_move_qty Integer
    compute='_compute_account_move_qty'
  • active Boolean
    default=True tracking=True
  • carbon_compute_method Selection
    selection=[('physical', 'Physical'), ('monetary', 'Monetary')] string='Compute method' tracking=True
  • carbon_contributor_id Many2one → carbon.factor.contributor
    comodel_name='carbon.factor.contributor' string='Contributor' tracking=True
  • carbon_currency_id Many2one → res.currency
    comodel_name='res.currency' compute='_compute_carbon_currency_id'
  • carbon_currency_label Char
    compute='_compute_carbon_currency_id' default='kgCO2e'
  • carbon_database_id Many2one → carbon.factor.database
    comodel_name='carbon.factor.database' string='Database' tracking=True
  • carbon_date Date
    related='recent_value_id.date' store=True
  • carbon_line_origin_ids One2many → carbon.line.origin
    comodel_name='carbon.line.origin' inverse_name='factor_id' string='Origins'
  • carbon_line_origin_qty Integer
    compute='_compute_carbon_line_origin_qty'
  • carbon_monetary_currency_id Many2one
    related='recent_value_id.carbon_monetary_currency_id'
  • carbon_uom_id Many2one
    related='recent_value_id.carbon_uom_id' store=True
  • carbon_value Float
    compute='_compute_carbon_value' store=True string='Value'
  • category Char
    compute='_compute_category' store=True
  • chart_of_account_qty Integer
    compute='_compute_chart_of_account_qty'
  • child_ids One2many → carbon.factor
    comodel_name='carbon.factor' inverse_name='parent_id'
  • child_qty Integer
    compute='_compute_child_qty'
  • color Integer
    default=<expr> export_string_translation=False
  • comment Html
  • contact_qty Integer
    compute='_compute_contact_qty'
  • country_group_id Many2one → res.country.group
    string='Country Group' tracking=True args: 'res.country.group'
  • country_id Many2one → res.country
    string='Country' tracking=True args: 'res.country'
  • descendant_ids Many2many → carbon.factor
    comodel_name='carbon.factor' compute='_compute_descendant_ids' recursive=True
  • distribution_template_qty Integer
    compute='_compute_distribution_template_qty'
  • factor_value_type_id Many2one
    related='recent_value_id.type_id' store=True string='Factor Value Type'
  • ghg_view_mode Boolean
    help='Toggle to show GHG details' string='Show greenhouse gases detail' tracking=True
  • has_invalid_value Boolean
    compute='_compute_has_invalid_value'
  • hierarchy Char
    compute='_compute_hierarchy' recursive=True
  • name Char
    required=True tracking=True
  • parent_id Many2one → carbon.factor
    comodel_name='carbon.factor' index=True ondelete='restrict' string='Parent' tracking=True
  • parent_path Char
    index=True
  • product_categ_qty Integer
    compute='_compute_product_categ_qty'
  • product_product_qty Integer
    compute='_compute_product_product_qty'
  • product_supplierinfo_ids One2many → product.product
    comodel_name='product.product' compute='_compute_product_supplierinfo_ids'
  • product_supplierinfo_qty Integer
    compute='_compute_product_supplierinfo_qty'
  • product_template_qty Integer
    compute='_compute_product_template_qty'
  • recent_value_id Many2one → carbon.factor.value
    comodel_name='carbon.factor.value' compute='_compute_recent_value' store=True
  • required_type_ids Many2many → carbon.factor.type
    string='Required Types' args: 'carbon.factor.type'
  • root Char
    compute='_compute_root' store=True
  • sequence Integer
  • supplierinfo_qty Integer
    compute='_compute_supplierinfo_qty'
  • uncertainty_percentage Float
    aggregator=False default=0.0 string='Uncertainty (%)' tracking=True
  • unit_label Char
    related='recent_value_id.unit_label'
  • value_ids One2many → carbon.factor.value
    comodel_name='carbon.factor.value' inverse_name='factor_id' string='Value List' tracking=True
Public methods (14)
  • action_carbon_recompute_entries(self)
  • action_see_account_move_ids(self)
  • action_see_carbon_line_origin_ids(self)
  • action_see_chart_of_account_ids(self)
  • action_see_child_ids(self)
  • action_see_contact_ids(self)
  • action_see_distribution_template_ids(self)
  • action_see_product_categ_ids(self)
  • action_see_product_product_ids(self)
  • action_see_product_supplier_ids(self)
  • action_see_product_template_ids(self)
  • check_distribution(self, distribution: <expr>) -> <expr>
    Check that the distribution is valid and update it if needed
  • get_carbon_value(self, distribution: <expr>=None, **kwargs) -> <expr>
    Return a value computed depending on the calculation method of carbon (qty/price) and the type of operation (credit/debit) Used in carbon.line.mixin to compute carbon debt of a line model Returns: - total_value (float): the carbon value - total_uncertainty_value (float): the uncertainty value - factor_to_details (dict): the details of the computation with this data structure: { carbon.factor.id: { carbon.factor.value.id: { 'value': ..., 'distribution': ..., 'uncertainty_percentage': ..., 'uncertainty_value': ..., 'compute_method': ..., 'carbon_value': ..., 'uom_id': ..., 'monetary_currency_id': ..., }, carbon.factor.value.id: { ... }, }, }
  • write(self, vals)

New fields (1)
  • name Char
    required=True
Public methods (0)

No public methods.

New fields (2)
  • name Char
    required=True
  • url Char
Public methods (0)

No public methods.

New fields (2)
  • code Char
    required=True
  • name Char
    required=True args: 'Description'
Public methods (0)

No public methods.

New fields (21)
  • carbon_compute_method Selection
    related='factor_id.carbon_compute_method' store=True
  • carbon_currency_label Char
    related='factor_id.carbon_currency_label'
  • carbon_monetary_currency_id Many2one → res.currency
    string='Currency' tracking=True args: 'res.currency'
  • carbon_uom_id Many2one → uom.uom
    string='Unit of measure' tracking=True args: 'uom.uom'
  • carbon_value Float
    compute='_compute_carbon_value' digits='Carbon Factor value' readonly=False required=True store=True string='Total not broken down (kgCO2)' tracking=True
  • ch4_value Float
    digits='Carbon Factor value' string='CH4 (kgCO2e)' tracking=True
  • co2_value Float
    digits='Carbon Factor value' string='CO2 (kg)' tracking=True
  • comment Char
  • date Date
    required=True tracking=True
  • display_name Char
    compute='_compute_display_name' recursive=True store=True
  • factor_id Many2one → carbon.factor
    ondelete='cascade' required=True args: 'carbon.factor'
  • hfc_value Float
    digits='Carbon Factor value' string='HFC (kgCO2e)' tracking=True
  • is_carbon_value_computed Boolean
    compute='_compute_carbon_value' default=False store=True
  • is_ghg_detailed_value Boolean
    compute='_compute_is_ghg_detailed_value'
  • n2o_value Float
    digits='Carbon Factor value' string='N2O (kgCO2e)' tracking=True
  • nf3_value Float
    digits='Carbon Factor value' string='NF3 (kgCO2e)' tracking=True
  • other_ghg_value Float
    digits='Carbon Factor value' string='Other GHG (kgCO2e)' tracking=True
  • pfc_value Float
    digits='Carbon Factor value' string='PFC (kgCO2e)' tracking=True
  • sf6_value Float
    digits='Carbon Factor value' string='SF6 (kgCO2e)' tracking=True
  • type_id Many2one → carbon.factor.type
    tracking=True args: 'carbon.factor.type'
  • unit_label Char
    compute='_compute_unit_label' string=' '
Public methods (2)
  • action_reset_precision_value(self)
  • get_infos(self) -> <expr>

New fields (17)
  • active Boolean
    readonly=True
  • carbon_compute_method Selection
    readonly=True selection=[('physical', 'Physical'), ('monetary', 'Monetary')] string='Compute Method'
  • carbon_contributor_id Many2one → carbon.factor.contributor
    readonly=True string='Contributor' args: 'carbon.factor.contributor'
  • carbon_database_id Many2one → carbon.factor.database
    readonly=True string='Database' args: 'carbon.factor.database'
  • carbon_uom_id Many2one → uom.uom
    readonly=True string='Unit of measure' args: 'uom.uom'
  • carbon_value Float
    aggregator='avg' readonly=True string='Average CO2 (kg)'
  • category Char
    readonly=True
  • country_group_id Many2one → res.country.group
    readonly=True string='Country Group' args: 'res.country.group'
  • country_id Many2one → res.country
    readonly=True string='Country' args: 'res.country'
  • date Date
    readonly=True
  • factor_id Many2one → carbon.factor
    readonly=True string='Factor' args: 'carbon.factor'
  • ghg_view_mode Boolean
    readonly=True string='Show greenhouse gases detail'
  • name Char
    readonly=True
  • parent_id Many2one → carbon.factor
    comodel_name='carbon.factor' readonly=True string='Parent'
  • root Char
    readonly=True
  • type_id Many2one → carbon.factor.type
    readonly=True string='Type' args: 'carbon.factor.type'
  • uncertainty_percentage Float
    readonly=True string='Uncertainty (%)'
Public methods (0)

No public methods.

New fields (7)
  • carbon_currency_id Many2one → res.currency
    compute='_compute_carbon_currency_id' args: 'res.currency'
  • carbon_data_uncertainty_percentage Float
    default=<expr> string='CO2 Uncertainty %'
  • carbon_debt Monetary
    compute='_compute_carbon_debt' currency_field='carbon_currency_id' help="A positive value means that your system's debt grows, a negative value means it shrinks" inverse='_inverse_carbon_debt' readonly=False store=True string='CO2'
  • carbon_is_locked Boolean
    default=False
  • carbon_origin_ids One2many → carbon.line.origin
    bypass_search_access=True args: 'carbon.line.origin', 'res_id', 'Carbon value origin details'
  • carbon_origin_json Json
    compute='_compute_carbon_debt' store=True
  • carbon_uncertainty_value Monetary
    compute='_compute_carbon_debt' currency_field='carbon_currency_id' readonly=False store=True string='CO2 Uncertainty'
Public methods (7)
  • action_recompute_carbon(self) -> dict
    Force re-computation of carbon values for lines
  • action_see_carbon_origin(self)
  • action_switch_locked(self)
  • create(self, vals_list)
    @api.model_create_multi
  • get_carbon_sign(self) -> int
    Return the sign of the carbon value (1 or -1) Mainly used for account.move.line to determine if the line is a credit or a debit
  • unlink(self)
  • write(self, vals)

New fields (38)
  • carbon_data_uncertainty_percentage Float
    readonly=True related='move_line_id.carbon_data_uncertainty_percentage' store=False
  • carbon_value Float
    digits='Carbon Factor value' string='Value'
  • comment Char
  • company_id Many2one → res.company
    comodel_name='res.company' compute='_compute_company_id' store=True
  • computation_level Char
  • compute_method Char
  • distribution Float
  • factor_category_id Many2one
    related='factor_id.parent_id' store=True string='Factor Category'
  • factor_contributor_id Many2one
    related='factor_id.carbon_contributor_id' store=True string='Contributor'
  • factor_database_id Many2one
    related='factor_id.carbon_database_id' store=True string='Database'
  • factor_id Many2one
    related='factor_value_id.factor_id' store=True string='Emission Factor'
  • factor_value_id Many2one → carbon.factor.value
    string='Factor value' args: 'carbon.factor.value'
  • factor_value_type_id Many2one
    related='factor_value_id.type_id' store=True string='Factor Value Type'
  • monetary_currency_id Many2one → res.currency
    string='Currency' args: 'res.currency'
  • move_company_currency_id Many2one
    readonly=True related='move_id.company_currency_id' store=False string='Company Currency'
  • move_date Date
    readonly=True related='move_id.date' store=True string='Invoice Date'
  • move_id Many2one
    related='move_line_id.move_id' store=True string='Journal Entry'
  • move_line_account_id Many2one
    related='move_line_id.account_id' store=True string='Account'
  • move_line_balance Monetary
    currency_field='move_company_currency_id' readonly=True related='move_line_id.balance' store=False string='Balance'
  • move_line_id Many2one → account.move.line
    compute='_compute_many2one_lines' store=True string='Journal Item' args: 'account.move.line'
  • move_line_is_invoice_line Boolean
    readonly=True related='move_line_id.is_invoice_line' store=True
  • move_line_journal_id Many2one
    related='move_line_id.journal_id' store=True string='Journal'
  • move_line_label Char
    readonly=True related='move_line_id.name' store=False string='Label'
  • move_line_partner_id Many2one
    related='move_line_id.partner_id' store=True string='Partner'
  • move_line_product_category_id Many2one
    readonly=True related='move_line_id.product_category_id' store=False string='Product Category'
  • move_line_product_id Many2one
    readonly=True related='move_line_id.product_id' store=True string='Product'
  • move_line_product_tmpl_id Many2one
    readonly=True related='move_line_product_id.product_tmpl_id' store=True string='Product Template'
  • move_state Selection
    readonly=True related='move_id.state' string='Status'
  • quantity Float
    compute='_compute_quantity' readonly=True store=True
  • res_id Many2oneReference
    index=True model_field='res_model' string='Res id'
  • res_model Char
    index=True precompute=True readonly=True related='res_model_id.model' store=True string='Model'
  • res_model_id Many2one → ir.model
    index=True ondelete='cascade' required=True args: 'ir.model'
  • signed_uncertainty_value Float
    compute='_compute_signed_uncertainty_value' digits='Carbon value' store=True
  • signed_value Float
    compute='_compute_signed_value' digits='Carbon value' store=True string='Total'
  • uncertainty_percentage Float
    default=0.0 string='Uncertainty'
  • uncertainty_value Float
    default=0.0 digits='Carbon Factor value'
  • uom_id Many2one → uom.uom
    args: 'uom.uom'
  • value Float
    digits='Carbon value' required=True string='Factor Value'
Public methods (1)
  • get_record(self)
    Return the record that generated this origin

New fields (19)
  • carbon_in_distribution_line_ids One2many → carbon.distribution.line
    bypass_search_access=True domain="[('carbon_type', '=', 'in')]" args: 'carbon.distribution.line', 'res_in_id', 'Distribution lines IN'
  • carbon_in_distribution_template_id Many2one → carbon.distribution.template
    ondelete='set null' string='Distribution Template' args: 'carbon.distribution.template'
  • carbon_in_factor_id Many2one → carbon.factor
    domain=<expr> ondelete='set null' string='Emission Factor Purchases' args: 'carbon.factor'
  • carbon_in_fallback_reference Reference
    readonly=True selection='_selection_fallback_model' string='Fallback record'
  • carbon_in_has_valid_distribution Boolean
    compute='_compute_carbon_in_has_valid_distribution'
  • carbon_in_is_manual Boolean
    default=False
  • carbon_in_mode Selection
    compute='_compute_carbon_in_mode' default='auto' selection=[('auto', 'Automatic'), ('manual', 'Manual')] store=True
  • carbon_in_use_distribution Boolean
    default=False help='Todo: add help' string='Use Distribution'
  • carbon_in_value_origin Char
    readonly=True string='Value origin'
  • carbon_out_distribution_line_ids One2many → carbon.distribution.line
    bypass_search_access=True domain="[('carbon_type', '=', 'out')]" args: 'carbon.distribution.line', 'res_out_id', 'Distribution lines OUT'
  • carbon_out_distribution_template_id Many2one → carbon.distribution.template
    ondelete='set null' string='Distribution Template' args: 'carbon.distribution.template'
  • carbon_out_factor_id Many2one → carbon.factor
    domain=<expr> ondelete='set null' string='Emission Factor Sales' args: 'carbon.factor'
  • carbon_out_fallback_reference Reference
    readonly=True selection='_selection_fallback_model' string='Fallback record '
  • carbon_out_has_valid_distribution Boolean
    compute='_compute_carbon_out_has_valid_distribution'
  • carbon_out_is_manual Boolean
    default=False
  • carbon_out_mode Selection
    compute='_compute_carbon_out_mode' default='auto' selection=[('auto', 'Automatic'), ('manual', 'Manual')] store=True
  • carbon_out_use_distribution Boolean
    default=False string='Use Distribution '
  • carbon_out_value_origin Char
    readonly=True string='Value origin '
  • model_name Char
    compute='_compute_model_name'
Public methods (9)
  • auto_carbon_distribution(self, carbon_types: <expr>=None)
  • can_compute_carbon_value(self, carbon_type: str) -> bool
  • create(self, vals_list)
    @api.model_create_multi
  • generate_origin_string(self, path: <expr>, carbon_type: str) -> str
    @api.model
  • get_carbon_distribution(self, carbon_type: str) -> <expr>
    Return factors and their distributions for a given carbon type
  • has_valid_carbon_distribution(self, carbon_type: str)
  • has_valid_carbon_fallback(self, carbon_type: str)
  • has_valid_carbon_value(self, carbon_type: str)
  • write(self, vals)

New fields (1)
  • carbon_line_origin_ids One2many → carbon.line.origin
    comodel_name='carbon.line.origin' inverse_name='move_line_product_category_id' string='Origins'
Public methods (0)

No public methods.

New fields (1)
  • carbon_line_origin_ids One2many → carbon.line.origin
    comodel_name='carbon.line.origin' inverse_name='move_line_product_id' string='Origins'
Public methods (0)

No public methods.

New fields (0)

No new fields.

Public methods (2)
  • create(self, vals_list)
    @api.model_create_multi
  • write(self, vals)

New fields (1)
  • carbon_line_origin_ids One2many → carbon.line.origin
    comodel_name='carbon.line.origin' inverse_name='move_line_product_tmpl_id' string='Origins'
Public methods (0)

No public methods.

New fields (6)
  • carbon_default_data_uncertainty_percentage Float
    default=0.0
  • carbon_in_is_manual Boolean
    default=True
  • carbon_lock_date Date
    help='' string='CO2e Computation Lock Date' tracking=True
  • carbon_out_is_manual Boolean
    default=True
  • invoice_display_co2 Boolean
    default=True help='Display CO2 equivalent values in invoice documents' string='Display CO2 in Invoices'
  • invoice_report_footer Html
    translate=True
Public methods (1)
  • create(self, vals_list)
    @api.model_create_multi

New fields (20)
  • available_module_names Char
    compute='_compute_available_modules'
  • carbon_default_data_uncertainty_percentage Float
    readonly=False related='company_id.carbon_default_data_uncertainty_percentage'
  • carbon_in_factor_id Many2one
    readonly=False related='company_id.carbon_in_factor_id' string='Emission Factor Purchases'
  • carbon_lock_date Date
    readonly=False related='company_id.carbon_lock_date'
  • carbon_out_factor_id Many2one
    readonly=False related='company_id.carbon_out_factor_id' string='Emission Factor Sales'
  • extra_module_names Char
    compute='_compute_available_modules'
  • invoice_display_co2 Boolean
    readonly=False related='company_id.invoice_display_co2'
  • invoice_report_footer Html
    readonly=False related='company_id.invoice_report_footer' translate=True
  • module_sustainability_account_asset Boolean
  • module_sustainability_account_asset_management Boolean
  • module_sustainability_employee_commuting Boolean
  • module_sustainability_hr_expense_report Boolean
  • module_sustainability_mis_builder Boolean
  • module_sustainability_point_of_sale Boolean
  • module_sustainability_product_label_print Boolean
  • module_sustainability_purchase Boolean
  • module_sustainability_purchase_stock Boolean
  • module_sustainability_sale Boolean
  • module_sustainability_stock Boolean
  • module_sustainability_website_sale Boolean
Public methods (0)

No public methods.

New fields (0)

No new fields.

Public methods (0)

No public methods.

New fields (4)
  • carbon_in_mode Selection
    recursive=True
  • carbon_line_origin_ids One2many → carbon.line.origin
    comodel_name='carbon.line.origin' inverse_name='move_line_partner_id' string='Origins'
  • carbon_out_mode Selection
    recursive=True
  • has_computed_carbon_mode Boolean
    default=False
Public methods (0)

No public methods.

New fields (10)
  • action_plan_ids Many2many → sustainability.action.plan
    required=False args: 'sustainability.action.plan'
  • action_plan_qty Integer
    compute='_compute_action_plan_qty'
  • active Boolean
    default=True
  • budget Selection
    required=True tracking=True args: _levels
  • complexity Selection
    required=True tracking=True args: _levels
  • description Text
    required=True tracking=True
  • image Image
    max_height=1920 max_width=1920 required=False
  • name Char
    required=True tracking=True
  • reduction_potential Selection
    required=True tracking=True args: _levels
  • scenario_qty Integer
    compute='_compute_scenario_qty'
Public methods (2)
  • action_see_action_plans(self)
  • action_see_scenarios(self)

New fields (8)
  • action_ids Many2many → sustainability.action
    string='Actions' args: 'sustainability.action'
  • action_qty Integer
    compute='_compute_action_qty'
  • active Boolean
    default=True
  • description Text
    required=True tracking=True
  • end_date Date
    required=True tracking=True
  • name Char
    required=True tracking=True
  • scenario_id Many2one → sustainability.scenario
    ondelete='restrict' required=True tracking=True args: 'sustainability.scenario'
  • start_date Date
    required=True tracking=True
Public methods (1)
  • action_see_actions(self)

New fields (1)
  • name Char
    help='Examples: Physical control, Operational control, Share of capital' required=True
Public methods (0)

No public methods.

New fields (4)
  • approach_id Many2one → sustainability.approach
    comodel_name='sustainability.approach' required=True
  • is_default Boolean
    default=False help='Allows defining a default characterization for the chosen approach for the default nomenclature. For example, for "Energy" -> "Non-operated"'
  • name Char
    help='Examples: Operated, Non-operated, Supported, Non-operated, Unsupported' required=True
  • regulatory_nomenclature_category_id Many2one → sustainability.nomenclature.category
    comodel_name='sustainability.nomenclature.category' required=True
Public methods (0)

No public methods.

New fields (3)
  • is_default Boolean
    default=False help='To manage categories of the regulatory method (Energy, Non-Energy, Inputs...) guiding the characterizations (Physical control, Operational control...)'
  • name Char
    help='Examples: Carbon Balance, GHG Protocol, ISO/TR 14069, Regulatory Method' required=True
  • url Char
    required=True
Public methods (0)

No public methods.

New fields (4)
  • description Char
    required=True
  • name Char
    help='Examples: Direct GHG emissions, Indirect emissions associated with energy' required=True
  • nomenclature_id Many2one → sustainability.nomenclature
    comodel_name='sustainability.nomenclature' required=True
  • reporting_section Char
    required=True
Public methods (0)

No public methods.

New fields (5)
  • approach_characterization_id Many2one → sustainability.approach.characterization
    comodel_name='sustainability.approach.characterization'
  • emission_factor_category_id Many2one → carbon.factor
    comodel_name='carbon.factor'
  • emission_factor_type_id Many2one → carbon.factor.type
    comodel_name='carbon.factor.type'
  • nomenclature_sub_category_id Many2one → sustainability.nomenclature.sub_category
    comodel_name='sustainability.nomenclature.sub_category' required=True
  • rule_order Integer
    help='Move items up/down' required=True
Public methods (0)

No public methods.

New fields (8)
  • activity_data Char
  • category_id Many2one → sustainability.nomenclature.category
    comodel_name='sustainability.nomenclature.category' required=True
  • description Char
    required=True
  • emission_sources Char
  • examples Char
  • name Char
    help='Examples: Direct emissions from fixed combustion sources, Upstream freight transport' required=True
  • other_information Char
  • reporting_section Char
    required=True
Public methods (0)

No public methods.

New fields (7)
  • action_plan_ids One2many → sustainability.action.plan
    args: 'sustainability.action.plan', 'scenario_id'
  • action_plan_qty Integer
    compute='_compute_action_plan_qty'
  • action_qty Integer
    compute='_compute_action_qty'
  • active Boolean
    default=True
  • description Text
    required=True tracking=True
  • end_date Date
    required=True tracking=True
  • name Char
    required=True tracking=True
Public methods (2)
  • action_see_action_plans(self)
  • action_see_actions(self)

New fields (1)
  • sustainability_is_physical Boolean
    compute='_compute_sustainability_is_physical' readonly=False store=True string='Is physical'
Public methods (0)

No public methods.

Loading…

Loading…

Loading…