Product Country Restriction

product_country_restriction
REPOSITORY
REPOSITORYOCA/product-attribute
GIT
GIThttps://github.com/OCA/product-attribute.git
GIT FOLDER
GIT FOLDERhttps://github.com/OCA/product-attribute/tree/16.0/product_country_restriction
VERSION
VERSION 1.0.1
CATEGORY
CATEGORYUncategorized
LICENSE
LICENSEAGPL-3
APPLICATION
APPLICATIONNo
AUTO-INSTALLABLE
AUTO-INSTALLABLENo
AUTHORS
AUTHORSOdoo Community Association (OCA), ACSONE SA/NV
MAINTAINERS
MAINTAINERSOdoo Community Association (OCA), ACSONE SA/NV
COMMITTERS
COMMITTERSWeblate, OCA-git-bot, oca-ci, Xavier Bouquiaux, valentinagiuliani-rapsodoo
WEBSITE
WEBSITEhttps://github.com/OCA/product-attribute
LAST TRACKING UPDATE
LAST TRACKING UPDATE2026-07-06 00:53:48
ODOO DEPENDENCIES
ODOO DEPENDENCIES odoo/odoo:
    - base
    - product
    - mail
    - base_setup
    - web
    - bus
    - web_tour
    - uom
PYTHON DEPENDENCIES
PYTHON DEPENDENCIES Not have
SYSTEM DEPENDENCIES
SYSTEM DEPENDENCIES Not have
DESCRIPTION
DESCRIPTION

Code Analysis

Views touched (11)
XML IDNameModelTypeStatus
product_country_restriction_form_view product.country.restriction.form (in product_country_restriction) product.country.restriction form New
product_country_restriction_item_form_view product.country.restriction.item.form (in product_country_restriction) product.country.restriction.item form New
product_country_restriction_item_search_view product.country.restriction.item.search (in product_country_restriction) product.country.restriction.item search New
product_country_restriction_item_tree_view product.country.restriction.item.tree (in product_country_restriction) product.country.restriction.item tree New
product_country_restriction_rule_form_view product.country.restriction.rule.form (in product_country_restriction) product.country.restriction.rule form New
product_country_restriction_rule_search_view product.country.restriction.rule.search (in product_country_restriction) product.country.restriction.rule search New
product_country_restriction_rule_tree_view product.country.restriction.rule.tree (in product_country_restriction) product.country.restriction.rule tree New
product_country_restriction_search_view product.country.restriction.search (in product_country_restriction) product.country.restriction search New
product_country_restriction_tree_view product.country.restriction.tree (in product_country_restriction) product.country.restriction tree New
view_country_form res.country.form res.country field Inherits base.view_country_form
view_partner_form res.partner.form res.partner xpath Inherits base.view_partner_form
Models touched (9)

New fields (0)

No new fields.

Public methods (0)

No public methods.

New fields (8)
  • active Boolean
    copy=False default=True
  • company_id Many2one → res.company
    comodel_name='res.company' default=<expr> string='Company'
  • country_group_ids Many2many → res.country.group
    column1='restriction_id' column2='group_id' comodel_name='res.country.group' help='Fill in this if you want that retriction apply on these groups(in addition to particular countries).' relation='product_country_restriction_country_group_rel' string='Country Groups'
  • country_ids Many2many → res.country
    column1='restriction_id' column2='country_id' comodel_name='res.country' help='Fill in this if you want that restriction apply on these(in addition to country groups).' relation='product_country_restriction_country_rel' string='Countries'
  • item_ids One2many → product.country.restriction.item
    comodel_name='product.country.restriction.item' inverse_name='restriction_id' string='Country Restriction Items'
  • name Char
    required=True translate=True
  • resulting_country_ids Many2many → res.country
    comodel_name='res.country' compute='_compute_resulting_country_ids' readonly=True
  • sequence Integer
    default=10
Public methods (0)

No public methods.

