Repository
OCA/agreement · module folder · Try on Runboat
Module version
1.0.0
Category
Agreement
Folder size
1.31 MB
License
AGPL-3
Application
No
Auto-installable
No
Website
https://github.com/OCA/agreement
Last tracking update
2026-08-07 09:06:33
Authors
Odoo Community Association (OCA), Tecnativa
Maintainers
Odoo Community Association (OCA), Tecnativa
Committers
Graeme Gellatly, Weblate, OCA-git-bot, oca-ci
Odoo dependencies
OCA/account-invoicing:
OCA/agreement:
odoo/odoo:
- web
- bus
- uom
Python dependencies
None
System dependencies
None
Required by
agreement_rebate_partner_company_group
Description
This module extends the functionality of agreement module to allow
define rebate conditions.

Code Analysis

Views touched (17)
XML IDNameModelTypeStatus
agreement_form agreement form Inherits agreement.agreement_form
agreement_rebate_condition_form agreement.rebate.condition.form agreement.rebate.condition form New
agreement_rebate_condition_tree agreement.rebate.condition.tree agreement.rebate.condition list New
agreement_rebate_line_form agreement.rebate.line.form agreement.rebate.line form New
agreement_rebate_line_tree agreement.rebate.line.tree agreement.rebate.line list New
agreement_rebate_section_tree agreement.rebate.section.tree agreement.rebate.section list New
agreement_rebate_settlement_form agreement.rebate.settlement agreement.rebate.settlement form New
agreement_rebate_settlement_line_search agreement.rebate.settlement.line.search agreement.rebate.settlement.line search New
agreement_rebate_settlement_line_tree agreement.rebate.settlement.line agreement.rebate.settlement.line list New
agreement_rebate_settlement_search agreement.rebate.settlement.search agreement.rebate.settlement search New
agreement_rebate_settlement_tree agreement.rebate.settlement agreement.rebate.settlement list New
agreement_search agreement search Inherits agreement.agreement_search
agreement_type_form_view agreement.type form Inherits agreement.agreement_type_form_view
agreement_type_list_view agreement.type list Inherits agreement.agreement_type_list_view
agreement_type_search agreement.type search Inherits agreement.agreement_type_search
view_invoice_create_wiz agreement.invoice.create.wiz agreement.invoice.create.wiz form New
view_settlement_create_wiz agreement.settlement.create.wiz agreement.settlement.create.wiz form New
HTTP endpoints (0)

No HTTP endpoints found for this module.

Models touched (10)

New fields (1)
  • agreement_rebate_settlement_line_ids Many2many → agreement.rebate.settlement.line
    column1='invoice_line_id' column2='settlement_line_id' comodel_name='agreement.rebate.settlement.line' relation='agreement_rebate_settlement_line_account_invoice_line_rel' string='Settlement lines'
Public methods (0)

No public methods.

New fields (6)
  • additional_consumption Float
    default=0.0
  • is_rebate Boolean
    related='agreement_type_id.is_rebate' string='Is rebate agreement type'
  • rebate_discount Float
    default=0.0 digits='Discount'
  • rebate_line_ids One2many → agreement.rebate.line
    comodel_name='agreement.rebate.line' copy=True inverse_name='agreement_id' string='Agreement rebate lines'
  • rebate_section_ids One2many → agreement.rebate.section
    comodel_name='agreement.rebate.section' copy=True inverse_name='agreement_id' string='Agreement rebate sections'
  • rebate_type Selection
    selection=[('global', 'Global (A discount global for all lines)'), ('line', 'Line (A discount for every line)'), ('section_total', 'Compute total and apply discount rule match'), ('section_prorated', 'Calculate the discount in each amount section')] string='rebate type'
Public methods (0)

No public methods.

New fields (11)
  • agreement_ids Many2many → agreement
    comodel_name='agreement' string='Agreements'
  • agreement_type_ids Many2many → agreement.type
    comodel_name='agreement.type' string='Agreement types'
  • date_from Date
    string='From'
  • date_to Date
    string='To'
  • domain Selection
    default='sale' args: '_domain_selection'
  • invoice_group Selection
    default='settlement' required=True string='Group invoice by' args: [('settlement', 'Settlement'), ('partner', 'Partner'), ('commercial_partner', 'Commercial partner')]
  • invoice_partner_id Many2one → res.partner
    comodel_name='res.partner' string='Force invoice to'
  • invoice_type Selection
    default='out_invoice' required=True args: [('out_invoice', 'Customer Invoice'), ('in_invoice', 'Vendor Bill'), ('out_refund', 'Customer Credit Note'), ('in_refund', 'Vendor Credit Note')]
  • journal_id Many2one → account.journal
    comodel_name='account.journal' required=True string='Journal'
  • product_id Many2one → product.product
    comodel_name='product.product' required=True string='Product'
  • settlements_ids Many2many → agreement.rebate.settlement
    comodel_name='agreement.rebate.settlement' string='Rebate settlements'
