Link coupons to order lines

sale_coupon_order_line_link
REPOSITORY
REPOSITORYOCA/sale-promotion
GIT
GIThttps://github.com/OCA/sale-promotion.git
GIT FOLDER
GIT FOLDERhttps://github.com/OCA/sale-promotion/tree/15.0/sale_coupon_order_line_link
VERSION
VERSION 1.0.0
CATEGORY
CATEGORYSale
LICENSE
LICENSEAGPL-3
APPLICATION
APPLICATIONNo
AUTO-INSTALLABLE
AUTO-INSTALLABLENo
AUTHORS
AUTHORSTecnativa, Odoo Community Association (OCA)
MAINTAINERS
MAINTAINERSTecnativa, Odoo Community Association (OCA)
COMMITTERS
COMMITTERSWeblate, OCA-git-bot, David, oca-ci
WEBSITE
WEBSITEhttps://github.com/OCA/sale-promotion
LAST TRACKING UPDATE
LAST TRACKING UPDATE2026-07-06 00:46:29
ODOO DEPENDENCIES
ODOO DEPENDENCIES odoo/odoo:
    - sale_coupon
    - coupon
    - account
    - base_setup
    - base
    - web
    - product
    - mail
    - bus
    - web_tour
    - uom
    - analytic
    - portal
    - web_editor
    - http_routing
    - auth_signup
    - digest
    - resource
    - sale
    - sales_team
    - payment
    - utm
PYTHON DEPENDENCIES
PYTHON DEPENDENCIES Not have
SYSTEM DEPENDENCIES
SYSTEM DEPENDENCIES Not have
DESCRIPTION
DESCRIPTION

Code Analysis

Views touched (3)
XML IDNameModelTypeStatus
view_order_form sale.order xpath Inherits sale.view_order_form
view_order_line_tree sale.order.line field Inherits sale.view_order_line_tree
view_order_product_search sale.report field Inherits sale.view_order_product_search
Models touched (3)

New fields (0)

No new fields.

Public methods (1)
  • write(self, vals)
    We're looking for reward lines set in the write, from those, we'll get the proper ids to write them into the related lines

New fields (4)
  • coupon_program_id Many2one → coupon.program
    comodel_name='coupon.program' ondelete='restrict' string='Coupon Program'
  • reward_generated_line_ids Many2many → sale.order.line
    column1='sale_line_id' column2='reward_generated_line_id' comodel_name='sale.order.line' help='Link on the reward lines generated meeting this line as criteria' relation='sale_line_reward_generated_line_rel' string='Reward Generated lines'
  • reward_line_ids Many2many → sale.order.line
    column1='sale_line_id' column2='reward_line_id' comodel_name='sale.order.line' help='Link on the reward lines applied from this one' relation='sale_line_reward_line_rel' string='Reward lines'
  • reward_origin_generated_line_ids Many2many → sale.order.line
    column1='reward_generated_line_id' column2='sale_line_id' comodel_name='sale.order.line' help='Origin Link on the reward lines generated meeting this line as criteria' relation='sale_line_reward_generated_line_rel' string='Origin Reward Generated lines'
Public methods (1)
  • write(self, vals)
    When the reward line is update we should refresh the line links as well

New fields (1)
  • coupon_program_id Many2one → coupon.program
    comodel_name='coupon.program' string='Coupon Program'
Public methods (0)

No public methods.

REPOSITORY
REPOSITORYOCA/sale-promotion
GIT
GIThttps://github.com/OCA/sale-promotion.git
GIT FOLDER
GIT FOLDERhttps://github.com/OCA/sale-promotion/tree/14.0/sale_coupon_order_line_link
VERSION
VERSION 1.0.2
CATEGORY
CATEGORYSale
LICENSE
LICENSEAGPL-3
APPLICATION
APPLICATIONNo
AUTO-INSTALLABLE
AUTO-INSTALLABLENo
AUTHORS
AUTHORSTecnativa, Odoo Community Association (OCA)
MAINTAINERS
MAINTAINERSTecnativa, Odoo Community Association (OCA)
COMMITTERS
COMMITTERSdavid, OCA Transbot, oca-travis, Weblate, OCA-git-bot, David, Ilyas, ilyasProgrammer
WEBSITE
WEBSITEhttps://github.com/OCA/sale-promotion
LAST TRACKING UPDATE
LAST TRACKING UPDATE2026-07-06 00:40:50
ODOO DEPENDENCIES
ODOO DEPENDENCIES odoo/odoo:
    - sale_coupon
    - coupon
    - account
    - base_setup
    - base
    - web
    - product
    - mail
    - bus
    - web_tour
    - uom
    - analytic
    - portal
    - web_editor
    - http_routing
    - auth_signup
    - digest
    - resource
    - sale
    - sales_team
    - payment
    - utm
PYTHON DEPENDENCIES
PYTHON DEPENDENCIES Not have
SYSTEM DEPENDENCIES
SYSTEM DEPENDENCIES Not have
DESCRIPTION
DESCRIPTION

Code Analysis