New fields (10)
  • end_date Date
  • name Char
    compute='_compute_name' index=True store=True
  • product_category_id Many2one → product.category
    comodel_name='product.category' index=True ondelete='cascade' string='Product Category'
  • product_id Many2one → product.product
    comodel_name='product.product' index=True ondelete='cascade' string='Variant'
  • product_template_id Many2one → product.template
    comodel_name='product.template' index=True ondelete='cascade' string='Product'
  • restriction_id Many2one → product.country.restriction
    comodel_name='product.country.restriction' index=True ondelete='cascade'
  • rule_code Char
    readonly=True related='rule_id.code'
  • rule_id Many2one → product.country.restriction.rule
    comodel_name='product.country.restriction.rule' ondelete='restrict' required=True string='Rule'
  • sequence Integer
    default=10
  • start_date Date
Public methods (0)

No public methods.

New fields (3)
  • code Char
    required=True
  • name Char
    required=True translate=True
  • sequence Integer
    default=10
Public methods (0)

No public methods.

New fields (0)

No new fields.

Public methods (0)

No public methods.

New fields (0)

No new fields.

Public methods (0)

No public methods.

New fields (2)
  • country_restriction_id Many2one → product.country.restriction
    comodel_name='product.country.restriction'
  • country_restriction_strategy Selection
    default=<expr> help='Choose here how your country rules apply.[Authorize]: Authorize all products but those for which strategyapply.[Restrict]: Restrict all products but those for which strategy apply.' selection=<expr>
Public methods (0)

No public methods.

New fields (2)
  • product_country_restriction_count Integer
    compute='_compute_product_country_restriction_count' readonly=True
  • product_country_restriction_ids Many2many → product.country.restriction
    comodel_name='product.country.restriction' compute='_compute_product_country_restriction_ids'
Public methods (1)
  • action_view_country_restrictions(self)

New fields (1)
  • country_restriction_id Many2one → product.country.restriction
    comodel_name='product.country.restriction' default=<expr> string='Country Restriction'
Public methods (0)

No public methods.

REPOSITORY
REPOSITORYOCA/product-attribute
GIT
GIThttps://github.com/OCA/product-attribute.git
GIT FOLDER
GIT FOLDERhttps://github.com/OCA/product-attribute/tree/10.0/product_country_restriction
VERSION
VERSION 1.1.1
CATEGORY
CATEGORYUncategorized
LICENSE
LICENSEAGPL-3
APPLICATION
APPLICATIONNo
AUTO-INSTALLABLE
AUTO-INSTALLABLENo
AUTHORS
AUTHORSOdoo Community Association (OCA), ACSONE SA/NV
MAINTAINERS
MAINTAINERSOdoo Community Association (OCA), ACSONE SA/NV
COMMITTERS
COMMITTERSDenis Roussel, oca-travis, OCA-git-bot
WEBSITE
WEBSITEhttps://github.com/OCA/product-attribute
LAST TRACKING UPDATE
LAST TRACKING UPDATE2026-07-06 00:19:57
ODOO DEPENDENCIES
ODOO DEPENDENCIES odoo/odoo:
    - base
    - product
    - decimal_precision
    - mail
    - base_setup
    - web_kanban
    - web
    - bus
    - web_tour
    - report
PYTHON DEPENDENCIES
PYTHON DEPENDENCIES Not have
SYSTEM DEPENDENCIES
SYSTEM DEPENDENCIES Not have
DESCRIPTION
DESCRIPTION

Code Analysis