Public methods (2)
  • action_create_invoice(self)
  • action_show_invoices(self, invoices)

New fields (2)
  • name Char
    string='Rebate condition'
  • rebate_domain Char
    string='Domain'
Public methods (0)

No public methods.

New fields (8)
  • agreement_id Many2one → agreement
    comodel_name='agreement' string='Agreement'
  • rebate_category_ids Many2many → product.category
    comodel_name='product.category' string='Product categories'
  • rebate_condition_id Many2one → agreement.rebate.condition
    comodel_name='agreement.rebate.condition' string='Rebate condition'
  • rebate_discount Float
  • rebate_domain Char
    compute='_compute_rebate_domain' readonly=False store=True
  • rebate_product_ids Many2many → product.product
    comodel_name='product.product' string='Products'
  • rebate_product_tmpl_ids Many2many → product.template
    comodel_name='product.template' string='Product templates'
  • rebate_target Selection
    args: [('product', 'Product variant'), ('product_tmpl', 'Product templates'), ('category', 'Product categories'), ('condition', 'Rebate condition'), ('domain', 'Rebate domain')]
Public methods (0)

No public methods.

New fields (4)
  • agreement_id Many2one → agreement
    comodel_name='agreement' string='Agreement'
  • amount_from Float
    string='From'
  • amount_to Float
    string='To'
  • rebate_discount Float
    string='% Dto'
Public methods (0)

No public methods.

New fields (11)
  • active Boolean
    default=True
  • amount_invoiced Float
  • amount_rebate Float
  • company_id Many2one → res.company
    comodel_name='res.company' default=<expr> index=True required=True string='Company'
  • date Date
    default=fields.Date.today
  • date_from Date
  • date_to Date
  • invoice_id Many2one → account.move
    comodel_name='account.move' string='Invoice'
  • line_ids One2many → agreement.rebate.settlement.line
    comodel_name='agreement.rebate.settlement.line' inverse_name='settlement_id' string='Settlement Lines'
  • name Char
    default='/' required=True
  • partner_id Many2one → res.partner
    comodel_name='res.partner' string='Partner'
Public methods (6)
  • action_show_agreement(self)
  • action_show_detail(self)
  • action_show_settlement(self)
  • action_show_settlement_lines(self)
  • create(self, vals_list)
    @api.model_create_multi
  • write(self, vals)

New fields (18)
  • active Boolean
    default=True
  • agreement_id Many2one → agreement
    comodel_name='agreement' required=True string='Agreement'
  • amount_from Float
    readonly=True string='From'
  • amount_gross Float
  • amount_invoiced Float
  • amount_rebate Float
  • amount_to Float
    readonly=True string='To'
  • company_id Many2one → res.company
    comodel_name='res.company' related='settlement_id.company_id' string='Company'
  • date Date
    related='settlement_id.date' store=True
  • invoice_line_ids Many2many → account.move.line
    column1='settlement_line_id' column2='invoice_line_id' comodel_name='account.move.line' relation='agreement_rebate_settlement_line_account_invoice_line_rel' string='Invoice lines'
  • invoice_status Selection
    compute='_compute_invoice_status' readonly=False store=True args: [('invoiced', 'Fully Invoiced'), ('to_invoice', 'To Invoice'), ('no', 'Nothing to Invoice')]
  • partner_id Many2one → res.partner
    comodel_name='res.partner' string='Partner'
  • percent Float
    readonly=True
  • rebate_line_id Many2one → agreement.rebate.line
    comodel_name='agreement.rebate.line' string='Rebate Line'
  • rebate_section_id Many2one → agreement.rebate.section
    comodel_name='agreement.rebate.section' string='Rebate section'
  • rebate_type Selection
    related='agreement_id.rebate_type' string='Rebate type'
  • settlement_id Many2one → agreement.rebate.settlement
    comodel_name='agreement.rebate.settlement' ondelete='cascade' string='Rebate settlement'
  • target_domain Char
Public methods (2)
  • action_show_detail(self)
  • write(self, vals)

New fields (8)
  • agreement_ids Many2many → agreement
    comodel_name='agreement' string='Agreements'
  • agreement_type_ids Many2many → agreement.type
    comodel_name='agreement.type' string='Agreement types'
  • date Date
    default=fields.Date.today
  • date_from Date
    string='From'
  • date_to Date
    required=True string='To'
  • discard_settled_agreement Boolean
    default='True' help='If checked, the agreements with settlements in selected period will be discard' string='Discard settled agreements'
  • domain Selection
    default='sale' args: '_domain_selection'
  • journal_ids Many2many → account.journal
    comodel_name='account.journal' string='Journals'
Public methods (3)
  • action_create_settlement(self)
  • get_agregate_fields(self)
  • get_settlement_key(self, agreement)

New fields (1)
  • is_rebate Boolean
    string='Is rebate agreement type'
Public methods (0)

No public methods.

Loading…

Loading…

Loading…

Loading…