Add odex25_donation

This commit is contained in:
expert 2025-01-06 09:42:28 +02:00
parent 680be55bad
commit c079be8cd2
1304 changed files with 93355 additions and 0 deletions

View File

@ -0,0 +1,22 @@
# -*- coding: utf-8 -*-
#################################################################################
#
# Odoo, Open Source Management Solution
# Copyright (C) 2020-today Ascetic Business Solution <www.asceticbs.com>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
#################################################################################
from. import models

View File

@ -0,0 +1,37 @@
# -*- coding: utf-8 -*-
#################################################################################
#
# Odoo, Open Source Management Solution
# Copyright (C) 2020-today Ascetic Business Solution <www.asceticbs.com>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
#################################################################################
{
'name': "Total Sales and Purchase of the Product",
'author': "Ascetic Business Solution",
'category': 'Sales',
'summary': """Total Sales and Purchase of the Product""",
'website': 'http://www.asceticbs.com',
'license': 'AGPL-3',
'description': """Total Sales and Purchase of the Product""",
'version': '14.0.1.0',
'depends': ['base','sale_management'],
'data': ['views/product_template_view.xml'],
'images': ['static/description/banner.png'],
'installable': True,
'application': True,
'auto_install': False,
}

View File

@ -0,0 +1,22 @@
# -*- coding: utf-8 -*-
#################################################################################
#
# Odoo, Open Source Management Solution
# Copyright (C) 2020-today Ascetic Business Solution <www.asceticbs.com>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
#################################################################################
from. import product_template

View File

@ -0,0 +1,77 @@
# -*- coding: utf-8 -*-
#################################################################################
#
# Odoo, Open Source Management Solution
# Copyright (C) 2020-today Ascetic Business Solution <www.asceticbs.com>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
#################################################################################
from odoo import api, fields, models, _
#Class is Extended for new features, which are displaying two tables for total customer invoice and total vendor bills on particular product form, also display its button with total amount of that product.
class ProductTemplateInvoiceAmount(models.Model):
_inherit = "product.template"
cust_invoice_line_ids = fields.One2many('account.move.line','template_id', string='Customer Invoice',compute='_compute_get_customer_invoices_in_product',help='get particular products invoice id from all customers invoices')
vendor_bill_line_ids = fields.One2many('account.move.line','template_id', string='Vendor Bill Line',compute='_compute_get_vendor_bills_in_product',help='get particular products invoice id from all vendors bills')
#compute customers invoices on product, which is related to that product.
def _compute_get_customer_invoices_in_product(self):
for record in self:
if record.id:
cust_invoice=self.env['account.move.line'].search([('product_id.product_tmpl_id','=',self.id),('move_id.move_type','=','out_invoice')])
record.cust_invoice_line_ids = cust_invoice
else:
record.cust_invoice_line_ids = False
#compute vendor bills invoices on product, which is related to that product.
def _compute_get_vendor_bills_in_product(self):
for record in self:
if record.id:
vendor_bill=self.env['account.move.line'].search([('product_id.product_tmpl_id','=',self.id),('move_id.move_type','=','in_invoice')])
record.vendor_bill_line_ids = vendor_bill
else:
record.vendor_bill_line_ids = False
#Class is Extended for new features,take template_id and invoice_state from account.invoice.line to product.template.
class AccountMoveIn(models.Model):
_inherit = "account.move.line"
template_id = fields.Many2one('product.template',string="template ids",compute='get_template_id',help='This field is in relation with customer invoice and vendor bills')
invoice_state = fields.Selection([('draft','Draft'),('posted', 'Posted'),('cancel', 'Cancelled'),], string='Status',compute='get_template_id', index=True, readonly=True, default='draft',track_visibility='onchange', copy=False,help=" * The 'Draft' status is used when a user is encoding a new and unconfirmed Invoice.\n"" * The 'Pro-forma' status is used when the invoice does not have an invoice number.\n"" * The 'Open' status is used when user creates invoice, an invoice number is generated. It stays in the open status till the user pays the invoice.\n"" * The 'Paid' status is set automatically when the invoice is paid. Its related journal entries may or may not be reconciled.\n"" * The 'Cancelled' status is used when user cancel invoice.")
### Add one field for invoice number and vendor bill number
number = fields.Char(compute='get_template_id')
#Create template_id(product_id.product_tmpl_id) from product_id and create invoice_state from invoice_id.
def get_template_id(self):
for record in self:
if record.product_id:
record.template_id = record.product_id.product_tmpl_id
else:
record.template_id = False
for record in self:
if record.move_id:
record.invoice_state = record.move_id.state
else:
record.invoice_state = False
for record in self:
if record.move_id:
record.number = record.move_id.name
else:
record.number = False

Binary file not shown.

After

Width:  |  Height:  |  Size: 44 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 32 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

View File

@ -0,0 +1,97 @@
<html>
<body>
<section class="oe_container oe_dark">
<div class="oe_row">
<div class="oe_row">
<h2 class="oe_slogan oe_span10" style="text-align: center;">Total Sales and Purchase of the Product</h2>
</div>
<div class="oe_slogan" style="margin-top:10px !important;">
<a
class="btn btn-primary btn-lg mt8" style="color: #FFFFFF !important;"
href="https://youtu.be/DqraGqoC264"><i
class="fa fa-check-square" target="_blank"></i> Live Preview </a>
</div>
</div>
</section>
<section class="oe_container">
<div class="oe_row" style="width: 100% !important;">
<div class="oe_span12" style="width: 100% !important;">
<div class="panel-body">
<div class="alert alert-info" style="background-color:#0000FF;color:#FFF;text-align: center;"><i class="fa fa-cog fa-spin fa-1x"></i> <strong> Our Services </strong>
</div>
<table style="width: 100%;">
<tr>
<td>
<ul style="list-style-type:square;">
<li><a href="http://asceticbs.com/odoo-consultancy">Odoo Consulting</a></li>
<li><a href="http://asceticbs.com/odoo-customization">Odoo Customization</a></li>
<li><a href="http://asceticbs.com/support-and-maintenance">Support and Maintenance</a></li>
<li><a href="http://asceticbs.com/odoo-website-design-and-development">Odoo Website Development</a></li>
</ul>
</td>
<td>
<ul style="list-style-type:square;">
<li><a href="http://asceticbs.com/odoo-version-migration">Odoo Version Migration</a></li>
<li><a href="http://asceticbs.com/iOS-Mobile-Application">iOS Mobile Application</a></li>
<li><a href="http://asceticbs.com/android-mobile-application">Android Mobile Application</a></li>
</ul>
</td>
<td>
<ul style="list-style-type:square;">
<li><a href="http://asceticbs.com/Odoo-Functional-Training">Odoo Functional Training</a></li>
<li><a href="http://asceticbs.com/Odoo-Technical-Training">Odoo Technical Training</a></li>
<li><a href="http://asceticbs.com/Business-Analyst-System-Architect">Business Analyst / System Architect</a></li>
</ul>
</td>
</tr>
</table>
</div>
<div class="panel-body"">
<ul class="list-unstyled">
<div class="alert alert-info" style="background-color:#0000FF;color:#FFF;text-align: center;"><i class="fa fa-life-ring fa-spin fa-1x"></i> <strong> Do you need any help? </strong>
</div>
<li>Contact this module maintainer for any question, need support or request for the new feature : </li>
<li>* Riken Bhorania <i class="fa fa-whatsapp"></i> +91 9427425799, <i class="fa fa-skype fa_custom"></i> <a href="skype:riken.bhorania?chat">riken.bhorania, </a> <i class="fa fa-envelope"></i> riken.bhorania@asceticbs.com </li>
<li>* Bhaumin Chorera <i class="fa fa-whatsapp"></i> +91 8530000384, <i class="fa fa-skype fa_custom"></i> <a href="skype:bhaumin.chorera?chat">bhaumin.chorera, </a> <i class="fa fa-envelope"></i> bhaumin.chorera@asceticbs.com </li>
</ul>
</div>
<div class="panel-body"">
<ul class="list-unstyled">
<div class="alert alert-info" style="background-color:#0000FF;color:#FFF;text-align: center;"><i class="fa fa-globe fa-spin fa-1x"></i> <strong> Get In Touch </strong>
</div><br/>
<div class="oe_slogan" style="margin-top:10px !important;">
<img src="company-logo.png" style="width: 190px; margin-bottom: 20px;" class="center-block">
</div>
<div class="oe_slogan" style="margin-top:10px !important;">
<a class="btn btn-primary btn-lg mt8"
style="background-color:#0000FF;color: #FFFFFF !important;" href="http://www.asceticbs.com"><i
class="fa fa-envelope"></i> Website </a>
<a class="btn btn-primary btn-lg mt8" style="background-color:#0000FF;color: #FFFFFF !important;"
href="http://www.asceticbs.com/contact-us"><i
class="fa fa-phone"></i> Contact Us </a>
<a class="btn btn-primary btn-lg mt8" style="background-color:#0000FF;color: #FFFFFF !important;"
href="http://www.asceticbs.com/services"><i
class="fa fa-check-square"></i> Services </a>
<a class="btn btn-primary btn-lg mt8" style="background-color:#0000FF;color: #FFFFFF !important;"
href="https://apps.odoo.com/apps/modules/browse?author=Ascetic%20Business%20Solution"><i
class="fa fa-binoculars"></i> More Apps </a>
</div>
<table style="width: 100%;">
<tr style="width: 50%;">
<th style="text-align: center; width: 45%;"></th>
<th style="text-align: center;"><a href="https://twitter.com/asceticbs" target="_blank"><i class="fa fa-2x fa-twitter" style="color:white;background: #00a0d1;width:35px;"></i></a></th>
<th style="text-align: center;"><a href="https://www.linkedin.com/company/ascetic-business-solution-llp" target="_blank"><i class="fa fa-2x fa-linkedin" style="color:white;background: #31a3d6;width:35px;padding-left: 3px;"></i></a></th>
<th style="text-align: center;"><a href="https://www.facebook.com/asceticbs" target="_blank"><i class="fa fa-2x fa-facebook" style="color:white;background: #3b5998;width:35px;padding-left: 8px;"></i></a></th>
<th style="text-align: center;"><a href="https://www.youtube.com/channel/UCsozahEAndQ2whjcuDIBNZQ" target="_blank"><i class="fa fa-2x fa-youtube-play" style="color:white;background: #c53c2c;width:35px;"></i></a></th>
<th style="text-align: center; width: 45%;"></th>
</tr>
</table>
</div>
</div>
</section>
</body>
</html>

View File

@ -0,0 +1,44 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<!-- Extended the functionality of product.template to show total product invoices table of customer invoice and vendor bills in product.-->
<record id="view_product_template_invoices_view" model="ir.ui.view">
<field name="name">product.template.product.form</field>
<field name="model">product.template</field>
<field name="inherit_id" ref="product.product_template_only_form_view"/>
<field name="arch" type="xml">
<xpath expr="//page[@name='bbb']" position="inside">
<field name='cust_invoice_line_ids' string="Donor`s Invoices">
<tree string="Donor`s Invoices" editable="bottom" decoration-success="invoice_state in ('posted')">
<field name="partner_id" string = "Donor"/>
<field name="number" string = "Invoice number"/>
<field name="company_id" invisible="1"/>
<field name="price_unit" invisible="1"/>
<field name="quantity" invisible="1"/>
<field name="price_subtotal" sum = "Total Amount" widget = "monetary"/>
<field name="currency_id" invisible="1"/>
<field name="invoice_state"/>
</tree>
</field>
</xpath>
<xpath expr="//page[@name='purchase']" position="inside">
<group string="Vendor bills">
<field name='vendor_bill_line_ids'>
<tree decoration-success="invoice_state in ('posted')">
<field name="partner_id" string = "Vendor"/>
<field name="number" string = "Bill number"/>
<field name="company_id" invisible="1"/>
<field name="price_unit"/>
<field name="quantity"/>
<field name="price_subtotal" sum = "Total Amount" widget = "monetary"/>
<field name="currency_id" invisible="1"/>
<field name="invoice_state"/>
</tree>
</field>
</group>
</xpath>
</field>
</record>
</odoo>

View File

@ -0,0 +1,4 @@
*.pyc
.idea/
controller/__pycache__
models/__pycache__

View File