Views touched (11)
XML IDNameModelTypeStatus
product_country_restriction_form_view product.country.restriction.form (in product_country_restriction) product.country.restriction form New
product_country_restriction_item_form_view product.country.restriction.item.form (in product_country_restriction) product.country.restriction.item form New
product_country_restriction_item_search_view product.country.restriction.item.search (in product_country_restriction) product.country.restriction.item search New
product_country_restriction_item_tree_view product.country.restriction.item.tree (in product_country_restriction) product.country.restriction.item tree New
product_country_restriction_rule_form_view product.country.restriction.rule.form (in product_country_restriction) product.country.restriction.rule form New
product_country_restriction_rule_search_view product.country.restriction.rule.search (in product_country_restriction) product.country.restriction.rule search New
product_country_restriction_rule_tree_view product.country.restriction.rule.tree (in product_country_restriction) product.country.restriction.rule tree New
product_country_restriction_search_view product.country.restriction.search (in product_country_restriction) product.country.restriction search New
product_country_restriction_tree_view product.country.restriction.tree (in product_country_restriction) product.country.restriction tree New
view_country_form res.country.form res.country field Inherits base.view_country_form
view_partner_form res.partner.form res.partner xpath Inherits base.view_partner_form
Models touched (9)

New fields (0)

No new fields.

Public methods (0)

No public methods.

New fields (8)
  • active Boolean
    copy=False default=True
  • company_id Many2one → res.company
    comodel_name='res.company' default=<expr> string='Company'
  • country_group_ids Many2many → res.country.group
    column1='restriction_id' column2='group_id' comodel_name='res.country.group' help='Fill in this if you want that retriction apply on these groups(in addition to particular countries).' relation='product_country_restriction_country_group_rel' string='Country Groups'
  • country_ids Many2many → res.country
    column1='restriction_id' column2='country_id' comodel_name='res.country' help='Fill in this if you want that restriction apply on these(in addition to country groups).' relation='product_country_restriction_country_rel' string='Countries'
  • item_ids One2many → product.country.restriction.item
    comodel_name='product.country.restriction.item' inverse_name='restriction_id' string='Country Restriction Items'
  • name Char
    required=True translate=True
  • resulting_country_ids Many2many → res.country
    comodel_name='res.country' compute='_compute_resulting_country_ids' readonly=True
  • sequence Integer
    default=10
Public methods (0)

No public methods.

New fields (10)
  • end_date Date
  • name Char
    compute='_compute_name' index=True store=True
  • product_category_id Many2one → product.category
    comodel_name='product.category' index=True ondelete='cascade' string='Product Category'
  • product_id Many2one → product.product
    comodel_name='product.product' index=True ondelete='cascade' string='Variant'
  • product_template_id Many2one → product.template
    comodel_name='product.template' index=True ondelete='cascade' string='Product'
  • restriction_id Many2one → product.country.restriction
    comodel_name='product.country.restriction' index=True ondelete='cascade'
  • rule_code Char
    readonly=True related='rule_id.code'
  • rule_id Many2one → product.country.restriction.rule
    comodel_name='product.country.restriction.rule' ondelete='restrict' required=True string='Rule'
  • sequence Integer
    default=10
  • start_date Date
Public methods (0)

No public methods.

New fields (3)
  • code Char
    required=True
  • name Char
    required=True translate=True
  • sequence Integer
    default=10
Public methods (0)

No public methods.

New fields (0)

No new fields.

Public methods (0)

No public methods.

New fields (0)

No new fields.

Public methods (0)

No public methods.

New fields (2)
  • country_restriction_strategy Selection
    default=<expr> help='Choose here how your country rules apply.[Authorize]: Authorize all products but those for which strategyapply.[Restrict]: Restrict all products but those for which strategy apply.' selection=<expr>
  • default_country_restriction_id Many2one → product.country.restriction
    comodel_name='product.country.restriction'
Public methods (0)

No public methods.

New fields (2)
  • product_country_restriction_count Integer
    compute='_compute_product_country_restriction_count' readonly=True
  • product_country_restriction_ids Many2many → product.country.restriction
    comodel_name='product.country.restriction' compute='_compute_product_country_restriction_ids'
Public methods (1)
  • action_view_country_restrictions(self)
    @api.multi

New fields (1)
  • country_restriction_id Many2one → product.country.restriction
    comodel_name='product.country.restriction' default=<expr> string='Country Restriction'
Public methods (0)

No public methods.