Skip to content

Commit

Permalink
[MIG] coupon_incompatibility: Migration to 16. and renamed to loyalty…
Browse files Browse the repository at this point in the history
…_incompatibility
  • Loading branch information
ernesto-garcia-tecnativa committed Oct 5, 2023
1 parent c3740b8 commit cbb0b3f
Show file tree
Hide file tree
Showing 11 changed files with 44 additions and 44 deletions.
20 changes: 10 additions & 10 deletions loyalty_incompatibility/README.rst
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
========================
Coupon incompatibilities
========================
=========================
Loyalty incompatibilities
=========================

..
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:d0f226b03c0cdd23f7863e8e0d89ee38292bfa13164fea87ce6b1f570717a4ee
!! source digest: sha256:7bbd36fbea8d0f0f450e8406233e896315f165ff8e839dc5079e061efcef3a1a
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
.. |badge1| image:: https://img.shields.io/badge/maturity-Production%2FStable-green.png
Expand All @@ -17,13 +17,13 @@ Coupon incompatibilities
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
:alt: License: AGPL-3
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fsale--promotion-lightgray.png?logo=github
:target: https://github.com/OCA/sale-promotion/tree/15.0/coupon_incompatibility
:target: https://github.com/OCA/sale-promotion/tree/16.0-mig-coupon_incompatibility/loyalty_incompatibility
:alt: OCA/sale-promotion
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
:target: https://translation.odoo-community.org/projects/sale-promotion-15-0/sale-promotion-15-0-coupon_incompatibility
:target: https://translation.odoo-community.org/projects/sale-promotion-16-0-mig-coupon_incompatibility/sale-promotion-16-0-mig-coupon_incompatibility-loyalty_incompatibility
:alt: Translate me on Weblate
.. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png
:target: https://runboat.odoo-community.org/builds?repo=OCA/sale-promotion&target_branch=15.0
:target: https://runboat.odoo-community.org/builds?repo=OCA/sale-promotion&target_branch=16.0-mig-coupon_incompatibility
:alt: Try me on Runboat

|badge1| |badge2| |badge3| |badge4| |badge5|
Expand All @@ -40,7 +40,7 @@ Configuration

To configure promotion incompatibilities (either coupons or promotion programs):

#. Go to *Sales > Products > Coupon Programs* and select or create a new one.
#. Go to *Sales > Products > Discount & Loyalty* and select or create a new one.
#. In the *Incompatible Promotions* set the promotions that aren't compatible with the
one you're configuring.

Expand All @@ -50,7 +50,7 @@ Bug Tracker
Bugs are tracked on `GitHub Issues <https://github.com/OCA/sale-promotion/issues>`_.
In case of trouble, please check there if your issue has already been reported.
If you spotted it first, help us to smash it by providing a detailed and welcomed
`feedback <https://github.com/OCA/sale-promotion/issues/new?body=module:%20coupon_incompatibility%0Aversion:%2015.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
`feedback <https://github.com/OCA/sale-promotion/issues/new?body=module:%20loyalty_incompatibility%0Aversion:%2016.0-mig-coupon_incompatibility%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.

Do not contact contributors directly about support or help with technical issues.

Expand Down Expand Up @@ -92,6 +92,6 @@ Current `maintainer <https://odoo-community.org/page/maintainer-role>`__:

|maintainer-chienandalu|

This module is part of the `OCA/sale-promotion <https://github.com/OCA/sale-promotion/tree/15.0/coupon_incompatibility>`_ project on GitHub.
This module is part of the `OCA/sale-promotion <https://github.com/OCA/sale-promotion/tree/16.0-mig-coupon_incompatibility/loyalty_incompatibility>`_ project on GitHub.

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
6 changes: 3 additions & 3 deletions loyalty_incompatibility/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@
# Copyright 2023 Tecnativa - Stefan Ungureanu
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
{
"name": "Coupon incompatibilities",
"name": "Loyalty incompatibilities",
"summary": "Allows to set incompatibility rules between promotions",
"version": "15.0.1.0.0",
"version": "16.0.1.0.0",
"development_status": "Production/Stable",
"category": "Sale",
"website": "https://github.com/OCA/sale-promotion",
"author": "Tecnativa, Odoo Community Association (OCA)",
"maintainers": ["chienandalu"],
"license": "AGPL-3",
"depends": ["coupon"],
"depends": ["loyalty"],
"data": ["views/sale_coupon_program_views.xml"],
}
10 changes: 5 additions & 5 deletions loyalty_incompatibility/i18n/es.po
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * coupon_incompatibility
# * loyalty_incompatibility
#
msgid ""
msgstr ""
Expand All @@ -17,13 +17,13 @@ msgstr ""
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
"X-Generator: Poedit 3.2.2\n"

#. module: coupon_incompatibility
#: model:ir.model,name:coupon_incompatibility.model_coupon_program
#. module: loyalty_incompatibility
#: model:ir.model,name:loyalty_incompatibility.model_coupon_program
msgid "Coupon display on a website"
msgstr ""