@ -0,0 +1,398 @@
SOFTWARE LICENCE AGREEMENT
==========================
This AGREEMENT is made effective on the date of the purchase of the software
between Webkul Software Pvt. Ltd.,Company incorporated under the Companies
Act, 1956 (hereinafter referred to as “Licensor"), and the purchaser of the
software/ product (hereinafter referred to as "Licensee").
Preamble
--------
Licensor is a web and mobile product based organization engaged in the
business of developing and marketing software for enterprise level e-commerce
businesses. It is an ISO and NSR (NASSCOM) certified organization having a
team of more than 150 creative engineers which come from different
backgrounds. It has developed more than 700 web extensions and apps in the
past few years for open source platforms which are used and trusted globally.
Licensee now wishes to obtain license, and Licensor wishes to grant a license,
to allow use of the software so purchased in developing the e-commerce
business website/ mobile app of the Licensee, subject to the terms and
conditions set forth herein.
THEREFORE, with the intent to be legally bound, the parties hereby agree as
follows:
Agreement
---------
1.DEFINITIONS.
As used in this Agreement, the following capitalized terms
shall have the definitions set forth below:
"Derivative Works" are works developed by Licensee, its officers, agents,
contractors or employees, which are based upon, in whole or in part, the
Source Code and/or the Documentation and may also be based upon and/or
incorporate one or more other preexisting works of the Licensor. Derivative
Works may be any improvement, revision, modification, translation (including
compilation or recapitulation by computer), abridgment, condensation,
expansion, or any other form in which such a preexisting work may be recast,
transformed, or adapted. For purposes hereof, a Derivative Work shall also
include any compilation that incorporates such a preexisting work.
"Documentation" is written, printed or otherwise recorded or stored (digital
or paper) material relating to the Software and/or Source Code, including
technical specifications and instructions for its use including Software/
Source Code annotations and other descriptions of the principles of its
operation and instructions for its use.
"Improvements" shall mean, with respect to the Software, all modifications and
changes made, developed, acquired or conceived after the date hereof and
during the entire term of this Agreement.
"Source Code" is the computer programming source code form of the Software in
the form maintained by the Licensor, and includes all non-third-party
executables, libraries, components, and Documentation created or used in the
creation, development, maintenance, and support of the Software as well as all
updates, error corrections and revisions thereto provided by Licensor, in
whole or in part.
2.SOFTWARE LICENSE.
(a)Grant of License. For the consideration set forth below, Licensor hereby
grants to Licensee, and Licensee hereby accepts the worldwide, non-exclusive,
perpetual, royalty-free rights and licenses set forth below:
(i)The right and license to use and incorporate the software, in whole or in
part, to develop its website/ mobile app (including the integration of all or
part of the Licensors software into Licensee's own software) on one domain (
Except Joomla modules , listed on store are entitled to be used on unlimited
domain as per the standard guidelines ) only, solely for the own personal or
business use of the Licensee. However, the License does not authorize the
Licensee to compile, copy or distribute the said Software or its Derivative
Works.
(ii)The right and license does not authorize the Licensee to share any backup
or archival copies of the Software and / or the Source Code and Documentation
on any public internet space including github , stackoverflow etc . The
Licensee must ensure that the backup are not accessible to any other person
and the Licensee must prevent copying / use of source code by any unauthorized
persons.
(iii)The right and license does not authorize the Licensee to migrate the
domain license to another domain.
(iv)Our Joomla extensions are published under the GNU/GPL.
(b)Scope; Rights and Responsibilities.
(i)Licensor shall enable the Licensee to download one complete copy of the
Software.
(ii)The Software is intended for the sole use of the Licensee in development
of its own website/ mobile app.
(iii)Licensee does not have the right to hand over, sell, distribute,
sub-license, rent, lease or lend any portion of the Software or Documentation,
whether modified or unmodified, to anyone. Licensee should not place the
Software on a server so that it becomes accessible via a public network such
as the Internet for distribution purposes. In case the Licensee is using any
source code management system like github, it can use the code there only when
it has paid subscription from such management system.
(iv) In case the Licensee purchases the module and allow the third party
development agency to customize as per its need, it is at liberty to do so
subject to the condition that the Licensee as well as the Agency are not
authorized to sell the modified version of the extension. Except for the
required customization purposes, Licensee is not authorized to release the
Source Code, Derivative Work source code and/or Documentation to any third
party, which shall be considered as violation of the Agreement, inter-alia
entailing forthwith termination and legal action.
(c)Ownership.
(i)Software and Source Code. All right, title, copyright, and interest in the
Software, Source Code, Software Modifications and Error corrections will be
and remain the property of Licensor.
(ii)Derivative Works. As creation of Derivative Works by the Licensee is
prohibited, thus, all right, title, copyright, and interest in any and/or all
Derivative Works and Improvements created by, or on behalf of, Licensee will
also be deemed to the property of Licensor. Licensor shall be entitled to
protect copyright / intellectual property in all such Derivative Works and
Improvements also in any country as it may deem fit including without
limitation seeking copyright and/or patent protection.
3.CONSIDERATION.
(a)Licensee shall pay to Licensor the amount as mentioned on the website from
where the order is placed, as one-time, upfront fees in consideration for the
licenses and rights granted hereunder (hereinafter referred to as the "License
Fee"). The License Fee to be paid by Licensee shall be paid upfront at the
time of placing the order, and no credit will be allowed under any
circumstances.
(b)Once paid, the License Fees shall be non-refundable. The Licensee has fully
satisfied itself about the Software and has seen the demonstration, and only
thereafter has placed the order. Thus, the License Fees or any part thereof is
non-refundable. No claim for refund of the Licence Fees shall be entertained
under any circumstances.
4.REPRESENTATIONS AND WARRANTIES.
(a)Mutual. Each of the parties represents and warrants to the other as
follows.
(i)such party is a legal entity duly organized, validly existing and in good
standing;
(ii)such party has the power and authority to conduct its business as
presently conducted and to enter into, execute, deliver and perform this
Agreement.
(iii)This Agreement has been duly and validly accepted by such party and
constitutes the legal, valid and binding obligations of such party
respectively, enforceable against such party in accordance with their
respective terms;
(iv)the acceptance, execution, delivery and performance of this Agreement does
not and will not violate such party's charter or by-laws; nor require any
consent, authorization, approval, exemption or other action by any third party
or governmental entity.
(b)Licensor warrants that, at the time of purchase of the Software:
the Software will function materially as set forth in the website or published
functionality provided by Licensor to customers and potential customers
describing the Software; and
Software add-ons, if purchased by the Licensee from the Licensor, will not
materially diminish the features or functions of or the specifications of the
Software as they existed as of the execution of this Agreement.
(c)Title. Licensor represents and warrants that it is the exclusive owner of
all copyright/ intellectual property in the Software (including the Source
Code) and has good and marketable title to the Software (including the Source
Code) free and clear of all liens, claims and encumbrances of any nature
whatsoever (collectively, "Liens"). Licensor's grant of license and rights to
Licensee hereunder does not, and will not infringe any third party's property,
intellectual property or personal rights.
5.TERM.
(a)Subject to Licensee's payment obligations, this Agreement shall commence as
on the date of making payment of the Software by the Licensee to the Licensor,
and shall continue until terminated by either party.
(b)The Licensor retains the right to terminate the license at any time, if the
Licensee is not abiding by any of the terms of the Agreement. The Licensee may
terminate the Agreement at any time at its own discretion by uninstalling the
Software and /or by destroying the said Software (or any copies thereof).
However, the Licensee shall not be entitled to seek any refund of the amount
paid by it to the Licensor, under any circumstances.
(c)Survival. In the event this Agreement is terminated for any reason, the
provisions set forth in Sections 2(a), 2(b), and 2(c) shall survive.
6.INDEMNIFICATION.
The Licensee release the Licensor from, and agree to indemnify, defend and
hold harmless the Licensor (and its officers, directors, employees, agents and
Affiliates) against, any claim, loss, damage, settlement, cost, taxes, expense
or other liability (including, without limitation, attorneys' fees) (each, a
"Claim") arising from or related to: (a) any actual or alleged breach of any
obligations in this Agreement; (b) any refund, adjustment, or return of
Software,(c) any claim for actual or alleged infringement of any Intellectual
Property Rights made by any third party or damages related thereto; or (d)
Taxes.
7.LIMITATION OF LIABILITY.
The Licensor will not be liable for any direct, indirect, incidental, special,
consequential or exemplary damages, including but not limited to, damages for
loss of profits, goodwill, use, data or other intangible losses arising out of
or in connection with the Software, whether in contract, warranty, tort etc. (
including negligence, software liability, any type of civil responsibility or
other theory or otherwise) to the Licensee or any other person for cost of
software, cover, recovery or recoupment of any investment made by the Licensee
or its affiliates in connection with this Agreement, or for any other loss of
profit, revenue, business, or data or punitive or consequential damages
arising out of or relating to this Agreement. Further, the aggregate liability
of the Licensor, arising out of or in connection with this Agreement or the
transactions contemplated hereby will not exceed at any time, or under any
circumstances, the total amounts received by the Licensor from the Licensee in
connection with the particular software giving rise to the claim.
8.FORCE MAJEURE.
The Licensor will not be liable for any delay or failure to perform any of its
obligations under this Agreement by reasons, events or other matters beyond
its reasonable control.
9.RELATIONSHIP OF PARTIES.
The Licensor and Licensee are independent legal entities, and nothing in this
Agreement will be construed to create a partnership, joint venture,
association of persons, agency, franchise, sales representative, or employment
relationship between the parties. The Licensee will have no authority to make
or accept any offers or representations on behalf of the Licensor. The
relationship between the parties is that of Licensor and Licensee only, and
the rights, duties, liabilities of each party shall be governed by this
Agreement.
10.MODIFICATION.
The Licensor may amend any of the terms and conditions contained in this
Agreement at any time and solely at its discretion. Any changes will be
effective upon the posting of such changes on the Portal/ website, and the
Licensee is responsible for reviewing these changes and informing itself of
all applicable changes or notices. The continued use of a software by the
Licensee after posting of any changes by the Licensor, will constitute the
acceptance of such changes or modifications by the Licensee.
11.MISCELLANEOUS.
(a)General Provisions. This Agreement: (i) may be amended only by a writing
signed by each of the parties; (ii) may be executed in several counterparts,
each of which shall be deemed an original but all of which shall constitute
one and the same instrument; (iii) contains the entire agreement of the
parties with respect to the transactions contemplated hereby and supersedes
all prior written and oral agreements, and all contemporaneous oral
agreements, relating to such transactions; (iv) shall be governed by, and
construed and enforced in accordance with, the laws of India; and (v) shall be
binding upon, and inure to the benefit of, the parties and their respective
successors and permitted assigns. Each of the parties hereby irrevocably
submits to the jurisdiction of the Courts at Delhi, India, for the purposes of
any action or proceeding arising out of or relating to this Agreement or the
subject matter hereof and brought by any other party.
(b)Assignment. Except for the purpose of customization as mentioned in clause
2(b)(iv) above, Licensee cannot assign, pledge or otherwise transfer, whether
by operation of law or otherwise, this Agreement, or any of its obligations
hereunder, without the prior written consent of Licensor, which consent shall
not be unreasonably withheld.
(c)Notices. Unless otherwise specifically provided herein, all notices,
consents, requests, demands and other communications required or permitted
hereunder:
(i)shall be in writing;
(ii)shall be sent by messenger, certified or registered mail/email, or
reliable express delivery service, to the appropriate address(es) set forth
below; and
(iii)shall be deemed to have been given on the date of receipt by the
addressee, as evidenced by a receipt executed by the addressee (or a
responsible person in his or her office), the records of the Party delivering
such communication or a notice to the effect that such addressee refused to
claim or accept such communication, if sent by messenger, mail or express
delivery service.
All such communications shall be sent to the following addresses or numbers,
or to such other addresses or numbers as any party may inform the others by
giving five days' prior notice:
If to Webkul Software Pvt. Ltd.:
Webkul Software Pvt. Ltd.
A-67, Sector 63, NOIDA 201301,
Uttar Pradesh, India
If to Licensee:
At the address mentioned by the Licensee
(at the time of placing order of generating Invoice)
(d)Severability. It is the intent of the parties that the provisions of this
Agreement be enforced to the fullest extent permissible under the laws and
public policies of India in which enforcement hereof is sought. In
furtherance of the foregoing, each provision hereof shall be severable from
each other provision, and any provision hereof which is/ becomes unenforceable
shall be subject to the following: (i) if such provision is contrary to or
conflicts with any requirement of any statute, rule or regulation in effect,
then such requirement shall be incorporated into, or substituted for, such
unenforceable provision to the minimum extent necessary to make such provision
enforceable; (ii) the court, agency or arbitrator considering the matter is
hereby authorized to (or, if such court, agency or arbitrator is unwilling or
fails to do so, then the parties shall) amend such provision to the minimum
extent necessary to make such provision enforceable, and the parties hereby
consent to the entry of an order so amending such provision; and (iii) if
any such provision cannot be or is not reformed and made enforceable pursuant
to clause (i) or (ii) above, then such provision shall be ineffective to the
minimum extent necessary to make the remainder of this Agreement enforceable.
Any application of the foregoing provisions to any provision hereof shall not
effect the validity or enforceability of any other provision hereof.
(e)By purchasing the Software, the Licensee acknowledge that it has read this
Agreement, and that it agrees to the content of the Agreement, its terms and
agree to use the Software in compliance with this Agreement.
(f)The Licensor holds the sole copyright of the Software. The Software or any
portion thereof is a copyrightable matter and is liable to be protected by the
applicable laws. Copyright infringement in any manner can lead to prosecution
according to the current law. The Licensor reserves the right to revoke the
license of any user who is not holding any license or is holding an invalid
license.
(g)This Agreement gives the right to use only one copy of the Software on one
domain solely for the own personal or business use of the Licensee, subject to
all the terms and conditions of this Agreement. A separate License has to be
purchased for each new Software installation. Any distribution of the Software
without the written consent of the Licensor (including non-commercial
distribution) is regarded as violation of this Agreement, and will entail
immediate termination of the Agreement and may invite liability, both civil
and criminal, as per applicable laws.
(h)The Licensor reserves the rights to publish a selected list of users/
Licensees of its Software, and no permission of any Licensee is needed in this
regard. The Licensee agrees that the Licensor may, in its sole discretion,
disclose or make available any information provided or submitted by the
Licensee or related to it under this Agreement to any judicial,
quasi-judicial, governmental, regulatory or any other authority as may be
required by the Licensor to co-operate and / or comply with any of their
orders, instructions or directions or to fulfill any requirements under
applicable Laws.
(i)If the Licensee continues to use the Software even after the sending of the
notice by the Licensor for termination, the Licensee agree to accept an
injunction to restrain itself from its further use, and to pay all costs (
including but not limited to reasonable attorney fees) to enforce injunction
or to revoke the License, and any damages suffered by the Licensor because of
the misuse of the Software by the Licensee.
12.ARBITRATION.
If any dispute arises between the Licensor and the Licensee at any time, in
connection with the validity, interpretation, implementation or alleged breach
of any provision of this Agreement, the same shall be referred to a sole
Arbitrator who shall be an independent and neutral third party appointed
exclusively by the Licensor. The Licensee shall not object to the appointment
of the Arbitrator so appointed by the Licensor. The place of arbitration shall
be Delhi, India. The Arbitration & Conciliation Act, 1996 as amended by The
Arbitration & Conciliation (Amendment) Act, 2015, shall govern the
arbitration proceedings. The arbitration proceedings shall be held in the
English language.
This document is an electronic record in terms of Information Technology Act,
2000 and the amended provisions pertaining to electronic records in various
statutes as amended by the Information Technology Act, 2000. This electronic
record is generated by a computer system and does not require any physical or
digital signatures.

View File

@ -0,0 +1,20 @@
# -*- coding: utf-8 -*-
#################################################################################
# Author : Webkul Software Pvt. Ltd. (<https://webkul.com/>:wink:
# Copyright(c): 2015-Present Webkul Software Pvt. Ltd.
# All Rights Reserved.
#
#
#
# This program is copyright property of the author mentioned above.
# You can`t redistribute it and/or modify it.
#
#
# You should have received a copy of the License along with this program.
# If not, see <https://store.webkul.com/license.html/>;
#################################################################################
from . import models
from . import controllers

View File

@ -0,0 +1,85 @@
# -*- coding: utf-8 -*-
#################################################################################
# Author : Webkul Software Pvt. Ltd. (<https://webkul.com/>)
# Copyright(c): 2015-Present Webkul Software Pvt. Ltd.
# All Rights Reserved.
#
#
#
# This program is copyright property of the author mentioned above.
# You can`t redistribute it and/or modify it.
#
#
# You should have received a copy of the License along with this program.
# If not, see <https://store.webkul.com/license.html/>
#################################################################################
{
"name" : "Odoo Affiliate Management",
"summary" : """Affiliate extension for odoo E-commerce store""",
"category" : "Website",
"version" : "1.0.7",
"sequence" : 1,
"author" : "Webkul Software Pvt. Ltd.",
"license" : "Other proprietary",
"maintainer" : "Saurabh Gupta",
"website" : "https://store.webkul.com/Odoo-Affiliate-Management.html",
"description" : """Odoo Affiliate Extension for Affiliate Management""",
"live_test_url" : "http://odoodemo.webkul.com/?module=affiliate_management&lifetime=90&lout=1&custom_url=/",
"depends" : [
'sales_team',
'website_sale',
'wk_wizard_messages',
'web',
'web_tour',
'auth_signup',
'account',
'base'
],
"data" : [
'security/affiliate_security.xml',
'security/ir.model.access.csv',
'views/affiliate_pragram_form_view.xml',
'data/automated_scheduler_action.xml',
'views/affiliate_manager_view.xml',
'data/sequence_view.xml',
'views/account_invoice_inherit.xml',
'views/affiliate_visit_view.xml',
'views/affiliate_config_setting_view.xml',
'views/res_users_inherit_view.xml',
'views/affiliate_tool_view.xml',
'views/affiliate_image_view.xml',
'views/advance_commision_view.xml',
'views/affiliate_pricelist_view.xml',
'views/affiliate_banner_view.xml',
'views/report_template.xml',
'views/payment_template.xml',
'views/index_template.xml',
'views/tool_template.xml',
'views/header_template.xml',
'views/footer_template.xml',
'views/join_email_template.xml',
'views/signup_template.xml',
'views/affiliate_request_view.xml',
'views/welcome_mail_tepmlate.xml',
'views/reject_mail_template.xml',
'views/tool_product_link_template.xml',
'views/about_template.xml',
'data/default_affiliate_program_data.xml',
],
"assets" : {
"web.assets_backend" : [],
"web.assets_frontend" : [
'affiliate_management/static/src/css/website_affiliate.css',
'affiliate_management/static/src/js/validation.js',
]
},
"demo" : ['data/demo_data_view.xml'],
"images" : ['static/description/banner.gif'],
"application" : True,
"installable" : True,
"price" : 99,
"currency" : "USD",
}

View File

@ -0,0 +1,311 @@
diff --git a/static/description/index.html b/static/description/index.html
index adf3754..4b261ec 100644
--- a/static/description/index.html
+++ b/static/description/index.html
@@ -20,7 +20,7 @@

<div class="shadow p-3 mb-5 bg-white rounded" style="background: #FFFFFF;box-shadow: 0px 0px 6px 0 rgba(0, 0, 0, 0.1);padding:4% 4% 1% 4%;height:100%;margin-top:2%"> 
<div class="container" style="color:#333333;font-size:18px;font-weight:bold;">
- <div> <img src= "icon-1.png" style="position: absolute;margin-top:-0.9%;width: 40.14px;height:40.14px;background: rgba(255, 255, 255, 0.7);"></div><div style="margin-left:6%;">Affiliate Management in Odoo for marketing on another level!</div>
+ <div class="position-absolute"> <img src= "icon-1.png" style="position:absolute;margin-top:-0.9%;width: 40.14px;height:40.14px;background: rgba(255, 255, 255, 0.7);"></div><div style="margin-left:6%;">Affiliate Management in Odoo for marketing on another level!</div>
</div>
</br>
<div class="container " style="color:#555555;font-size:16px;">
@@ -58,7 +58,7 @@

<div class="shadow p-3 mb-5 bg-white rounded" style="background: #FFFFFF;box-shadow: 0px 0px 6px 0 rgba(0, 0, 0, 0.1);padding:4% 4% 1% 4%;height:100%;margin-top:2%"> 
<div class="container" style="color:#333333;font-size:18px;font-weight:bold;">
- <div> <img src= "icon-2.png" style="position: absolute;margin-top:-0.9%;width: 40.14px;height:40.14px;background: rgba(255, 255, 255, 0.7);"></div><div style="margin-left:6%;">Hassle-free way for Affiliate Management in Odoo</div>
+ <div class="position-absolute"> <img src= "icon-2.png" style="position: absolute;margin-top:-0.9%;width: 40.14px;height:40.14px;background: rgba(255, 255, 255, 0.7);"></div><div style="margin-left:6%;">Hassle-free way for Affiliate Management in Odoo</div>
</div>
</br>
<div class="container " style="color:#555555;font-size:16px;">
@@ -425,6 +425,288 @@
</section>

<br/><br/>
+<section class="oe_container mb32">
+ <div class="row mt16 mb16 pb32">
+ <div class="container text-center d-none d-xl-block" style="color:#333333;font-size:26px;font-weight:bold;">
+ <p>Our Other Apps</p>
+ </div>
+ <div class=" d-none d-xl-block container text-center" style="color:#555555;font-size:18px;">
+ Make your eCommerce Experience more better with our other Apps.
+ </div>
+ <div class="container ml0 mr0">
+ <div class="offset-md-2 col-md-8">
+ <div class="row ml0 mr0">
+ <div id="mp_addons_carousel" class="container carousel slide mt64 mb32 d-none d-xl-block" data-ride="carousel">
+ <div class="carousel-inner">
+ <div class="carousel-item active" style="min-height: 0px;">
+ <div class="row">
+ <div class="text-center col-xs-12 col-sm-3 col-md-3 mb16 mt16" style="float: left;">
+ <a href="https://apps.odoo.com/apps/modules/13.0/marketplace_membership" target="_blank">
+ <div>
+ <img class="img img-responsive" alt="not found" width="100" height="100" style="border-radius: 16px;" src="https://apps.odoocdn.com/apps/assets/13.0/marketplace_membership/icon.png">
+ <div class="mt8" style="font-size: 16px;color: #333333;text-align: center;line-height: 21px;white-space: nowrap;overflow: hidden;text-overflow: ellipsis;">
+ Marketplace <br/> Membership
+ </div>
+ </div>
+ </a>
+ </div>
+ <div class="text-center col-xs-12 col-sm-3 col-md-3 mb16 mt16" style="float: left;">
+ <a href="https://apps.odoo.com/apps/modules/13.0/marketplace_advance_barcode_labels" target="_blank">
+ <div>
+ <img class="img img-responsive" width="100" height="100" style="border-radius: 16px;" src="https://apps.odoocdn.com/apps/assets/13.0/marketplace_advance_barcode_labels/icon.png">
+ <div class="mt8" style="font-size: 16px;color: #333333;text-align: center;line-height: 21px;white-space: nowrap;overflow: hidden;text-overflow: ellipsis;">
+ Advance Barcode <br/> Labels For Product
+ </div>
+ </div>
+ </a>
+ </div>
+ <div class="text-center col-xs-12 col-sm-3 col-md-3 mb16 mt16" style="float: left;">
+ <a href="https://apps.odoo.com/apps/modules/13.0/marketplace_booking_system" target="_blank">
+ <div>
+ <img class="img img-responsive" width="100" height="100" style="border-radius: 16px;" src="https://apps.odoocdn.com/apps/assets/13.0/marketplace_booking_system/icon.png">
+ <div class="mt8" style="font-size: 16px;color: #333333;text-align: center;line-height: 21px;white-space: nowrap;overflow: hidden;text-overflow: ellipsis;">
+ Booking & Reservation <br/> Management
+ </div>
+ </div>
+ </a>
+ </div>
+ <div class="text-center col-xs-12 col-sm-3 col-md-3 mb16 mt16" style="float: left;">
+ <a href="https://apps.odoo.com/apps/modules/13.0/marketplace_preorder" target="_blank">
+ <div>
+ <img class="img img-responsive" width="100" height="100" style="border-radius: 16px;" src="https://apps.odoocdn.com/apps/assets/13.0/marketplace_preorder/icon.png">
+ <div class="mt8" style="font-size: 16px;color: #333333;text-align: center;line-height: 21px;white-space: nowrap;overflow: hidden;text-overflow: ellipsis;">
+ Marketplace <br/> Pre-Order
+ </div>
+ </div>
+ </a>
+ </div>
+ <div class="text-center col-xs-12 col-sm-3 col-md-3 mb16 mt16" style="float: left;">
+ <a href="https://apps.odoo.com/apps/modules/13.0/marketplace_favourite_seller" target="_blank">
+ <div>
+ <img class="img img-responsive" alt="not found" width="100" height="100" style="border-radius: 16px;" src="https://apps.odoocdn.com/apps/assets/13.0/marketplace_favourite_seller/icon.png">
+ <div class="mt8" style="font-size: 16px;color: #333333;text-align: center;line-height: 21px;white-space: nowrap;overflow: hidden;text-overflow: ellipsis;">
+ Favourite <br/> Seller
+ </div>
+ </div>
+ </a>
+ </div>
+ <div class="text-center col-xs-12 col-sm-3 col-md-3 mb16 mt16" style="float: left;">
+ <a href="https://apps.odoo.com/apps/modules/13.0/marketplace_shipping_per_product" target="_blank">
+ <div>
+ <img class="img img-responsive" alt="not found" width="100" height="100" style="border-radius: 16px;" src="https://apps.odoocdn.com/apps/assets/13.0/marketplace_shipping_per_product/icon.png">
+ <div class="mt8" style="font-size: 16px;color: #333333;text-align: center;line-height: 21px;white-space: nowrap;overflow: hidden;text-overflow: ellipsis;">
+ Shipping <br/> Per Product
+ </div>
+ </div>
+ </a>
+ </div>
+ <div class="text-center col-xs-12 col-sm-3 col-md-3 mb16 mt16" style="float: left;">
+ <a href="https://apps.odoo.com/apps/modules/13.0/marketplace_hyperlocal_system" target="_blank">
+ <div>
+ <img class="img img-responsive" alt="not found" width="100" height="100" style="border-radius: 16px;" src="https://apps.odoocdn.com/apps/assets/13.0/marketplace_hyperlocal_system/icon.png">
+ <div class="mt8" style="font-size: 16px;color: #333333;text-align: center;line-height: 21px;white-space: nowrap;overflow: hidden;text-overflow: ellipsis;">
+ Marketplace <br/> Hyperlocal System
+ </div>
+ </div>
+ </a>
+ </div>
+ <div class="text-center col-xs-12 col-sm-3 col-md-3 mb16 mt16" style="float: left;">
+ <a href="https://apps.odoo.com/apps/modules/13.0/marketplace_sms_notification" target="_blank">
+ <div>
+ <img class="img img-responsive" alt="not found" width="100" height="100" style="border-radius: 16px;" src="https://apps.odoocdn.com/apps/assets/13.0/marketplace_sms_notification/icon.png">
+ <div class="mt8" style="font-size: 16px;color: #333333;text-align: center;line-height: 21px;white-space: nowrap;overflow: hidden;text-overflow: ellipsis;">
+ SMS <br/> Notifications
+ </div>
+ </div>
+ </a>
+ </div>
+ </div>
+ </div>
+ <div class="carousel-item" style="min-height: 0px;">
+ <div class="row">
+ <div class="text-center col-xs-12 col-sm-3 col-md-3 mb16 mt16" style="float: left;">
+ <a href="https://apps.odoo.com/apps/modules/13.0/marketplace_seller_slider" target="_blank">
+ <div>
+ <img class="img img-responsive" alt="not found" width="100" height="100" style="border-radius: 16px;" src="https://apps.odoocdn.com/apps/assets/13.0/marketplace_seller_slider/icon.png">
+ <div class="mt8" style="font-size: 16px;color: #333333;text-align: center;line-height: 21px;white-space: nowrap;overflow: hidden;text-overflow: ellipsis;">
+ Seller <br/> Slider
+ </div>
+ </div>
+ </a>
+ </div>
+ <div class="text-center col-xs-12 col-sm-3 col-md-3 mb16 mt16" style="float: left;">
+ <a href="https://apps.odoo.com/apps/modules/13.0/marketplace_daily_deals" target="_blank">
+ <div>
+ <img class="img img-responsive" alt="not found" width="100" height="100" style="border-radius: 16px;" src="https://apps.odoocdn.com/apps/assets/13.0/marketplace_daily_deals/icon.png">
+ <div class="mt8" style="font-size: 16px;color: #333333;text-align: center;line-height: 21px;white-space: nowrap;overflow: hidden;text-overflow: ellipsis;">
+ Daily Deals <br/> And Flash Sales
+ </div>
+ </div>
+ </a>
+ </div>
+ <div class="text-center col-xs-12 col-sm-3 col-md-3 mb16 mt16" style="float: left;">
+ <a href="https://apps.odoo.com/apps/modules/13.0/marketplace_buyer_seller_communication" target="_blank">
+ <div>
+ <img class="img img-responsive" width="100" height="100" style="border-radius: 16px;" src="https://apps.odoocdn.com/apps/assets/13.0/marketplace_buyer_seller_communication/icon.png">
+ <div class="mt8" style="font-size: 16px;color: #333333;text-align: center;line-height: 21px;white-space: nowrap;overflow: hidden;text-overflow: ellipsis;">
+ Buyer Seller <br/> Communication
+ </div>
+ </div>
+ </a>
+ </div>
+ <div class="text-center col-xs-12 col-sm-3 col-md-3 mb16 mt16" style="float: left;">
+ <a href="https://apps.odoo.com/apps/modules/13.0/marketplace_advance_commission" target="_blank">
+ <div>
+ <img class="img img-responsive" width="100" height="100" style="border-radius: 16px;" src="https://apps.odoocdn.com/apps/assets/13.0/marketplace_advance_commission/icon.png">
+ <div class="mt8" style="font-size: 16px;color: #333333;text-align: center;line-height: 21px;white-space: nowrap;overflow: hidden;text-overflow: ellipsis;">
+ Advance <br/> Commission
+ </div>
+ </div>
+ </a>
+ </div>
+ <div class="text-center col-xs-12 col-sm-3 col-md-3 mb16 mt16" style="float: left;">
+ <a href="https://apps.odoo.com/apps/modules/13.0/marketplace_qna_and_faq" target="_blank">
+ <div>
+ <img class="img img-responsive" width="100" height="100" style="border-radius: 16px;" src="https://apps.odoocdn.com/apps/assets/13.0/marketplace_qna_and_faq/icon.png">
+ <div class="mt8" style="font-size: 16px;color: #333333;text-align: center;line-height: 21px;white-space: nowrap;overflow: hidden;text-overflow: ellipsis;">
+ Marketplace <br/> Q&A & FAQ
+ </div>
+ </div>
+ </a>
+ </div>
+ <div class="text-center col-xs-12 col-sm-3 col-md-3 mb16 mt16" style="float: left;">
+ <a href="https://apps.odoo.com/apps/modules/13.0/marketplace_voucher" target="_blank">
+ <div>
+ <img class="img img-responsive" alt="not found" width="100" height="100" style="border-radius: 16px;" src="https://apps.odoocdn.com/apps/assets/13.0/marketplace_voucher/icon.png">
+ <div class="mt8" style="font-size: 16px;color: #333333;text-align: center;line-height: 21px;white-space: nowrap;overflow: hidden;text-overflow: ellipsis;">
+ MarketPlace <br/> Voucher
+ </div>
+ </div>
+ </a>
+ </div>
+ <div class="text-center col-xs-12 col-sm-3 col-md-3 mb16 mt16" style="float: left;">
+ <a href="https://apps.odoo.com/apps/modules/13.0/marketplace_ajax_login" target="_blank">
+ <div>
+ <img class="img img-responsive" alt="not found" width="100" height="100" style="border-radius: 16px;" src="https://apps.odoocdn.com/apps/assets/13.0/marketplace_ajax_login/icon.png">
+ <div class="mt8" style="font-size: 16px;color: #333333;text-align: center;line-height: 21px;white-space: nowrap;overflow: hidden;text-overflow: ellipsis;">
+ Marketplace <br/> Ajax Login
+ </div>
+ </div>
+ </a>
+ </div>
+ <div class="text-center col-xs-12 col-sm-3 col-md-3 mb16 mt16" style="float: left;">
+ <a href="https://apps.odoo.com/apps/modules/13.0/marketplace_seller_collection_page" target="_blank">
+ <div>
+ <img class="img img-responsive" alt="not found" width="100" height="100" style="border-radius: 16px;" src="https://apps.odoocdn.com/apps/assets/13.0/marketplace_seller_collection_page/icon.png">
+ <div class="mt8" style="font-size: 16px;color: #333333;text-align: center;line-height: 21px;white-space: nowrap;overflow: hidden;text-overflow: ellipsis;">
+ Seller <br/> collections
+ </div>
+ </div>
+ </a>
+ </div>
+ </div>
+ </div>
+ <div class="carousel-item" style="min-height: 0px;">
+ <div class="row">
+ <div class="text-center col-xs-12 col-sm-3 col-md-3 mb16 mt16" style="float: left;">
+ <a href="https://apps.odoo.com/apps/modules/13.0/marketplace_seller_auction" target="_blank">
+ <div>
+ <img class="img img-responsive" alt="not found" width="100" height="100" style="border-radius: 16px;" src="https://apps.odoocdn.com/apps/assets/13.0/marketplace_seller_auction/icon.png">
+ <div class="mt8" style="font-size: 16px;color: #333333;text-align: center;line-height: 21px;white-space: nowrap;overflow: hidden;text-overflow: ellipsis;">
+ Seller <br/> Auction
+ </div>
+ </div>
+ </a>
+ </div>
+ <div class="text-center col-xs-12 col-sm-3 col-md-3 mb16 mt16" style="float: left;">
+ <a href="https://apps.odoo.com/apps/modules/13.0/marketplace_seller_blogs" target="_blank">
+ <div>
+ <img class="img img-responsive" width="100" height="100" style="border-radius: 16px;" src="https://apps.odoocdn.com/apps/assets/13.0/marketplace_seller_blogs/icon.png">
+ <div class="mt8" style="font-size: 16px;color: #333333;text-align: center;line-height: 21px;white-space: nowrap;overflow: hidden;text-overflow: ellipsis;">
+ Seller <br/> Blogs
+ </div>
+ </div>
+ </a>
+ </div>
+ <div class="text-center col-xs-12 col-sm-3 col-md-3 mb16 mt16" style="float: left;">
+ <a href="https://apps.odoo.com/apps/modules/13.0/marketplace_quote_system" target="_blank">
+ <div>
+ <img class="img img-responsive" width="100" height="100" style="border-radius: 16px;" src="https://apps.odoocdn.com/apps/assets/13.0/marketplace_quote_system/icon.png">
+ <div class="mt8" style="font-size: 16px;color: #333333;text-align: center;line-height: 21px;white-space: nowrap;overflow: hidden;text-overflow: ellipsis;">
+ Quote <br/> System
+ </div>
+ </div>
+ </a>
+ </div>
+ <div class="text-center col-xs-12 col-sm-3 col-md-3 mb16 mt16" style="float: left;">
+ <a href="https://apps.odoo.com/apps/modules/13.0/marketplace_product_size_chart" target="_blank">
+ <div>
+ <img class="img img-responsive" width="100" height="100" style="border-radius: 16px;" src="https://apps.odoocdn.com/apps/assets/13.0/marketplace_product_size_chart/icon.png">
+ <div class="mt8" style="font-size: 16px;color: #333333;text-align: center;line-height: 21px;white-space: nowrap;overflow: hidden;text-overflow: ellipsis;">
+ Seller Product <br/> Size Chart
+ </div>
+ </div>
+ </a>
+ </div>
+ <div class="text-center col-xs-12 col-sm-3 col-md-3 mb16 mt16" style="float: left;">
+ <a href="https://apps.odoo.com/apps/modules/13.0/marketplace_seller_locator" target="_blank">
+ <div>
+ <img class="img img-responsive" alt="not found" width="100" height="100" style="border-radius: 16px;" src="https://apps.odoocdn.com/apps/assets/13.0/marketplace_seller_locator/icon.png">
+ <div class="mt8" style="font-size: 16px;color: #333333;text-align: center;line-height: 21px;white-space: nowrap;overflow: hidden;text-overflow: ellipsis;">
+ Seller <br/> Locator
+ </div>
+ </div>
+ </a>
+ </div>
+ <div class="text-center col-xs-12 col-sm-3 col-md-3 mb16 mt16" style="float: left;">
+ <a href="https://apps.odoo.com/apps/modules/13.0/marketplace_seller_vacation" target="_blank">
+ <div>
+ <img class="img img-responsive" alt="not found" width="100" height="100" style="border-radius: 16px;" src="https://apps.odoocdn.com/apps/assets/13.0/marketplace_seller_vacation/icon.png">
+ <div class="mt8" style="font-size: 16px;color: #333333;text-align: center;line-height: 21px;white-space: nowrap;overflow: hidden;text-overflow: ellipsis;">
+ Seller <br/> Vacation
+ </div>
+ </div>
+ </a>
+ </div>
+ <div class="text-center col-xs-12 col-sm-3 col-md-3 mb16 mt16" style="float: left;">
+ <a href="https://apps.odoo.com/apps/modules/13.0/marketplace_product_pack" target="_blank">
+ <div>
+ <img class="img img-responsive" alt="not found" width="100" height="100" style="border-radius: 16px;" src="https://apps.odoocdn.com/apps/assets/13.0/marketplace_product_pack/icon.png">
+ <div class="mt8" style="font-size: 16px;color: #333333;text-align: center;line-height: 21px;white-space: nowrap;overflow: hidden;text-overflow: ellipsis;">
+ Marketplace <br/> Product Pack
+ </div>
+ </div>
+ </a>
+ </div>
+ <div class="text-center col-xs-12 col-sm-3 col-md-3 mb16 mt16" style="float: left;">
+ <a href="https://apps.odoo.com/apps/modules/13.0/marketplace_seller_badges" target="_blank">
+ <div>
+ <img class="img img-responsive" alt="not found" width="100" height="100" style="border-radius: 16px;" src="https://apps.odoocdn.com/apps/assets/13.0/marketplace_seller_badges/icon.png">
+ <div class="mt8" style="font-size: 16px;color: #333333;text-align: center;line-height: 21px;white-space: nowrap;overflow: hidden;text-overflow: ellipsis;">
+ Seller <br/> Badges
+ </div>
+ </div>
+ </a>
+ </div>
+ </div>
+ </div>
+ </div>
+ <a class="carousel-control-prev" href="#mp_addons_carousel" data-slide="prev" style="left:-50px;width: 35px;color: #000;">
+ <span class="carousel-control-prev-icon" style="font-size:35px;opacity: 0.2;color:#000000;margin-top: -50px;">
+ <i class="fa fa-chevron-left" aria-hidden="false"></i>
+ </span>
+ </a>
+ <a class="carousel-control-next" href="#mp_addons_carousel" data-slide="next" style="right:-40px;width: 35px;color: #000;">
+ <span class="carousel-control-next-icon" style="font-size:35px;opacity: 0.2;color:#000000;margin-top: -50px;">
+ <i class="fa fa-chevron-right" aria-hidden="false"></i>
+ </span>
+ </a>
+ </div>
+ </div>
+ </div>
+ </div>
+ </div>
+</section>

<section class="mb-5" id="webkul_support">
<div class="row">

View File

@ -0,0 +1,11 @@
=>Affiliate Management technical name 'affiliate_management'
[version:1.0.1] Date : 30-10-2017
*[IMPROVEMENT]
- improvement in Generate banner (in product search)
*[FIX]
- replace a (select a category) to (all categories) in category dropdown in views/tool_product_link_template.xml
*[ADD]
-
*[change]
-version from 1.0.0 to 1.0.1 in manifest
*[remove]

View File

@ -0,0 +1,18 @@
# -*- coding: utf-8 -*-
#################################################################################
# Author : Webkul Software Pvt. Ltd. (<https://webkul.com/>:wink:
# Copyright(c): 2015-Present Webkul Software Pvt. Ltd.
# All Rights Reserved.
#
#
#
# This program is copyright property of the author mentioned above.
# You can`t redistribute it and/or modify it.
#
#
# You should have received a copy of the License along with this program.
# If not, see <https://store.webkul.com/license.html/>;
#################################################################################
from . import main
from . import affiliate_website
from . import home

View File

@ -0,0 +1,514 @@
# -*- coding: utf-8 -*-
#################################################################################
# Author : Webkul Software Pvt. Ltd. (<https://webkul.com/>:wink:
# Copyright(c): 2015-Present Webkul Software Pvt. Ltd.
# All Rights Reserved.
#
#
#
# This program is copyright property of the author mentioned above.
# You can`t redistribute it and/or modify it.
#
#
# You should have received a copy of the License along with this program.
# If not, see <https://store.webkul.com/license.html/>;
#################################################################################
from ast import literal_eval
from odoo.addons.auth_signup.models.res_users import SignupError
from odoo import http
from odoo.http import request
from odoo import tools
from odoo.tools.translate import _
import logging
_logger = logging.getLogger(__name__)
from odoo.fields import Date
import werkzeug.utils
import werkzeug.wrappers
from odoo.addons.website_sale.controllers.main import TableCompute
import requests
# from odoo.addons.web.controllers.main import db_monodb, ensure_db, set_cookie_and_redirect, login_and_redirect
from odoo.addons.web.controllers.utils import ensure_db, _get_login_redirect_url
from odoo.addons.affiliate_management.controllers.home import Home
from odoo.addons.website.controllers.main import Website,QueryURL
# from odoo.addons.website_form.controllers.main import WebsiteForm
from odoo.addons.website_sale.controllers.main import WebsiteSale
from odoo.osv import expression
class website_affiliate(Home):
#home page of affiliate website
@http.route('/affiliate/', auth='public',type='http', website=True)
def affiliate(self, **kw):
banner = request.env['affiliate.banner'].sudo().search([])
banner_title = banner[-1].banner_title if banner else ''
banner_image = banner[-1].banner_image if banner else ''
ConfigValues = request.env['res.config.settings'].sudo().website_constant()
enable_forget_pwd = ConfigValues.get('enable_forget_pwd')
enable_login = ConfigValues.get('enable_login')
enable_signup = ConfigValues.get('enable_signup')
how_it_work_title = ConfigValues.get('work_title')
how_it_work_text = tools.html_sanitize(ConfigValues.get('work_text'))
values = {
'default_header':False,
'affiliate_website':True,
'banner_title':banner_title,
'banner_image':banner_image,
'enable_forget_pwd':enable_forget_pwd,
'enable_login':enable_login,
'enable_signup':enable_signup,
'website_name' : request.env['website'].search([])[0].name,
'how_it_work_title':how_it_work_title,
'how_it_work_text' :how_it_work_text
}
if request.session.get('error'):
values.update({'error':request.session.get('error')})
if request.session.get('success'):
values.update({'success':request.session.get('success')})
request.session.pop('error', None)
request.session.pop('success', None)
return http.request.render('affiliate_management.affiliate', values)
@http.route('/affiliate/join', auth='public',type='json', website=True,methods=['POST'])
def join(self,email ,**kw):
msg = False
aff = request.env['affiliate.request'].sudo().search([('name','=',email)])
if aff:
if (not aff.signup_valid) and (not aff.user_id):
aff.regenerate_token()
msg = "Thank you for registering with us, we have sent you the Signup mail at "+email+"."
else:
if aff.state == 'aproove':
msg = "Your email is already registered with us "
elif aff.state == 'register':
msg = "Your request is pending for approval with us, soon you will receive 'Approval' confirmation e-mail."
else:
if aff.user_id:
msg = "Your request is pending for approval with us, soon you will receive 'Approval' confirmation e-mail."
else:
msg = "We have already sended you a joining e-mail"
else:
user = request.env['res.users'].sudo().search([('login','=',email)])
msg = "Thank you for registering with us, we have sent you the Signup mail at "+email
vals = {
'name':email,
'state':'draft',
}
if user:
vals.update({
"partner_id":user.partner_id.id,
"user_id" : user.id,
'state' : 'register'
})
msg = "Your request is pending for approval with us, soon you will receive 'Approval' confirmation e-mail."
aff_request = request.env['affiliate.request'].sudo().create(vals)
return msg
@http.route('/affiliate/about',type='http', auth="user", website=True)
def affiliate_about(self, **kw):
partner = request.env.user.partner_id
base_url = request.env['ir.config_parameter'].sudo().get_param('web.base.url')
currency_id = request.env.user.company_id.currency_id
ConfigValues = request.env['res.config.settings'].sudo().website_constant()
db = request.session.get('db')
value={
'url': "%s/shop?aff_key=%s&db=%s" %(base_url,partner.res_affiliate_key,db),
'affiliate_key': partner.res_affiliate_key,
'pending_amt':partner.pending_amt,
'approved_amt':partner.approved_amt,
'currency_id':currency_id,
'how_it_works_title':ConfigValues.get('work_title'),
'how_it_works_text':tools.html_sanitize(ConfigValues.get('work_text')),
}
return http.request.render('affiliate_management.about', value)
@http.route('/affiliate/signup', auth='public',type='http', website=True)
def register(self, **kw):
token = request.httprequest.args.get('token')
user = request.env['affiliate.request'].sudo().search([('signup_token','=',token)])
term_condition = request.env['res.config.settings'].sudo().website_constant().get('term_condition')
values = {}
if user.signup_valid and user.state == 'draft':
values .update({
'name': user.name.split('@')[0],
'login': user.name,
'token': token,
'term_condition':tools.html_sanitize(term_condition),
})
if request.session.get('error'):
values.update({'error':request.session.get('error')})
else:
pass
request.session.pop('error', None)
return http.request.render('affiliate_management.register',values)
@http.route('/affiliate/register', auth='public',type='http', website=True)
def register_affiliate(self, **kw):
ensure_db()
aff_request = request.env['affiliate.request'].sudo().search([('name','=',kw.get('login'))])
if aff_request and kw.get('confirm_password') == kw.get('password') and aff_request.signup_token == kw.get('token'):
template_user_id = literal_eval(request.env['ir.config_parameter'].sudo().get_param('base.template_portal_user_id', 'False'))
template_user = request.env['res.users'].sudo().browse(template_user_id)
auto_approve_request = request.env['res.config.settings'].sudo().website_constant().get('auto_approve_request')
if not template_user.exists():
raise SignupError('Invalid template user.')
data = kw
redirect_url = "/"
values = { key: data.get(key) for key in ('login', 'name') }
values['email'] = data.get('email') or values.get('login')
values['lang'] = request.lang.code
values['active'] = True
no_invitation_mail = True
values['password'] = data.get('password',"")
try:
with request.env.cr.savepoint():
user = template_user.with_context(no_reset_password = no_invitation_mail).copy(values)
_logger.info('------user.partner--%r-----',user.partner_id)
# update phoen no. and comment in res.partner
user.partner_id.comment = kw.get('comment')
user.partner_id.phone = kw.get('phone')
# update affiliate.request with partner and user id and state
aff_request.partner_id = user.partner_id.id
aff_request.user_id = user.id
aff_request.state = 'register'
request.env.cr.commit()
# check the config for auto approve the request
if auto_approve_request:
aff_request.action_aproove()
db = request.env.cr.dbname
uid = request.session.authenticate(request.session.db, data.get('email') or values.get('login'), data.get('password',""))
# request.params['login_success'] = True
_logger.info("=================uid====%r",uid)
return request.redirect(_get_login_redirect_url(uid, redirect='/affiliate'))
# return login_and_redirect(db, data['login'], data['password'],redirect_url='/affiliate')
# return _get_login_redirect_url(user.id,redirect='/affiliate')
except Exception as e:
_logger.error("Error123: %r"%e)
return request.redirect('/')
else:
if kw.get('password')!= kw.get('confirm_password'):
request.session['error']= "Passwords Does't match."
return request.redirect('/affiliate/signup?token='+kw.get('token'), 303)
else:
request.session['error']= "something went wrong.."
return request.redirect('/affiliate/', 303)
@http.route('/affiliate/register/confirmation', auth='public',type='http', website=True)
def register_affiliate_confirmation(self, **kw):
return http.request.render('affiliate_management.confirmation', {
})
@http.route('/affiliate/home',type='http', auth="user", website=True)
def home(self, **kw):
return http.request.render('affiliate_management.report', {
})
@http.route('/affiliate/report', type='http', auth="user", website=True)
def report(self, **kw):
partner = request.env.user.partner_id
enable_ppc = request.env['res.config.settings'].sudo().website_constant().get('enable_ppc')
currency_id = request.env.user.company_id.currency_id
visits = request.env['affiliate.visit'].sudo()
ppc_visit = visits.search([('affiliate_method','=','ppc'),('affiliate_partner_id','=',partner.id),'|',('state','=','invoice'),('state','=','confirm')])
pps_visit = visits.search([('affiliate_method','=','pps'),('affiliate_partner_id','=',partner.id),'|',('state','=','invoice'),('state','=','confirm')])
values = {
'pending_amt':partner.pending_amt,
'approved_amt':partner.approved_amt,
'ppc_count':len(ppc_visit),
'pps_count':len(pps_visit),
'enable_ppc':enable_ppc,
"currency_id":currency_id,
}
return http.request.render('affiliate_management.report', values)
@http.route(['/my/traffic','/my/traffic/page/<int:page>'], type='http', auth="user", website=True)
def traffic(self, page=1, date_begin=None, date_end=None, **kw):
values={}
partner = request.env.user.partner_id
visits = request.env['affiliate.visit'].sudo()
domain = [('affiliate_partner_id','=',partner.id),('affiliate_method','=','ppc'),'|',('state','=','invoice'),('state','=','confirm')]
if date_begin and date_end:
domain += [('create_date', '>', date_begin), ('create_date', '<=', date_end)]
traffic_count = visits.search_count(domain)
pager = request.website.pager(
url='/my/traffic',
url_args={'date_begin': date_begin, 'date_end': date_end},
total=traffic_count,
page=page,
step=10
)
ppc_visit = visits.search(domain, limit=10, offset=pager['offset'])
values.update({
'pager': pager,
'traffic': ppc_visit,
'default_url': '/my/traffic'
})
return http.request.render('affiliate_management.affiliate_traffic', values)
@http.route(['/my/traffic/<int:traffic>'], type='http', auth="user", website=True)
def aff_traffic_form(self, traffic=None, **kw):
traffic_visit = request.env['affiliate.visit'].sudo().browse([traffic])
return request.render("affiliate_management.traffic_form", {
'traffic_detail': traffic_visit,
'product_detail':request.env['product.product'].browse([traffic_visit.type_id]),
})
@http.route(['/my/order','/my/order/page/<int:page>'], type='http', auth="user", website=True)
def aff_order(self, page=1, date_begin=None, date_end=None, **kw):
values={}
partner = request.env.user.partner_id
visits = request.env['affiliate.visit'].sudo()
domain = [('affiliate_partner_id','=',partner.id),('affiliate_method','=','pps'),'|',('state','=','invoice'),('state','=','confirm')]
if date_begin and date_end:
domain += [('create_date', '>', date_begin), ('create_date', '<=', date_end)]
traffic_count = visits.search_count(domain)
pager = request.website.pager(
url='/my/order',
url_args={'date_begin': date_begin, 'date_end': date_end},
total=traffic_count,
page=page,
step=10
)
ppc_visit = visits.sudo().search(domain, limit=10, offset=pager['offset'])
values.update({
'pager': pager,
'traffic': ppc_visit,
'default_url': '/my/order',
})
return http.request.render('affiliate_management.affiliate_order', values)
@http.route(['/my/order/<int:order>'], type='http', auth="user", website=True)
def aff_order_form(self, order=None, **kw):
order_visit = request.env['affiliate.visit'].sudo().browse([order])
return request.render("affiliate_management.order_form", {
'order_visit_detail': order_visit,
'product_detail' :order_visit.sales_order_line_id.sudo()
})
# Routes for the payment template
@http.route(['/affiliate/payment','/affiliate/payment/page/<int:page>'], type='http', auth="user", website=True)
def payment(self, page=1, date_begin=None, date_end=None, **kw):
values={}
partner = request.env.user.partner_id
invoices = request.env['account.move']
domain = [('partner_id','=',partner.id),('payment_state','=','paid'),('ref','=',None)]
if date_begin and date_end:
domain += [('create_date', '>', date_begin), ('create_date', '<=', date_end)]
invoice_count = invoices.search_count(domain)
pager = request.website.pager(
url='/affiliate/payment',
url_args={'date_begin': date_begin, 'date_end': date_end},
total=invoice_count,
page=page,
step=10
)
invoice_list = invoices.search(domain, limit=10, offset=pager['offset'])
values.update({
'pager': pager,
'invoices': invoice_list,
'default_url': '/affiliate/payment',
})
return http.request.render('affiliate_management.payment_tree',values )
@http.route(['/my/invoice/<int:invoice>'], type='http', auth="user", website=True)
def aff_invoice_form(self, invoice=None, **kw):
inv = request.env['account.move'].sudo().browse([invoice])
return request.render("affiliate_management.payment_form", {
'invoice': inv,
})
@http.route('/affiliate/tool', auth='user',type='http', website=True)
def tool(self, **kw):
"""actions for Tool "affiliate/tool"""
return http.request.render('affiliate_management.tool',{})
@http.route('/tool/create_link', auth='user',type='http', website=True)
def create_link(self, **kw):
"""generate affiliate link by url"""
partner = request.env.user.partner_id
# link = kw.get("link")
link = kw.get("link") if kw.get("link").find('#') != -1 else str(kw.get("link"))+'#'
index_li = link.find('#')
db = request.session.get('db')
db = "?db=%s" %(db)
link = link[:index_li]+db+link[index_li:]
result = self.check_link_validation(link)
if kw.get('link') and partner.res_affiliate_key and result:
index_li = link.find('#')
request.session['generate_link'] = link[:index_li]+'&aff_key='+partner.res_affiliate_key+link[index_li:]
return request.redirect('/tool/link_generator/', 303)
@http.route("/tool/link_generator", auth='user',type='http', website=True)
def link_generator(self, **kw):
partner = request.env.user.partner_id
values={}
if request.session.get('generate_link'):
values.update({
'generate_link':request.session.get('generate_link'),
'error':request.session.get('error')
})
if request.session.get('error'):
values.update({
'error':request.session.get('error')
})
request.session.pop('generate_link', None)
request.session.pop('error', None)
return http.request.render('affiliate_management.link_generator',values)
def check_link_validation(self,link):
base_url = request.env['ir.config_parameter'].sudo().get_param('web.base.url')
try:
r = requests.get(link,verify=False)
if r.status_code == 200:
langs = [l.code for l in request.website.language_ids]
link_arr = link.split("/")
# if a language is already in the path, remove it
if link_arr[1] in langs:
link_arr.pop(1)
link_base_url = link_arr[0]+"//"+link_arr[2]
if base_url == link_base_url :
#changed by vardaan as product are not showing as part of url
if 'shop' in link_arr or 'product' in link_arr:
return True
else:
request.session['error'] = "Url doesn't have shop/product"
return False
else:
request.session['error'] = "Base Url doesn't match"
return False
else:
request.session['error'] = "Please enter a Valid Url. Bad response from "+link
return False
except Exception as e:
request.session['error'] = "Please enter a Valid Url. + %r"%e
return False
@http.route("/tool/product_link", auth='user',type='http', website=True)
def product_link(self, **kw):
values={}
category = request.env['product.public.category'].sudo().search([])
values.update({
'category': category,
})
return http.request.render('affiliate_management.product_link',values)
# search the product on criteria category and published product
@http.route("/search/product", auth='user',type='http', website=True)
def search_product(self, **kw):
domain = request.website.sale_product_domain()
if kw.get('name'):
domain += [
('website_published','=',True),'|', '|', '|', ('name', 'ilike', kw.get('name')), ('description', 'ilike', kw.get('name')),
('description_sale', 'ilike', kw.get('name')), ('product_variant_ids.default_code', 'ilike', kw.get('name'))]
if kw.get('categories'):
category_id = request.env['product.public.category'].sudo().search([('name','=',kw.get('categories'))],limit=1)
if category_id:
domain += [('public_categ_ids', 'child_of', int(category_id.id))]
partner = request.env.user.partner_id
values={}
category = request.env['product.public.category'].sudo().search([])
values.update({
'category': category,
})
product_template = request.env['product.template'].sudo()
products = product_template.search(domain)
db = request.session.get('db')
if products:
values.update({
'bins': TableCompute().process(products, 10),
'search_products':products,
'rows':4,
'partner_key': partner.res_affiliate_key,
'base_url': request.env['ir.config_parameter'].sudo().get_param('web.base.url'),
'db':db
})
# _logger.info("=======values====%r",values)
return http.request.render('affiliate_management.product_link',values)
@http.route('/tool/generate_banner', auth='user',type='http', website=True)
def tool_banner(self, **kw):
partner = request.env.user.partner_id
banner_image_ids = request.env['affiliate.image'].sudo().search([('image_active','=',True)])
product = request.env['product.template'].sudo().search([('id','=',kw.get('product_id'))])
db = request.session.get('db')
values={
'banner_button':banner_image_ids,
'product':product,
'db':db
}
return http.request.render('affiliate_management.generate_banner',values)
@http.route("/tool/generate_button_link", auth='user',type='http', website=True)
def generate_button_link(self, **kw):
partner = request.env.user.partner_id
base_url = request.env['ir.config_parameter'].sudo().get_param('web.base.url')
db = request.session.get('db')
values ={
'partner_key': partner.res_affiliate_key,
'product_id':kw.get('product_id'),
'base_url' : base_url,
'db':db
}
selected_image= kw.get('choose_banner').split("_")
if selected_image[0] == 'button':
_logger.info("-----selected button image id ---%r---",selected_image[1])
button = request.env['affiliate.image'].sudo().browse([int(selected_image[1])])
values.update({
"button":button
})
else:
if selected_image[0] == 'product':
values.update({
"is_product":True
})
_logger.info("-----selected product image id ---%r---",selected_image[1])
return http.request.render('affiliate_management.generate_button_link',values)
@http.route("/affiliate/request", type='json', auth="public", methods=['POST'], website=True)
def portal_user(self, user_id,**kw):
User = request.env['res.users'].sudo().browse([request.uid])
AffRqstObj = request.env['affiliate.request'].sudo()
vals ={
'name':User.partner_id.email,
'partner_id': User.partner_id.id,
'user_id': request.uid,
'state':'register',
}
aff_request = AffRqstObj.create(vals)
auto_approve_request = request.env['res.config.settings'].sudo().website_constant().get('auto_approve_request')
if auto_approve_request:
aff_request.action_aproove()
return aff_request and True or False

View File

@ -0,0 +1,55 @@
# -*- coding: utf-8 -*-
#################################################################################
# Author : Webkul Software Pvt. Ltd. (<https://webkul.com/>:wink:
# Copyright(c): 2015-Present Webkul Software Pvt. Ltd.
# All Rights Reserved.
#
#
#
# This program is copyright property of the author mentioned above.
# You can`t redistribute it and/or modify it.
#
#
# You should have received a copy of the License along with this program.
# If not, see <https://store.webkul.com/license.html/>;
#################################################################################
import werkzeug.utils
import werkzeug.wrappers
from odoo import http
from odoo.http import request
import logging
_logger = logging.getLogger(__name__)
from odoo.addons.web.controllers.home import Home
import odoo
import odoo.modules.registry
from odoo.tools.translate import _
from odoo.http import request
class Home(Home):
@http.route(website=True, auth="public")
def web_login(self, redirect=None, *args, **kw):
response = super(Home, self).web_login(redirect=redirect, *args, **kw)
# kw.get('affiliate_login_form') is hidden field in login form of affiliate home page
check_affiliate = request.env['res.users'].sudo().search([('login','=',kw.get('login'))]).partner_id.is_affiliate
if kw.get('affiliate_login_form') and response.qcontext.get('error'):
request.session['error']= 'Wrong login/password'
return request.redirect('/affiliate/',303)
else:
if kw.get('affiliate_login_form') and check_affiliate:
return super(Home, self).web_login(redirect='/affiliate/about', *args, **kw)
else:
return response
@http.route('/web/session/logout', type='http', auth="none")
def logout(self, redirect='/web'):
partner = request.env['res.users'].sudo().browse([request.session.uid])
if partner.partner_id.is_affiliate:
request.session.logout(keep_db=True)
return werkzeug.utils.redirect('/affiliate', 303)
else:
request.session.logout(keep_db=True)
return werkzeug.utils.redirect(redirect, 303)

View File

@ -0,0 +1,174 @@
# -*- coding: utf-8 -*-
#################################################################################
# Author : Webkul Software Pvt. Ltd. (<https://webkul.com/>:wink:
# Copyright(c): 2015-Present Webkul Software Pvt. Ltd.
# All Rights Reserved.
#
#
#
# This program is copyright property of the author mentioned above.
# You can`t redistribute it and/or modify it.
#
#
# You should have received a copy of the License along with this program.
# If not, see <https://store.webkul.com/license.html/>;
#################################################################################
from odoo import http
from odoo.http import request
from odoo import fields
import logging
_logger = logging.getLogger(__name__)
from odoo.addons.website_sale.controllers.main import WebsiteSale
import datetime
class WebsiteSale(WebsiteSale):
def create_aff_visit_entry(self,vals):
ppc_exist = self.check_ppc_exist(vals)
if ppc_exist:
visit = ppc_exist
else:
visit = request.env['affiliate.visit'].sudo().create(vals)
return visit
def check_ppc_exist(self,vals):
domain = [('type_id','=',vals['type_id']),('affiliate_method','=',vals['affiliate_method']),('affiliate_key','=',vals['affiliate_key']),('ip_address','=',vals['ip_address'])]
visit = request.env['affiliate.visit'].sudo().search(domain)
check_unique_ppc = request.env['res.config.settings'].sudo().website_constant().get('unique_ppc_traffic')
# "check_unique_ppc" it cheacks that in config setting wheather the unique ppc is enable or not
if check_unique_ppc:
if visit:
return visit
else:
return False
else:
return False
# override shop action in website_sale
@http.route([
'/shop',
'/shop/page/<int:page>',
'/shop/category/<model("product.public.category"):category>',
'/shop/category/<model("product.public.category"):category>/page/<int:page>'
], type='http', auth="public", website=True,sitemap=WebsiteSale.sitemap_shop)
def shop(self, page=0, category=None, search='', ppg=False, **post):
enable_ppc = request.env['res.config.settings'].sudo().website_constant().get('enable_ppc')
expire = False
result = super(WebsiteSale,self).shop(page=page, category=category, search=search, ppg=ppg, **post)
aff_key = request.httprequest.args.get('aff_key')
if category and aff_key:
expire = self.calc_cookie_expire_date()
path = request.httprequest.full_path
partner_id = request.env['res.partner'].sudo().search([('res_affiliate_key','=',aff_key),('is_affiliate','=',True)])
vals = self.create_affiliate_visit(aff_key,partner_id,category)
vals.update({'affiliate_type':'category'})
if ( len(partner_id) == 1):
affiliate_visit = self.create_aff_visit_entry(vals) if enable_ppc else False
result.set_cookie(key='affkey_%s'%(aff_key), value='category_%s'%(category.id),expires=expire)
else:
_logger.info("=====affiliate_visit not created by category===========")
else:
if aff_key:
expire = self.calc_cookie_expire_date()
partner_id = request.env['res.partner'].sudo().search([('res_affiliate_key','=',aff_key),('is_affiliate','=',True)])
if partner_id:
result.set_cookie(key='affkey_%s'%(aff_key), value='shop',expires=expire)
return result
@http.route(['/shop/<model("product.template"):product>'], type='http', auth="public", website=True)
def product(self, product, category='', search='', **kwargs):
_logger.info("=====product page=========")
_logger.info("=====product page aff_key==%r=========",request.httprequest.args)
enable_ppc = request.env['res.config.settings'].sudo().website_constant().get('enable_ppc')
expire = self.calc_cookie_expire_date()
result = super(WebsiteSale,self).product(product=product, category=category, search=search, **kwargs)
if request.httprequest.args.get('aff_key'):
# path is the complete url with url = xxxx?aff_key=XXXXXXXX
path = request.httprequest.full_path
# aff_key is fetch from url
aff_key = request.httprequest.args.get('aff_key')
partner_id = request.env['res.partner'].sudo().search([('res_affiliate_key','=',aff_key),('is_affiliate','=',True)])
vals = self.create_affiliate_visit(aff_key,partner_id,product)
vals.update({'affiliate_type':'product'})
if ( len(partner_id) == 1):
affiliate_visit = self.create_aff_visit_entry(vals) if enable_ppc else False
# "create_aff_visit_entry " this methods check weather the visit is already created or not or if created return the no. of existing record in object
result.set_cookie(key='affkey_%s'%(aff_key),value='product_%s'%(product.id),expires=expire)
_logger.info("============affiliate_visit created by product==%r=======",affiliate_visit)
else:
_logger.info("=====affiliate_visit not created by product===========%s %s"%(aff_key,partner_id))
return result
@http.route(['/shop/confirmation'], type='http', auth="public", website=True)
def shop_payment_confirmation(self, **post):
result = super(WebsiteSale,self).shop_payment_confirmation(**post)
# here result id http.render argument is http.render{ http.render(template, qcontext=None, lazy=True, **kw) }
sale_order_id = result.qcontext.get('order')
return self.update_affiliate_visit_cookies( sale_order_id,result )
def create_affiliate_visit(self,aff_key,partner_id,type_id):
""" method to delete the cookie after update function on id"""
vals = {
'affiliate_method':'ppc',
'affiliate_key':aff_key,
'affiliate_partner_id':partner_id.id,
'url':request.httprequest.full_path,
'ip_address':request.httprequest.environ['REMOTE_ADDR'],
'type_id':type_id.id,
'convert_date':fields.datetime.now(),
'affiliate_program_id': partner_id.affiliate_program_id.id,
}
return vals
def update_affiliate_visit_cookies(self , sale_order_id ,result):
"""update affiliate.visit from cokkies data i.e created in product and shop method"""
cookies = dict(request.httprequest.cookies)
visit = request.env['affiliate.visit']
arr=[]# contains cookies product_id
for k,v in cookies.items():
if 'affkey_' in k:
arr.append(k.split('_')[1])
if arr:
partner_id = request.env['res.partner'].sudo().search([('res_affiliate_key','=',arr[0]),('is_affiliate','=',True)])
for s in sale_order_id.order_line:
if len(arr)>0 and partner_id:
product_tmpl_id = s.product_id.product_tmpl_id.id
aff_visit = visit.sudo().create({
'affiliate_method':'pps',
'affiliate_key':arr[0],
'affiliate_partner_id':partner_id.id,
'url':"",
'ip_address':request.httprequest.environ['REMOTE_ADDR'],
'type_id':product_tmpl_id,
'affiliate_type': 'product',
'type_name':s.product_id.id,
'sales_order_line_id':s.id,
'convert_date':fields.datetime.now(),
'affiliate_program_id': partner_id.affiliate_program_id.id,
'product_quantity' : s.product_uom_qty,
'is_converted':True
})
# delete cookie after first sale occur
cookie_del_status=False
for k,v in cookies.items():
if 'affkey_' in k:
cookie_del_status = result.delete_cookie(key=k)
return result
def calc_cookie_expire_date(self):
ConfigValues = request.env['res.config.settings'].sudo().website_constant()
cookie_expire = ConfigValues.get('cookie_expire')
cookie_expire_period = ConfigValues.get('cookie_expire_period')
time_dict = {
'hours':cookie_expire,
'days':cookie_expire*24,
'months':cookie_expire*24*30,
}
return datetime.datetime.utcnow() + datetime.timedelta(hours=time_dict[cookie_expire_period])

View File

@ -0,0 +1,81 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<data noupdate="0" >
<!-- <record model="ir.cron" id="affiliate_ppc_maturity_scheduler_call">
<field name="name">Automated ppc maturity Scheduler</field>
<field name="active" eval="True"/>
<field name="interval_number">1</field>
<field name="interval_type">days</field>
<field name="numbercall">-1</field>
<field name="doall" eval="False"/>
<field name="model" eval="'affiliate.visit'"/>
<field name="function" eval="'process_ppc_maturity_scheduler_queue'"/>
<field name="args" eval="'()'"/>
</record> -->
<record id="affiliate_ppc_maturity_scheduler_call" model="ir.cron">
<field name="name">Automated ppc maturity Scheduler</field>
<field name="active" eval="True"/>
<field name="interval_number">1</field>
<field name="interval_type">days</field>
<field name="numbercall">-1</field>
<field name="model_id" ref="model_affiliate_visit"/>
<field name="state">code</field>
<field name="code">model.process_ppc_maturity_scheduler_queue()</field>
<field name="doall" eval="False"/>
</record>
<!-- generate invoice by crone according to settings day of date -->
<!-- <record model="ir.cron" id="affiliate_visit_scheduler_call">
<field name="name">Automated invoice Scheduler</field>
<field name="active" eval="True"/>
<field name="interval_number">1</field>
<field name="interval_type">days</field>
<field name="numbercall">-1</field>
<field name="doall" eval="False"/>
<field name="model" eval="'affiliate.visit'"/>
<field name="function" eval="'process_scheduler_queue'"/>
<field name="args" eval="'()'"/>
</record> -->
<record id="affiliate_visit_scheduler_call" model="ir.cron">
<field name="name">Automated invoice Scheduler</field>
<field name="active" eval="True"/>
<field name="interval_number">1</field>
<field name="interval_type">days</field>
<field name="numbercall">-1</field>
<field name="model_id" ref="model_affiliate_visit"/>
<field name="state">code</field>
<field name="code">model.process_scheduler_queue()</field>
<field name="doall" eval="False"/>
</record>
<record model="ir.actions.server" id="open_invoice_server_action">
<field name="name">Create Visits Invoice</field>
<field name="model_id" ref="model_affiliate_visit"/>
<field name="binding_model_id" ref="model_affiliate_visit" />
<field name="state">code</field>
<field name="code">
if records:
action = records.create_invoice()
</field>
</record>
<!-- invoice server action -->
<!-- <record id="test_more_item" model="ir.values">
<field eval="'client_action_multi'" name="key2"/>
<field eval="'affiliate.visit'" name="model"/>
<field name="name">Test Item</field>
<field eval="'ir.actions.server,%d'%open_invoice_server_action" name="value"/>
</record> -->
</data>
</odoo>

View File

@ -0,0 +1,51 @@
<odoo>
<data noupdate="1">
<record id="affiliate_program_1" model="affiliate.program">
<field name="name">Default Affiliate Program</field>
<field name="ppc_type">s</field>
<field name="amount_ppc_fixed">10</field>
<field name="matrix_type">f</field>
<field name="amount">10</field>
</record>
<function
model="ir.default" name="set"
eval="('res.config.settings','enable_ppc',True)"/>
<function
model="ir.default" name="set"
eval="('res.config.settings', 'enable_signup', True)"/>
<function
model="ir.default" name="set"
eval="('res.config.settings', 'enable_login', True)"/>
<function
model="ir.default" name="set"
eval="('res.config.settings', 'enable_forget_pwd', True)"/>
<function
model="ir.default" name="set"
eval="('res.config.settings', 'cookie_expire', 1)"/>
<function
model="ir.default" name="set"
eval="('res.config.settings', 'cookie_expire_period', 'days')"/>
<function
model="ir.default" name="set"
eval="('res.config.settings', 'payment_day', 7)"/>
<function
model="ir.default" name="set"
eval="('res.config.settings', 'work_title','The process is very simple. Simply, signup/login to your affiliate portal, pick your affiliate link and place them into your website/blogs and watch your account balance grow as your visitors become our customers, as :'
)"/>
<function
model="ir.config_parameter" name="set_param"
eval="('auth_signup.allow_uninvited', True)"/>
</data>
</odoo>

View File

@ -0,0 +1,435 @@
<odoo>
<data noupdate="1">
<!-- set constant in ir.default -->
<record id="affiliate_image_1" model="affiliate.image">
<field name="image" type="base64" file="affiliate_management/static/src/img/ban1.png"/>
<field name="title">Banner</field>
<field name="name">image1</field>
</record>
<record id="affiliate_image_2" model="affiliate.image">
<field name="image" type="base64" file="affiliate_management/static/src/img/ban2.png"/>
<field name="title">Banner</field>
<field name="name">image2</field>
</record>
<record id="affiliate_image_3" model="affiliate.image">
<field name="image" type="base64" file="affiliate_management/static/src/img/ban3.png"/>
<field name="title">Banner</field>
<field name="name">image3</field>
</record>
<record id="affiliate_image_4" model="affiliate.image">
<field name="image" type="base64" file="affiliate_management/static/src/img/but1.png"/>
<field name="title">Button</field>
<field name="name">image4</field>
</record>
<record id="affiliate_image_5" model="affiliate.image">
<field name="image" type="base64" file="affiliate_management/static/src/img/but2.png"/>
<field name="title">Button</field>
<field name="name">image5</field>
</record>
<record id="affiliate_image_6" model="affiliate.image">
<field name="image" type="base64" file="affiliate_management/static/src/img/but3.png"/>
<field name="title">Button</field>
<field name="name">image6</field>
</record>
<!-- res_partner -->
<record id="res_partner_1" model="res.partner">
<field name="name">Demo1</field>
<!-- <field name="supplier">1</field> -->
<!-- <field eval="0" name="customer"/> -->
<field name="is_company">1</field>
<field name="city">DemoCity1</field>
<field name="zip">106</field>
<field name="country_id" ref="base.tw"/>
<field name="street">31 Demo city street</field>
<field name="email">Demo@example.com</field>
<field name="phone">(+886) (02) 4162 2023</field>
<field name="website">http://www.DemoUser.com</field>
<!-- <field name="image" type="base64" file="affiliate_management/static/src/img/res_partner_1-image.png"/> -->
<field name="is_affiliate">True</field>
<field name="res_affiliate_key">123OxPzL</field>
<field name="affiliate_program_id" ref="affiliate_program_1"/>
</record>
<record id="res_partner_2" model="res.partner">
<field name="name">Demo2</field>
<!-- <field name="supplier">1</field> -->
<!-- <field eval="0" name="customer"/> -->
<field name="is_company">1</field>
<field name="city">DemoCity2</field>
<field name="zip">106367</field>
<field name="country_id" ref="base.tw"/>
<field name="street">313 Demo2 city2 street2</field>
<field name="email">Demo2@example.com</field>
<field name="phone">(+886) (02) 4162 2023</field>
<field name="website">http://www.DemoUser2.com</field>
<!-- <field name="image" type="base64" file="affiliate_management/static/src/img/res_partner_3-image.jpeg"/> -->
<field name="is_affiliate">True</field>
<field name="res_affiliate_key">223OxPzL</field>
<field name="affiliate_program_id" ref="affiliate_program_1"/>
</record>
<record id="res_partner_3" model="res.partner">
<field name="name">Demo3</field>
<!-- <field name="supplier">1</field> -->
<!-- <field eval="0" name="customer"/> -->
<field name="is_company">1</field>
<field name="city">DemoCity3</field>
<field name="zip">106345</field>
<field name="country_id" ref="base.tw"/>
<field name="street">313 Demo3 city3 street3</field>
<field name="email">Demo3@example.com</field>
<field name="phone">(+886) (02) 4162 2023</field>
<field name="website">http://www.DemoUser3.com</field>
<!-- <field name="image" type="base64" file="affiliate_management/static/src/img/res_partner_2-image.png"/> -->
<field name="is_affiliate">True</field>
<field name="res_affiliate_key">323OxPzL</field>
<field name="affiliate_program_id" ref="affiliate_program_1"/>
</record>
<record model="res.users" id="affiliate_demouser_res_partner_1" context="{'no_reset_password': True}">
<field name="login">Demo1@example.com</field>
<field name="password">webkul</field>
<field name="groups_id" eval="[(6,0,[ref('base.group_portal'),ref('affiliate_security_user_group')])]"/>
<field name="partner_id" ref="res_partner_1"/>
<field name="company_id" ref="base.main_company"/>
<field name="company_ids" eval="[(4, ref('base.main_company'))]"/>
</record>
<record model="res.users" id="affiliate_demouser_res_partner_2" context="{'no_reset_password': True}">
<field name="login">Demo2@example.com</field>
<field name="password">webkul</field>
<field name="groups_id" eval="[(6,0,[ref('base.group_portal'),ref('affiliate_security_user_group')])]"/>
<field name="partner_id" ref="res_partner_2"/>
<field name="company_id" ref="base.main_company"/>
<field name="company_ids" eval="[(4, ref('base.main_company'))]"/>
</record>
<record model="res.users" id="affiliate_demouser_res_partner_3" context="{'no_reset_password': True}">
<field name="login">Demo3@example.com</field>
<field name="password">webkul</field>
<field name="groups_id" eval="[(6,0,[ref('base.group_portal'),ref('affiliate_security_user_group')])]"/>
<field name="partner_id" ref="res_partner_3"/>
<field name="company_id" ref="base.main_company"/>
<field name="company_ids" eval="[(4, ref('base.main_company'))]"/>
</record>
<!-- create a request for the user in register stage -->
<record id="affiliate_request_1" model="affiliate.request">
<field name="password">webkul</field>
<field name="name">Demo1@example.com</field>
<field name="partner_id" ref="res_partner_1"/>
<field name="state">aproove</field>
<field name="user_id" ref="affiliate_demouser_res_partner_1"/>
</record>
<record id="affiliate_request_2" model="affiliate.request">
<field name="password">webkul</field>
<field name="name">Demo2@example.com</field>
<field name="partner_id" ref="res_partner_2"/>
<field name="state">aproove</field>
<field name="user_id" ref="affiliate_demouser_res_partner_2"/>
</record>
<record id="affiliate_request_3" model="affiliate.request">
<field name="password">webkul</field>
<field name="name">Demo3@example.com</field>
<field name="partner_id" ref="res_partner_3"/>
<field name="state">aproove</field>
<field name="user_id" ref="affiliate_demouser_res_partner_3"/>
</record>
<!-- pending state request -->
<record id="res_partner_4" model="res.partner">
<field name="name">Demo4</field>
<!-- <field name="supplier">1</field> -->
<!-- <field eval="0" name="customer"/> -->
<field name="is_company">1</field>
<field name="city">DemoCity4</field>
<field name="zip">106345</field>
<field name="country_id" ref="base.tw"/>
<field name="street">313 Demo4 city4 street4</field>
<field name="email">Demo4@example.com</field>
<field name="phone">(+886) (02) 4162 2023</field>
<field name="website">http://www.DemoUser4.com</field>
<!-- <field name="image" type="base64" file="affiliate_management/static/src/img/res_partner_2-image.png"/> -->
<!-- <field name="is_affiliate">True</field>
<field name="res_affiliate_key">323OxPzL</field>
<field name="affiliate_program_id" ref="affiliate_program_1"/> -->
</record>
<record model="res.users" id="affiliate_demouser_res_partner_4" context="{'no_reset_password': True}">
<field name="login">Demo4@example.com</field>
<field name="password">webkul</field>
<field name="groups_id" eval="[(6,0,[ref('base.group_portal'),ref('affiliate_security_user_group')])]"/>
<field name="partner_id" ref="res_partner_4"/>
<field name="company_id" ref="base.main_company"/>
<field name="company_ids" eval="[(4, ref('base.main_company'))]"/>
</record>
<record id="affiliate_request_4" model="affiliate.request">
<field name="password">webkul</field>
<field name="name">Demo4@example.com</field>
<field name="partner_id" ref="res_partner_4"/>
<field name="state">register</field>
<field name="user_id" ref="affiliate_demouser_res_partner_4"/>
</record>
<record id="res_partner_5" model="res.partner">
<field name="name">Demo5</field>
<!-- <field name="supplier">1</field> -->
<!-- <field eval="0" name="customer"/> -->
<field name="is_company">1</field>
<field name="city">DemoCity5</field>
<field name="zip">106345</field>
<field name="country_id" ref="base.tw"/>
<field name="street">313 Demo5 city5 street5</field>
<field name="email">Demo4@example.com</field>
<field name="phone">(+886) (02) 4162 2023</field>
<field name="website">http://www.DemoUser5.com</field>
<!-- <field name="image" type="base64" file="affiliate_management/static/src/img/res_partner_2-image.png"/> -->
<!-- <field name="is_affiliate">True</field>
<field name="res_affiliate_key">323OxPzL</field>
<field name="affiliate_program_id" ref="affiliate_program_1"/> -->
</record>
<record model="res.users" id="affiliate_demouser_res_partner_5" context="{'no_reset_password': True}">
<field name="login">Demo5@example.com</field>
<field name="password">webkul</field>
<field name="groups_id" eval="[(6,0,[ref('base.group_portal'),ref('affiliate_security_user_group')])]"/>
<field name="partner_id" ref="res_partner_5"/>
<field name="company_id" ref="base.main_company"/>
<field name="company_ids" eval="[(4, ref('base.main_company'))]"/>
</record>
<record id="affiliate_request_5" model="affiliate.request">
<field name="password">webkul</field>
<field name="name">Demo5@example.com</field>
<field name="partner_id" ref="res_partner_5"/>
<field name="state">register</field>
<field name="user_id" ref="affiliate_demouser_res_partner_5"/>
</record>
<!-- draft state request -->
<record id="affiliate_request_6" model="affiliate.request">
<field name="name">Demo6@example.com</field>
<field name="state">draft</field>
<field name="signup_token">CJyPAvexmav0Bar8C456</field>
</record>
<record id="affiliate_request_7" model="affiliate.request">
<field name="name">Demo7@example.com</field>
<field name="state">draft</field>
<field name="signup_token">CJyPAvex1230Bar8C456</field>
</record>
<record id="order_id_1" model="sale.order">
<field name="partner_id" ref="res_partner_1"/>
</record>
<record id="order_id_2" model="sale.order">
<field name="partner_id" ref="res_partner_2"/>
</record>
<record id="sol_id_1" model="sale.order.line">
<field name="name">Zed+ Antivirus</field>
<field name="product_id" ref="product.product_order_01"/>
<field name="product_uom_qty" >1</field>
<field name="order_partner_id" ref="res_partner_1"/>
<field name="order_id" ref="order_id_1"/>
<field name="price_unit">2950.00</field>
</record>
<record id="sol_id_2" model="sale.order.line">
<field name="name">Antivirus</field>
<field name="product_id" ref="product.product_order_01"/>
<field name="product_uom_qty" >1</field>
<field name="order_partner_id" ref="res_partner_1"/>
<field name="order_id" ref="order_id_2"/>
<field name="price_unit">950.00</field>
</record>
<record id="affiliate_visit_1" model="affiliate.visit">
<field name="affiliate_method">ppc</field>
<field name="affiliate_type">product</field>
<field name="type_id">15</field>
<field name="type_name">iMac</field>
<field name="is_converted">False</field>
<field name="affiliate_key">123OxPzL</field>
<field name="affiliate_partner_id" ref="res_partner_1"/>
<field name="url">/shop/product/e-com09-imac-15?aff_key=123OxPzL</field>
<field name="affiliate_program_id" ref="affiliate_program_1"/>
<field name="state">draft</field>
<!-- <field name="act_invoice_id" ref="affiliate_account_invoice_1"/> -->
</record>
<record id="affiliate_visit_2" model="affiliate.visit">
<field name="affiliate_method">ppc</field>
<field name="affiliate_type">product</field>
<field name="type_id">15</field>
<field name="type_name">iPad</field>
<field name="is_converted">False</field>
<field name="affiliate_key">223OxPzL</field>
<field name="affiliate_partner_id" ref="res_partner_2"/>
<field name="url">/shop/product/e-com09-ipad-10?aff_key=223OxPzL</field>
<field name="affiliate_program_id" ref="affiliate_program_1"/>
<field name="state">draft</field>
<!-- <field name="act_invoice_id" ref="affiliate_account_invoice_2"/> -->
</record>
<record id="affiliate_visit_3" model="affiliate.visit">
<field name="affiliate_method">pps</field>
<field name="affiliate_type">product</field>
<field name="type_id">6</field>
<field name="type_name">Zed+ Antivirus</field>
<field name="is_converted">True</field>
<field name="sales_order_line_id" ref="sol_id_1" />
<field name="affiliate_key">123OxPzL</field>
<field name="affiliate_partner_id" ref="res_partner_1"/>
<field name="url">/shop/product/prod-order-zed-antivirus-6?aff_key=123OxPzL</field>
<field name="affiliate_program_id" ref="affiliate_program_1"/>
<field name="state">draft</field>
<field name="product_quantity">1</field>
</record>
<record id="affiliate_visit_4" model="affiliate.visit">
<field name="affiliate_method">pps</field>
<field name="affiliate_type">product</field>
<field name="type_id">6</field>
<field name="type_name">Antivirus</field>
<field name="is_converted">True</field>
<field name="sales_order_line_id" ref="sol_id_2" />
<field name="affiliate_key">223OxPzL</field>
<field name="affiliate_partner_id" ref="res_partner_2"/>
<field name="url">/shop/product/prod-antivirus-6?aff_key=223OxPzL</field>
<field name="affiliate_program_id" ref="affiliate_program_1"/>
<field name="state">draft</field>
<field name="product_quantity">1</field>
</record>
<record id="affiliate_visit_5" model="affiliate.visit">
<field name="affiliate_method">ppc</field>
<field name="affiliate_type">product</field>
<field name="type_id">20</field>
<field name="type_name">Bosh Speaker</field>
<field name="is_converted">False</field>
<field name="affiliate_key">323OxPzL</field>
<field name="affiliate_partner_id" ref="res_partner_3"/>
<field name="url">/shop/product/e-com09-ipad-20?aff_key=323OxPzL</field>
<field name="affiliate_program_id" ref="affiliate_program_1"/>
<field name="state">draft</field>
</record>
<record id="affiliate_visit_6" model="affiliate.visit">
<field name="affiliate_method">ppc</field>
<field name="affiliate_type">product</field>
<field name="type_id">25</field>
<field name="type_name">Xemberg Shoes</field>
<field name="is_converted">False</field>
<field name="affiliate_key">323OxPzL</field>
<field name="affiliate_partner_id" ref="res_partner_3"/>
<field name="url">/shop/product/e-com09-ipad-40?aff_key=323OxPzL</field>
<field name="affiliate_program_id" ref="affiliate_program_1"/>
<field name="state">draft</field>
</record>
<record id="advance_commision_1" model="advance.commision">
<field name="name">Advance Commission</field>
<field name="active_adv_comsn">True</field>
</record>
<record id="affiliate_product_pricelist_item_1" model="affiliate.product.pricelist.item">
<field name="name">product</field>
<field name="advance_commision_id" ref="advance_commision_1"/>
<field name="applied_on">1_product</field>
<field name="product_tmpl_id">10</field>
<field name="compute_price">fixed</field>
<field name="fixed_price">10</field>
<field name="sequence">1</field>
</record>
<record id="affiliate_product_pricelist_item_2" model="affiliate.product.pricelist.item">
<field name="name">product</field>
<field name="advance_commision_id" ref="advance_commision_1"/>
<field name="applied_on">2_product_category</field>
<field name="categ_id">4</field>
<field name="compute_price">fixed</field>
<field name="fixed_price">10</field>
<field name="sequence">1</field>
</record>
<record id="affiliate_product_pricelist_item_3" model="affiliate.product.pricelist.item">
<field name="name">product</field>
<field name="advance_commision_id" ref="advance_commision_1"/>
<field name="applied_on">3_global</field>
<field name="compute_price">fixed</field>
<field name="fixed_price">10</field>
<field name="sequence">1</field>
</record>
<record id="advance_commision_2" model="advance.commision">
<field name="name">Advance Commission2</field>
<field name="active_adv_comsn">True</field>
</record>
<record id="affiliate_product_pricelist_item_4" model="affiliate.product.pricelist.item">
<field name="name">product</field>
<field name="advance_commision_id" ref="advance_commision_2"/>
<field name="applied_on">1_product</field>
<field name="product_tmpl_id">20</field>
<field name="compute_price">fixed</field>
<field name="fixed_price">100</field>
<field name="sequence">1</field>
</record>
<record id="affiliate_product_pricelist_item_5" model="affiliate.product.pricelist.item">
<field name="name">product</field>
<field name="advance_commision_id" ref="advance_commision_2"/>
<field name="applied_on">2_product_category</field>
<field name="categ_id">9</field>
<field name="compute_price">fixed</field>
<field name="fixed_price">100</field>
<field name="sequence">1</field>
</record>
<record id="affiliate_product_pricelist_item_6" model="affiliate.product.pricelist.item">
<field name="name">product</field>
<field name="advance_commision_id" ref="advance_commision_2"/>
<field name="applied_on">3_global</field>
<field name="compute_price">fixed</field>
<field name="fixed_price">100</field>
<field name="sequence">1</field>
</record>
</data>
</odoo>
<!--
Visitor clicks on affiliate links posted on your website/blogs.
A cookie is placed in their browser for tracking purposes. The visitor browses our site and may decide to order.
The visitor browses our site and may decide to order. If the visitor orders, the order will be registered as a sale for you and you will receive a commission for this sale.
If the visitor orders, the order will be registered as a sale for you and you will receive a commission for this sale. -->

View File

@ -0,0 +1,12 @@
<odoo>
<data noupdate="0">
<record id="seq_visit_order" model="ir.sequence">
<field name="name">Program No</field>
<field name="code">affiliate.visit</field>
<field name="prefix">VST</field>
<field name="padding">6</field>
<field name="company_id" eval="False"/>
</record>
</data>
</odoo>

View File

@ -0,0 +1,5 @@
affiliate_ir_property_manager,manager_access_ir_property,base.model_ir_property,affiliate_security_manager_group,1,1,1,1
affiliate_res_company_manager,manager_access_res_company,base.model_res_company,affiliate_security_manager_group,1,1,0,0
affiliate_ir_module_module_manager,manager_access_ir_module_module,base.model_ir_module_module,affiliate_security_manager_group,1,1,0,0
affiliate_ir_config_parameter_manager,manager_access_ir_config_parameter,base.model_ir_config_parameter,affiliate_security_manager_group,1,1,0,0
affiliate_ir_rule_manager,manager_access_ir_rule,base.model_ir_rule,affiliate_security_manager_group,1,1,0,0

View File

@ -0,0 +1,28 @@
# -*- coding: utf-8 -*-
#################################################################################
# Author : Webkul Software Pvt. Ltd. (<https://webkul.com/>:wink:
# Copyright(c): 2015-Present Webkul Software Pvt. Ltd.
# All Rights Reserved.
#
#
#
# This program is copyright property of the author mentioned above.
# You can`t redistribute it and/or modify it.
#
#
# You should have received a copy of the License along with this program.
# If not, see <https://store.webkul.com/license.html/>;
#################################################################################
from . import affiliate_program
from . import affiliate_visit
from . import res_partner_inherit
from . import res_user_inherit
from . import affiliate_config_setting
from . import account_invoice_inherit
from . import affiliate_tool
from . import affiliate_banner
from . import affiliate_request
from . import affiliate_image
from . import advance_commision
from . import affiliate_product_pricelist_item
# from . import odoo_http

View File

@ -0,0 +1,60 @@
# -*- coding: utf-8 -*-
#################################################################################
# Author : Webkul Software Pvt. Ltd. (<https://webkul.com/>:wink:
# Copyright(c): 2015-Present Webkul Software Pvt. Ltd.
# All Rights Reserved.
#
#
#
# This program is copyright property of the author mentioned above.
# You can`t redistribute it and/or modify it.
#
#
# You should have received a copy of the License along with this program.
# If not, see <https://store.webkul.com/license.html/>;
#################################################################################
import logging
_logger = logging.getLogger(__name__)
from odoo.exceptions import UserError
from odoo import models, fields,api,_
import random, string
from odoo.http import request
class AccountInvoiceInherit(models.Model):
_inherit = 'account.move'
aff_visit_id = fields.One2many('affiliate.visit','act_invoice_id',string="Report")
# def write(self, vals):
# result = super(AccountInvoiceInherit,self).write(vals)
# if self.ref:
# move_id = self.env["account.move"].sudo().search([("name","=",self.ref)])
# if self.payment_state == "paid":
# if move_id.aff_visit_id:
# move_id.aff_visit_id.write({"state":"paid"})
# return result
class AccountPaymentInherit(models.Model):
_inherit = 'account.payment'
_description = "Account Payment Inherit Model"
# def action_validate_invoice_payment(self):
def action_post(self):
result = super(AccountPaymentInherit,self).action_post()
active_id = self._context.get('active_id')
move_id = self.env['account.move'].browse([active_id])
if move_id:
if move_id.state == "posted" and move_id.aff_visit_id:
for visit in move_id.aff_visit_id:
if visit.state != "paid":
visit.write({"state":"paid"})
return result

View File

@ -0,0 +1,100 @@
# -*- coding: utf-8 -*-
#################################################################################
# Author : Webkul Software Pvt. Ltd. (<https://webkul.com/>:wink:
# Copyright(c): 2015-Present Webkul Software Pvt. Ltd.
# All Rights Reserved.
#
#
#
# This program is copyright property of the author mentioned above.
# You can`t redistribute it and/or modify it.
#
#
# You should have received a copy of the License along with this program.
# If not, see <https://store.webkul.com/license.html/>;
#################################################################################
import logging
_logger = logging.getLogger(__name__)
from odoo.exceptions import UserError
from odoo import models, fields,api,_
class AffiliateCommision(models.Model):
_name = "advance.commision"
_description = "Affiliate Commision Model"
name = fields.Char(string="Name", required=True)
pricelist_item_ids = fields.One2many("affiliate.product.pricelist.item",'advance_commision_id',string="Item")
active_adv_comsn = fields.Boolean(default=True,string="Active")
def toggle_active_button(self):
if self.active_adv_comsn:
self.active_adv_comsn = False
else:
self.active_adv_comsn = True
# argument of calc_commision_adv(adv_comm_id, product_id on which commision apply , price of product)
def calc_commision_adv(self, adv_comsn_id, product_templ_id , product_price):
_logger.info("-----in adcvace commision model-- method-- calc_commision_adv-----")
product_tmpl_category_ids = self.env['product.template'].browse([product_templ_id]).public_categ_ids
_logger.info("**********-----product_tmpl_category_ids--%r********",product_tmpl_category_ids)
pricelist_ids = self.env['affiliate.product.pricelist.item'].search([('advance_commision_id','=',adv_comsn_id)])
for pricelist_id in pricelist_ids:
_logger.info("***====pricelist_id.name=%r======",pricelist_id.name)
commision_value = False
commision_value_type = False
adv_commision_amount = False
# on global product
if pricelist_id.applied_on == "3_global":
if pricelist_id.compute_price == "fixed":
commision_value = pricelist_id.fixed_price
commision_value_type = 'fixed'
adv_commision_amount = pricelist_id.fixed_price
else:
if pricelist_id.compute_price == "percentage":
commision_value = product_price * (pricelist_id.percent_price /100)
commision_value_type = 'percentage'
adv_commision_amount = pricelist_id.percent_price
else:
# on product category
if pricelist_id.applied_on == "2_product_category":
if pricelist_id.categ_id in product_tmpl_category_ids:
if pricelist_id.compute_price == "fixed":
commision_value = pricelist_id.fixed_price
commision_value_type = 'fixed'
adv_commision_amount = pricelist_id.fixed_price
else:
if pricelist_id.compute_price == "percentage":
commision_value = product_price * (pricelist_id.percent_price /100)
commision_value_type = 'percentage'
adv_commision_amount = pricelist_id.percent_price
else:
# on specific product
if pricelist_id.applied_on == "1_product":
if product_templ_id == pricelist_id.product_tmpl_id.id:
if pricelist_id.compute_price == "fixed":
commision_value = pricelist_id.fixed_price
commision_value_type = 'fixed'
adv_commision_amount = pricelist_id.fixed_price
else:
if pricelist_id.compute_price == "percentage":
commision_value = product_price * (pricelist_id.percent_price /100)
commision_value_type = 'percentage'
adv_commision_amount = pricelist_id.percent_price
if commision_value and commision_value_type:
break
# this break is used for if advance commission found in pricelist ids
# then it will break so that further pricelist ids is not executed in for loop
# this is for calculation advance commission base on global, perticular product or category
return adv_commision_amount,commision_value , commision_value_type

View File

@ -0,0 +1,35 @@
# -*- coding: utf-8 -*-
#################################################################################
# Author : Webkul Software Pvt. Ltd. (<https://webkul.com/>:wink:
# Copyright(c): 2015-Present Webkul Software Pvt. Ltd.
# All Rights Reserved.
#
#
#
# This program is copyright property of the author mentioned above.
# You can`t redistribute it and/or modify it.
#
#
# You should have received a copy of the License along with this program.
# If not, see <https://store.webkul.com/license.html/>;
#################################################################################
import logging
_logger = logging.getLogger(__name__)
from odoo.exceptions import UserError
from odoo import models, fields,api,_
class AffiliateBanner(models.Model):
_name = "affiliate.banner"
_description = "Affiliate Banner Model"
banner_title = fields.Text(string="Banner Text")
banner_image = fields.Binary(string="Banner Image")
@api.model_create_multi
def create(self,vals_list):
res = None
for vals in vals_list:
if vals.get('banner_image') == False:
raise UserError("Image field is mandatory")
res = super(AffiliateBanner,self).create(vals)
return res

View File

@ -0,0 +1,185 @@
# -*- coding: utf-8 -*-
#################################################################################
# Author : Webkul Software Pvt. Ltd. (<https://webkul.com/>:wink:
# Copyright(c): 2015-Present Webkul Software Pvt. Ltd.
# All Rights Reserved.
#
#
#
# This program is copyright property of the author mentioned above.
# You can`t redistribute it and/or modify it.
#
#
# You should have received a copy of the License along with this program.
# If not, see <https://store.webkul.com/license.html/>;
#################################################################################
import logging
_logger = logging.getLogger(__name__)
from odoo import api, fields, models, _
from odoo.exceptions import UserError
class AffiliateConfiguration(models.TransientModel):
_inherit = 'res.config.settings'
_description = "Affiliate Configuration Model"
@api.model
def _get_program(self):
# _logger.info("-----_get_program-----%r-----",self.env['affiliate.program'].search([]))
# self.remove_prgm()
return self.env['affiliate.program'].search([],limit=1).id
def remove_prgm(self):
# _logger.info("----remove_prgm--env['affiliate.program']------%r-----",self.env['affiliate.program'].search([]))
prgm = self.env['affiliate.program'].search([])
for p in prgm:
p.unlink()
@api.model
def _get_banner(self):
return self.env['affiliate.banner'].search([],limit=1).id
affiliate_program_id = fields.Many2one('affiliate.program',string=" Affiliate Program")
enable_ppc = fields.Boolean(string= "Enable PPC", default=True )
auto_approve_request = fields.Boolean(default=False )
ppc_maturity = fields.Integer(string="PPC Maturity",required=True, default=1)
ppc_maturity_period = fields.Selection([('days','Days'),('months','Months'),('weeks','Weeks')],required=True,default='days')
cookie_expire = fields.Integer(string="Cookie expiration",required=True, default=1)
cookie_expire_period = fields.Selection([('hours','Hours'),('days','Days'),('months','Months')],required=True,default='days')
payment_day = fields.Integer(string="Payment day",required=True, default=7)
minimum_amt = fields.Integer(string="Minimum Payout Balance",required=True, default=0)
currency_id = fields.Many2one('res.currency', 'Currency', required=True,
default=lambda self: self.env.user.company_id.currency_id.id)
aff_product_id = fields.Many2one('product.product', 'Product',help="Product used in Invoicing")
enable_signup = fields.Boolean(string= "Enable Sign Up", default=True )
enable_login = fields.Boolean(string= "Enable Log In", default=True )
enable_forget_pwd = fields.Boolean(string= "Enable Forget Password", default=False )
affiliate_banner_id = fields.Many2one('affiliate.banner',string="Bannner")
welcome_mail_template = fields.Many2one('mail.template',string="Approved Request Mail",readonly=True )
reject_mail_template = fields.Many2one('mail.template',string="Reject Request Mail ",readonly=True)
Invitation_mail_template = fields.Many2one('mail.template',string="Invitation Request Mail ",readonly=True)
unique_ppc_traffic = fields.Boolean(string= "Unique ppc for product", default=False,help="this field is used to enable unique traffic on product for an Affiliate for a specific browser. " )
term_condition = fields.Html(string="Term & condition Text", related='affiliate_program_id.term_condition',translate=True)
work_title = fields.Text(string="How Does It Work Title",related='affiliate_program_id.work_title', translate=True)
work_text = fields.Html(string="How Does It Work Text",related='affiliate_program_id.work_text', translate=True)
# @api.multi
def set_values(self):
if self.minimum_amt < 1:
raise UserError(_("Minimum Payout Balance should not be in negative figure."))
super(AffiliateConfiguration, self).set_values()
IrDefault = self.env['ir.default'].sudo()
IrDefault.set('res.config.settings', 'ppc_maturity', self.ppc_maturity)
IrDefault.set('res.config.settings', 'ppc_maturity_period', self.ppc_maturity_period)
IrDefault.set('res.config.settings', 'enable_ppc', self.enable_ppc)
IrDefault.set('res.config.settings', 'auto_approve_request', self.auto_approve_request )
IrDefault.set('res.config.settings', 'aff_product_id', self.aff_product_id.id)
IrDefault.set('res.config.settings', 'enable_signup', self.enable_signup )
IrDefault.set('res.config.settings', 'enable_login', self.enable_login )
IrDefault.set('res.config.settings', 'enable_forget_pwd', self.enable_forget_pwd )
IrDefault.set('res.config.settings', 'payment_day', self.payment_day)
IrDefault.set('res.config.settings', 'minimum_amt', self.minimum_amt)
IrDefault.set('res.config.settings', 'cookie_expire', self.cookie_expire)
IrDefault.set('res.config.settings', 'cookie_expire_period', self.cookie_expire_period)
IrDefault.set('res.config.settings', 'unique_ppc_traffic', self.unique_ppc_traffic)
IrDefault.set('res.config.settings', 'term_condition', self.term_condition)
IrDefault.set('res.config.settings', 'work_title', self.work_title)
IrDefault.set('res.config.settings', 'work_text', self.work_text)
# IrDefault.set('res.config.settings', 'affiliate_program_id', self.affiliate_program_id.id)
# IrDefault.set('res.config.settings', 'affiliate_banner_id', self.affiliate_banner_id.id)
IrDefault.set('res.config.settings', 'affiliate_program_id', self._get_program())
IrDefault.set('res.config.settings', 'affiliate_banner_id', self._get_banner())
self.scheduler_ppc_maturity_set()
def scheduler_ppc_maturity_set(self):
ppc_maturity_schedular = self.env.ref("affiliate_management.affiliate_ppc_maturity_scheduler_call")
ppc_maturity_schedular.write({
'interval_number' : self.ppc_maturity,
'interval_type' : self.ppc_maturity_period,
})
@api.model
def get_values(self):
template_1 = self.env['ir.model.data']._xmlid_lookup('affiliate_management.welcome_affiliate_email')[2]
template_2 = self.env['ir.model.data']._xmlid_lookup('affiliate_management.reject_affiliate_email')[2]
template_3 = self.env['ir.model.data']._xmlid_lookup('affiliate_management.join_affiliate_email')[2]
res = super(AffiliateConfiguration, self).get_values()
IrDefault = self.env['ir.default'].sudo()
res.update(
welcome_mail_template=IrDefault.get('res.config.settings', 'welcome_mail_template') or template_1,
reject_mail_template=IrDefault.get('res.config.settings', 'reject_mail_template') or template_2,
Invitation_mail_template=IrDefault.get('res.config.settings', 'Invitation_mail_template') or template_3,
work_title=IrDefault.get('res.config.settings', 'work_title') or _("The process is very simple. Simply, signup/login to your affiliate portal, pick your affiliate link and place them into your website/blogs and watch your account balance grow as your visitors become our customers, as :"),
work_text=IrDefault.get('res.config.settings', 'work_text') or _("<ol><li><p style='text-align: left; margin-left: 3em;'>Visitor clicks on affiliate links posted on your website/blogs.</p></li><li><p style='text-align: left; margin-left: 3em;'>A cookie is placed in their browser for tracking purposes. The visitor browses our site and may decide to order.</p></li><li><p style='text-align: left; margin-left: 3em;'>The visitor browses our site and may decide to order. If the visitor orders, the order will be registered as a sale for you and you will receive a commission for this sale.</p></li><li><p style='text-align: left; margin-left: 3em;'>If the visitor orders, the order will be registered as a sale for you and you will receive a commission for this sale.</p></li></ol>"),
unique_ppc_traffic=IrDefault.get('res.config.settings', 'unique_ppc_traffic') or False,
term_condition=IrDefault.get('res.config.settings', 'term_condition') or _("Write your own Term and Condition"),
ppc_maturity =IrDefault.get('res.config.settings', 'ppc_maturity') or 1,
ppc_maturity_period=IrDefault.get('res.config.settings', 'ppc_maturity_period')or 'months',
enable_ppc =IrDefault.get('res.config.settings', 'enable_ppc') or False,
auto_approve_request =IrDefault.get('res.config.settings', 'auto_approve_request' ) or False,
aff_product_id=IrDefault.get('res.config.settings', 'aff_product_id') or False,
enable_signup =IrDefault.get('res.config.settings', 'enable_signup') or False,
enable_login =IrDefault.get('res.config.settings', 'enable_login' ) or False,
enable_forget_pwd =IrDefault.get('res.config.settings', 'enable_forget_pwd') or False,
payment_day =IrDefault.get('res.config.settings', 'payment_day') or 7,
minimum_amt =IrDefault.get('res.config.settings', 'minimum_amt') or 1,
cookie_expire=IrDefault.get('res.config.settings', 'cookie_expire') or 1,
cookie_expire_period =IrDefault.get('res.config.settings', 'cookie_expire_period') or 'days',
affiliate_program_id =IrDefault.get('res.config.settings', 'affiliate_program_id') or self._get_program(),
affiliate_banner_id =IrDefault.get('res.config.settings', 'affiliate_banner_id') or self._get_banner(),
)
return res
def website_constant(self):
res ={}
IrDefault = self.env['ir.default'].sudo()
aff_prgmObj = self.env['affiliate.program'].search([], limit=1)
res.update(
work_title = aff_prgmObj.work_title or "The process is very simple. Simply, signup/login to your affiliate portal, pick your affiliate link and place them into your website/blogs and watch your account balance grow as your visitors become our customers, as :",
work_text = aff_prgmObj.work_text or "<ol><li><p style='text-align: left; margin-left: 3em;'>Visitor clicks on affiliate links posted on your website/blogs.</p></li><li><p style='text-align: left; margin-left: 3em;'>A cookie is placed in their browser for tracking purposes.</p></li><li><p style='text-align: left; margin-left: 3em;'>The visitor browses our site and may decide to order. </p></li><li><p style='text-align: left; margin-left: 3em;'>If the visitor orders, the order will be registered as a sale for you and you will receive a commission for this sale.</p></li></ol>",
unique_ppc_traffic = IrDefault.get('res.config.settings', 'unique_ppc_traffic') or False,
term_condition = aff_prgmObj.term_condition or "Write your own Term and Condition",
enable_ppc =IrDefault.get('res.config.settings', 'enable_ppc') or False,
enable_signup =IrDefault.get('res.config.settings', 'enable_signup') or False,
enable_login =IrDefault.get('res.config.settings', 'enable_login' ) or False,
enable_forget_pwd =IrDefault.get('res.config.settings', 'enable_forget_pwd') or False,
auto_approve_request =IrDefault.get('res.config.settings', 'auto_approve_request' ) or False,
cookie_expire=IrDefault.get('res.config.settings', 'cookie_expire') or 1,
cookie_expire_period =IrDefault.get('res.config.settings', 'cookie_expire_period') or 'days',
payment_day =IrDefault.get('res.config.settings', 'payment_day') or 7,
minimum_amt =IrDefault.get('res.config.settings', 'minimum_amt') or 1,
aff_product_id=IrDefault.get('res.config.settings', 'aff_product_id') or False,
)
return res
# @api.multi
def open_program(self):
return {
'type': 'ir.actions.act_window',
'name': 'My Affiliate Program',
# 'view_type': 'form',
'view_mode': 'form',
'res_model': 'affiliate.program',
'res_id': self.affiliate_program_id.id,
'target': 'current',
}
# @api.multi
def open_banner(self):
return {
'type': 'ir.actions.act_window',
'name': 'My Affiliate Banner',
# 'view_type': 'form',
'view_mode': 'form',
'res_model': 'affiliate.banner',
'res_id': self.affiliate_banner_id.id,
'target': 'current',
}

View File

@ -0,0 +1,49 @@
# -*- coding: utf-8 -*-
#################################################################################
# Author : Webkul Software Pvt. Ltd. (<https://webkul.com/>:wink:
# Copyright(c): 2015-Present Webkul Software Pvt. Ltd.
# All Rights Reserved.
#
#
#
# This program is copyright property of the author mentioned above.
# You can`t redistribute it and/or modify it.
#
#
# You should have received a copy of the License along with this program.
# If not, see <https://store.webkul.com/license.html/>;
#################################################################################
import logging
_logger = logging.getLogger(__name__)
from odoo.exceptions import UserError
from odoo import models, fields,api,_
class AffiliateImage(models.Model):
_name = "affiliate.image"
_description = "Affiliate Image Model"
_inherit = ['mail.thread']
name = fields.Char(string = "Name",required=True)
title = fields.Char(string = "Title",required=True)
banner_height = fields.Integer(string = "Height")
bannner_width = fields.Integer(string = "Width")
image = fields.Binary(string="Image",required=True)
user_id = fields.Many2one('res.users', string='current user', index=True, tracking=True, default=lambda self: self.env.user)
image_active = fields.Boolean(string="Active",default=True)
def toggle_active_button(self):
if self.image_active:
self.image_active = False
else:
self.image_active = True
@api.model_create_multi
def create(self,vals_list):
res = None
for vals in vals_list:
if vals.get('image') == False:
raise UserError("Image field is mandatory")
res = super(AffiliateImage,self).create(vals)
return res

View File

@ -0,0 +1,92 @@
# -*- coding: utf-8 -*-
#################################################################################
# Author : Webkul Software Pvt. Ltd. (<https://webkul.com/>:wink:
# Copyright(c): 2015-Present Webkul Software Pvt. Ltd.
# All Rights Reserved.
#
#
#
# This program is copyright property of the author mentioned above.
# You can`t redistribute it and/or modify it.
#
#
# You should have received a copy of the License along with this program.
# If not, see <https://store.webkul.com/license.html/>;
#################################################################################
import logging
_logger = logging.getLogger(__name__)
from odoo.exceptions import UserError
from odoo import models, fields,api,_
class AffiliateProductPricelistItem(models.Model):
_name = "affiliate.product.pricelist.item"
_description = "Affiliate Product Pricelist Item Model"
_order = 'sequence'
name = fields.Char(string="Name")
advance_commision_id = fields.Many2one('advance.commision')
applied_on = fields.Selection([
('3_global', 'Global'),
('2_product_category', ' Product Category'),
('1_product', 'Product')], "Apply On",
default='3_global', required=True,
help='Pricelist Item applicable on selected option')
categ_id = fields.Many2one(
'product.public.category', 'Product Category', ondelete='cascade',
help="Specify a product category if this rule only applies to products belonging to this eccmmerce website category or its children categories. Keep empty otherwise.")
product_tmpl_id = fields.Many2one(
'product.template', 'Product Template', ondelete='cascade',
help="Specify a template if this rule only applies to one product template. Keep empty otherwise.")
compute_price = fields.Selection([
('fixed', 'Fix Price'),
('percentage', 'Percentage (discount)')], index=True, default='fixed')
fixed_price = fields.Float('Fixed Price')
percent_price = fields.Float('Percentage Price')
currency_id = fields.Many2one('res.currency', 'Currency', required=True,
default=lambda self: self.env.user.company_id.currency_id.id,readonly='True')
sequence = fields.Integer(required=True, default=1,
help="The sequence field is used to define order in which the pricelist item are applied.")
# @api.multi
def write(self, vals):
if 'fixed_price' in vals.keys() or 'compute_price' in vals.keys() or 'percent_price' in vals.keys():
compute_price = vals.get('compute_price') if 'compute_price' in vals.keys() else self[-1].compute_price
change_value = None
if compute_price == 'fixed':
if 'fixed_price' in vals.keys():
change_value = vals.get('fixed_price')
else:
change_value = self[-1].fixed_price
else:
if 'percent_price' in vals.keys():
change_value = vals.get('percent_price')
else:
change_value = self[-1].percent_price
if change_value <= 0:
raise UserError("Price List Item value must be greater than zero.")
return super(AffiliateProductPricelistItem,self).write(vals)
@api.model_create_multi
def create(self, vals_list):
res = None
for vals in vals_list:
if (vals.get('compute_price') == 'fixed') and vals.get('fixed_price') <= 0:
raise UserError("Price List Item value must be greater than zero.")
if (vals.get('compute_price') == 'percentage') and vals.get('percent_price') <= 0:
raise UserError("Price List Item value must be greater than zero.")
res = super(AffiliateProductPricelistItem,self).create(vals)
return res
# @api.model
# def create(self, vals):
# if vals.get('fixed_price') and vals.get('fixed_price') < 0:
# raise UserError(_("Fixed Price should not be in negative figure."))
# if vals.get('percent_price') and vals.get('percent_price') > -1 or vals.get('percent_price') < 100:
# raise UserError(_("Percentage Price should not be less than zero or greater than 100."))
# return super(AffiliateProductPricelistItem,self).create(vals)

View File

@ -0,0 +1,64 @@
# -*- coding: utf-8 -*-
#################################################################################
# Author : Webkul Software Pvt. Ltd. (<https://webkul.com/>:wink:
# Copyright(c): 2015-Present Webkul Software Pvt. Ltd.
# All Rights Reserved.
#
#
#
# This program is copyright property of the author mentioned above.
# You can`t redistribute it and/or modify it.
#
#
# You should have received a copy of the License along with this program.
# If not, see <https://store.webkul.com/license.html/>;
#################################################################################
import logging
_logger = logging.getLogger(__name__)
from odoo.exceptions import UserError
from odoo import models, fields,api,_
class AffiliateProgram(models.Model):
_name = "affiliate.program"
_description = "Affiliate Model"
name = fields.Char(string = "Name",required=True)
ppc_type = fields.Selection([("s","Simple"),("a","Advance")], string="Ppc Type",required=True,default="s")
amount_ppc_fixed = fields.Float(string="Amount Fixed",default=0,required=True)
pps_type = fields.Selection([("s","Simple"),("a","Advanced")], string="Pps Type",required=True,default="s")
matrix_type = fields.Selection([("f","Fixed"),("p","Percentage")],required=True,default='f',string="Matrix Type")
amount = fields.Float(string="Amount",default=0, required=True)
currency_id = fields.Many2one('res.currency', 'Currency',
default=lambda self: self.env.user.company_id.currency_id.id)
advance_commision_id = fields.Many2one('advance.commision',string="Pricelist",domain="[('active_adv_comsn', '=', True)]")
# config field for translation
term_condition = fields.Html(string="Term & condition Text", translate=True)
work_title = fields.Text(string="How Does It Work Title", translate=True)
work_text = fields.Html(string="How Does It Work Text", translate=True)
def unlink(self):
raise UserError(_("You can't delete the Affiliate Program."))
@api.model
def fields_view_get(self, view_id=None, view_type='form', toolbar=False, submenu=False):
cxt = dict(self._context)
cxt['hide_ppc'] = not self.env['ir.default'].get('res.config.settings', 'enable_ppc')
res = super(AffiliateProgram, self.with_context(cxt)).fields_view_get(view_id=view_id, view_type=view_type, toolbar=toolbar, submenu=submenu)
return res
@api.onchange('matrix_type')
def check_amount(self):
m_type = self.matrix_type
amount = self.amount
if m_type == 'p' and amount > 100:
self.amount = 0
def write(self, vals):
if vals.get('work_text') and vals.get('work_text')=='<p><br></p>':
vals['work_text'] = None
if vals.get('term_condition') and vals.get('term_condition')=='<p><br></p>':
vals['term_condition'] = None
return super(AffiliateProgram, self).write(vals)

View File

@ -0,0 +1,213 @@
# -*- coding: utf-8 -*-
#################################################################################
# Author : Webkul Software Pvt. Ltd. (<https://webkul.com/>:wink:
# Copyright(c): 2015-Present Webkul Software Pvt. Ltd.
# All Rights Reserved.
#
#
#
# This program is copyright property of the author mentioned above.
# You can`t redistribute it and/or modify it.
#
#
# You should have received a copy of the License along with this program.
# If not, see <https://store.webkul.com/license.html/>;
#################################################################################
import logging
_logger = logging.getLogger(__name__)
from odoo.exceptions import UserError
from odoo import models, fields,api,_
from datetime import datetime, timedelta
from odoo.addons.auth_signup.models.res_partner import SignupError, now
import random
from ast import literal_eval
from odoo import SUPERUSER_ID
from odoo.http import request
class AffiliateRequest(models.Model):
_name = "affiliate.request"
_description = "Affiliate Request Model"
# _inherit = ['ir.needaction_mixin']
def random_token(self):
# the token has an entropy of about 120 bits (6 bits/char * 20 chars)
chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789'
return ''.join(random.SystemRandom().choice(chars) for i in range(20))
password = fields.Char(string='password',invisible=True)
name = fields.Char(string="Email")
partner_id = fields.Many2one('res.partner')
signup_token = fields.Char(string='Token',invisible=True)
signup_expiration = fields.Datetime(copy=False)
signup_valid = fields.Boolean(compute='_compute_signup_valid', string='Signup Token is Valid',default=False)
signup_type = fields.Char(string='Signup Token Type', copy=False)
# user_id = fields.Integer(string='User',help='check wether the request have user id')
user_id = fields.Many2one('res.users')
parent_aff_key = fields.Char(string='Parent Affiliate Key')
state = fields.Selection([
('draft', 'Requested'),
('register', 'Pending For Approval'),
('cancel', 'Rejected'),
('aproove', 'Approved'),
], string='Status', readonly=True, default='draft' )
@api.model_create_multi
def create(self, vals_list):
aff_request = None
for vals in vals_list:
_logger.info("these are vals we need to create aff req %r",vals)
if vals.get('user_id'):
# for portal user
if len(self.search([('user_id','=',vals.get('user_id'))])) == 0:
aff_request = super(AffiliateRequest,self).create(vals)
else:
aff_request = self.search([('user_id','=',vals.get('user_id'))])
else:
# for new user signup with affilaite sign up page
aff_request = super(AffiliateRequest,self).create(vals)
aff_request.signup_token = self.random_token()
aff_request.signup_expiration = fields.Datetime.now()
aff_request.signup_type = 'signup'
self.send_joining_mail(aff_request)
return aff_request
# @api.multi
def _compute_signup_valid(self):
"""after one day sign up token is valid false"""
if self.user_id:
self.signup_valid = self.signup_valid
pass
else:
dt = fields.Datetime.from_string(fields.Datetime.now())
expiration = fields.Datetime.from_string(self.signup_expiration)+timedelta(days=1)
if dt > expiration:
self.signup_valid = False
else:
self.signup_valid = True
def action_cancel(self):
user = self.env['res.users'].search([('login','=',self.name),('active','=',True)])
# find id of security grup user
user_group_id = self.env['ir.model.data'].check_object_reference('affiliate_management', 'affiliate_security_user_group')[1]
if self.user_id:
if self.user_id.id == self.env.ref('base.user_admin').id:
raise UserError("Admin can't be an Affiliate")
# for portal user
# remove grup ids from user groups_id
user.groups_id = [(3, user_group_id)]
user.groups_id = [(3, user_group_id+1)]
user.partner_id.is_affiliate = False
self.state = 'cancel'
template_id = self.env.ref('affiliate_management.reject_affiliate_email')
user_mail = self.env.user.partner_id.company_id.email or self.env.company.email
email_values = {"email_from":user_mail}
db = request.session.get('db')
res = template_id.with_context({"db":db}).send_mail(self.id,force_send=True,email_values=email_values)
return True
def action_aproove(self):
if self.user_id:
if self.user_id.id == self.env.ref('base.user_admin').id:
raise UserError("Admin can't be an Affiliate")
affiliate_program = self.env['affiliate.program'].search([])
if not affiliate_program:
raise UserError("In Configuration settings Program is absent")
with self.env.cr.savepoint():
self.set_group_user(self.user_id.id)
self.state = 'aproove'
self.user_id.partner_id.is_affiliate = True
self.env.cr.commit()
template_id = self.env.ref('affiliate_management.welcome_affiliate_email')
user_mail = self.env.user.partner_id.company_id.email or self.env.company.email
db = request.session.get('db')
email_values = {"email_from":user_mail}
res = template_id.send_mail(self.id,force_send=True,email_values=email_values)
return True
@api.model
def _signup_create_user(self, values):
""" create a new user from the template user """
IrConfigParam = self.env['ir.config_parameter']
template_user_id = literal_eval(IrConfigParam.get_param('base.template_portal_user_id', 'False'))
template_user = self.browse(template_user_id)
assert template_user.exists(), 'Signup: invalid template user'
# check that uninvited users may sign up
if 'partner_id' not in values:
if not literal_eval(IrConfigParam.get_param('auth_signup.allow_uninvited', 'False')):
raise SignupError('Signup is not allowed for uninvited users')
assert values.get('login'), "Signup: no login given for new user"
assert values.get('partner_id') or values.get('name'), "Signup: no name or partner given for new user"
# create a copy of the template user (attached to a specific partner_id if given)
values['active'] = True
try:
with self.env.cr.savepoint():
return template_user.with_context(reset_password=False).copy(values)
# return template_user.with_context(no_reset_password=True).copy(values)
except Exception as e:
# copy may failed if asked login is not available.
raise SignupError(ustr(e))
def send_joining_mail(self,aff_request):
if aff_request.signup_valid:
db = request.session.get('db')
template_id = self.env.ref('affiliate_management.join_affiliate_email')
user_mail = self.env.user.partner_id.company_id.email or self.env.company.email
email_values = {"email_from":user_mail}
res = template_id.send_mail(aff_request.id,force_send=True,email_values=email_values)
def regenerate_token(self):
self.signup_token = self.random_token()
self.signup_expiration = fields.Datetime.now()
self.signup_valid = True
self.send_joining_mail(self)
# for counter on request menu
# @api.model
# def _needaction_count(self, domain=None):
# return len(self.env['affiliate.request'].search([('state','=','register')]))
def set_group_user(self,user_id):
"""Assign group to portal user"""
UserObj = self.env['res.users'].sudo()
user_group_id = self.env['ir.model.data']._xmlid_lookup('affiliate_management.affiliate_security_user_group')[2]
groups_obj = self.env["res.groups"].browse(user_group_id)
if groups_obj:
for group_obj in groups_obj:
group_obj.write({"users": [(4, user_id, 0)]})
user = UserObj.browse([user_id])
user.active = True
user.partner_id.is_affiliate = True
user.partner_id.res_affiliate_key = ''.join(random.choice('0123456789ABCDEFGHIJ0123456789KLMNOPQRSTUVWXYZ') for i in range(8))
user.partner_id.affiliate_program_id = self.env['affiliate.program'].search([])[-1].id
def checkRequestExists(self,user_id):
exist = self.search([('user_id','=',user_id.id)])
return len(exist) and True or False
def checkRequeststate(self,user_id):
exist = self.search([('user_id','=',user_id.id)])
if len(exist):
if exist.state == 'register':
return 'pending'
elif exist.state == 'cancel':
return 'cancel'

View File

@ -0,0 +1,60 @@
# -*- coding: utf-8 -*-
#################################################################################
# Author : Webkul Software Pvt. Ltd. (<https://webkul.com/>:wink:
# Copyright(c): 2015-Present Webkul Software Pvt. Ltd.
# All Rights Reserved.
#
#
#
# This program is copyright property of the author mentioned above.
# You can`t redistribute it and/or modify it.
#
#
# You should have received a copy of the License along with this program.
# If not, see <https://store.webkul.com/license.html/>;
#################################################################################
from odoo import models,fields,api,_
import logging
_logger = logging.getLogger(__name__)
from odoo.exceptions import UserError
class AffiliateTool(models.TransientModel):
_name = 'affiliate.tool'
_description = "Affiliate Tool Model"
_inherit = ['mail.thread']
@api.depends('entity','aff_product_id','aff_category_id')
def _make_link(self):
key = ""
if self.env['res.users'].browse(self.env.uid).res_affiliate_key:
key = self.env['res.users'].browse(self.env.uid).res_affiliate_key
type_url = ""
if self.entity == 'product':
type_url = '/shop/product/'+str(self.aff_product_id.id)
if self.entity == 'category':
type_url = '/shop/category/'+str(self.aff_category_id.id)
base_url = self.env['ir.config_parameter'].get_param('web.base.url')
if self.entity and (self.aff_product_id or self.aff_category_id):
self.link = base_url+type_url+"?aff_key="+key
else:
self.link = ""
@api.onchange('entity')
def _blank_field(self):
self.aff_product_id = ""
self.aff_category_id = ""
self.link = ""
name = fields.Char(string="Name")
entity = fields.Selection([('product','Product'),('category','Category')],string="Choose Entity",required=True)
aff_product_id = fields.Many2one('product.template', string='Product')
aff_category_id = fields.Many2one('product.public.category',string='Category')
link = fields.Char(string='Link',compute='_make_link')
user_id = fields.Many2one('res.users', string='current user', index=True, tracking=True, default=lambda self: self.env.user)
@api.model_create_multi
def create(self, vals_list):
new_url = None
for vals in vals_list:
vals['name'] = self.env['ir.sequence'].next_by_code('affiliate.tool')
new_url = super(AffiliateTool,self).create(vals)
return new_url

View File

@ -0,0 +1,361 @@
# -*- coding: utf-8 -*-
#################################################################################
# Author : Webkul Software Pvt. Ltd. (<https://webkul.com/>:wink:
# Copyright(c): 2015-Present Webkul Software Pvt. Ltd.
# All Rights Reserved.
#
#
#
# This program is copyright property of the author mentioned above.
# You can`t redistribute it and/or modify it.
#
#
# You should have received a copy of the License along with this program.
# If not, see <https://store.webkul.com/license.html/>;
#################################################################################
import logging
_logger = logging.getLogger(__name__)
from odoo.exceptions import UserError
from odoo import models, fields,api,_
from datetime import timedelta
import datetime
class AffiliateVisit(models.Model):
_name = "affiliate.visit"
_order = "create_date desc"
_description = "Affiliate Visit Model"
name = fields.Char(string = "Name",readonly='True')
# @api.multi
@api.depends('affiliate_type','type_id')
def _calc_type_name(self):
for record in self:
if record.affiliate_type == 'product':
record.type_name = record.env['product.template'].browse([record.type_id]).name
if record.affiliate_type == 'category':
record.type_name = record.env['product.public.category'].browse([record.type_id]).name
affiliate_method = fields.Selection([("ppc","Pay Per Click"),("pps","Pay Per Sale")],string="Order Report",readonly='True',states={'draft': [('readonly', False)]},help="state of traffic either ppc or pps")
affiliate_type = fields.Selection([("product","Product"),("category","Category")],string="Affiliate Type",readonly='True',states={'draft': [('readonly', False)]},help="whether the ppc or pps is on product or category")
type_id = fields.Integer(string='Type Id',readonly='True',states={'draft': [('readonly', False)]},help="Id of product template on which ppc or pps traffic create")
type_name = fields.Char(string='Type Name',readonly='True',states={'draft': [('readonly', False)]},compute='_calc_type_name',help="Name of the product")
is_converted = fields.Boolean(string="Is Converted",readonly='True',states={'draft': [('readonly', False)]})
sales_order_line_id = fields.Many2one("sale.order.line",readonly='True',states={'draft': [('readonly', False)]})
affiliate_key = fields.Char(string="Key",readonly='True',states={'draft': [('readonly', False)]})
affiliate_partner_id = fields.Many2one("res.partner",string="Affiliate",readonly='True',states={'draft': [('readonly', False)]})
url = fields.Char(string="Url",readonly='True',states={'draft': [('readonly', False)]})
ip_address = fields.Char(readonly='True',states={'draft': [('readonly', False)]})
currency_id = fields.Many2one('res.currency', 'Currency', required=True,
default=lambda self: self.env.user.company_id.currency_id.id,readonly='True',states={'draft': [('readonly', False)]})
convert_date = fields.Datetime(string='Date',readonly='True',states={'draft': [('readonly', False)]})
price_total = fields.Monetary(string="Sale value",related='sales_order_line_id.price_total',states={'draft': [('readonly', False)]},help="Total sale value of product" )
unit_price = fields.Float(string="Product Unit Price", related='sales_order_line_id.price_unit', readonly='True',
states={'draft': [('readonly', False)]},help="price unit of the product")
commission_amt = fields.Float(readonly='True',states={'draft': [('readonly', False)]})
affiliate_program_id = fields.Many2one('affiliate.program',string='Program',readonly='True',states={'draft': [('readonly', False)]})
amt_type = fields.Char(string='Commission Matrix',readonly='True',states={'draft': [('readonly', False)]},help="Commission Matrix on which commission value calculated")
act_invoice_id = fields.Many2one("account.move", string='Act Invoice id',readonly='True',states={'draft': [('readonly', False)]})
state = fields.Selection([
('draft', 'Draft'),
('cancel', 'Cancel'),
('confirm', 'Confirm'),
('invoice', 'Invoiced'),
('paid', 'Paid'),
], string='Status', readonly=True, default='draft' )
product_quantity = fields.Integer(readonly='True',states={'draft': [('readonly', False)]})
@api.model_create_multi
def create(self, vals_list):
new_visit = None
for vals in vals_list:
vals['name'] = self.env['ir.sequence'].next_by_code('affiliate.visit')
new_visit = super(AffiliateVisit,self).create(vals)
return new_visit
# button on view action
def action_cancel(self):
self.state = 'cancel'
return True
# button on view action
def action_confirm(self):
check_enable_ppc = self.env['res.config.settings'].sudo().website_constant().get('enable_ppc')
if self.affiliate_method != 'ppc' and not self.sales_order_line_id:
raise UserError("Order is not present in visit %s."%self.name)
if self.affiliate_method != 'ppc' and not self.price_total:
raise UserError("Sale value must be greater than zero.")
if self.affiliate_method == 'ppc' and (not check_enable_ppc) :
raise UserError("Pay per click is disable, so you can't confirm it's commission")
self.state = 'confirm'
status = self._get_rate(self.affiliate_method , self.affiliate_type, self.type_id )
if status.get('is_error'):
raise UserError(status['message'])
return True
# button on view action
def action_paid(self):
self.state = 'paid'
return True
# scheduler according to the scheduler define in data automated scheduler
@api.model
def process_scheduler_queue(self):
users_all = self.env['res.users'].search([('is_affiliate','=',True)])
ConfigValues = self.env['res.config.settings'].sudo().website_constant()
payment_day = ConfigValues.get('payment_day')
threshold_amt = ConfigValues.get('minimum_amt')
# make the date of current month of setting date
payment_date = datetime.date(datetime.date.today().year, datetime.date.today().month, payment_day)
for u in users_all:
visits = self.search([('state','=','confirm'),('affiliate_partner_id','=',u.partner_id.id)])
if payment_date and visits:
visits = visits.filtered(lambda r: fields.Date.from_string(r.create_date) <= payment_date)
_logger.info("*****filter- visits=%r******",visits)
_logger.info("****before******before method***visits**%r*******",visits)
visits = self.check_enable_ppc_visits(visits)
# function to filter the visits if ppc is enable or disable accordingly
_logger.info("*****after*****after method***visits**%r*******",visits)
total_comm_per_user = 0
if visits:
for v in visits:
total_comm_per_user = total_comm_per_user + v.commission_amt
if total_comm_per_user >= threshold_amt and payment_date:
dic={
'name':"Total earn commission on ppc and pps",
'quantity':1,
'price_unit':total_comm_per_user,
'product_id':ConfigValues.get('aff_product_id'),
}
invoice_dict = [
{
'invoice_line_ids': [(0, 0, dic)],
'move_type': 'in_invoice',
'partner_id':u.partner_id.id,
'invoice_date':fields.Datetime.now().date()
}
]
inv_id = self.env['account.move'].create(invoice_dict)
for v in visits:
v.state = 'invoice'
v.act_invoice_id = inv_id.id
return True
def check_enable_ppc_visits(self,visits):
check_enable_ppc = self.env['res.config.settings'].sudo().website_constant().get('enable_ppc')
if check_enable_ppc:
return visits
else:
visits = visits.filtered(lambda v: v.affiliate_method == 'pps')
return visits
# method call from server action
@api.model
def create_invoice(self):
# get the value of enable ppc from settings
ConfigValues = self.env['res.config.settings'].sudo().website_constant()
check_enable_ppc = ConfigValues.get('enable_ppc')
aff_vst = self._context.get('active_ids')
act_invoice = self.env['account.move']
# check the first visit of context is ppc or pps and enable pps
affiliate_method_type = self.browse([aff_vst[0]]).affiliate_method
if affiliate_method_type == 'ppc' and (not check_enable_ppc) :
raise UserError("Pay per click is disable, so you can't generate it's invoice")
invoice_ids =[]
for v in aff_vst:
vst = self.browse([v])
# [[0, 'virtual_754', {'sequence': 10, 'product_id': 36, 'name': '[Deposit] Deposit', 'account_id': 21, 'analytic_account_id': False, 'analytic_tag_ids': [[6, False, []]],
# 'quantity': 1, 'product_uom_id': 1, 'price_unit': 150, 'discount': 0, 'tax_ids': [[6, False, [1]]]
if vst.state == 'confirm':
# ********** creating invoice line *********************
if vst.sales_order_line_id:
dic={
'name':"Type "+vst.affiliate_type+" on Pay Per Sale ",
'quantity':1,
'price_unit':vst.commission_amt,
# 'move_id':inv_id.id,
# 'product_id':ConfigValues.get('aff_product_id'),
}
else:
dic={
'name':"Type "+vst.affiliate_type+" on Pay Per Click ",
'price_unit':vst.commission_amt,
'quantity':1,
# 'product_id':ConfigValues.get('aff_product_id'),
}
invoice_dict = [
{
'invoice_line_ids': [(0, 0, dic)],
'move_type': 'in_invoice',
'partner_id':vst.affiliate_partner_id.id,
'invoice_date':fields.Datetime.now().date()
}]
line = self.env['account.move'].create(invoice_dict)
vst.state = 'invoice'
vst.act_invoice_id = line.id
invoice_ids.append(line)
msg = str(len(invoice_ids))+' records has been invoiced out of '+str(len(aff_vst))
partial_id = self.env['wk.wizard.message'].create({'text': msg})
return {
'name': "Message",
'view_mode': 'form',
'view_id': False,
'res_model': 'wk.wizard.message',
'res_id': partial_id.id,
'type': 'ir.actions.act_window',
'nodestroy': True,
'target': 'new',
}
def _get_rate(self,affiliate_method,affiliate_type,type_id):
#_get_rate() methods arguments (pps,product,product_id) or (ppc,product,product_id) or (ppc,category,category_id)
# check product.id in product.template
# check category.id in product.public.category
product_exists = False
category_exists = False
commission = 0.0
commission_type = False
adv_commision_amount = False
from_currency = self.sales_order_line_id.currency_id
company = self.env.user.company_id
response = {}
if self.affiliate_program_id:
if affiliate_type == 'product':
product_exists = self.env['product.template'].browse([type_id])
if affiliate_type == 'category':
category_exists = self.env['product.public.category'].browse([type_id])
if affiliate_method == 'ppc' and product_exists or category_exists: # pay per click
commission = from_currency._convert(self.affiliate_program_id.amount_ppc_fixed,self.affiliate_program_id.currency_id, company, fields.Date.today())
commission_type = 'fixed'
self.commission_amt = commission
else:
# pay per sale
if affiliate_method == 'pps' and product_exists :
#for pps_type simple
if self.affiliate_program_id.pps_type == 's':
if self.affiliate_program_id.matrix_type == 'f': # fixed
amt = from_currency._convert(self.affiliate_program_id.amount,self.affiliate_program_id.currency_id, company, fields.Date.today())
commission = amt * self.product_quantity
commission_type = 'fixed'
else:
if self.affiliate_program_id.matrix_type == 'p' and (not self.affiliate_program_id.amount >100): # percentage
amt_product = from_currency._convert(self.price_total,self.affiliate_program_id.currency_id, company, fields.Date.today())
commission = (amt_product * self.affiliate_program_id.amount/100)
commission_type = 'percentage'
else:
response={
'is_error':1,
'message':'Percenatge amount is greater than 100',
}
else:
# for pps type advance (advance depends upon price list)
if self.affiliate_program_id.pps_type == 'a' and product_exists:#for pps_type advance
adv_commision_amount,commission,commission_type = self.advance_pps_type_calc()
# adv_commision_amount = is a amount if advance commission
# commission = is a amount which is earned by commisiion
commission = commission * self.product_quantity
_logger.info("----commision_value-%r--------commision_value_type-%r------",commission,commission_type)
_logger.info('================advance_pps_type_calc===============')
if commission and commission_type:
_logger.info("---22----adv_commision_amount--%r--commision_value-%r--------commision_value_type-%r------",adv_commision_amount,commission,commission_type)
else:
response={
'is_error':1,
'message':'No commission Category Found for this product..'
}
else:
response={
'is_error':1,
'message':'pps_type is advance',
}
else:
response={
'is_error':1,
'message':'Affilite method is niether ppc nor pps or affiliate type is absent(product or category)',
}
else:
response={
'is_error':1,
'message':'Program is absent in visit',
}
if commission:
self.commission_amt = commission
# self.amt_type = commission_type
if commission_type == 'fixed' and affiliate_method == 'ppc':
self.amt_type = self.affiliate_program_id.currency_id.symbol+ str(commission)
if commission_type == 'percentage' and affiliate_method == 'ppc':
self.amt_type = str(self.affiliate_program_id.amount_ppc_fixed)+ '%'
#for pps
if commission_type == 'percentage' and self.affiliate_program_id.pps_type == 's':
self.amt_type = str(self.affiliate_program_id.amount) +"%"
if commission_type == 'fixed' and affiliate_method == 'pps' and self.affiliate_program_id.pps_type == 's':
self.amt_type = self.affiliate_program_id.currency_id.symbol + str(commission)
if commission_type == 'fixed' and affiliate_method == 'pps' and self.affiliate_program_id.pps_type == 'a':
self.amt_type = self.affiliate_program_id.currency_id.symbol + str(adv_commision_amount)+" advance"
if commission_type == 'percentage' and affiliate_method == 'pps' and self.affiliate_program_id.pps_type == 'a':
self.amt_type = str(adv_commision_amount)+"%"+" advance"
response={
'is_error':0,
'message':'Commission successfully added',
'comm_type':commission_type,
'comm_amt' : commission
}
else:
if response.get('is_error') == 1:
response={
'is_error':1,
'message':response.get('message'),
}
return response
def advance_pps_type_calc(self):
adv_commision_amount,commision_value,commision_value_type = self.env["advance.commision"].calc_commision_adv(self.affiliate_program_id.advance_commision_id.id, self.type_id , self.unit_price)
# argument of calc_commision_adv(adv_comm_id, product_id on which commision apply , price of product)
# return adv_commision_amount ,commision_value, commision_value_type
_logger.info("---11----adv_commision_amount----commision_value-%r--------commision_value_type-%r------",adv_commision_amount,commision_value,commision_value_type)
# return commision_value,commision_value_type
return adv_commision_amount,commision_value,commision_value_type
@api.model
def process_ppc_maturity_scheduler_queue(self):
_logger.info("-----Inside----process_ppc_maturity_scheduler_queue-----------")
check_enable_ppc = self.env['res.config.settings'].sudo().website_constant().get('enable_ppc')
all_ppc_visits = self.search([('affiliate_method','=','ppc'),('state','=','draft')])
if check_enable_ppc:
for visit in all_ppc_visits:
visit.action_confirm()

View File

@ -0,0 +1,70 @@
from odoo import http
import logging
from odoo.http import request
_logger = logging.getLogger(__name__)
from odoo.tools.func import lazy_property
from odoo.http import root, db_filter, db_list
DEFAULT_SESSION = {
'context': {
#'lang': request.default_lang() # must be set at runtime
},
'db': None,
'debug': '',
'login': None,
'uid': None,
'session_token': None,
# profiling
'profile_session': None,
'profile_collectors': None,
'profile_params': None,
}
def _get_session_and_dbname(self):
sid = (self.httprequest.args.get('session_id')
or self.httprequest.headers.get("X-Openerp-Session-Id"))
db_from_request = self.httprequest.values.get("db") or self.httprequest.headers.get("db")
if sid:
is_explicit = True
else:
sid = self.httprequest.cookies.get('session_id')
is_explicit = False
if sid is None:
session = root.session_store.new()
else:
session = root.session_store.get(sid)
session.sid = sid # in case the session was not persisted
session.is_explicit = is_explicit
for key, val in DEFAULT_SESSION.items():
session.setdefault(key, val)
if not session.context.get('lang'):
session.context['lang'] = self.default_lang()
dbname = None
host = self.httprequest.environ['HTTP_HOST']
if session.db and db_filter([session.db], host=host):
dbname = session.db
else:
all_dbs = db_list(force=True, host=host)
if len(all_dbs) == 1:
dbname = all_dbs[0] # monodb
# if db received in request
if db_from_request and db_filter([db_from_request], host=host):
dbname = db_from_request
if session.db != dbname:
if session.db:
_logger.warning("Logged into database %r, but dbfilter rejects it; logging session out.", session.db)
session.logout(keep_db=False)
session.db = dbname
session.is_dirty = False
return session, dbname
http.Request._get_session_and_dbname = _get_session_and_dbname

View File

@ -0,0 +1,77 @@
# -*- coding: utf-8 -*-
#################################################################################
# Author : Webkul Software Pvt. Ltd. (<https://webkul.com/>:wink:
# Copyright(c): 2015-Present Webkul Software Pvt. Ltd.
# All Rights Reserved.
#
#
#
# This program is copyright property of the author mentioned above.
# You can`t redistribute it and/or modify it.
#
#
# You should have received a copy of the License along with this program.
# If not, see <https://store.webkul.com/license.html/>;
#################################################################################
import logging
_logger = logging.getLogger(__name__)
from odoo.exceptions import UserError
from odoo import models, fields,api,_
import random, string
import datetime
class ResPartnerInherit(models.Model):
_inherit = 'res.partner'
_description = "ResPartner Inherit Model"
is_affiliate = fields.Boolean(default=False)
res_affiliate_key = fields.Char(string="Affiliate key")
affiliate_program_id = fields.Many2one("affiliate.program",string="Program")
pending_amt = fields.Float(compute='_compute_pending_amt', string='Pending Amount')
approved_amt = fields.Float(compute='_compute_approved_amt', string='Approved Amount')
def toggle_active(self):
for o in self:
if o.is_affiliate:
o.is_affiliate = False
else:
o.is_affiliate = True
return super(ResPartnerInherit,self).toggle_active()
def _compute_pending_amt(self):
for s in self:
visits = s.env['affiliate.visit'].search([('state','=','confirm'),('affiliate_partner_id','=',s.id)])
amt = 0
for v in visits:
amt = amt + v.commission_amt
s.pending_amt = amt
def _compute_approved_amt(self):
for s in self:
visits = s.env['affiliate.visit'].search([('state','=','invoice'),('affiliate_partner_id','=',s.id)])
amt = 0
for v in visits:
amt = amt + v.commission_amt
s.approved_amt = amt
def generate_key(self):
ran = ''.join(random.choice('0123456789ABCDEFGHIJ0123456789KLMNOPQRSTUVWXYZ') for i in range(8))
self.res_affiliate_key = ran
@api.model_create_multi
def create(self,vals_list):
aff_prgm = None
new_res_partner = None
for vals in vals_list:
aff_prgm = self.env['affiliate.program'].search([])[-1].id if len(self.env['affiliate.program'].search([]))>0 else ''
if vals.get('is_affiliate'):
vals.update({
'affiliate_program_id':aff_prgm
})
new_res_partner = super(ResPartnerInherit,self).create(vals)
return new_res_partner

View File

@ -0,0 +1,30 @@
# -*- coding: utf-8 -*-
#################################################################################
# Author : Webkul Software Pvt. Ltd. (<https://webkul.com/>:wink:
# Copyright(c): 2015-Present Webkul Software Pvt. Ltd.
# All Rights Reserved.
#
#
#
# This program is copyright property of the author mentioned above.
# You can`t redistribute it and/or modify it.
#
#
# You should have received a copy of the License along with this program.
# If not, see <https://store.webkul.com/license.html/>;
#################################################################################
import logging
_logger = logging.getLogger(__name__)
from odoo.exceptions import UserError
from odoo import models, fields,api,_
import random, string
from ast import literal_eval
class ResUserInherit(models.Model):
_inherit = 'res.users'
_inherits = {'res.partner': 'partner_id'}
_description = "ResUser Inherit Model"
res_affiliate_key = fields.Char(related='partner_id.res_affiliate_key',string='Partner Affiliate Key', inherited=True)

View File

@ -0,0 +1,101 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<data noupdate="0">
<record id="affiliate_security_category" model="ir.module.category">
<field name="name">Affiliate Category</field>
</record>
<record id="affiliate_security_user_group" model="res.groups">
<field name="name">User</field>
<field name="category_id" ref= "affiliate_security_category"/>
</record>
<record id="affiliate_security_manager_group" model="res.groups">
<field name="name">Manager</field>
<field name="users" eval="[(4, ref('base.user_root')),(4, ref('base.user_admin'))]"/>
<field name="category_id" ref= "affiliate_security_category"/>
<field name="implied_ids" eval= "[(4,ref('affiliate_security_user_group'))]"/>
</record>
</data>
<data>
<record id="affiliate_management_user_rule" model="ir.rule">
<field name="name">Affiliate managemnt Records for User</field>
<field name="model_id" ref="affiliate_management.model_res_partner"/>
<field name="groups" eval="[(4,ref('affiliate_security_user_group'))]"/>
<field name="domain_force">[("id", '=',user.partner_id.id)]</field>
</record>
<record id="affiliate_management_user_visit_rule" model="ir.rule">
<field name="name">Affiliate managemnt visits for User</field>
<field name="model_id" ref="affiliate_management.model_affiliate_visit"/>
<field name="groups" eval="[(4,ref('affiliate_security_user_group'))]"/>
<field name="domain_force">[("affiliate_partner_id", '=',user.partner_id.id)]</field>
</record>
<record id="affiliate_management_user_account_invoice_rule" model="ir.rule">
<field name="name">Affiliate managemnt account invoice for User</field>
<field name="model_id" ref="affiliate_management.model_account_move"/>
<field name="groups" eval="[(4,ref('affiliate_security_user_group'))]"/>
<field name="domain_force">[("partner_id", '=',user.partner_id.id)]</field>
</record>
<record id="affiliate_management_user_aff_image_rule" model="ir.rule">
<field name="name">Affiliate managemnt Image for User</field>
<field name="model_id" ref="affiliate_management.model_affiliate_image"/>
<field name="groups" eval="[(4,ref('affiliate_security_user_group'))]"/>
<field name="domain_force">[(1, '=',1)]</field>
</record>
<!-- manager rule -->
<record id="affiliate_management_manager_visit_rule" model="ir.rule">
<field name="name">Affiliate managemnt visits for Manager</field>
<field name="model_id" ref="affiliate_management.model_affiliate_visit"/>
<field name="groups" eval="[(4,ref('affiliate_security_manager_group'))]"/>
<field name="domain_force">[(1, '=',1)]</field>
</record>
<record id="affiliate_management_manager_request_rule" model="ir.rule">
<field name="name">Affiliate managemnt request for Manager</field>
<field name="model_id" ref="affiliate_management.model_affiliate_request"/>
<field name="groups" eval="[(4,ref('affiliate_security_manager_group'))]"/>
<field name="domain_force">[(1, '=',1)]</field>
</record>
<record id="affiliate_management_manager_account_invoice_rule" model="ir.rule">
<field name="name">Affiliate managemnt account invoice for Manager</field>
<field name="model_id" ref="affiliate_management.model_account_move"/>
<field name="groups" eval="[(4,ref('affiliate_security_manager_group'))]"/>
<field name="domain_force">[(1, '=',1)]</field>
</record>
<record id="affiliate_management_res_partner_manager_rule" model="ir.rule">
<field name="name">manager managemnt Records for manager</field>
<field name="model_id" ref="affiliate_management.model_res_partner"/>
<field name="groups" eval="[(4,ref('affiliate_security_manager_group'))]"/>
<field name="domain_force">[(1, '=',1)]</field>
</record>
<record id="affiliate_management_manager_rule" model="ir.rule">
<field name="name">manager advance commision for manager</field>
<field name="model_id" ref="affiliate_management.model_advance_commision"/>
<field name="groups" eval="[(4,ref('affiliate_security_manager_group'))]"/>
<field name="domain_force">[(1, '=',1)]</field>
</record>
</data>
</odoo>

View File

@ -0,0 +1,44 @@
id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink
affiliate_affiliate_visit_global,global_access_affiliate_visit,model_affiliate_visit,,1,0,0,0
affiliate_res_partner_user,user_access_res_partner,model_res_partner,affiliate_security_user_group,1,1,0,0
affiliate_affiliate_visit_user,user_access_affiliate_visit,model_affiliate_visit,affiliate_security_user_group,1,0,0,0
affiliate_affiliate_program_user,user_affiliate_program_visit,model_affiliate_program,affiliate_security_user_group,1,0,0,0
affiliate_affiliate_image_user,user_affiliate_image,model_affiliate_image,affiliate_security_user_group,1,0,0,0
affiliate_account_invoice_user,user_account_invoice,account.model_account_move,affiliate_security_user_group,1,0,0,0
affiliate_account_invoice_line_user,user_account_invoice_line,account.model_account_move_line,affiliate_security_user_group,1,0,0,0
affiliate_account_move_line_user,user_account_move_line,account.model_account_move_line,affiliate_security_user_group,1,0,0,0
affiliate_account_partial_reconcile_user,user_account_partial_reconcile,account.model_account_partial_reconcile,affiliate_security_user_group,1,0,0,0
affiliate_account_move_user,user_account_move,account.model_account_move,affiliate_security_user_group,1,0,0,0
affiliate_sale_order_line_user,user_sale_order_line,sale.model_sale_order_line,affiliate_security_user_group,1,0,0,0
affiliate_product_product_user,user_product_product,product.model_product_product,affiliate_security_user_group,1,0,0,0
affiliate_sale_order_user,user_sale_order,sale.model_sale_order,affiliate_security_user_group,1,0,0,0
affiliate_affiliate_product_pricelist_item_user,user_affiliate_product_pricelist_item_view,model_affiliate_product_pricelist_item,affiliate_security_user_group,0,0,0,0
affiliate_affiliate_affiliate_tool_user,user_affiliate_tool_view,model_affiliate_tool,affiliate_security_user_group,1,0,0,0
affiliate_res_partner_manager,manager_access_res_partner,model_res_partner,affiliate_security_manager_group,1,1,0,0
affiliate_res_users_manager,manager_access_res_users,model_res_users,affiliate_security_manager_group,1,1,0,0
affiliate_affiliate_visit_manager,manager_access_affiliate_visit,model_affiliate_visit,affiliate_security_manager_group,1,1,1,0
affiliate_affiliate_program_manager,manager_affiliate_program_visit,model_affiliate_program,affiliate_security_manager_group,1,1,1,1
affiliate_affiliate_image_manager,manager_affiliate_image,model_affiliate_image,affiliate_security_manager_group,1,1,1,1
affiliate_affiliate_banner_manager,manager_affiliate_banner_visit,model_affiliate_banner,affiliate_security_manager_group,1,1,1,1
affiliate_account_invoice_manager,manager_account_invoice,account.model_account_move,affiliate_security_manager_group,1,1,1,1
affiliate_account_invoice_line_manager,manager_account_invoice_line,account.model_account_move_line,affiliate_security_manager_group,1,1,1,1
affiliate_account_move_line_manager,manager_account_move_line,account.model_account_move_line,affiliate_security_manager_group,1,1,1,1
affiliate_sale_order_manager,manager_sale_order,sale.model_sale_order,affiliate_security_manager_group,1,0,0,0
affiliate_sale_order_line_manager,manager_sale_order_line,sale.model_sale_order_line,affiliate_security_manager_group,1,0,0,0
affiliate_affiliate_request_manager,manager_access_affiliate_request,model_affiliate_request,affiliate_security_manager_group,1,1,1,1
affiliate_res_groups_manager,manager_access_res_groups,base.model_res_groups,affiliate_security_manager_group,1,1,1,1
affiliate_ir_module_category_manager,manager_access_ir_module_category,base.model_ir_module_category,affiliate_security_manager_group,1,1,1,1
affiliate_ir_ui_view_manager,manager_access_ir_ui_view,base.model_ir_ui_view,affiliate_security_manager_group,1,1,1,1
affiliate_advance_commision_manager,manager_advance_commision_view,model_advance_commision,affiliate_security_manager_group,1,1,1,1
affiliate_affiliate_product_pricelist_item_manager,manager_affiliate_product_pricelist_item_view,model_affiliate_product_pricelist_item,affiliate_security_manager_group,1,1,1,1
affiliate_account_journal_manager,manager_account_journal_view,account.model_account_journal,affiliate_security_manager_group,1,1,1,1
affiliate_affiliate_affiliate_tool,manager_access_affiliate_tool,model_affiliate_tool,affiliate_security_manager_group,1,1,1,0
1 id name model_id:id group_id:id perm_read perm_write perm_create perm_unlink
2 affiliate_affiliate_visit_global global_access_affiliate_visit model_affiliate_visit 1 0 0 0
3 affiliate_res_partner_user user_access_res_partner model_res_partner affiliate_security_user_group 1 1 0 0
4 affiliate_affiliate_visit_user user_access_affiliate_visit model_affiliate_visit affiliate_security_user_group 1 0 0 0
5 affiliate_affiliate_program_user user_affiliate_program_visit model_affiliate_program affiliate_security_user_group 1 0 0 0
6 affiliate_affiliate_image_user user_affiliate_image model_affiliate_image affiliate_security_user_group 1 0 0 0
7 affiliate_account_invoice_user user_account_invoice account.model_account_move affiliate_security_user_group 1 0 0 0
8 affiliate_account_invoice_line_user user_account_invoice_line account.model_account_move_line affiliate_security_user_group 1 0 0 0
9 affiliate_account_move_line_user user_account_move_line account.model_account_move_line affiliate_security_user_group 1 0 0 0
10 affiliate_account_partial_reconcile_user user_account_partial_reconcile account.model_account_partial_reconcile affiliate_security_user_group 1 0 0 0
11 affiliate_account_move_user user_account_move account.model_account_move affiliate_security_user_group 1 0 0 0
12 affiliate_sale_order_line_user user_sale_order_line sale.model_sale_order_line affiliate_security_user_group 1 0 0 0
13 affiliate_product_product_user user_product_product product.model_product_product affiliate_security_user_group 1 0 0 0
14 affiliate_sale_order_user user_sale_order sale.model_sale_order affiliate_security_user_group 1 0 0 0
15 affiliate_affiliate_product_pricelist_item_user user_affiliate_product_pricelist_item_view model_affiliate_product_pricelist_item affiliate_security_user_group 0 0 0 0
16 affiliate_affiliate_affiliate_tool_user user_affiliate_tool_view model_affiliate_tool affiliate_security_user_group 1 0 0 0
17 affiliate_res_partner_manager manager_access_res_partner model_res_partner affiliate_security_manager_group 1 1 0 0
18 affiliate_res_users_manager manager_access_res_users model_res_users affiliate_security_manager_group 1 1 0 0
19 affiliate_affiliate_visit_manager manager_access_affiliate_visit model_affiliate_visit affiliate_security_manager_group 1 1 1 0
20 affiliate_affiliate_program_manager manager_affiliate_program_visit model_affiliate_program affiliate_security_manager_group 1 1 1 1
21 affiliate_affiliate_image_manager manager_affiliate_image model_affiliate_image affiliate_security_manager_group 1 1 1 1
22 affiliate_affiliate_banner_manager manager_affiliate_banner_visit model_affiliate_banner affiliate_security_manager_group 1 1 1 1
23 affiliate_account_invoice_manager manager_account_invoice account.model_account_move affiliate_security_manager_group 1 1 1 1
24 affiliate_account_invoice_line_manager manager_account_invoice_line account.model_account_move_line affiliate_security_manager_group 1 1 1 1
25 affiliate_account_move_line_manager manager_account_move_line account.model_account_move_line affiliate_security_manager_group 1 1 1 1
26 affiliate_sale_order_manager manager_sale_order sale.model_sale_order affiliate_security_manager_group 1 0 0 0
27 affiliate_sale_order_line_manager manager_sale_order_line sale.model_sale_order_line affiliate_security_manager_group 1 0 0 0
28 affiliate_affiliate_request_manager manager_access_affiliate_request model_affiliate_request affiliate_security_manager_group 1 1 1 1
29 affiliate_res_groups_manager manager_access_res_groups base.model_res_groups affiliate_security_manager_group 1 1 1 1
30 affiliate_ir_module_category_manager manager_access_ir_module_category base.model_ir_module_category affiliate_security_manager_group 1 1 1 1
31 affiliate_ir_ui_view_manager manager_access_ir_ui_view base.model_ir_ui_view affiliate_security_manager_group 1 1 1 1
32 affiliate_advance_commision_manager manager_advance_commision_view model_advance_commision affiliate_security_manager_group 1 1 1 1
33 affiliate_affiliate_product_pricelist_item_manager manager_affiliate_product_pricelist_item_view model_affiliate_product_pricelist_item affiliate_security_manager_group 1 1 1 1
34 affiliate_account_journal_manager manager_account_journal_view account.model_account_journal affiliate_security_manager_group 1 1 1 1
35 affiliate_affiliate_affiliate_tool manager_access_affiliate_tool model_affiliate_tool affiliate_security_manager_group 1 1 1 0

Binary file not shown.

After

Width:  |  Height:  |  Size: 38 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 59 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 542 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 106 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 120 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 140 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 109 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 82 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 98 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 100 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 78 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 84 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 90 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 234 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 80 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 76 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 75 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 75 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 345 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 341 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 469 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 315 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 244 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 75 KiB

View File

@ -0,0 +1,745 @@
<section>
<h2 style="font-family: Montserrat;font-size: 24px;color: #333333;line-height: 39px;text-align: center">Odoo Affiliate Management</h2>
<br/>
<p style="font-weight:400;font-family: Montserrat;font-size: 16px;color: #333333;line-height: 22px;text-align: center">Hassle-free way to manage the marketing tags for your Odoo Website!
</p>
<div class="row mt16 mb16 mp-features">
<div class="col-md-6 mt16 mb16" style="border-right:1px solid #C4C4C4">
Odoo Affiliate Management Module facilitates you to create and manage an Affiliate Program in Odoo. The interested candidates can signup from the website and you can manage the process from the back-end.
</div>
<div class="col-md-6 mt16 mb16">
<h5>Information</h5>
<span class="ml-1 mr-2 my-auto"><img src="icon-user-guide.png" alt="user-guide"></span>
<span>User Guide</span>
<p><a href="https://webkul.com/blog/odoo-affiliate-management">https://webkul.com/blog/odoo-affiliate-management</a></p>
</div>
<div class="shadow p-3 bg-white rounded" style="background: #FFFFFF;box-shadow: 0px 0px 6px 0 rgba(0, 0, 0, 0.1);padding:4% 4% 1% 4%;height:100%;margin-top:2%">
<div class="container" style="color:#333333;font-size:18px;font-weight:bold;">
<div class="position-absolute"> <img src= "icon-1.png" style="position:absolute;margin-top:-0.9%;width: 40.14px;height:40.14px;background: rgba(255, 255, 255, 0.7);"></div><div style="margin-left:6%;">Affiliate Management in Odoo for marketing on another level!</div>
</div>
</br>
<div class="container " style="color:#555555;font-size:16px;">
<p style="font-weight:400;margin-top:16px;font-family: Montserrat;font-size: 16px;color: #555555;line-height: 22px;">Marketing is a part for any business that no one can ignore; as it is important for the better of products to the customers. There are various techniques for the marketing of any kind of business but what matters the most is using the apt one at the right time.
</p>
<p style="font-weight:400;margin-top:16px;font-family: Montserrat;font-size: 16px;color: #555555;line-height: 22px;">Talking about the apt marketing strategy, affiliate management cannot go unnoticed. Coming to the facts, 81% of brands and 84% of publishers leverage the power of affiliate marketing, reported by big-commerce. Affiliate marketing is a type of performance-based marketing in which you can reward one or more affiliates for each visitor or customer brought by the affiliate's own marketing efforts.
</p>
<p style="font-weight:400;margin-top:16px;font-family: Montserrat;font-size: 16px;color: #555555;line-height: 22px;">Now, you can manage affiliates in Odoo without any hassle. Odoo Affiliate Management facilitates you to create and manage an Affiliate Program in Odoo. The interested candidates can signup from the website and you can manage the process from the back-end.
</p>
</div>
</div>
<div class="shadow p-3 bg-white rounded" style="background: #FFFFFF;margin-top:2%;box-shadow: 0px 0px 6px 0 rgba(0, 0, 0, 0.1);padding:4% 4% 1% 4%;height:100%;">
<div style ="display: flex; flex-direction: row;">
<div style="width:50%;">
<div class="" style="color:#333333;font-size:18px;font-weight:bold;">
<div>Affiliate Management for tremendous Business Growth</div>
</div>
</br>
<div class=" " style="color:#555555;font-size:16px;">
<p style="font-weight:400;margin-top:16px;font-family: Montserrat;font-size: 16px;color: #555555;line-height: 22px;">When you associate affiliates with your business then all different minds put their complete efforts to sell your products with their set of creativity.
</p>
<p style="font-weight:400;margin-top:16px;font-family: Montserrat;font-size: 16px;color: #555555;line-height: 22px;">Moreover, the rewards offered for the sale also motivates the affiliate to bring the maximum customers to you which is a great step for the growth of your business.
</p>
<p style="font-weight:400;margin-top:16px;font-family: Montserrat;font-size: 16px;color: #555555;line-height: 22px;">Choose and work with the affiliates that relate to the theme of your website. Harness the power of recommendation to your advantage.and focus the efforts on target marketing rather than general paid advertisement.</p>
</div></div>
<div style="width:30%;">
<img src="illustration-1.png" ></img>
</div>
</div>
</div>
<div class="shadow p-3 bg-white rounded" style="background: #FFFFFF;box-shadow: 0px 0px 6px 0 rgba(0, 0, 0, 0.1);padding:4% 4% 1% 4%;height:100%;margin-top:2%">
<div class="container" style="color:#333333;font-size:18px;font-weight:bold;">
<div class="position-absolute"> <img src= "icon-2.png" style="position: absolute;margin-top:-0.9%;width: 40.14px;height:40.14px;background: rgba(255, 255, 255, 0.7);"></div><div style="margin-left:6%;">Hassle-free way for Affiliate Management in Odoo</div>
</div>
</br>
<div class="container " style="color:#555555;font-size:16px;">
<p style="font-weight:400;margin-top:16px;font-family: Montserrat;font-size: 16px;color: #555555;line-height: 22px;">Odoo Affiliate Management allows you to create and manage an Affiliate Program in Odoo. The interested candidates can sign up directly from the website and you can manage the process from the Odoo back-end.
</p>
<p style="font-weight:400;margin-top:16px;font-family: Montserrat;font-size: 16px;color: #555555;line-height: 22px;">You can easily build your own affiliate marketing team and promote your products on your affiliates' websites.
</p>
<p style="font-weight:400;margin-top:16px;font-family: Montserrat;font-size: 16px;color: #555555;line-height: 22px;">You can approve/reject affiliate requests and track the activity of your affiliate link for all your affiliates in the backend. Moreover, you can also define threshold balance in affiliate accounts for payout.
</p>
</div>
</div>
<div style ="margin:2%;width:98%;">
<h2 style="font-family: Montserrat;font-size: 24px;color: #333333;line-height: 39px;">Detailed Features List
</h2>
<br/>
<p style="font-weight:400;font-family: Montserrat;font-size: 16px;color: #333333;line-height: 22px;">Below is the detailed list of Feature for Affiliate Management
</p>
</div>
<div class="col-md-6 mt16 mb16">
<div class="shadow p-3 bg-white rounded" style="background: #FFFFFF;box-shadow: 0px 0px 6px 0 rgba(0, 0, 0, 0.1);padding:4% 4% 1% 4%;height:100%">
<div class="container" style="color:#333333;font-size:18px;font-weight:bold;">
Easy way to manage Affiliates in Odoo
</div>
<div class="container " style="color:#555555;font-size:16px;">
<ul style="padding:16px;">
<li>
<p style="font-weight:400;font-family: Montserrat;font-size: 16px;color: #555555;line-height: 22px;">It helps to create an Affiliate Program for your website in Odoo</p>
</li>
<br/>
<li>
<p style="font-weight:400;font-family: Montserrat;font-size: 16px;color: #555555;line-height: 22px;">Manage the entire affiliate Program using Odoo from the back-end
</p>
</li>
</ul>
</div>
</div>
</div>
<div class="col-md-6 mt16 mb16">
<div class="shadow p-3 bg-white rounded" style="background: #FFFFFF;box-shadow: 0px 0px 6px 0 rgba(0, 0, 0, 0.1);padding:4% 4% 1% 4%;height:100%">
<div class="container" style="color:#333333;font-size:18px;font-weight:bold;">Full Admin control for Affiliate Program in Odoo
</div>
<div class="container" style="color:#555555;font-size:16px;">
<ul style="padding:16px;">
<li>
<p style="font-weight:400;font-family: Montserrat;font-size: 16px;color: #555555;line-height: 22px;">As an admin, you can approve/reject the affiliate request from the backend
</p>
</li>
<li>
<p style="font-weight:400;font-family: Montserrat;font-size: 16px;color: #555555;line-height: 22px;">You can enable/disable Pay Per Click (PPC) affiliate program using Odoo.
</p> </li> <li>
<p style="font-weight:400;font-family: Montserrat;font-size: 16px;color: #555555;line-height: 22px;">Maturity time for a PPC can be set by the admin.
</p>
</li>
</ul>
</div>
</div>
</div>
<div class="col-md-6 mt16 mb16">
<div class="shadow p-3 bg-white rounded" style="background: #FFFFFF;box-shadow: 0px 0px 6px 0 rgba(0, 0, 0, 0.1);padding:4% 4% 1% 4%;height:100%">
<div class="container" style="color:#333333;font-size:18px;font-weight:bold;">
Manage the Reports in Real-time
</div>
<div class="container " style="color:#555555;font-size:16px;">
<ul style="padding:16px;">
<li>
<p style="font-weight:400;font-family: Montserrat;font-size: 16px;color: #555555;line-height: 22px;">The order report is generated for every Pay Per Sale (PPS) event on each affiliate's webpage.
</p>
</li>
<br/>
<li>
<p style="font-weight:400;font-family: Montserrat;font-size: 16px;color: #555555;line-height: 22px;">The event Report is generated for every Pay Per Click (PPC) event on each affiliate's webpage.
</p>
</li>
</ul>
</div>
</div>
</div>
<div class="col-md-6 mt16 mb16">
<div class="shadow p-3 bg-white rounded" style="background: #FFFFFF;box-shadow: 0px 0px 6px 0 rgba(0, 0, 0, 0.1);padding:4% 4% 1% 4%;height:100%">
<div class="container" style="color:#333333;font-size:18px;font-weight:bold;">Manage the Commision as per your Requirement
</div>
<div class="container" style="color:#555555;font-size:16px;">
<ul style="padding:16px;">
<li>
<p style="font-weight:400;font-family: Montserrat;font-size: 16px;color: #555555;line-height: 22px;">Set your threshold amount in commission calculation.
</p>
</li>
<li>
<p style="font-weight:400;font-family: Montserrat;font-size: 16px;color: #555555;line-height: 22px;">Commissions can be set on the basis of fixed or percentage paid.
</p>
</li>
</ul>
</div>
</div>
</div>
<div class="col-md-6 mt16 mb16">
<div class="shadow p-3 bg-white rounded" style="background: #FFFFFF;box-shadow: 0px 0px 6px 0 rgba(0, 0, 0, 0.1);padding:4% 4% 1% 4%;height:100%">
<div class="container" style="color:#333333;font-size:18px;font-weight:bold;">
Set The Background for Welcome page
</div>
<div class="container " style="color:#555555;font-size:16px;">
<ul style="padding:16px;">
<li>
<p style="font-weight:400;font-family: Montserrat;font-size: 16px;color: #555555;line-height: 22px;">Define/Update welcome page Banner and Title.
</p>
</li>
<br/>
<li>
<p style="font-weight:400;font-family: Montserrat;font-size: 16px;color: #555555;line-height: 22px;">Define/Update Email Text sent to the user for registration, welcome and cancel the request.
</p>
</li>
</ul>
</div>
</div>
</div>
<div class="col-md-6 mt16 mb16">
<div class="shadow p-3 bg-white rounded" style="background: #FFFFFF;box-shadow: 0px 0px 6px 0 rgba(0, 0, 0, 0.1);padding:4% 4% 1% 4%;height:100%">
<div class="container" style="color:#333333;font-size:18px;font-weight:bold;"> Send Welcome Notification to the Affiliates
</div>
<div class="container" style="color:#555555;font-size:16px;">
<ul style="padding:16px;">
<li>
<p style="font-weight:400;font-family: Montserrat;font-size: 16px;color: #555555;line-height: 22px;">Set your threshold amount in commission calculation.
</p>
</li>
<li>
<p style="font-weight:400;font-family: Montserrat;font-size: 16px;color: #555555;line-height: 22px;">The admin can edit and send emails to new affiliates like welcome mail or request cancellation mail.
</p>
</li>
</ul>
</div>
</div>
</div>
</div>
</div>
</section>
<br/><br/>
<section>
<h3 style="font-family: Montserrat;font-size: 26px;color:#333333;line-height: 39px;text-align:center;">Enter your mail id as shown to become an affiliate</h3>
<div style="padding:18px;margin-bottom: 32px; margin-top: 32px; background: #FFFFFF;0px 0px 6px 0 rgba(0, 0, 0, 0.16);border-radius: 2px;">
<div class="oe_demo img-responsive oe_screenshot" style="font-style:italic">
<a href="11.png">
<img src="11.png"/>
</a>
</div>
</div>
<br/>
<h3 style="font-family: Montserrat;font-size: 26px;color:#333333;line-height: 39px;text-align:center;">View the affiliate requests from the backend</h3>
<div style="padding:18px;margin-bottom: 32px; margin-top: 32px; background: #FFFFFF;0px 0px 6px 0 rgba(0, 0, 0, 0.16);border-radius: 2px;">
<div class="oe_demo img-responsive oe_screenshot" style="font-style:italic">
<a href="1.png">
<img src="1.png"/>
</a>
</div>
</div>
<br/>
<h3 style="font-family: Montserrat;font-size: 26px;color:#333333;line-height: 39px;text-align:center;">Tick the checkbox to enable the affiliate option</h3>
<div style="padding:18px;margin-bottom: 32px; margin-top: 32px; background: #FFFFFF;0px 0px 6px 0 rgba(0, 0, 0, 0.16);border-radius: 2px;">
<div class="oe_demo img-responsive oe_screenshot" style="font-style:italic">
<a href="10.png">
<img src="10.png"/>
</a>
</div>
</div>
<br/>
<h3 style="font-family: Montserrat;font-size: 26px;color:#333333;line-height: 39px;text-align:center;">Select the affiliate tool to generate the link</h3>
<div style="padding:18px;margin-bottom: 32px; margin-top: 32px; background: #FFFFFF;0px 0px 6px 0 rgba(0, 0, 0, 0.16);border-radius: 2px;">
<div class="oe_demo img-responsive oe_screenshot" style="font-style:italic">
<a href="12.png">
<img src="12.png"/>
</a>
</div>
</div>
<br/>
<h3 style="font-family: Montserrat;font-size: 26px;color:#333333;line-height: 39px;text-align:center;">Affiliate link generator</h3>
<div style="padding:18px;margin-bottom: 32px; margin-top: 32px; background: #FFFFFF;0px 0px 6px 0 rgba(0, 0, 0, 0.16);border-radius: 2px;">
<div class="oe_demo img-responsive oe_screenshot" style="font-style:italic">
<a href="13.png">
<img src="13.png"/>
</a>
</div>
</div>
<br/>
<h3 style="font-family: Montserrat;font-size: 26px;color:#333333;line-height: 39px;text-align:center;">Generate Product link: Choose Product</h3>
<div style="padding:18px;margin-bottom: 32px; margin-top: 32px; background: #FFFFFF;0px 0px 6px 0 rgba(0, 0, 0, 0.16);border-radius: 2px;">
<div class="oe_demo img-responsive oe_screenshot" style="font-style:italic">
<a href="14.png">
<img src="14.png"/>
</a>
</div>
</div>
<br/>
<h3 style="font-family: Montserrat;font-size: 26px;color:#333333;line-height: 39px;text-align:center;">Generate Product link: Choose Image</h3>
<div style="padding:18px;margin-bottom: 32px; margin-top: 32px; background: #FFFFFF;0px 0px 6px 0 rgba(0, 0, 0, 0.16);border-radius: 2px;">
<div class="oe_demo img-responsive oe_screenshot" style="font-style:italic">
<a href="15.png">
<img src="15.png"/>
</a>
</div>
</div>
<br/>
<h3 style="font-family: Montserrat;font-size: 26px;color:#333333;line-height: 39px;text-align:center;">Generate Product link: Copy generated code</h3>
<div style="padding:18px;margin-bottom: 32px; margin-top: 32px; background: #FFFFFF;0px 0px 6px 0 rgba(0, 0, 0, 0.16);border-radius: 2px;">
<div class="oe_demo img-responsive oe_screenshot" style="font-style:italic">
<a href="16.png">
<img src="16.png"/>
</a>
</div>
</div>
<br/>
<h3 style="font-family: Montserrat;font-size: 26px;color:#333333;line-height: 39px;text-align:center;">View you order earnings from here</h3>
<div style="padding:18px;margin-bottom: 32px; margin-top: 32px; background: #FFFFFF;0px 0px 6px 0 rgba(0, 0, 0, 0.16);border-radius: 2px;">
<div class="oe_demo img-responsive oe_screenshot" style="font-style:italic">
<a href="17.png">
<img src="17.png"/>
</a>
</div>
</div>
<br/>
<h3 style="font-family: Montserrat;font-size: 26px;color:#333333;line-height: 39px;text-align:center;">View your traffic earnings as shown</h3>
<div style="padding:18px;margin-bottom: 32px; margin-top: 32px; background: #FFFFFF;0px 0px 6px 0 rgba(0, 0, 0, 0.16);border-radius: 2px;">
<div class="oe_demo img-responsive oe_screenshot" style="font-style:italic">
<a href="18.png">
<img src="18.png"/>
</a>
</div>
</div>
<br/>
<h3 style="font-family: Montserrat;font-size: 26px;color:#333333;line-height: 39px;text-align:center;">View the order reports from the backend</h3>
<div style="padding:18px;margin-bottom: 32px; margin-top: 32px; background: #FFFFFF;0px 0px 6px 0 rgba(0, 0, 0, 0.16);border-radius: 2px;">
<div class="oe_demo img-responsive oe_screenshot" style="font-style:italic">
<a href="2.png">
<img src="2.png"/>
</a>
</div>
<br/>
<h3 style="font-family: Montserrat;font-size: 26px;color:#333333;line-height: 39px;text-align:center;">View the traffic report fromt the backend</h3>
<div style="padding:18px;margin-bottom: 32px; margin-top: 32px; background: #FFFFFF;0px 0px 6px 0 rgba(0, 0, 0, 0.16);border-radius: 2px;">
<div class="oe_demo img-responsive oe_screenshot" style="font-style:italic">
<a href="3.png">
<img src="3.png"/>
</a>
</div>
</div>
<br/>
<h3 style="font-family: Montserrat;font-size: 26px;color:#333333;line-height: 39px;text-align:center;">View the invoices from the backend</h3>
<div style="padding:18px;margin-bottom: 32px; margin-top: 32px; background: #FFFFFF;0px 0px 6px 0 rgba(0, 0, 0, 0.16);border-radius: 2px;">
<div class="oe_demo img-responsive oe_screenshot" style="font-style:italic">
<a href="4.png">
<img src="4.png"/>
</a>
</div>
</div>
<br/>
<h3 style="font-family: Montserrat;font-size: 26px;color:#333333;line-height: 39px;text-align:center;">View the affiliate images from the Odoo backend</h3>
<div style="padding:18px;margin-bottom: 32px; margin-top: 32px; background: #FFFFFF;0px 0px 6px 0 rgba(0, 0, 0, 0.16);border-radius: 2px;">
<div class="oe_demo img-responsive oe_screenshot" style="font-style:italic">
<a href="5.png">
<img src="5.png"/>
</a>
</div>
</div>
<br/>
<h3 style="font-family: Montserrat;font-size: 26px;color:#333333;line-height: 39px;text-align:center;">Manage the affiliate configuration from the Odoo backend</h3>
<div style="padding:18px;margin-bottom: 32px; margin-top: 32px; background: #FFFFFF;0px 0px 6px 0 rgba(0, 0, 0, 0.16);border-radius: 2px;">
<div class="oe_demo img-responsive oe_screenshot" style="font-style:italic">
<a href="6.png">
<img src="6.png"/>
</a>
</div>
</div>
<br/>
<h3 style="font-family: Montserrat;font-size: 26px;color:#333333;line-height: 39px;text-align:center;">Manage the payment configuration from the Odoo backend</h3>
<div style="padding:18px;margin-bottom: 32px; margin-top: 32px; background: #FFFFFF;0px 0px 6px 0 rgba(0, 0, 0, 0.16);border-radius: 2px;">
<div class="oe_demo img-responsive oe_screenshot" style="font-style:italic">
<a href="7.png">
<img src="7.png"/>
</a>
</div>
</div>
<br/>
<h3 style="font-family: Montserrat;font-size: 26px;color:#333333;line-height: 39px;text-align:center;">Set the rate for PPC and PPS as shown</h3>
<div style="padding:18px;margin-bottom: 32px; margin-top: 32px; background: #FFFFFF;0px 0px 6px 0 rgba(0, 0, 0, 0.16);border-radius: 2px;">
<div class="oe_demo img-responsive oe_screenshot" style="font-style:italic">
<a href="8.png">
<img src="8.png"/>
</a>
</div>
</div>
<br/>
<h3 style="font-family: Montserrat;font-size: 26px;color:#333333;line-height: 39px;text-align:center;">Set the advance comission</h3>
<div style="padding:18px;margin-bottom: 32px; margin-top: 32px; background: #FFFFFF;0px 0px 6px 0 rgba(0, 0, 0, 0.16);border-radius: 2px;">
<div class="oe_demo img-responsive oe_screenshot" style="font-style:italic">
<a href="9.png">
<img src="9.png"/>
</a>
</div>
</div>
<br/>
</section>
<br/><br/>
<section class="oe_container mb32">
<div class="row mt16 mb16 pb32">
<div class="container text-center d-none d-xl-block" style="color:#333333;font-size:26px;font-weight:bold;">
<p>Our Other Apps</p>
</div>
<div class=" d-none d-xl-block container text-center" style="color:#555555;font-size:18px;">
Make your eCommerce Experience more better with our other Apps.
</div>
<div class="container ml0 mr0">
<div class="offset-md-2 col-md-8">
<div class="row ml0 mr0">
<div id="mp_addons_carousel" class="container carousel slide mt64 mb32 d-none d-xl-block" data-ride="carousel">
<div class="carousel-inner">
<div class="carousel-item active" style="min-height: 0px;">
<div class="row">
<div class="text-center col-xs-12 col-sm-3 col-md-3 mb16 mt16" style="float: left;">
<a href="https://apps.odoo.com/apps/modules/13.0/marketplace_membership" target="_blank">
<div>
<img class="img img-responsive" alt="not found" width="100" height="100" style="border-radius: 16px;" src="https://apps.odoocdn.com/apps/assets/13.0/marketplace_membership/icon.png">
<div class="mt8" style="font-size: 16px;color: #333333;text-align: center;line-height: 21px;white-space: nowrap;overflow: hidden;text-overflow: ellipsis;">
Marketplace <br/> Membership
</div>
</div>
</a>
</div>
<div class="text-center col-xs-12 col-sm-3 col-md-3 mb16 mt16" style="float: left;">
<a href="https://apps.odoo.com/apps/modules/13.0/marketplace_advance_barcode_labels" target="_blank">
<div>
<img class="img img-responsive" width="100" height="100" style="border-radius: 16px;" src="https://apps.odoocdn.com/apps/assets/13.0/marketplace_advance_barcode_labels/icon.png">
<div class="mt8" style="font-size: 16px;color: #333333;text-align: center;line-height: 21px;white-space: nowrap;overflow: hidden;text-overflow: ellipsis;">
Advance Barcode <br/> Labels For Product
</div>
</div>
</a>
</div>
<div class="text-center col-xs-12 col-sm-3 col-md-3 mb16 mt16" style="float: left;">
<a href="https://apps.odoo.com/apps/modules/13.0/marketplace_booking_system" target="_blank">
<div>
<img class="img img-responsive" width="100" height="100" style="border-radius: 16px;" src="https://apps.odoocdn.com/apps/assets/13.0/marketplace_booking_system/icon.png">
<div class="mt8" style="font-size: 16px;color: #333333;text-align: center;line-height: 21px;white-space: nowrap;overflow: hidden;text-overflow: ellipsis;">
Booking & Reservation <br/> Management
</div>
</div>
</a>
</div>
<div class="text-center col-xs-12 col-sm-3 col-md-3 mb16 mt16" style="float: left;">
<a href="https://apps.odoo.com/apps/modules/13.0/marketplace_preorder" target="_blank">
<div>
<img class="img img-responsive" width="100" height="100" style="border-radius: 16px;" src="https://apps.odoocdn.com/apps/assets/13.0/marketplace_preorder/icon.png">
<div class="mt8" style="font-size: 16px;color: #333333;text-align: center;line-height: 21px;white-space: nowrap;overflow: hidden;text-overflow: ellipsis;">
Marketplace <br/> Pre-Order
</div>
</div>
</a>
</div>
<div class="text-center col-xs-12 col-sm-3 col-md-3 mb16 mt16" style="float: left;">
<a href="https://apps.odoo.com/apps/modules/13.0/marketplace_favourite_seller" target="_blank">
<div>
<img class="img img-responsive" alt="not found" width="100" height="100" style="border-radius: 16px;" src="https://apps.odoocdn.com/apps/assets/13.0/marketplace_favourite_seller/icon.png">
<div class="mt8" style="font-size: 16px;color: #333333;text-align: center;line-height: 21px;white-space: nowrap;overflow: hidden;text-overflow: ellipsis;">
Favourite <br/> Seller
</div>
</div>
</a>
</div>
<div class="text-center col-xs-12 col-sm-3 col-md-3 mb16 mt16" style="float: left;">
<a href="https://apps.odoo.com/apps/modules/13.0/marketplace_shipping_per_product" target="_blank">
<div>
<img class="img img-responsive" alt="not found" width="100" height="100" style="border-radius: 16px;" src="https://apps.odoocdn.com/apps/assets/13.0/marketplace_shipping_per_product/icon.png">
<div class="mt8" style="font-size: 16px;color: #333333;text-align: center;line-height: 21px;white-space: nowrap;overflow: hidden;text-overflow: ellipsis;">
Shipping <br/> Per Product
</div>
</div>
</a>
</div>
<div class="text-center col-xs-12 col-sm-3 col-md-3 mb16 mt16" style="float: left;">
<a href="https://apps.odoo.com/apps/modules/13.0/marketplace_hyperlocal_system" target="_blank">
<div>
<img class="img img-responsive" alt="not found" width="100" height="100" style="border-radius: 16px;" src="https://apps.odoocdn.com/apps/assets/13.0/marketplace_hyperlocal_system/icon.png">
<div class="mt8" style="font-size: 16px;color: #333333;text-align: center;line-height: 21px;white-space: nowrap;overflow: hidden;text-overflow: ellipsis;">
Marketplace <br/> Hyperlocal System
</div>
</div>
</a>
</div>
<div class="text-center col-xs-12 col-sm-3 col-md-3 mb16 mt16" style="float: left;">
<a href="https://apps.odoo.com/apps/modules/13.0/marketplace_sms_notification" target="_blank">
<div>
<img class="img img-responsive" alt="not found" width="100" height="100" style="border-radius: 16px;" src="https://apps.odoocdn.com/apps/assets/13.0/marketplace_sms_notification/icon.png">
<div class="mt8" style="font-size: 16px;color: #333333;text-align: center;line-height: 21px;white-space: nowrap;overflow: hidden;text-overflow: ellipsis;">
SMS <br/> Notifications
</div>
</div>
</a>
</div>
</div>
</div>
<div class="carousel-item" style="min-height: 0px;">
<div class="row">
<div class="text-center col-xs-12 col-sm-3 col-md-3 mb16 mt16" style="float: left;">
<a href="https://apps.odoo.com/apps/modules/13.0/marketplace_seller_slider" target="_blank">
<div>
<img class="img img-responsive" alt="not found" width="100" height="100" style="border-radius: 16px;" src="https://apps.odoocdn.com/apps/assets/13.0/marketplace_seller_slider/icon.png">
<div class="mt8" style="font-size: 16px;color: #333333;text-align: center;line-height: 21px;white-space: nowrap;overflow: hidden;text-overflow: ellipsis;">
Seller <br/> Slider
</div>
</div>
</a>
</div>
<div class="text-center col-xs-12 col-sm-3 col-md-3 mb16 mt16" style="float: left;">
<a href="https://apps.odoo.com/apps/modules/13.0/marketplace_daily_deals" target="_blank">
<div>
<img class="img img-responsive" alt="not found" width="100" height="100" style="border-radius: 16px;" src="https://apps.odoocdn.com/apps/assets/13.0/marketplace_daily_deals/icon.png">
<div class="mt8" style="font-size: 16px;color: #333333;text-align: center;line-height: 21px;white-space: nowrap;overflow: hidden;text-overflow: ellipsis;">
Daily Deals <br/> And Flash Sales
</div>
</div>
</a>
</div>
<div class="text-center col-xs-12 col-sm-3 col-md-3 mb16 mt16" style="float: left;">
<a href="https://apps.odoo.com/apps/modules/13.0/marketplace_buyer_seller_communication" target="_blank">
<div>
<img class="img img-responsive" width="100" height="100" style="border-radius: 16px;" src="https://apps.odoocdn.com/apps/assets/13.0/marketplace_buyer_seller_communication/icon.png">
<div class="mt8" style="font-size: 16px;color: #333333;text-align: center;line-height: 21px;white-space: nowrap;overflow: hidden;text-overflow: ellipsis;">
Buyer Seller <br/> Communication
</div>
</div>
</a>
</div>
<div class="text-center col-xs-12 col-sm-3 col-md-3 mb16 mt16" style="float: left;">
<a href="https://apps.odoo.com/apps/modules/13.0/marketplace_advance_commission" target="_blank">
<div>
<img class="img img-responsive" width="100" height="100" style="border-radius: 16px;" src="https://apps.odoocdn.com/apps/assets/13.0/marketplace_advance_commission/icon.png">
<div class="mt8" style="font-size: 16px;color: #333333;text-align: center;line-height: 21px;white-space: nowrap;overflow: hidden;text-overflow: ellipsis;">
Advance <br/> Commission
</div>
</div>
</a>
</div>
<div class="text-center col-xs-12 col-sm-3 col-md-3 mb16 mt16" style="float: left;">
<a href="https://apps.odoo.com/apps/modules/13.0/marketplace_qna_and_faq" target="_blank">
<div>
<img class="img img-responsive" width="100" height="100" style="border-radius: 16px;" src="https://apps.odoocdn.com/apps/assets/13.0/marketplace_qna_and_faq/icon.png">
<div class="mt8" style="font-size: 16px;color: #333333;text-align: center;line-height: 21px;white-space: nowrap;overflow: hidden;text-overflow: ellipsis;">
Marketplace <br/> Q&A & FAQ
</div>
</div>
</a>
</div>
<div class="text-center col-xs-12 col-sm-3 col-md-3 mb16 mt16" style="float: left;">
<a href="https://apps.odoo.com/apps/modules/13.0/marketplace_voucher" target="_blank">
<div>
<img class="img img-responsive" alt="not found" width="100" height="100" style="border-radius: 16px;" src="https://apps.odoocdn.com/apps/assets/13.0/marketplace_voucher/icon.png">
<div class="mt8" style="font-size: 16px;color: #333333;text-align: center;line-height: 21px;white-space: nowrap;overflow: hidden;text-overflow: ellipsis;">
MarketPlace <br/> Voucher
</div>
</div>
</a>
</div>
<div class="text-center col-xs-12 col-sm-3 col-md-3 mb16 mt16" style="float: left;">
<a href="https://apps.odoo.com/apps/modules/13.0/marketplace_ajax_login" target="_blank">
<div>
<img class="img img-responsive" alt="not found" width="100" height="100" style="border-radius: 16px;" src="https://apps.odoocdn.com/apps/assets/13.0/marketplace_ajax_login/icon.png">
<div class="mt8" style="font-size: 16px;color: #333333;text-align: center;line-height: 21px;white-space: nowrap;overflow: hidden;text-overflow: ellipsis;">
Marketplace <br/> Ajax Login
</div>
</div>
</a>
</div>
<div class="text-center col-xs-12 col-sm-3 col-md-3 mb16 mt16" style="float: left;">
<a href="https://apps.odoo.com/apps/modules/13.0/marketplace_seller_collection_page" target="_blank">
<div>
<img class="img img-responsive" alt="not found" width="100" height="100" style="border-radius: 16px;" src="https://apps.odoocdn.com/apps/assets/13.0/marketplace_seller_collection_page/icon.png">
<div class="mt8" style="font-size: 16px;color: #333333;text-align: center;line-height: 21px;white-space: nowrap;overflow: hidden;text-overflow: ellipsis;">
Seller <br/> collections
</div>
</div>
</a>
</div>
</div>
</div>
<div class="carousel-item" style="min-height: 0px;">
<div class="row">
<div class="text-center col-xs-12 col-sm-3 col-md-3 mb16 mt16" style="float: left;">
<a href="https://apps.odoo.com/apps/modules/13.0/marketplace_seller_auction" target="_blank">
<div>
<img class="img img-responsive" alt="not found" width="100" height="100" style="border-radius: 16px;" src="https://apps.odoocdn.com/apps/assets/13.0/marketplace_seller_auction/icon.png">
<div class="mt8" style="font-size: 16px;color: #333333;text-align: center;line-height: 21px;white-space: nowrap;overflow: hidden;text-overflow: ellipsis;">
Seller <br/> Auction
</div>
</div>
</a>
</div>
<div class="text-center col-xs-12 col-sm-3 col-md-3 mb16 mt16" style="float: left;">
<a href="https://apps.odoo.com/apps/modules/13.0/marketplace_seller_blogs" target="_blank">
<div>
<img class="img img-responsive" width="100" height="100" style="border-radius: 16px;" src="https://apps.odoocdn.com/apps/assets/13.0/marketplace_seller_blogs/icon.png">
<div class="mt8" style="font-size: 16px;color: #333333;text-align: center;line-height: 21px;white-space: nowrap;overflow: hidden;text-overflow: ellipsis;">
Seller <br/> Blogs
</div>
</div>
</a>
</div>
<div class="text-center col-xs-12 col-sm-3 col-md-3 mb16 mt16" style="float: left;">
<a href="https://apps.odoo.com/apps/modules/13.0/marketplace_quote_system" target="_blank">
<div>
<img class="img img-responsive" width="100" height="100" style="border-radius: 16px;" src="https://apps.odoocdn.com/apps/assets/13.0/marketplace_quote_system/icon.png">
<div class="mt8" style="font-size: 16px;color: #333333;text-align: center;line-height: 21px;white-space: nowrap;overflow: hidden;text-overflow: ellipsis;">
Quote <br/> System
</div>
</div>
</a>
</div>
<div class="text-center col-xs-12 col-sm-3 col-md-3 mb16 mt16" style="float: left;">
<a href="https://apps.odoo.com/apps/modules/13.0/marketplace_product_size_chart" target="_blank">
<div>
<img class="img img-responsive" width="100" height="100" style="border-radius: 16px;" src="https://apps.odoocdn.com/apps/assets/13.0/marketplace_product_size_chart/icon.png">
<div class="mt8" style="font-size: 16px;color: #333333;text-align: center;line-height: 21px;white-space: nowrap;overflow: hidden;text-overflow: ellipsis;">
Seller Product <br/> Size Chart
</div>
</div>
</a>
</div>
<div class="text-center col-xs-12 col-sm-3 col-md-3 mb16 mt16" style="float: left;">
<a href="https://apps.odoo.com/apps/modules/13.0/marketplace_seller_locator" target="_blank">
<div>
<img class="img img-responsive" alt="not found" width="100" height="100" style="border-radius: 16px;" src="https://apps.odoocdn.com/apps/assets/13.0/marketplace_seller_locator/icon.png">
<div class="mt8" style="font-size: 16px;color: #333333;text-align: center;line-height: 21px;white-space: nowrap;overflow: hidden;text-overflow: ellipsis;">
Seller <br/> Locator
</div>
</div>
</a>
</div>
<div class="text-center col-xs-12 col-sm-3 col-md-3 mb16 mt16" style="float: left;">
<a href="https://apps.odoo.com/apps/modules/13.0/marketplace_seller_vacation" target="_blank">
<div>
<img class="img img-responsive" alt="not found" width="100" height="100" style="border-radius: 16px;" src="https://apps.odoocdn.com/apps/assets/13.0/marketplace_seller_vacation/icon.png">
<div class="mt8" style="font-size: 16px;color: #333333;text-align: center;line-height: 21px;white-space: nowrap;overflow: hidden;text-overflow: ellipsis;">
Seller <br/> Vacation
</div>
</div>
</a>
</div>
<div class="text-center col-xs-12 col-sm-3 col-md-3 mb16 mt16" style="float: left;">
<a href="https://apps.odoo.com/apps/modules/13.0/marketplace_product_pack" target="_blank">
<div>
<img class="img img-responsive" alt="not found" width="100" height="100" style="border-radius: 16px;" src="https://apps.odoocdn.com/apps/assets/13.0/marketplace_product_pack/icon.png">
<div class="mt8" style="font-size: 16px;color: #333333;text-align: center;line-height: 21px;white-space: nowrap;overflow: hidden;text-overflow: ellipsis;">
Marketplace <br/> Product Pack
</div>
</div>
</a>
</div>
<div class="text-center col-xs-12 col-sm-3 col-md-3 mb16 mt16" style="float: left;">
<a href="https://apps.odoo.com/apps/modules/13.0/marketplace_seller_badges" target="_blank">
<div>
<img class="img img-responsive" alt="not found" width="100" height="100" style="border-radius: 16px;" src="https://apps.odoocdn.com/apps/assets/13.0/marketplace_seller_badges/icon.png">
<div class="mt8" style="font-size: 16px;color: #333333;text-align: center;line-height: 21px;white-space: nowrap;overflow: hidden;text-overflow: ellipsis;">
Seller <br/> Badges
</div>
</div>
</a>
</div>
</div>
</div>
</div>
<a class="carousel-control-prev" href="#mp_addons_carousel" data-slide="prev" style="left:-50px;width: 35px;color: #000;">
<span class="carousel-control-prev-icon" style="font-size:35px;opacity: 0.2;color:#000000;margin-top: -50px;">
<i class="fa fa-chevron-left" aria-hidden="false"></i>
</span>
</a>
<a class="carousel-control-next" href="#mp_addons_carousel" data-slide="next" style="right:-40px;width: 35px;color: #000;">
<span class="carousel-control-next-icon" style="font-size:35px;opacity: 0.2;color:#000000;margin-top: -50px;">
<i class="fa fa-chevron-right" aria-hidden="false"></i>
</span>
</a>
</div>
</div>
</div>
</div>
</div>
</section>
<section class="mb-5" id="webkul_support">
<div class="row">
<div class="col-12">
<h3 class="text-center">Help and Support</h3>
<p class="mb-2 text-center">Get Immediate support for any of your query</p>
</div>
<div class="col-12">
<p class="text-center px-5">You will get 90 days free support for any doubt, queries, and bug fixing (excluding data recovery) or any type of issue related to this module.</p>
</div>
<div class="mx-auto col-lg-9 mb-4 oe_screenshot">
<div class="row align-items-center justify-content-center mx-0">
<div class="col-xl-2 col-lg-2 col-md-2 sol-sm-2 text-center">
<img src="//apps.odoocdn.com/apps/assets/13.0/odoo_marketplace/mail.png?77fdd07" alt="mail" class="img img-fluid">
</div>
<div class="col-xl-7 col-lg-10 col-md-10 col-sm-10 pl-0 pr-2">
<p class="my-2" style="font-weight:bold;color:#555555;">Write a mail to us:</p>
<a style="font-size:18px;" href="mailto:support@webkul.com">support@webkul.com</a>
<p class="my-2" style="font-weight: normal;font-size: 14px;color:#777777;">Any queries or want any extra features? Just drop a mail to our support.</p>
</div>
<div class="col-xl-3 col-lg-4 text-center">
<a href="mailto:support@webkul.com" style="padding:10px 22px;background-color:#2335D7;font-size:14px;color:#ffffff;"><i class="fa fa-pencil-square-o" style="color:white; margin-right:4px"></i>Write To US</a>
</div>
</div>
</div>
<div class="mx-auto col-lg-9 oe_screenshot">
<div class="row align-items-center justify-content-center mx-0">
<div class="col-xl-2 col-lg-2 col-md-2 text-center">
<img src="//apps.odoocdn.com/apps/assets/13.0/odoo_marketplace/support-icon.png?77fdd07" alt="support-icon" class="img img-fluid">
</div>
<div class="col-xl-10 col-lg-10 col-md-10 pl-0">
<p class="my-2" style="font-weight:bold;color:#555555;">Get in touch with our Expert:</p>
<a class="text-break" style="font-size:18px;" href="mailto:https://webkul.uvdesk.com/en/customer/create-ticket/">https://webkul.uvdesk.com/en/customer/create-ticket/</a>
<p class="my-2" style="font-weight:normal;font-size:14px;color:#777777;">Any technical queries, want extra features, or anything else, our team is ready to answer all your questions, just raise a support ticket.</p>
</div>
</div>
</div>
</div>
</section>

Binary file not shown.

After

Width:  |  Height:  |  Size: 79 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 352 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.1 KiB

View File

@ -0,0 +1,27 @@
@CHARSET "UTF-8";
#jquery-loader{
border:2px black solid;
padding-top:35px;
background-color: white;
text-align: center;
}
#jquery-loader-background{background-color: silver}
#jquery-loader.blue-with-image{
border:2px #008587 solid;
padding-top:35px;
background-color: white;
text-align: center;
background-image: url(images/ajax-loader.gif);
background-position: center center;
background-repeat: no-repeat;
}
#jquery-loader.blue-with-image-2{
border:none;
padding-top:35px;
background-color: transparent;
text-align: center;
background-image: url(images/ajax-loader.gif);
background-position: center center;
background-repeat: no-repeat;
}