Views touched (3)
XML IDNameModelTypeStatus
view_order_form sale.order xpath Inherits sale.view_order_form
view_order_line_tree sale.order.line field Inherits sale.view_order_line_tree
view_order_product_search sale.report field Inherits sale.view_order_product_search
Models touched (3)

New fields (0)

No new fields.

Public methods (1)
  • write(self, vals)
    We're looking for reward lines set in the write, from those, we'll get the proper ids to write them into the related lines

New fields (4)
  • coupon_program_id Many2one → coupon.program
    comodel_name='coupon.program' ondelete='restrict' string='Coupon Program'
  • reward_generated_line_ids Many2many → sale.order.line
    column1='sale_line_id' column2='reward_generated_line_id' comodel_name='sale.order.line' help='Link on the reward lines generated meeting this line as criteria' relation='sale_line_reward_generated_line_rel' string='Reward Generated lines'
  • reward_line_ids Many2many → sale.order.line
    column1='sale_line_id' column2='reward_line_id' comodel_name='sale.order.line' help='Link on the reward lines applied from this one' relation='sale_line_reward_line_rel' string='Reward lines'
  • reward_origin_generated_line_ids Many2many → sale.order.line
    column1='reward_generated_line_id' column2='sale_line_id' comodel_name='sale.order.line' help='Origin Link on the reward lines generated meeting this line as criteria' relation='sale_line_reward_generated_line_rel' string='Origin Reward Generated lines'
Public methods (1)
  • write(self, vals)
    When the reward line is update we should refresh the line links as well

New fields (1)
  • coupon_program_id Many2one → coupon.program
    comodel_name='coupon.program' string='Coupon Program'
Public methods (0)

No public methods.

REPOSITORY
REPOSITORYOCA/sale-promotion
GIT
GIThttps://github.com/OCA/sale-promotion.git
GIT FOLDER
GIT FOLDERhttps://github.com/OCA/sale-promotion/tree/13.0/sale_coupon_order_line_link
VERSION
VERSION 1.2.1
CATEGORY
CATEGORYSale
LICENSE
LICENSEAGPL-3
APPLICATION
APPLICATIONNo
AUTO-INSTALLABLE
AUTO-INSTALLABLENo
AUTHORS
AUTHORSTecnativa, Odoo Community Association (OCA)
MAINTAINERS
MAINTAINERSTecnativa, Odoo Community Association (OCA)
COMMITTERS
COMMITTERSGitHub, david, oca-travis, OCA-git-bot, David, oca-ci
WEBSITE
WEBSITEhttps://github.com/OCA/sale-promotion
LAST TRACKING UPDATE
LAST TRACKING UPDATE2026-07-06 00:34:09
ODOO DEPENDENCIES
ODOO DEPENDENCIES odoo/odoo:
    - sale_coupon
    - sale_management
    - sale
    - sales_team
    - base
    - mail
    - base_setup
    - web
    - bus
    - web_tour
    - payment
    - account
    - product
    - uom
    - analytic
    - portal
    - web_editor
    - http_routing
    - auth_signup
    - digest
    - resource
    - utm
PYTHON DEPENDENCIES
PYTHON DEPENDENCIES Not have
SYSTEM DEPENDENCIES
SYSTEM DEPENDENCIES Not have
DESCRIPTION
DESCRIPTION

Code Analysis

Views touched (3)
XML IDNameModelTypeStatus
view_order_form sale.order xpath Inherits sale.view_order_form
view_order_line_tree sale.order.line field Inherits sale.view_order_line_tree
view_order_product_search sale.report field Inherits sale.view_order_product_search
Models touched (3)

New fields (0)

No new fields.

Public methods (1)
  • write(self, vals)
    We're looking for reward lines set in the write, from those, we'll get the proper ids to write them into the related lines

New fields (4)
  • coupon_program_id Many2one → sale.coupon.program
    comodel_name='sale.coupon.program' ondelete='restrict' string='Coupon Program'
  • reward_generated_line_ids Many2many → sale.order.line
    column1='sale_line_id' column2='reward_generated_line_id' comodel_name='sale.order.line' help='Link on the reward lines generated meeting this line as criteria' relation='sale_line_reward_generated_line_rel' string='Reward Generated lines'
  • reward_line_ids Many2many → sale.order.line
    column1='sale_line_id' column2='reward_line_id' comodel_name='sale.order.line' help='Link on the reward lines applied from this one' relation='sale_line_reward_line_rel' string='Reward lines'
  • reward_origin_generated_line_ids Many2many → sale.order.line
    column1='reward_generated_line_id' column2='sale_line_id' comodel_name='sale.order.line' help='Origin Link on the reward lines generated meeting this line as criteria' relation='sale_line_reward_generated_line_rel' string='Origin Reward Generated lines'
Public methods (1)
  • write(self, vals)
    When the reward line is update we should refresh the line links as well

New fields (1)
  • coupon_program_id Many2one → sale.coupon.program
    comodel_name='sale.coupon.program' string='Coupon Program'
Public methods (0)

No public methods.