#. module: coupon_incompatibility
#: model:ir.model.fields,field_description:coupon_incompatibility.field_coupon_program__incompatible_promotion_ids
#. module: loyalty_incompatibility
#: model:ir.model.fields,field_description:loyalty_incompatibility.field_coupon_program__incompatible_promotion_ids
msgid "Incompatible Promotions"
msgstr "Promociones incompatibles"

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * coupon_incompatibility
# * loyalty_incompatibility
#
msgid ""
msgstr ""
Expand All @@ -13,12 +13,12 @@ msgstr ""
"Content-Transfer-Encoding: \n"
"Plural-Forms: \n"

#. module: coupon_incompatibility
#: model:ir.model,name:coupon_incompatibility.model_coupon_program
#. module: loyalty_incompatibility
#: model:ir.model,name:loyalty_incompatibility.model_coupon_program
msgid "Coupon display on a website"
msgstr ""

#. module: coupon_incompatibility
#: model:ir.model.fields,field_description:coupon_incompatibility.field_coupon_program__incompatible_promotion_ids
#. module: loyalty_incompatibility
#: model:ir.model.fields,field_description:loyalty_incompatibility.field_coupon_program__incompatible_promotion_ids
msgid "Incompatible Promotions"
msgstr ""
6 changes: 3 additions & 3 deletions loyalty_incompatibility/models/coupon_program.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@
from odoo import fields, models


class CouponProgram(models.Model):
_inherit = "coupon.program"
class LoyaltyProgram(models.Model):
_inherit = "loyalty.program"