View File

@ -0,0 +1,94 @@
/*
* jQuery Loader Plugin
* @version: 2.0.0
* @requires jQuery v1.2.2 or later
* @author : ${author}
* @see : ${demoURL}
* Small loader
* usage : $.loader();
* $.loader(options) -> options =
* {
*
* }
*
* To close loader : $.loader("close");
*
*/
var jQueryLoaderOptions = null;
(function($) {
$.loader = function(option){
switch(option)
{
case 'close':
if(jQueryLoaderOptions){
if($("#"+jQueryLoaderOptions.id)){
$("#"+jQueryLoaderOptions.id +", #"+jQueryLoaderOptions.background.id).remove();
}
}
return;
case 'setContent':
if(jQueryLoaderOptions){
if($("#"+jQueryLoaderOptions.id)){
if(arguments.length == 2)
{
$("#"+jQueryLoaderOptions.id).html(arguments[1]);
}else{
if(console){
console.error("setContent method must have 2 arguments $.loader('setContent', 'new content');");
}else{
alert("setContent method must have 2 arguments $.loader('setContent', 'new content');");
}
}
}
}
return;
default:
var options = $.extend({
content:"Loading ...",
className:'loader',
id:'jquery-loader',
height:60,
width:200,
zIndex:30000,
background:{
opacity:0.4,
id:'jquery-loader-background'
}
}, option);
}
jQueryLoaderOptions = options;
var maskHeight = $(document).height();
var maskWidth = $(window).width();
var bgDiv = $('<div id="'+options.background.id+'"/>');
bgDiv.css({
zIndex:options.zIndex,
position:'absolute',
top:'0px',
left:'0px',
width:maskWidth,
height:maskHeight,
opacity:options.background.opacity
});
bgDiv.appendTo("body");
if(jQuery.bgiframe){
bgDiv.bgiframe();
}
var div = $('<div id="'+options.id+'" class="'+options.className+'"></div>');
div.css({
zIndex:options.zIndex+1,
width:options.width,
height:options.height
});
div.appendTo('body');
div.center();
div.html(options.content);
//$(options.content).appendTo(div);
};
$.fn.center = function () {
this.css("position","absolute");
this.css("top", ( $(window).height() - this.outerHeight() ) / 2+$(window).scrollTop() + "px");
this.css("left", ( $(window).width() - this.outerWidth() ) / 2+$(window).scrollLeft() + "px");
return this;
};
})(jQuery);

View File

@ -0,0 +1,153 @@
.affiliate_loader {
position: fixed;
left: 0px;
top: 0px;
width: 100%;
height: 100%;
z-index: 9999;
background: url(/affiliate_management/static/src/img/affiliateLoder.gif) center no-repeat rgba(255, 255, 255, 0.5);
text-shadow: 0 1px 1px white;
}
.form_container {
border: solid grey 6px;
}
.inp_style {
border: 2px solid #3aadaa;
border-radius: 22px;
}
.cpy_cde {
border-radius: 22px;
}
.cpy_url {
border-radius: 22px;
}
.img_banner {
position: absolute;
top: 0px;
height: 100%;
width: 100%;
}
.banner_text {
text-align: center;
font-style: normal;
font-family: arial;
color: white;
font-size: 50px;
}
/*
.affiliate_banner{
background-image: url("/affiliate_management/static/src/img/cover-banner.jpg"),
}
.banner_detail {
position: absolute;
top: 100px;
width: 100%;
height: 100%;
}*/
.aff_box{
text-align: center;
/*padding:20px;*/
}
.img_container {
border: solid;
position: absolute;
top: 50%;
width: 60%;
height: 46%;
left: 25%;
}
span.step {
background: #cccccc;
border-radius: 0.8em;
-moz-border-radius: 0.8em;
-webkit-border-radius: 0.8em;
color: #ffffff;
display: inline-block;
font-weight: bold;
line-height: 1.6em;
margin-right: 5px;
text-align: center;
width: 1.6em;
}
span.step1 {
background: green;
border-radius: 0.8em;
-moz-border-radius: 0.8em;
-webkit-border-radius: 0.8em;
color: #ffffff;
display: inline-block;
font-weight: bold;
line-height: 1.6em;
margin-right: 5px;
text-align: center;
width: 1.6em;
}
a {
text-decoration: none !important;
}
.button_image_generate_url{
width: 508px;
height: 284px;
display: inline;
position: relative;
top: 3%;
left: 10%;
}
.alert_msg_banner{
background: rgba(0, 0, 0, 0.5);
width: 44%;
height: 16%;
padding: 1%;
position: relative;
left: 30%;
display: none;
top:6%;
}
.alert_msg_banner_1{
background: rgba(0, 0, 0, 0.5);
width: 70%;
height: 20%;
padding: 1%;
position: relative;
left: 15%;
top: 6%;
}
.alert_msg_banner_signup{
background: rgba(0, 0, 0, 0.5);
width: 70%;
height: 18%;
padding: 1%;
position: relative;
left: 15%;
/*display: none;*/
top:6%;
}
.card_large_product{
position:relative !important;
bottom:80px !important;
}
#wrapwrap
{
border : none !important;
}
@media screen and (max-width: 574px) {
.cpy_cde {
margin-top: 36px;
}
.cpy_url {
margin-left: 50px;
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 19 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 142 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

View File

@ -0,0 +1,67 @@
<svg id="affiliate-tools" xmlns="http://www.w3.org/2000/svg" width="111" height="194" viewBox="0 0 111 194">
<metadata><?xpacket begin="" id="W5M0MpCehiHzreSzNTczkc9d"?>
<x:xmpmeta xmlns:x="adobe:ns:meta/" x:xmptk="Adobe XMP Core 5.6-c138 79.159824, 2016/09/14-01:09:01 ">
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
<rdf:Description rdf:about=""/>
</rdf:RDF>
</x:xmpmeta>
<?xpacket end="w"?></metadata>
<defs>
<style>
.cls-1, .cls-3 {
fill: #4a667d;
}
.cls-1, .cls-2, .cls-8 {
fill-rule: evenodd;
}
.cls-2, .cls-5 {
fill: #b1dcff;
}
.cls-4, .cls-8 {
fill: #fff;
}
.cls-6 {
fill: #91b9d9;
}
.cls-7 {
fill: #cbe8ff;
}
</style>
</defs>
<path id="Wrench_Icon" data-name="Wrench Icon" class="cls-1" d="M44.406,65.1l6.7,114.5c0,6.355-12.147,13.508-18.5,13.508s-18.5-7.153-18.5-13.508L20.79,65.567C9.02,63.307,0,53.429,0,41V25C0,13.527,7.7,4.326,18.125,1.123V29.531a9.5,9.5,0,0,0,9.5,9.5h7a9.5,9.5,0,0,0,9.5-9.5V0.848C55.043,3.733,63,14.175,63,26V41A24.87,24.87,0,0,1,44.406,65.1Z"/>
<path class="cls-2" d="M48,7s9.857,3.245,11,16V45S57.245,56.761,42,62c0,0-2.161,2.508-2,5l7,113s-13.311,20.343-29,0L25,67s-0.263-4.113-3-5c0,0-15.584-3.615-18-18V22S5.749,12.337,14,7V31s1.753,10.455,12,12H36s11.757-1.583,12-13V7Z"/>
<circle class="cls-3" cx="32.5" cy="171.5" r="8.5"/>
<circle class="cls-4" cx="32.5" cy="171.5" r="4.5"/>
<rect class="cls-3" x="76" y="4" width="35" height="107" rx="2" ry="2"/>
<rect class="cls-5" x="80" y="8" width="27" height="99"/>
<rect id="Rectangle_14_copy" data-name="Rectangle 14 copy" class="cls-6" x="102" y="8" width="5" height="99"/>
<rect id="Rectangle_14_copy_2" data-name="Rectangle 14 copy 2" class="cls-7" x="80" y="8" width="5" height="99"/>
<path id="Rectangle_6_copy" data-name="Rectangle 6 copy" class="cls-1" d="M87,107h14v63h6l-8.381,23H89.381L81,170h6V107Z"/>
<path class="cls-8" d="M91,111h6v59s-0.063,4.17,4,4l-5,15H92l-5-15s4.53-1.391,4-4V111Z"/>
</svg>

After

Width:  |  Height:  |  Size: 4.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 154 B

View File

@ -0,0 +1,47 @@
<svg id="Check_Icon" data-name="Check Icon" xmlns="http://www.w3.org/2000/svg" width="33" height="33" viewBox="0 0 33 33">
<metadata><?xpacket begin="" id="W5M0MpCehiHzreSzNTczkc9d"?>
<x:xmpmeta xmlns:x="adobe:ns:meta/" x:xmptk="Adobe XMP Core 5.6-c138 79.159824, 2016/09/14-01:09:01 ">
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
<rdf:Description rdf:about=""/>
</rdf:RDF>
</x:xmpmeta>
<?xpacket end="w"?></metadata>
<defs>
<style>
.cls-1, .cls-2 {
fill: #fff;
}
.cls-1 {
opacity: 0.25;
}
.cls-2 {
fill-rule: evenodd;
}
</style>
</defs>
<circle class="cls-1" cx="16.5" cy="16.5" r="16.5"/>
<path id="Rectangle_1_copy" data-name="Rectangle 1 copy" class="cls-2" d="M24.425,13.232l-9.192,9.192a1.5,1.5,0,0,1-2.121,0L9.575,18.889A1.5,1.5,0,0,1,11.7,16.768l2.475,2.475L22.3,11.111A1.5,1.5,0,1,1,24.425,13.232Z"/>
</svg>

After

Width:  |  Height:  |  Size: 2.9 KiB

View File

@ -0,0 +1,80 @@
<svg id="stats-management" xmlns="http://www.w3.org/2000/svg" width="217" height="192" viewBox="0 0 217 192">
<metadata><?xpacket begin="" id="W5M0MpCehiHzreSzNTczkc9d"?>
<x:xmpmeta xmlns:x="adobe:ns:meta/" x:xmptk="Adobe XMP Core 5.6-c138 79.159824, 2016/09/14-01:09:01 ">
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
<rdf:Description rdf:about=""/>
</rdf:RDF>
</x:xmpmeta>
<?xpacket end="w"?></metadata>
<defs>
<style>
.cls-1 {
fill: #4a667d;
}
.cls-1, .cls-2, .cls-3, .cls-4, .cls-5 {
fill-rule: evenodd;
}
.cls-2, .cls-5 {
fill: #b1dcff;
}
.cls-3 {
fill: #91b9d9;
}
.cls-4 {
fill: #cbe8ff;
}
.cls-5 {
stroke: #4a667d;
stroke-linejoin: round;
stroke-width: 4px;
}
</style>
</defs>
<g>
<path class="cls-1" d="M17,114.354V103a2,2,0,0,1,2-2H38.149Zm48,10.217V190a2,2,0,0,1-2,2H19a2,2,0,0,1-2-2V152.6Z"/>
<path id="Rectangle_12_copy" data-name="Rectangle 12 copy" class="cls-2" d="M21,111.828V105H31.814Zm40,15.079V188H21V150.267Z"/>
<path id="Rectangle_12_copy_2" data-name="Rectangle 12 copy 2" class="cls-3" d="M61,126.907V188H55V130.411Z"/>
<path id="Rectangle_12_copy_3" data-name="Rectangle 12 copy 3" class="cls-4" d="M21,111.828V105h6v3.04Zm6,34.935V188H21V150.267Z"/>
</g>
<g id="Group_2_copy" data-name="Group 2 copy">
<path class="cls-1" d="M75,77.732V64a2,2,0,0,1,2-2H99.916ZM123,90.7V190a2,2,0,0,1-2,2H77a2,2,0,0,1-2-2V118.731Z"/>
<path id="Rectangle_12_copy-2" data-name="Rectangle 12 copy" class="cls-2" d="M79,75.207V66H93.581Zm40,17.829V188H79V116.4Z"/>
<path id="Rectangle_12_copy_2-2" data-name="Rectangle 12 copy 2" class="cls-3" d="M119,93.036V188h-6V96.54Z"/>
<path id="Rectangle_12_copy_3-2" data-name="Rectangle 12 copy 3" class="cls-4" d="M79,75.207V66h6v5.418Zm6,37.685V188H79V116.4Z"/>
</g>
<g id="Group_2_copy_2" data-name="Group 2 copy 2">
<path class="cls-1" d="M164.724,66.334L180.8,90.52l0.2-.466V190a2,2,0,0,1-2,2H135a2,2,0,0,1-2-2V84.86ZM133,41.11V22a1.992,1.992,0,0,1,1.085-1.769l9.454,14.225Z"/>
<path id="Rectangle_12_copy-3" data-name="Rectangle 12 copy" class="cls-2" d="M164.724,66.334L177,84.806V188H137V82.524ZM137,24.617l6.539,9.839L137,38.585V24.617Z"/>
<path id="Rectangle_12_copy_2-3" data-name="Rectangle 12 copy 2" class="cls-3" d="M177,84.806V188h-6V75.778Z"/>
<path id="Rectangle_12_copy_3-3" data-name="Rectangle 12 copy 3" class="cls-4" d="M143,79.02V188h-6V82.524Zm-6-54.4,6,9.028V34.8l-6,3.788V24.617Z"/>
</g>
<g id="Arrow">
<path class="cls-5" d="M215,10L187.848,74.813s-1.945,12.041-9.557.624L166.748,58.122,4.137,153.4l-3.731-5.671L147.579,29.368,132.991,7.487S124.774-.573,137.053,0C153.612-.011,188.839-0.023,208,0,221.43-.511,215,10,215,10Z"/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 4.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 24 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 32 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.1 KiB

View File

@ -0,0 +1,261 @@
odoo.define('affiliate_management.validation',function(require){
"use strict";
var core = require('web.core');
var ajax = require('web.ajax');
var _t = core._t;
// js for choose button in step 2 of generate product url
// term_condition
$(document).ready(function() {
$('.signup-btn').on('click',function(){
var c = $('#tc-signup-checkbox').is(':checked');
console.log(c);
if (c == false)
{
$('#term_condition_error').show();
return false;
}
});
$( ".button_image_generate_url" ).hide();
$('.o_form_radio').on('click',function(){
$('[id^=product-text_]').hide();
console.log(this.getAttribute('id').split("_")[1])
var radio_id = this.getAttribute('id').split("_")[1];
$( ".button_image_generate_url" ).hide();
$('#image_'+radio_id).show();
});
$('.o_form_radio_product').on('click',function(){
$( ".button_image_generate_url" ).hide();
var product_text_id =$("#product-text_"+this.id.split("_")[1]);
$(product_text_id).show();
$( ".product_image" ).show();
});
// copy the text from clipboard
var copyBtn
var input
$('[id^=copy-btn_]').on('click',function(){
console.log("start")
copyBtn = this;
input = $("#copy-me_"+this.id.split("_")[1]);
console.log("input",input)
copyToClipboard();
$('[id^=copy-btn_]').text('Copy to Clipboard')
$(this).text('copied');
console.log("copy button clicked")
});
function copyToClipboardFF(text) {
window.prompt ("Copy to clipboard: Ctrl C, Enter", text);
}
function copyToClipboard() {
var success = true,
range = document.createRange(),
selection;
// For IE.
if (window.clipboardData) {
console.log("clipboard")
window.clipboardData.setData("Text", input.val());
} else {
// Create a temporary element off screen.
var tmpElem = $('<div>');
tmpElem.css({
position: "absolute",
left: "-1000px",
top: "-1000px",
});
// Add the input value to the temp element.
tmpElem.text(input.val());
console.log("tmpElem",tmpElem)
$("body").append(tmpElem);
// Select temp element.
range.selectNodeContents(tmpElem.get(0));
console.log("range",range)
selection = window.getSelection ();
selection.removeAllRanges ();
console.log("remove range")
selection.addRange (range);
// Lets copy.
try {
success = document.execCommand ("copy", false, null);
}
catch (e) {
copyToClipboardFF(input.val());
}
if (success) {
// alert ("The text is on the clipboard, try to paste it!");
// remove temp element.
tmpElem.remove();
}
}
}
// copy link for affiliate link generator
$("#link_copy_button").click(function(){
// Code to change the text of copy button to copied and again change it to copy
$(this).text('Copied');
setTimeout(function() {
$("#link_copy_button").text('Copy');
}, 2000);
$("#copy_link").show();
$("#copy_link").select();
document.execCommand('copy');
$("#copy_link").hide();
});
// copy html code from text area
var clicked = false;
$("#banner_copy_button").click(function(){
$("#banner_html_code").select();
document.execCommand('copy');
$(this).text('Copied');
setTimeout(function() {
$("#banner_copy_button").text('Copy');
$("#banner_html_code").blur();
}, 2000);
if (clicked == false)
{
$('#step3').hide();
$('#step3').after(
"<span class='step1'>&#10003;</span>"
);
clicked = true;
}
});
$("#later_button").click(function(){
$("#aff_req_btn").hide();
});
$('[id^=yes_btn_uid_]').on('click',function(){
var uid = this.id.split("_")[3];
ajax.jsonRpc("/affiliate/request", 'call',{'user_id': uid}).then(function (result){
console.log(result);
if (result)
{
// $("#aff_req_btn").replaceWith( "<p class='alert alert-success'>Your Request has been submitted sucessfully. Soon you will be notify by email.</p>");
$("#aff_req_btn").hide();
$(".alert_msg_banner").show();
}
else{
}
});
});
function isValidEmailAddress(emailAddress) {
// var pattern = /^([a-z\d!#$%&'*+\-\/=?^_`{|}~\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+(\.[a-z\d!#$%&'*+\-\/=?^_`{|}~\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+)*|"((([ \t]*\r\n)?[ \t]+)?([\x01-\x08\x0b\x0c\x0e-\x1f\x7f\x21\x23-\x5b\x5d-\x7e\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]|\\[\x01-\x09\x0b\x0c\x0d-\x7f\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]))*(([ \t]*\r\n)?[ \t]+)?")@(([a-z\d\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]|[a-z\d\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF][a-z\d\-._~\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]*[a-z\d\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])\.)+([a-z\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]|[a-z\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF][a-z\d\-._~\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]*[a-z\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])\.?$/i;
var pattern = /^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,63}$/i;
return pattern.test(emailAddress);
};
$("#join-btn").click(function(){
var email = $('#register_login').val();
if (isValidEmailAddress(email)){
$('.affiliate_loader').show();
ajax.jsonRpc("/affiliate/join", 'call',{'email': email}).then(function (result){
if (result){
console.log(result);
$(".aff_box").replaceWith(
"<div class='alert_msg_banner_signup' style='margin-top:10px;'>\
<center>\
<span style='color:white'>\
<img src='/affiliate_management/static/src/img/Icon_tick.png' />&nbsp;<span>"+result+"</span>\
</span>\
</center>\
</div>\
<br/>\
<div id='aff_req_btn'>\
<center>\
<a href='/shop' class='btn btn-success' style='width:177px;height:37px;' >Continue Shopping</a>\
</center>\
</div>");
}
});
$('.affiliate_loader').hide();
return false;
}else{
console.log("wrong email");
alert("Invalid Email type");
return false;
}
});
$("#cpy_cde").click(function() {
$("#usr_aff_code").select();
$(this).text('copied');
setTimeout(function() {
$("#cpy_cde").text('copy');
}, 2000);
document.execCommand('copy');
return false;
});
$("#cpy_url").click(function() {
$("#usr_aff_url").select();
$(this).text('copied')
setTimeout(function() {
$("#cpy_url").text('copy');
}, 2000);
document.execCommand('copy');
return false;
});
$("#url_anchor").click(function(){
$("#affiliate_url_inp").show();
$("#affiliate_code_inp").hide();
return false;
});
$("#code_anchor").click(function(){
$("#affiliate_url_inp").hide();
$("#affiliate_code_inp").show();
return false;
});
if ($(window).width() < 570) {
$('#cpy_url').removeClass('ms-2');
$('.report_amount').removeClass('mt-5');
$('.report_amount').removeClass('ms-2');
$('.report_amount').addClass('ms-4');
} else {
$('#cpy_url').addClass('ms-2');
$('.report_amount').addClass('mt-5');
$('.report_amount').removeClass('ms-4');
$('.report_amount').addClass('ms-2');
}
});
});

View File

@ -0,0 +1,186 @@
<odoo>
<data>
<template id="about" name="About Us">
<t t-call="website.layout">
<t t-if="user_id.partner_id.is_affiliate">
<div class="section">
<div class="oe_structure">
<div class="container mt16">
<div class="navbar navbar-expand-md navbar-light" style="background-color: #3aadaa">
<div>
<ul class="navbar-nav">
<li class="nav-item">
<a class="nav-link" href="/affiliate/about" style="color:white;">
<i class="fa fa-home fa-2x">
</i>
</a>
</li>
<li class="nav-item">
<a class="nav-link mt-1 ps-2 ms-1 namitm" href="/affiliate/report" style=" color: white;border-left: 3px solid;">
Reports
</a>
</li>
<li class="nav-item">
<a class="nav-link mt-1 ps-2 ms-1" href="/affiliate/payment" style=" color: white;border-left: 3px solid;">
Payments
</a>
</li>
<li class="nav-item">
<a class="nav-link mt-1 ps-2 ms-1" href="/affiliate/tool" style=" color: white;border-left: 3px solid;">
Tools
</a>
</li>
</ul>
</div>
</div>
</div>
</div>
<div class="oe_structure mt-2">
<div class="container">
<div class="row justify-content-center">
<div class="col-md-7">
<div id="affiliate_code_inp">
<form >
<label for="usr_aff_code" class="ms-2">
Your Referral Code
</label>
<br />
<br />
<div class="d-flex">
<div class="w-25 me-2">
<input type="text" class="form-control inp_style ms-2 text-center" id="usr_aff_code" name="code" t-att-value="affiliate_key" readonly="1" />
</div>
<div class="ps-2">
<button type="copy" class="btn btn-success cpy_cde" title="Click to Copy" data-toggle="tooltip" id="cpy_cde" style="top:12px;">
copy
</button>
</div>
</div>
</form>
<br />
<div class="ms-1">
<svg xmlns="http://www.w3.org/2000/svg" width="20" height="24" fill="currentColor" class="bi bi-mouse2" viewBox="0 0 16 16">
<path d="M3 5.188C3 2.341 5.22 0 8 0s5 2.342 5 5.188v5.625C13 13.658 10.78 16 8 16s-5-2.342-5-5.188V5.189zm4.5-4.155C5.541 1.289 4 3.035 4 5.188V5.5h3.5V1.033zm1 0V5.5H12v-.313c0-2.152-1.541-3.898-3.5-4.154zM12 6.5H4v4.313C4 13.145 5.81 15 8 15s4-1.855 4-4.188V6.5z" />
</svg>
<b>
<a href="" id="url_anchor">
Click here to get Referral Link
</a>
</b>
</div>
</div>
<div id="affiliate_url_inp" style="display:none;">
<form>
<label for="aff_link text-secondary" class="ms-2">
Get Referral Link
</label>
<br />
<br />
<div class="d-flex">
<div class="w-100 me-2">
<input type="text" class="form-control inp_style ms-2" id="usr_aff_url" name="aff_link" style="width: 100%;" t-att-value="url" readonly="1" />
</div>
<div class="ps-2">
<button type="copy" class="btn btn-success cpy_url" id="cpy_url" title="Click to Copy" data-toggle="tooltip" style="top:12px;">
copy
</button>
</div>
</div>
</form>
<br />
<div class="ms-1">
<svg xmlns="http://www.w3.org/2000/svg" width="20" height="24" fill="currentColor" class="bi bi-mouse2" viewBox="0 0 16 16">
<path d="M3 5.188C3 2.341 5.22 0 8 0s5 2.342 5 5.188v5.625C13 13.658 10.78 16 8 16s-5-2.342-5-5.188V5.189zm4.5-4.155C5.541 1.289 4 3.035 4 5.188V5.5h3.5V1.033zm1 0V5.5H12v-.313c0-2.152-1.541-3.898-3.5-4.154zM12 6.5H4v4.313C4 13.145 5.81 15 8 15s4-1.855 4-4.188V6.5z" />
</svg>
<b>
<a href="" id="code_anchor">
Click here to get Referral Code
</a>
</b>
</div>
</div>
</div>
<div class="col-md-5 d-flex justify-content-end">
<div class="me-1">
<strong>
Pending Amount:
</strong>
<span>
<t t-esc="currency_id.symbol" />
<t t-esc="pending_amt" />
</span>
<br />
<div style="font-size: 12px;opacity: 76%;color: #23527c;">
(* Report whose state is confirmed but not invoiced)
</div>
<strong>
Approved Amount:
</strong>
<span>
<t t-esc="currency_id.symbol" />
<t t-esc="approved_amt" />
</span>
<div style="font-size: 12px;opacity: 76%;color: #23527c;">
(* Report whose state is invoiced but not paid)
</div>
</div>
</div>
</div>
<div class="divider mt-4" style="border-bottom:2px solid black;opacity:30%">
</div>
</div>
<div class="container-fluid">
<div class="row justify-content-center">
<div class="col-md-offset-2 col-md-8">
<div style="padding:20px">
<center>
<h3>
How Does it Work?
</h3>
</center>
<t t-esc="how_it_works_title" />
</div>
<div class=" col-md-8">
<t t-esc="how_it_works_text" />
</div>
</div>
</div>
<div class="row justify-content-center" style="text-align: left;">
<div class="col-md-offset-3 col-md-4" style="padding:35px">
<h3>
Stats Management
</h3>
With our Affiliate Program, one will able to instantly see all the information related to his earnings from Pay Per Sale and Pay Per Click, which would be highly valuable in making decisions. Reports generated by our Stats Management saves time and gives a more clear picture of your Affiliate Program profit and loss and what to focus on in order to maximize your profit.
<div style="text-align:left">
<a href="/affiliate/report/" class="btn btn-default" style="background-color: #00A09D;color:white;">
View Your Stats
</a>
</div>
</div>
<img src="/affiliate_management/static/src/img/icon-stats-management.svg" class="col-lg-3" style="height: 180px;" />
</div>
<div class="row justify-content-center" id="affilaite_tool" style="text-align: left;">
<img src="/affiliate_management/static/src/img/icon-affiliate-tools.svg" class="col-md-offset-3 col-lg-3" style="height: 180px;" />
<div class="col-md-4" style="padding:35px">
<h3>
Affiliate Tool
</h3>
Through our specially designed Affiliate Tools namely “Affiliate Link Generator” and “Product Link Generator” user can easily manage his affiliate program.
Through our tools, its easy to build the affiliate product links and banners and earn money.
<div style="text-align:left">
<a href="/affiliate/tool/" class="btn btn-default" style="background-color: #00A09D;color:white;">
View Tools
</a>
</div>
</div>
</div>
</div>
</div>
</div>
</t>
</t>
</template>
</data>
</odoo>
<!-- -->

View File

@ -0,0 +1,38 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<data>
<record id="invoice_supplier_inherit_form" model="ir.ui.view">
<field name="name">account.move.inherit.supplier.form</field>
<field name="model">account.move</field>
<field name="inherit_id" ref="account.view_move_form" />
<field name="arch" type="xml">
<xpath expr="//notebook/page[2]" position="after">
<page string="Reports">
<group>
<field name="aff_visit_id" nolabel="1"/>
</group>
</page>
</xpath>
</field>
</record>
<record id="action_move_out_affiliate_invoice_type" model="ir.actions.act_window">
<field name="name">Affiliate Invoices</field>
<field name="res_model">account.move</field>
<field name="view_mode">tree,kanban,form</field>
<field name="view_id" ref="account.view_out_invoice_tree"/>
<field name="search_view_id" ref="account.view_account_invoice_filter"/>
<field name="domain">[('move_type', '=', 'in_invoice'), ('aff_visit_id', '!=', False)]</field>
<field name="context">{'default_move_type': 'in_invoice'}</field>
<field name="help" type="html">
<p class="o_view_nocontent_smiling_face">
Create an affiliate invoice
</p><p>
Create invoices, register payments and keep track of the discussions with your affiliates.
</p>
</field>
</record>
</data>
</odoo>

View File

@ -0,0 +1,77 @@
<odoo>
<data>
<record model="ir.ui.view" id="advance_commision_view_form">
<field name="name">advance.commission.form</field>
<field name="model">advance.commision</field>
<field name="arch" type="xml">
<form >
<sheet>
<div class="oe_button_box" name="button_box">
<button name="toggle_active_button" type="object" class="oe_stat_button" icon="fa-archive">
<field string="active_adv_comsn" name="active_adv_comsn" invisible="1"/>
<span attrs="{'invisible':[('active_adv_comsn','=',True)]}" class="o_field_widget">Inactive</span>
<span attrs="{'invisible':[('active_adv_comsn','=',False)]}" style="color:green" class="o_field_widget" >Active</span>
</button>
</div>
<group>
<h1>
<field name="name" default_focus="1" nolabel="1" placeholder="Name" />
</h1>
<group>
</group>
</group>
<separator string="Pricelist Items"/>
<!-- <field name="pricelist_item_ids"/> -->
<field name="pricelist_item_ids" nolabel="1">
<tree string="Pricelist Items">
<field name="name" />
<field name="compute_price" />
<field name="fixed_price" attrs="{'invisible':[('compute_price','=','percentage')]}" />
<field name="percent_price" attrs="{'invisible':[('compute_price','=','fixed')]}" />
<field name="sequence" />
</tree>
</field>
</sheet>
</form>
</field>
</record>
<record model="ir.ui.view" id="advance_commision_view_tree">
<field name="name">advance.commission.tree</field>
<field name="model">advance.commision</field>
<field name="arch" type="xml">
<tree>
<field name="name"/>
<field name="active_adv_comsn"/>
</tree>
</field>
</record>
<record model="ir.actions.act_window" id="advance_commision_action">
<field name="name">Affiliate Advance Commission</field>
<field name="res_model">advance.commision</field>
<field name="view_mode">tree,form</field>
</record>
<menuitem name="Advance Computation"
id="advance_commision_sub_menu"
parent="configuration_submenu_root"
action='advance_commision_action'
groups="base.group_system"
sequence = "2"
/>
</data>
</odoo>

View File

@ -0,0 +1,34 @@
<odoo>
<data>
<record model="ir.ui.view" id="affiliate_banner_view_form">
<field name="name">affiliate banner form</field>
<field name="model">affiliate.banner</field>
<field name="arch" type="xml">
<form create="false">
<sheet>
<group>
<field name="banner_title"/>
<!-- <field name="banner_image" widget="image" class="oe_avatar"/> -->
<field name="banner_image" widget="image" class="" help="Banner for sellers landing page. Banner size must be 1298 x 400 px for perfect view." options='{"size": [325, 100]}'/>
</group>
</sheet>
</form>
</field>
</record>
<!--
<record model="ir.actions.act_window" id="affiliate_image_action">
<field name="name">Affilaite image</field>
<field name="res_model">affiliate.image</field>
<field name="view_mode">tree,form</field>
</record>
-->
</data>
</odoo>

View File

@ -0,0 +1,270 @@
<!-- <?xml version="1.0" encoding="utf-8"?> -->
<odoo>
<record id="view_affiliate_config_form" model="ir.ui.view">
<field name="name">res.config.view</field>
<field name="model">res.config.settings</field>
<field name="inherit_id" ref="base.res_config_settings_view_form"/>
<field name="arch" type="xml">
<xpath expr="//div[hasclass('settings')]" position="inside">
<div class="app_settings_block" data-string="Affiliate Management" string="Affiliate Management" data-key="affiliate_management" groups="website.group_website_designer">
<h2> Affiliate Management Configuration</h2>
<div class="row mt16 o_settings_container" id="affiliate_management" title="Configure your Affiliate Management">
<div class="col-xs-12 col-md-6 o_setting_box" id="affiliate_program">
<div class="o_setting_right_pane">
<strong><label string="Affiliate Program" for="affiliate_program_id"/></strong>
<div class="text-muted">
Configure your Affiliate Program data
</div>
<div class="mt8" invisible="1">
<field name="affiliate_program_id"/>
</div>
<div class="content-group">
<button type="object" name="open_program" string="Configure" class="btn-link"/>
</div>
</div>
</div>
<div class="col-12 col-lg-offset-6 col-lg-6 o_setting_box" id="ppc_setting">
<div class="o_setting_left_pane">
<field name="enable_ppc"/>
</div>
<div class="o_setting_right_pane">
<label for="enable_ppc"/>
<div class="text-muted">
Manage your PPC
</div>
<div class="content-group" attrs="{'invisible': [('enable_ppc', '=', False)]}">
<div class="row mt16">
<div class="col-lg-4">
<label class="o_light_label" string="PPC Maturity" for="ppc_maturity"/>
</div>
<div class="col-lg-3">
<field name="ppc_maturity"/>
</div>
<div class="col-lg-4">
<field name="ppc_maturity_period"/>
</div>
</div>
<div class="row mt16">
<label class="col-lg-4 o_light_label" string="Unique PPC For Product" for="unique_ppc_traffic"/>
<field class="col-lg-4" name="unique_ppc_traffic"/>
</div>
</div>
</div>
</div>
<div class="col-12 col-lg-offset-6 col-lg-6 o_setting_box" id="cookie_setting">
<div class="o_setting_right_pane">
<label string="Cookie Expiration" for="cookie_expire"/>
<div class="text-muted">
Manage your Cookie expiry
</div>
<div class="content-group">
<div class="row mt16">
<div class="col-lg-2">
<label class="o_light_label" string="Expiry" for="cookie_expire"/>
</div>
<div class="col-lg-3">
<field name="cookie_expire"/>
</div>
<div class="col-lg-5">
<field name="cookie_expire_period"/>
</div>
</div>
</div>
</div>
</div>
<div class="col-12 col-lg-offset-6 col-lg-6 o_setting_box" id="auto_approve_setting">
<div class="o_setting_left_pane">
<field name="auto_approve_request"/>
</div>
<div class="o_setting_right_pane">
<label for="auto_approve_request"/>
<!-- <div class="text-muted">
Manage your PPC
</div> -->
</div>
</div>
<div class="col-12 col-lg-offset-6 col-lg-6 o_setting_box" id="aff_product_setting">
<div class="o_setting_right_pane">
<label string="Affiliate product (optional)" for="aff_product_id"/>
<!-- <div class="text-muted">
Manage your PPC
</div> -->
<div class="mt16">
<label class="col-lg-2 o_light_label" string="Product" for="aff_product_id"/>
<field name="aff_product_id"/>
</div>
</div>
</div>
</div>
<h2> Payment Configuration</h2>
<div class="row mt16 o_settings_container" id="affiliate_program_payment" title="Configure your Affiliate Program Payment">
<div class="col-xs-12 col-md-6 o_setting_box" id="payment_day_setting">
<div class="o_setting_right_pane">
<label string="Payment Day" for="payment_day"/>
<!-- <div class="text-muted">
Manage your PPC
</div> -->
<div class="content-group">
<div class="row mt16">
<div class="col-lg-2">
<label class="o_light_label" string="Day" for="payment_day"/>
</div>
<div class="col-lg-4">
<field name="payment_day"/>
</div>
<div class="col-lg-5">
<span class="col-lg-5">Day of Every Month</span>
</div>
</div>
</div>
</div>
</div>
<div class="col-xs-12 col-md-6 o_setting_box" id="payout_balance_setting">
<div class="o_setting_right_pane">
<label string="Minimum Payout Balance" for="minimum_amt"/>
<!-- <div class="text-muted">
Manage your PPC
</div> -->
<div class="content-group">
<div class="row mt16">
<div class="col-lg-2">
<label class="o_light_label" string="Balance" for="minimum_amt"/>
</div>
<div class="col-lg-4">
<field name="minimum_amt"/>
</div>
<div class="col-lg-5">
<field name="currency_id" readonly="1"/>
</div>
</div>
</div>
</div>
</div>
</div>
<h2> Website Configuration</h2>
<div class="row mt16 o_settings_container" id="affiliate_program_website" title="Configure your Affiliate Program Website">
<div class="col-12 col-lg-offset-6 col-lg-6 o_setting_box" id="signup_setting">
<div class="o_setting_left_pane">
<field name="enable_signup"/>
</div>
<div class="o_setting_right_pane">
<label for="enable_signup"/>
<!-- <div class="text-muted">
Manage your PPC
</div> -->
</div>
</div>
<div class="col-12 col-lg-offset-6 col-lg-6 o_setting_box" id="login_setting">
<div class="o_setting_left_pane">
<field name="enable_login"/>
</div>
<div class="o_setting_right_pane">
<label for="enable_login"/>
<!-- <div class="text-muted">
Manage your PPC
</div> -->
</div>
</div>
<div class="col-xs-12 col-md-6 o_setting_box" id="aff_banner_setting">
<div class="o_setting_right_pane">
<label string="Affiliate Banner" for="affiliate_banner_id"/>
<div class="text-muted">
Configure your Affiliate Banner
</div>
<div class="mt8" invisible="1">
<field name="affiliate_banner_id"/>
</div>
<div class="content-group">
<button type="object" name="open_banner" string="Configure" class="btn-link"/>
</div>
</div>
</div>
<div class="col-12 col-lg-offset-6 col-lg-6 o_setting_box" id="forget_pwd_setting">
<div class="o_setting_left_pane">
<field name="enable_forget_pwd"/>
</div>
<div class="o_setting_right_pane">
<label for="enable_forget_pwd"/>
<!-- <div class="text-muted">
Manage your PPC
</div> -->
</div>
</div>
</div>
<h2> Email Configuration</h2>
<div class="row mt16 o_settings_container" id="affiliate_program_email" title="Configure your Affiliate Program Email">
<div class="col-xs-12 col-md-6 o_setting_box" id="aff_request_mail_setting">
<div class="o_setting_right_pane">
<label string="Approved Request Mail" for="welcome_mail_template"/>
<div class="text-muted">
Configure your Approved Request Mail
</div>
<div class="mt8">
<field name="welcome_mail_template"/>
</div>
</div>
</div>
<div class="col-xs-12 col-md-6 o_setting_box" id="aff_invitation_mail_setting">
<div class="o_setting_right_pane">
<label string="Invitation Request Mail" for="Invitation_mail_template"/>
<div class="text-muted">
Configure your Invitation Request Mail
</div>
<div class="mt8">
<field name="Invitation_mail_template"/>
</div>
</div>
</div>
<div class="col-xs-12 col-md-6 o_setting_box" id="aff_reject_mail_setting">
<div class="o_setting_right_pane">
<label string="Reject Request Mail" for="reject_mail_template"/>
<div class="text-muted">
Configure your Reject Request Mail
</div>
<div class="mt8">
<field name="reject_mail_template"/>
</div>
</div>
</div>
</div>
</div>
<!-- </div> -->
</xpath>
</field>
</record>
<record id="affiliate_config_form_action" model="ir.actions.act_window">
<field name="name">Settings</field>
<field name="type">ir.actions.act_window</field>
<field name="res_model">res.config.settings</field>
<field name="view_mode">form</field>
<field name="view_id" ref="affiliate_management.view_affiliate_config_form"/>
<field name="target">inline</field>
<field name="context">{'module' : 'affiliate_management'}</field>
</record>
<menuitem id="setting_submenu_root" name="Settings" parent="configuration_submenu_root"
sequence="0" action="affiliate_config_form_action"
groups="base.group_system"/>
</odoo>

Some files were not shown because too many files have changed in this diff Show More