incompatible_promotion_ids = fields.Many2many(
comodel_name="coupon.program",
comodel_name="loyalty.program",
relation="sale_coupon_program_incompatibility_rel",
column1="program_id",
column2="incompatible_program_id",
Expand Down
2 changes: 1 addition & 1 deletion loyalty_incompatibility/readme/CONFIGURE.rst
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
To configure promotion incompatibilities (either coupons or promotion programs):

#. Go to *Sales > Products > Coupon Programs* and select or create a new one.
#. Go to *Sales > Products > Discount & Loyalty* and select or create a new one.
#. In the *Incompatible Promotions* set the promotions that aren't compatible with the
one you're configuring.
16 changes: 8 additions & 8 deletions loyalty_incompatibility/static/description/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="generator" content="Docutils: https://docutils.sourceforge.io/" />
<title>Coupon incompatibilities</title>
<title>Loyalty incompatibilities</title>
<style type="text/css">

/*
Expand Down Expand Up @@ -360,16 +360,16 @@
</style>
</head>
<body>
<div class="document" id="coupon-incompatibilities">
<h1 class="title">Coupon incompatibilities</h1>
<div class="document" id="loyalty-incompatibilities">
<h1 class="title">Loyalty incompatibilities</h1>

<!-- !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:d0f226b03c0cdd23f7863e8e0d89ee38292bfa13164fea87ce6b1f570717a4ee
!! source digest: sha256:7bbd36fbea8d0f0f450e8406233e896315f165ff8e839dc5079e061efcef3a1a
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
<p><a class="reference external image-reference" href="https://odoo-community.org/page/development-status"><img alt="Production/Stable" src="https://img.shields.io/badge/maturity-Production%2FStable-green.png" /></a> <a class="reference external image-reference" href="http://www.gnu.org/licenses/agpl-3.0-standalone.html"><img alt="License: AGPL-3" src="https://img.shields.io/badge/licence-AGPL--3-blue.png" /></a> <a class="reference external image-reference" href="https://github.com/OCA/sale-promotion/tree/15.0/coupon_incompatibility"><img alt="OCA/sale-promotion" src="https://img.shields.io/badge/github-OCA%2Fsale--promotion-lightgray.png?logo=github" /></a> <a class="reference external image-reference" href="https://translation.odoo-community.org/projects/sale-promotion-15-0/sale-promotion-15-0-coupon_incompatibility"><img alt="Translate me on Weblate" src="https://img.shields.io/badge/weblate-Translate%20me-F47D42.png" /></a> <a class="reference external image-reference" href="https://runboat.odoo-community.org/builds?repo=OCA/sale-promotion&amp;target_branch=15.0"><img alt="Try me on Runboat" src="https://img.shields.io/badge/runboat-Try%20me-875A7B.png" /></a></p>
<p><a class="reference external image-reference" href="https://odoo-community.org/page/development-status"><img alt="Production/Stable" src="https://img.shields.io/badge/maturity-Production%2FStable-green.png" /></a> <a class="reference external image-reference" href="http://www.gnu.org/licenses/agpl-3.0-standalone.html"><img alt="License: AGPL-3" src="https://img.shields.io/badge/licence-AGPL--3-blue.png" /></a> <a class="reference external image-reference" href="https://github.com/OCA/sale-promotion/tree/16.0-mig-coupon_incompatibility/loyalty_incompatibility"><img alt="OCA/sale-promotion" src="https://img.shields.io/badge/github-OCA%2Fsale--promotion-lightgray.png?logo=github" /></a> <a class="reference external image-reference" href="https://translation.odoo-community.org/projects/sale-promotion-16-0-mig-coupon_incompatibility/sale-promotion-16-0-mig-coupon_incompatibility-loyalty_incompatibility"><img alt="Translate me on Weblate" src="https://img.shields.io/badge/weblate-Translate%20me-F47D42.png" /></a> <a class="reference external image-reference" href="https://runboat.odoo-community.org/builds?repo=OCA/sale-promotion&amp;target_branch=16.0-mig-coupon_incompatibility"><img alt="Try me on Runboat" src="https://img.shields.io/badge/runboat-Try%20me-875A7B.png" /></a></p>
<p>Base module to handle incompatibility between promotions and coupons</p>
<p><strong>Table of contents</strong></p>
<div class="contents local topic" id="contents">
Expand All @@ -388,7 +388,7 @@ <h1 class="title">Coupon incompatibilities</h1>
<h1><a class="toc-backref" href="#toc-entry-1">Configuration</a></h1>
<p>To configure promotion incompatibilities (either coupons or promotion programs):</p>
<ol class="arabic simple">
<li>Go to <em>Sales &gt; Products &gt; Coupon Programs</em> and select or create a new one.</li>
<li>Go to <em>Sales &gt; Products &gt; Discount &amp; Loyalty</em> and select or create a new one.</li>
<li>In the <em>Incompatible Promotions</em> set the promotions that aren’t compatible with the
one you’re configuring.</li>
</ol>
Expand All @@ -398,7 +398,7 @@ <h1><a class="toc-backref" href="#toc-entry-2">Bug Tracker</a></h1>
<p>Bugs are tracked on <a class="reference external" href="https://github.com/OCA/sale-promotion/issues">GitHub Issues</a>.
In case of trouble, please check there if your issue has already been reported.
If you spotted it first, help us to smash it by providing a detailed and welcomed
<a class="reference external" href="https://github.com/OCA/sale-promotion/issues/new?body=module:%20coupon_incompatibility%0Aversion:%2015.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**">feedback</a>.</p>
<a class="reference external" href="https://github.com/OCA/sale-promotion/issues/new?body=module:%20loyalty_incompatibility%0Aversion:%2016.0-mig-coupon_incompatibility%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**">feedback</a>.</p>
<p>Do not contact contributors directly about support or help with technical issues.</p>
</div>
<div class="section" id="credits">
Expand Down Expand Up @@ -429,7 +429,7 @@ <h2><a class="toc-backref" href="#toc-entry-6">Maintainers</a></h2>
promote its widespread use.</p>
<p>Current <a class="reference external" href="https://odoo-community.org/page/maintainer-role">maintainer</a>:</p>
<p><a class="reference external image-reference" href="https://github.com/chienandalu"><img alt="chienandalu" src="https://github.com/chienandalu.png?size=40px" /></a></p>
<p>This module is part of the <a class="reference external" href="https://github.com/OCA/sale-promotion/tree/15.0/coupon_incompatibility">OCA/sale-promotion</a> project on GitHub.</p>
<p>This module is part of the <a class="reference external" href="https://github.com/OCA/sale-promotion/tree/16.0-mig-coupon_incompatibility/loyalty_incompatibility">OCA/sale-promotion</a> project on GitHub.</p>
<p>You are welcome to contribute. To learn how please visit <a class="reference external" href="https://odoo-community.org/page/Contribute">https://odoo-community.org/page/Contribute</a>.</p>
</div>
</div>
Expand Down
16 changes: 8 additions & 8 deletions loyalty_incompatibility/views/sale_coupon_program_views.xml
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
<?xml version="1.0" encoding="utf-8" ?>
<odoo>
<record id="sale_coupon_program_view_form_common" model="ir.ui.view">
<field name="inherit_id" ref="coupon.coupon_program_view_coupon_program_form" />
<field name="model">coupon.program</field>
<record id="sale_loyalty_program_view_form_common" model="ir.ui.view">
<field name="inherit_id" ref="loyalty.loyalty_program_view_form" />
<field name="model">loyalty.program</field>
<field name="arch" type="xml">
<field name="rule_products_domain" position="before">
<field name="currency_id" position="before">
<field name="incompatible_promotion_ids" widget="many2many_tags" />
</field>
</field>
</record>
<record id="sale_coupon_program_view_tree" model="ir.ui.view">
<field name="inherit_id" ref="coupon.coupon_program_view_tree" />
<field name="model">coupon.program</field>
<record id="sale_loyalty_program_view_tree" model="ir.ui.view">
<field name="inherit_id" ref="loyalty.loyalty_program_view_tree" />
<field name="model">loyalty.program</field>
<field name="arch" type="xml">
<field name="active" position="before">
<field name="program_type" position="before">
<field name="incompatible_promotion_ids" widget="many2many_tags" />
</field>
</field>
Expand Down

This file was deleted.

File renamed without changes.

0 comments on commit cbb0b3f

Please sign in to comment.