[REF] *: modules downgrade
|
|
@ -125,3 +125,9 @@ dmypy.json
|
|||
|
||||
# github action
|
||||
.github/workflows/*yaml
|
||||
|
||||
# config
|
||||
.config/
|
||||
|
||||
# vscode
|
||||
.vscode/
|
||||
|
|
@ -1,77 +0,0 @@
|
|||
# -*- 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
|
||||
|
|
@ -1,44 +0,0 @@
|
|||
<?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>
|
||||
|
||||
|
||||
|
||||
|
|
@ -31,7 +31,5 @@
|
|||
'depends': ['base','sale_management'],
|
||||
'data': ['views/product_template_view.xml'],
|
||||
'images': ['static/description/banner.png'],
|
||||
'installable': True,
|
||||
'application': True,
|
||||
'auto_install': False,
|
||||
}
|
||||
|
|
@ -0,0 +1,35 @@
|
|||
# -*- 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 fields, models
|
||||
|
||||
class ProductTemplateInvoiceAmount(models.Model):
|
||||
_inherit = "product.template"
|
||||
|
||||
sale_move_line_ids = fields.One2many('account.move.line','product_template_id', readonly=True, domain=[('move_id.move_type','=','out_invoice')])
|
||||
|
||||
purchase_move_line_ids = fields.One2many('account.move.line','product_template_id', readonly=True, domain=[('move_id.move_type','=','in_invoice')])
|
||||
|
||||
class AccountMoveIn(models.Model):
|
||||
_inherit = "account.move.line"
|
||||
|
||||
product_template_id = fields.Many2one('product.template', related='product_id.product_tmpl_id', store=True)
|
||||
|
||||
|
Before Width: | Height: | Size: 44 KiB After Width: | Height: | Size: 44 KiB |
|
Before Width: | Height: | Size: 32 KiB After Width: | Height: | Size: 32 KiB |
|
Before Width: | Height: | Size: 2.3 KiB After Width: | Height: | Size: 2.3 KiB |
|
|
@ -0,0 +1,45 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<odoo>
|
||||
|
||||
<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='sales']/group[@name='sale']" position="inside">
|
||||
<group name="donor_invoices" string="Donor`s Invoices" colspan="2">
|
||||
<field name='sale_move_line_ids' string="Donor`s Invoices">
|
||||
<tree decoration-success="parent_state in ('posted')">
|
||||
<field name="company_id" invisible="1" />
|
||||
<field name="price_unit" invisible="1" />
|
||||
<field name="currency_id" invisible="1" />
|
||||
<field name="quantity" invisible="1" />
|
||||
<field name="partner_id" string="Donor" />
|
||||
<field name="move_name" />
|
||||
<field name="price_subtotal" sum="Total Amount" widget="monetary" />
|
||||
<field name="parent_state" />
|
||||
</tree>
|
||||
</field>
|
||||
</group>
|
||||
</xpath>
|
||||
<xpath expr="//page[@name='purchase']" position="inside">
|
||||
<group string="Vendor bills" colspan="2">
|
||||
<field name='purchase_move_line_ids'>
|
||||
<tree decoration-success="parent_state in ('posted')">
|
||||
<field name="currency_id" invisible="1" />
|
||||
<field name="company_id" invisible="1" />
|
||||
<field name="quantity" invisible="1" />
|
||||
<field name="price_unit" invisible="1" />
|
||||
<field name="partner_id" string="Vendor" />
|
||||
<field name="move_name" />
|
||||
<field name="price_subtotal" sum="Total Amount" widget="monetary" />
|
||||
<field name="parent_state" />
|
||||
</tree>
|
||||
</field>
|
||||
</group>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
</odoo>
|
||||
|
||||
|
||||
|
|
@ -1,4 +0,0 @@
|
|||
*.pyc
|
||||
.idea/
|
||||
controller/__pycache__
|
||||
models/__pycache__
|
||||
|
|
@ -1,398 +0,0 @@
|
|||
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 Licensor’s 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.
|
||||
|
|
@ -14,72 +14,62 @@
|
|||
# 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",
|
||||
"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',
|
||||
'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',
|
||||
'views/assets.xml'
|
||||
],
|
||||
"demo": ['data/demo_data_view.xml'],
|
||||
"images": ['static/description/banner.gif'],
|
||||
"application": True,
|
||||
"installable": True,
|
||||
"price": 99,
|
||||
"currency": "USD",
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,311 +0,0 @@
|
|||
[1mdiff --git a/static/description/index.html b/static/description/index.html[m
|
||||
[1mindex adf3754..4b261ec 100644[m
|
||||
[1m--- a/static/description/index.html[m
|
||||
[1m+++ b/static/description/index.html[m
|
||||
[36m@@ -20,7 +20,7 @@[m
|
||||
[m
|
||||
<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%"> [m
|
||||
<div class="container" style="color:#333333;font-size:18px;font-weight:bold;">[m
|
||||
[31m- <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>[m
|
||||
[32m+[m[32m <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>[m
|
||||
</div>[m
|
||||
</br>[m
|
||||
<div class="container " style="color:#555555;font-size:16px;">[m
|
||||
[36m@@ -58,7 +58,7 @@[m
|
||||
[m
|
||||
<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%"> [m
|
||||
<div class="container" style="color:#333333;font-size:18px;font-weight:bold;">[m
|
||||
[31m- <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>[m
|
||||
[32m+[m[32m <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>[m
|
||||
</div>[m
|
||||
</br>[m
|
||||
<div class="container " style="color:#555555;font-size:16px;">[m
|
||||
[36m@@ -425,6 +425,288 @@[m
|
||||
</section>[m
|
||||
[m
|
||||
<br/><br/>[m
|
||||
[32m+[m[32m<section class="oe_container mb32">[m
|
||||
[32m+[m[32m <div class="row mt16 mb16 pb32">[m
|
||||
[32m+[m[32m <div class="container text-center d-none d-xl-block" style="color:#333333;font-size:26px;font-weight:bold;">[m
|
||||
[32m+[m[32m <p>Our Other Apps</p>[m
|
||||
[32m+[m[32m </div>[m
|
||||
[32m+[m[32m <div class=" d-none d-xl-block container text-center" style="color:#555555;font-size:18px;">[m
|
||||
[32m+[m[32m Make your eCommerce Experience more better with our other Apps.[m
|
||||
[32m+[m[32m </div>[m
|
||||
[32m+[m[32m <div class="container ml0 mr0">[m
|
||||
[32m+[m[32m <div class="offset-md-2 col-md-8">[m
|
||||
[32m+[m[32m <div class="row ml0 mr0">[m
|
||||
[32m+[m[32m <div id="mp_addons_carousel" class="container carousel slide mt64 mb32 d-none d-xl-block" data-ride="carousel">[m
|
||||
[32m+[m[32m <div class="carousel-inner">[m
|
||||
[32m+[m[32m <div class="carousel-item active" style="min-height: 0px;">[m
|
||||
[32m+[m[32m <div class="row">[m
|
||||
[32m+[m[32m <div class="text-center col-xs-12 col-sm-3 col-md-3 mb16 mt16" style="float: left;">[m
|
||||
[32m+[m[32m <a href="https://apps.odoo.com/apps/modules/13.0/marketplace_membership" target="_blank">[m
|
||||
[32m+[m[32m <div>[m
|
||||
[32m+[m[32m <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">[m
|
||||
[32m+[m[32m <div class="mt8" style="font-size: 16px;color: #333333;text-align: center;line-height: 21px;white-space: nowrap;overflow: hidden;text-overflow: ellipsis;">[m
|
||||
[32m+[m[32m Marketplace <br/> Membership[m
|
||||
[32m+[m[32m </div>[m
|
||||
[32m+[m[32m </div>[m
|
||||
[32m+[m[32m </a>[m
|
||||
[32m+[m[32m </div>[m
|
||||
[32m+[m[32m <div class="text-center col-xs-12 col-sm-3 col-md-3 mb16 mt16" style="float: left;">[m
|
||||
[32m+[m[32m <a href="https://apps.odoo.com/apps/modules/13.0/marketplace_advance_barcode_labels" target="_blank">[m
|
||||
[32m+[m[32m <div>[m
|
||||
[32m+[m[32m <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">[m
|
||||
[32m+[m[32m <div class="mt8" style="font-size: 16px;color: #333333;text-align: center;line-height: 21px;white-space: nowrap;overflow: hidden;text-overflow: ellipsis;">[m
|
||||
[32m+[m[32m Advance Barcode <br/> Labels For Product[m
|
||||
[32m+[m[32m </div>[m
|
||||
[32m+[m[32m </div>[m
|
||||
[32m+[m[32m </a>[m
|
||||
[32m+[m[32m </div>[m
|
||||
[32m+[m[32m <div class="text-center col-xs-12 col-sm-3 col-md-3 mb16 mt16" style="float: left;">[m
|
||||
[32m+[m[32m <a href="https://apps.odoo.com/apps/modules/13.0/marketplace_booking_system" target="_blank">[m
|
||||
[32m+[m[32m <div>[m
|
||||
[32m+[m[32m <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">[m
|
||||
[32m+[m[32m <div class="mt8" style="font-size: 16px;color: #333333;text-align: center;line-height: 21px;white-space: nowrap;overflow: hidden;text-overflow: ellipsis;">[m
|
||||
[32m+[m[32m Booking & Reservation <br/> Management[m
|
||||
[32m+[m[32m </div>[m
|
||||
[32m+[m[32m </div>[m
|
||||
[32m+[m[32m </a>[m
|
||||
[32m+[m[32m </div>[m
|
||||
[32m+[m[32m <div class="text-center col-xs-12 col-sm-3 col-md-3 mb16 mt16" style="float: left;">[m
|
||||
[32m+[m[32m <a href="https://apps.odoo.com/apps/modules/13.0/marketplace_preorder" target="_blank">[m
|
||||
[32m+[m[32m <div>[m
|
||||
[32m+[m[32m <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">[m
|
||||
[32m+[m[32m <div class="mt8" style="font-size: 16px;color: #333333;text-align: center;line-height: 21px;white-space: nowrap;overflow: hidden;text-overflow: ellipsis;">[m
|
||||
[32m+[m[32m Marketplace <br/> Pre-Order[m
|
||||
[32m+[m[32m </div>[m
|
||||
[32m+[m[32m </div>[m
|
||||
[32m+[m[32m </a>[m
|
||||
[32m+[m[32m </div>[m
|
||||
[32m+[m[32m <div class="text-center col-xs-12 col-sm-3 col-md-3 mb16 mt16" style="float: left;">[m
|
||||
[32m+[m[32m <a href="https://apps.odoo.com/apps/modules/13.0/marketplace_favourite_seller" target="_blank">[m
|
||||
[32m+[m[32m <div>[m
|
||||
[32m+[m[32m <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">[m
|
||||
[32m+[m[32m <div class="mt8" style="font-size: 16px;color: #333333;text-align: center;line-height: 21px;white-space: nowrap;overflow: hidden;text-overflow: ellipsis;">[m
|
||||
[32m+[m[32m Favourite <br/> Seller[m
|
||||
[32m+[m[32m </div>[m
|
||||
[32m+[m[32m </div>[m
|
||||
[32m+[m[32m </a>[m
|
||||
[32m+[m[32m </div>[m
|
||||
[32m+[m[32m <div class="text-center col-xs-12 col-sm-3 col-md-3 mb16 mt16" style="float: left;">[m
|
||||
[32m+[m[32m <a href="https://apps.odoo.com/apps/modules/13.0/marketplace_shipping_per_product" target="_blank">[m
|
||||
[32m+[m[32m <div>[m
|
||||
[32m+[m[32m <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">[m
|
||||
[32m+[m[32m <div class="mt8" style="font-size: 16px;color: #333333;text-align: center;line-height: 21px;white-space: nowrap;overflow: hidden;text-overflow: ellipsis;">[m
|
||||
[32m+[m[32m Shipping <br/> Per Product[m
|
||||
[32m+[m[32m </div>[m
|
||||
[32m+[m[32m </div>[m
|
||||
[32m+[m[32m </a>[m
|
||||
[32m+[m[32m </div>[m
|
||||
[32m+[m[32m <div class="text-center col-xs-12 col-sm-3 col-md-3 mb16 mt16" style="float: left;">[m
|
||||
[32m+[m[32m <a href="https://apps.odoo.com/apps/modules/13.0/marketplace_hyperlocal_system" target="_blank">[m
|
||||
[32m+[m[32m <div>[m
|
||||
[32m+[m[32m <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">[m
|
||||
[32m+[m[32m <div class="mt8" style="font-size: 16px;color: #333333;text-align: center;line-height: 21px;white-space: nowrap;overflow: hidden;text-overflow: ellipsis;">[m
|
||||
[32m+[m[32m Marketplace <br/> Hyperlocal System[m
|
||||
[32m+[m[32m </div>[m
|
||||
[32m+[m[32m </div>[m
|
||||
[32m+[m[32m </a>[m
|
||||
[32m+[m[32m </div>[m
|
||||
[32m+[m[32m <div class="text-center col-xs-12 col-sm-3 col-md-3 mb16 mt16" style="float: left;">[m
|
||||
[32m+[m[32m <a href="https://apps.odoo.com/apps/modules/13.0/marketplace_sms_notification" target="_blank">[m
|
||||
[32m+[m[32m <div>[m
|
||||
[32m+[m[32m <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">[m
|
||||
[32m+[m[32m <div class="mt8" style="font-size: 16px;color: #333333;text-align: center;line-height: 21px;white-space: nowrap;overflow: hidden;text-overflow: ellipsis;">[m
|
||||
[32m+[m[32m SMS <br/> Notifications[m
|
||||
[32m+[m[32m </div>[m
|
||||
[32m+[m[32m </div>[m
|
||||
[32m+[m[32m </a>[m
|
||||
[32m+[m[32m </div>[m
|
||||
[32m+[m[32m </div>[m
|
||||
[32m+[m[32m </div>[m
|
||||
[32m+[m[32m <div class="carousel-item" style="min-height: 0px;">[m
|
||||
[32m+[m[32m <div class="row">[m
|
||||
[32m+[m[32m <div class="text-center col-xs-12 col-sm-3 col-md-3 mb16 mt16" style="float: left;">[m
|
||||
[32m+[m[32m <a href="https://apps.odoo.com/apps/modules/13.0/marketplace_seller_slider" target="_blank">[m
|
||||
[32m+[m[32m <div>[m
|
||||
[32m+[m[32m <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">[m
|
||||
[32m+[m[32m <div class="mt8" style="font-size: 16px;color: #333333;text-align: center;line-height: 21px;white-space: nowrap;overflow: hidden;text-overflow: ellipsis;">[m
|
||||
[32m+[m[32m Seller <br/> Slider[m
|
||||
[32m+[m[32m </div>[m
|
||||
[32m+[m[32m </div>[m
|
||||
[32m+[m[32m </a>[m
|
||||
[32m+[m[32m </div>[m
|
||||
[32m+[m[32m <div class="text-center col-xs-12 col-sm-3 col-md-3 mb16 mt16" style="float: left;">[m
|
||||
[32m+[m[32m <a href="https://apps.odoo.com/apps/modules/13.0/marketplace_daily_deals" target="_blank">[m
|
||||
[32m+[m[32m <div>[m
|
||||
[32m+[m[32m <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">[m
|
||||
[32m+[m[32m <div class="mt8" style="font-size: 16px;color: #333333;text-align: center;line-height: 21px;white-space: nowrap;overflow: hidden;text-overflow: ellipsis;">[m
|
||||
[32m+[m[32m Daily Deals <br/> And Flash Sales[m
|
||||
[32m+[m[32m </div>[m
|
||||
[32m+[m[32m </div>[m
|
||||
[32m+[m[32m </a>[m
|
||||
[32m+[m[32m </div>[m
|
||||
[32m+[m[32m <div class="text-center col-xs-12 col-sm-3 col-md-3 mb16 mt16" style="float: left;">[m
|
||||
[32m+[m[32m <a href="https://apps.odoo.com/apps/modules/13.0/marketplace_buyer_seller_communication" target="_blank">[m
|
||||
[32m+[m[32m <div>[m
|
||||
[32m+[m[32m <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">[m
|
||||
[32m+[m[32m <div class="mt8" style="font-size: 16px;color: #333333;text-align: center;line-height: 21px;white-space: nowrap;overflow: hidden;text-overflow: ellipsis;">[m
|
||||
[32m+[m[32m Buyer Seller <br/> Communication[m
|
||||
[32m+[m[32m </div>[m
|
||||
[32m+[m[32m </div>[m
|
||||
[32m+[m[32m </a>[m
|
||||
[32m+[m[32m </div>[m
|
||||
[32m+[m[32m <div class="text-center col-xs-12 col-sm-3 col-md-3 mb16 mt16" style="float: left;">[m
|
||||
[32m+[m[32m <a href="https://apps.odoo.com/apps/modules/13.0/marketplace_advance_commission" target="_blank">[m
|
||||
[32m+[m[32m <div>[m
|
||||
[32m+[m[32m <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">[m
|
||||
[32m+[m[32m <div class="mt8" style="font-size: 16px;color: #333333;text-align: center;line-height: 21px;white-space: nowrap;overflow: hidden;text-overflow: ellipsis;">[m
|
||||
[32m+[m[32m Advance <br/> Commission[m
|
||||
[32m+[m[32m </div>[m
|
||||
[32m+[m[32m </div>[m
|
||||
[32m+[m[32m </a>[m
|
||||
[32m+[m[32m </div>[m
|
||||
[32m+[m[32m <div class="text-center col-xs-12 col-sm-3 col-md-3 mb16 mt16" style="float: left;">[m
|
||||
[32m+[m[32m <a href="https://apps.odoo.com/apps/modules/13.0/marketplace_qna_and_faq" target="_blank">[m
|
||||
[32m+[m[32m <div>[m
|
||||
[32m+[m[32m <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">[m
|
||||
[32m+[m[32m <div class="mt8" style="font-size: 16px;color: #333333;text-align: center;line-height: 21px;white-space: nowrap;overflow: hidden;text-overflow: ellipsis;">[m
|
||||
[32m+[m[32m Marketplace <br/> Q&A & FAQ[m
|
||||
[32m+[m[32m </div>[m
|
||||
[32m+[m[32m </div>[m
|
||||
[32m+[m[32m </a>[m
|
||||
[32m+[m[32m </div>[m
|
||||
[32m+[m[32m <div class="text-center col-xs-12 col-sm-3 col-md-3 mb16 mt16" style="float: left;">[m
|
||||
[32m+[m[32m <a href="https://apps.odoo.com/apps/modules/13.0/marketplace_voucher" target="_blank">[m
|
||||
[32m+[m[32m <div>[m
|
||||
[32m+[m[32m <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">[m
|
||||
[32m+[m[32m <div class="mt8" style="font-size: 16px;color: #333333;text-align: center;line-height: 21px;white-space: nowrap;overflow: hidden;text-overflow: ellipsis;">[m
|
||||
[32m+[m[32m MarketPlace <br/> Voucher[m
|
||||
[32m+[m[32m </div>[m
|
||||
[32m+[m[32m </div>[m
|
||||
[32m+[m[32m </a>[m
|
||||
[32m+[m[32m </div>[m
|
||||
[32m+[m[32m <div class="text-center col-xs-12 col-sm-3 col-md-3 mb16 mt16" style="float: left;">[m
|
||||
[32m+[m[32m <a href="https://apps.odoo.com/apps/modules/13.0/marketplace_ajax_login" target="_blank">[m
|
||||
[32m+[m[32m <div>[m
|
||||
[32m+[m[32m <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">[m
|
||||
[32m+[m[32m <div class="mt8" style="font-size: 16px;color: #333333;text-align: center;line-height: 21px;white-space: nowrap;overflow: hidden;text-overflow: ellipsis;">[m
|
||||
[32m+[m[32m Marketplace <br/> Ajax Login[m
|
||||
[32m+[m[32m </div>[m
|
||||
[32m+[m[32m </div>[m
|
||||
[32m+[m[32m </a>[m
|
||||
[32m+[m[32m </div>[m
|
||||
[32m+[m[32m <div class="text-center col-xs-12 col-sm-3 col-md-3 mb16 mt16" style="float: left;">[m
|
||||
[32m+[m[32m <a href="https://apps.odoo.com/apps/modules/13.0/marketplace_seller_collection_page" target="_blank">[m
|
||||
[32m+[m[32m <div>[m
|
||||
[32m+[m[32m <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">[m
|
||||
[32m+[m[32m <div class="mt8" style="font-size: 16px;color: #333333;text-align: center;line-height: 21px;white-space: nowrap;overflow: hidden;text-overflow: ellipsis;">[m
|
||||
[32m+[m[32m Seller <br/> collections[m
|
||||
[32m+[m[32m </div>[m
|
||||
[32m+[m[32m </div>[m
|
||||
[32m+[m[32m </a>[m
|
||||
[32m+[m[32m </div>[m
|
||||
[32m+[m[32m </div>[m
|
||||
[32m+[m[32m </div>[m
|
||||
[32m+[m[32m <div class="carousel-item" style="min-height: 0px;">[m
|
||||
[32m+[m[32m <div class="row">[m
|
||||
[32m+[m[32m <div class="text-center col-xs-12 col-sm-3 col-md-3 mb16 mt16" style="float: left;">[m
|
||||
[32m+[m[32m <a href="https://apps.odoo.com/apps/modules/13.0/marketplace_seller_auction" target="_blank">[m
|
||||
[32m+[m[32m <div>[m
|
||||
[32m+[m[32m <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">[m
|
||||
[32m+[m[32m <div class="mt8" style="font-size: 16px;color: #333333;text-align: center;line-height: 21px;white-space: nowrap;overflow: hidden;text-overflow: ellipsis;">[m
|
||||
[32m+[m[32m Seller <br/> Auction[m
|
||||
[32m+[m[32m </div>[m
|
||||
[32m+[m[32m </div>[m
|
||||
[32m+[m[32m </a>[m
|
||||
[32m+[m[32m </div>[m
|
||||
[32m+[m[32m <div class="text-center col-xs-12 col-sm-3 col-md-3 mb16 mt16" style="float: left;">[m
|
||||
[32m+[m[32m <a href="https://apps.odoo.com/apps/modules/13.0/marketplace_seller_blogs" target="_blank">[m
|
||||
[32m+[m[32m <div>[m
|
||||
[32m+[m[32m <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">[m
|
||||
[32m+[m[32m <div class="mt8" style="font-size: 16px;color: #333333;text-align: center;line-height: 21px;white-space: nowrap;overflow: hidden;text-overflow: ellipsis;">[m
|
||||
[32m+[m[32m Seller <br/> Blogs[m
|
||||
[32m+[m[32m </div>[m
|
||||
[32m+[m[32m </div>[m
|
||||
[32m+[m[32m </a>[m
|
||||
[32m+[m[32m </div>[m
|
||||
[32m+[m[32m <div class="text-center col-xs-12 col-sm-3 col-md-3 mb16 mt16" style="float: left;">[m
|
||||
[32m+[m[32m <a href="https://apps.odoo.com/apps/modules/13.0/marketplace_quote_system" target="_blank">[m
|
||||
[32m+[m[32m <div>[m
|
||||
[32m+[m[32m <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">[m
|
||||
[32m+[m[32m <div class="mt8" style="font-size: 16px;color: #333333;text-align: center;line-height: 21px;white-space: nowrap;overflow: hidden;text-overflow: ellipsis;">[m
|
||||
[32m+[m[32m Quote <br/> System[m
|
||||
[32m+[m[32m </div>[m
|
||||
[32m+[m[32m </div>[m
|
||||
[32m+[m[32m </a>[m
|
||||
[32m+[m[32m </div>[m
|
||||
[32m+[m[32m <div class="text-center col-xs-12 col-sm-3 col-md-3 mb16 mt16" style="float: left;">[m
|
||||
[32m+[m[32m <a href="https://apps.odoo.com/apps/modules/13.0/marketplace_product_size_chart" target="_blank">[m
|
||||
[32m+[m[32m <div>[m
|
||||
[32m+[m[32m <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">[m
|
||||
[32m+[m[32m <div class="mt8" style="font-size: 16px;color: #333333;text-align: center;line-height: 21px;white-space: nowrap;overflow: hidden;text-overflow: ellipsis;">[m
|
||||
[32m+[m[32m Seller Product <br/> Size Chart[m
|
||||
[32m+[m[32m </div>[m
|
||||
[32m+[m[32m </div>[m
|
||||
[32m+[m[32m </a>[m
|
||||
[32m+[m[32m </div>[m
|
||||
[32m+[m[32m <div class="text-center col-xs-12 col-sm-3 col-md-3 mb16 mt16" style="float: left;">[m
|
||||
[32m+[m[32m <a href="https://apps.odoo.com/apps/modules/13.0/marketplace_seller_locator" target="_blank">[m
|
||||
[32m+[m[32m <div>[m
|
||||
[32m+[m[32m <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">[m
|
||||
[32m+[m[32m <div class="mt8" style="font-size: 16px;color: #333333;text-align: center;line-height: 21px;white-space: nowrap;overflow: hidden;text-overflow: ellipsis;">[m
|
||||
[32m+[m[32m Seller <br/> Locator[m
|
||||
[32m+[m[32m </div>[m
|
||||
[32m+[m[32m </div>[m
|
||||
[32m+[m[32m </a>[m
|
||||
[32m+[m[32m </div>[m
|
||||
[32m+[m[32m <div class="text-center col-xs-12 col-sm-3 col-md-3 mb16 mt16" style="float: left;">[m
|
||||
[32m+[m[32m <a href="https://apps.odoo.com/apps/modules/13.0/marketplace_seller_vacation" target="_blank">[m
|
||||
[32m+[m[32m <div>[m
|
||||
[32m+[m[32m <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">[m
|
||||
[32m+[m[32m <div class="mt8" style="font-size: 16px;color: #333333;text-align: center;line-height: 21px;white-space: nowrap;overflow: hidden;text-overflow: ellipsis;">[m
|
||||
[32m+[m[32m Seller <br/> Vacation[m
|
||||
[32m+[m[32m </div>[m
|
||||
[32m+[m[32m </div>[m
|
||||
[32m+[m[32m </a>[m
|
||||
[32m+[m[32m </div>[m
|
||||
[32m+[m[32m <div class="text-center col-xs-12 col-sm-3 col-md-3 mb16 mt16" style="float: left;">[m
|
||||
[32m+[m[32m <a href="https://apps.odoo.com/apps/modules/13.0/marketplace_product_pack" target="_blank">[m
|
||||
[32m+[m[32m <div>[m
|
||||
[32m+[m[32m <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">[m
|
||||
[32m+[m[32m <div class="mt8" style="font-size: 16px;color: #333333;text-align: center;line-height: 21px;white-space: nowrap;overflow: hidden;text-overflow: ellipsis;">[m
|
||||
[32m+[m[32m Marketplace <br/> Product Pack[m
|
||||
[32m+[m[32m </div>[m
|
||||
[32m+[m[32m </div>[m
|
||||
[32m+[m[32m </a>[m
|
||||
[32m+[m[32m </div>[m
|
||||
[32m+[m[32m <div class="text-center col-xs-12 col-sm-3 col-md-3 mb16 mt16" style="float: left;">[m
|
||||
[32m+[m[32m <a href="https://apps.odoo.com/apps/modules/13.0/marketplace_seller_badges" target="_blank">[m
|
||||
[32m+[m[32m <div>[m
|
||||
[32m+[m[32m <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">[m
|
||||
[32m+[m[32m <div class="mt8" style="font-size: 16px;color: #333333;text-align: center;line-height: 21px;white-space: nowrap;overflow: hidden;text-overflow: ellipsis;">[m
|
||||
[32m+[m[32m Seller <br/> Badges[m
|
||||
[32m+[m[32m </div>[m
|
||||
[32m+[m[32m </div>[m
|
||||
[32m+[m[32m </a>[m
|
||||
[32m+[m[32m </div>[m
|
||||
[32m+[m[32m </div>[m
|
||||
[32m+[m[32m </div>[m
|
||||
[32m+[m[32m </div>[m
|
||||
[32m+[m[32m <a class="carousel-control-prev" href="#mp_addons_carousel" data-slide="prev" style="left:-50px;width: 35px;color: #000;">[m
|
||||
[32m+[m[32m <span class="carousel-control-prev-icon" style="font-size:35px;opacity: 0.2;color:#000000;margin-top: -50px;">[m
|
||||
[32m+[m[32m <i class="fa fa-chevron-left" aria-hidden="false"></i>[m
|
||||
[32m+[m[32m </span>[m
|
||||
[32m+[m[32m </a>[m
|
||||
[32m+[m[32m <a class="carousel-control-next" href="#mp_addons_carousel" data-slide="next" style="right:-40px;width: 35px;color: #000;">[m
|
||||
[32m+[m[32m <span class="carousel-control-next-icon" style="font-size:35px;opacity: 0.2;color:#000000;margin-top: -50px;">[m
|
||||
[32m+[m[32m <i class="fa fa-chevron-right" aria-hidden="false"></i>[m
|
||||
[32m+[m[32m </span>[m
|
||||
[32m+[m[32m </a>[m
|
||||
[32m+[m[32m </div>[m
|
||||
[32m+[m[32m </div>[m
|
||||
[32m+[m[32m </div>[m
|
||||
[32m+[m[32m </div>[m
|
||||
[32m+[m[32m </div>[m
|
||||
[32m+[m[32m</section>[m
|
||||
[m
|
||||
<section class="mb-5" id="webkul_support">[m
|
||||
<div class="row">[m
|
||||
|
|
@ -1,11 +0,0 @@
|
|||
=>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]
|
||||
|
|
@ -13,6 +13,16 @@
|
|||
# You should have received a copy of the License along with this program.
|
||||
# If not, see <https://store.webkul.com/license.html/>;
|
||||
#################################################################################
|
||||
from odoo.addons.website.controllers.main import Website, QueryURL
|
||||
from odoo.osv import expression
|
||||
from odoo.addons.website_sale.controllers.main import WebsiteSale
|
||||
from odoo.addons.affiliate_management.controllers.home import Home
|
||||
from odoo.addons.web.controllers.main import ensure_db, _get_login_redirect_url
|
||||
import requests
|
||||
from odoo.addons.website_sale.controllers.main import TableCompute
|
||||
import werkzeug.wrappers
|
||||
import werkzeug.utils
|
||||
from odoo.fields import Date
|
||||
from ast import literal_eval
|
||||
from odoo.addons.auth_signup.models.res_users import SignupError
|
||||
from odoo import http
|
||||
|
|
@ -21,26 +31,14 @@ 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)
|
||||
# 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 ''
|
||||
|
|
@ -52,33 +50,33 @@ class website_affiliate(Home):
|
|||
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
|
||||
'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')})
|
||||
values.update({'error': request.session.get('error')})
|
||||
if request.session.get('success'):
|
||||
values.update({'success':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):
|
||||
@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)])
|
||||
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+"."
|
||||
msg = "Thank you for registering with us, we have sent you the Signup mail at " + email + "."
|
||||
|
||||
else:
|
||||
if aff.state == 'aproove':
|
||||
|
|
@ -92,65 +90,64 @@ class website_affiliate(Home):
|
|||
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
|
||||
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',
|
||||
'name': email,
|
||||
'state': 'draft',
|
||||
}
|
||||
if user:
|
||||
vals.update({
|
||||
"partner_id":user.partner_id.id,
|
||||
"user_id" : user.id,
|
||||
'state' : 'register'
|
||||
"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)
|
||||
@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')),
|
||||
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)
|
||||
@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)])
|
||||
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),
|
||||
})
|
||||
'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')})
|
||||
values.update({'error': request.session.get('error')})
|
||||
else:
|
||||
pass
|
||||
request.session.pop('error', None)
|
||||
return http.request.render('affiliate_management.register',values)
|
||||
return http.request.render('affiliate_management.register', values)
|
||||
|
||||
|
||||
@http.route('/affiliate/register', auth='public',type='http', website=True)
|
||||
@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'))])
|
||||
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)
|
||||
|
|
@ -159,16 +156,16 @@ class website_affiliate(Home):
|
|||
raise SignupError('Invalid template user.')
|
||||
data = kw
|
||||
redirect_url = "/"
|
||||
values = { key: data.get(key) for key in ('login', 'name') }
|
||||
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',"")
|
||||
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)
|
||||
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')
|
||||
|
|
@ -181,60 +178,58 @@ class website_affiliate(Home):
|
|||
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',""))
|
||||
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)
|
||||
_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)
|
||||
_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)
|
||||
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.."
|
||||
request.session['error'] = "something went wrong.."
|
||||
return request.redirect('/affiliate/', 303)
|
||||
|
||||
@http.route('/affiliate/register/confirmation', auth='public',type='http', website=True)
|
||||
@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)
|
||||
@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')])
|
||||
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,
|
||||
'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)
|
||||
@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={}
|
||||
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')]
|
||||
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)
|
||||
|
|
@ -254,23 +249,20 @@ class website_affiliate(Home):
|
|||
|
||||
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]),
|
||||
'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)
|
||||
@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={}
|
||||
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')]
|
||||
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)
|
||||
|
|
@ -289,23 +281,21 @@ class website_affiliate(Home):
|
|||
})
|
||||
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()
|
||||
'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)
|
||||
@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={}
|
||||
values = {}
|
||||
partner = request.env.user.partner_id
|
||||
invoices = request.env['account.move']
|
||||
domain = [('partner_id','=',partner.id),('payment_state','=','paid'),('ref','=',None)]
|
||||
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)
|
||||
|
|
@ -324,8 +314,7 @@ class website_affiliate(Home):
|
|||
'invoices': invoice_list,
|
||||
'default_url': '/affiliate/payment',
|
||||
})
|
||||
return http.request.render('affiliate_management.payment_tree',values )
|
||||
|
||||
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):
|
||||
|
|
@ -335,49 +324,48 @@ class website_affiliate(Home):
|
|||
|
||||
})
|
||||
|
||||
@http.route('/affiliate/tool', auth='user',type='http', website=True)
|
||||
@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',{})
|
||||
return http.request.render('affiliate_management.tool', {})
|
||||
|
||||
|
||||
@http.route('/tool/create_link', auth='user',type='http', website=True)
|
||||
@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"))+'#'
|
||||
# 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:]
|
||||
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:]
|
||||
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)
|
||||
@http.route("/tool/link_generator", auth='user', type='http', website=True)
|
||||
def link_generator(self, **kw):
|
||||
partner = request.env.user.partner_id
|
||||
values={}
|
||||
values = {}
|
||||
if request.session.get('generate_link'):
|
||||
values.update({
|
||||
'generate_link':request.session.get('generate_link'),
|
||||
'error':request.session.get('error')
|
||||
})
|
||||
'generate_link': request.session.get('generate_link'),
|
||||
'error': request.session.get('error')
|
||||
})
|
||||
if request.session.get('error'):
|
||||
values.update({
|
||||
'error':request.session.get('error')
|
||||
})
|
||||
'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)
|
||||
return http.request.render('affiliate_management.link_generator', values)
|
||||
|
||||
def check_link_validation(self,link):
|
||||
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)
|
||||
r = requests.get(link, verify=False)
|
||||
|
||||
if r.status_code == 200:
|
||||
langs = [l.code for l in request.website.language_ids]
|
||||
|
|
@ -386,10 +374,10 @@ class website_affiliate(Home):
|
|||
# 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]
|
||||
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 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:
|
||||
|
|
@ -399,113 +387,105 @@ class website_affiliate(Home):
|
|||
request.session['error'] = "Base Url doesn't match"
|
||||
return False
|
||||
else:
|
||||
request.session['error'] = "Please enter a Valid Url. Bad response from "+link
|
||||
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
|
||||
request.session['error'] = "Please enter a Valid Url. + %r" % e
|
||||
return False
|
||||
|
||||
|
||||
|
||||
|
||||
@http.route("/tool/product_link", auth='user',type='http', website=True)
|
||||
@http.route("/tool/product_link", auth='user', type='http', website=True)
|
||||
def product_link(self, **kw):
|
||||
values={}
|
||||
values = {}
|
||||
category = request.env['product.public.category'].sudo().search([])
|
||||
values.update({
|
||||
'category': category,
|
||||
})
|
||||
return http.request.render('affiliate_management.product_link',values)
|
||||
|
||||
})
|
||||
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)
|
||||
@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')),
|
||||
('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:
|
||||
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={}
|
||||
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,
|
||||
'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
|
||||
})
|
||||
'db': db
|
||||
})
|
||||
# _logger.info("=======values====%r",values)
|
||||
return http.request.render('affiliate_management.product_link',values)
|
||||
return http.request.render('affiliate_management.product_link', values)
|
||||
|
||||
|
||||
@http.route('/tool/generate_banner', auth='user',type='http', website=True)
|
||||
@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'))])
|
||||
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
|
||||
values = {
|
||||
'banner_button': banner_image_ids,
|
||||
'product': product,
|
||||
'db': db
|
||||
}
|
||||
return http.request.render('affiliate_management.generate_banner',values)
|
||||
return http.request.render('affiliate_management.generate_banner', values)
|
||||
|
||||
|
||||
@http.route("/tool/generate_button_link", auth='user',type='http', website=True)
|
||||
@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 ={
|
||||
values = {
|
||||
'partner_key': partner.res_affiliate_key,
|
||||
'product_id':kw.get('product_id'),
|
||||
'base_url' : base_url,
|
||||
'db':db
|
||||
'product_id': kw.get('product_id'),
|
||||
'base_url': base_url,
|
||||
'db': db
|
||||
}
|
||||
selected_image= kw.get('choose_banner').split("_")
|
||||
selected_image = kw.get('choose_banner').split("_")
|
||||
if selected_image[0] == 'button':
|
||||
_logger.info("-----selected button image id ---%r---",selected_image[1])
|
||||
_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
|
||||
})
|
||||
"button": button
|
||||
})
|
||||
else:
|
||||
if selected_image[0] == 'product':
|
||||
values.update({
|
||||
"is_product":True
|
||||
"is_product": True
|
||||
})
|
||||
_logger.info("-----selected product image id ---%r---",selected_image[1])
|
||||
return http.request.render('affiliate_management.generate_button_link',values)
|
||||
|
||||
|
||||
_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):
|
||||
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',
|
||||
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')
|
||||
|
|
|
|||
|
|
@ -13,6 +13,10 @@
|
|||
# You should have received a copy of the License along with this program.
|
||||
# If not, see <https://store.webkul.com/license.html/>;
|
||||
#################################################################################
|
||||
from odoo.tools.translate import _
|
||||
import odoo.modules.registry
|
||||
import odoo
|
||||
from odoo.addons.web.controllers.main import Home
|
||||
import werkzeug.utils
|
||||
import werkzeug.wrappers
|
||||
|
||||
|
|
@ -21,12 +25,7 @@ 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):
|
||||
|
||||
|
|
@ -34,10 +33,10 @@ class Home(Home):
|
|||
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
|
||||
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)
|
||||
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)
|
||||
|
|
|
|||
|
|
@ -13,38 +13,37 @@
|
|||
# You should have received a copy of the License along with this program.
|
||||
# If not, see <https://store.webkul.com/license.html/>;
|
||||
#################################################################################
|
||||
import datetime
|
||||
from odoo.addons.website_sale.controllers.main import WebsiteSale
|
||||
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
|
||||
def create_aff_visit_entry(self, vals):
|
||||
ppc_exist = self.check_ppc_exist(vals)
|
||||
if ppc_exist:
|
||||
visit = ppc_exist
|
||||
else:
|
||||
return False
|
||||
else:
|
||||
return False
|
||||
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([
|
||||
|
|
@ -52,123 +51,118 @@ class WebsiteSale(WebsiteSale):
|
|||
'/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)
|
||||
], 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)
|
||||
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):
|
||||
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)
|
||||
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)])
|
||||
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)
|
||||
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
|
||||
|
||||
|
||||
_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 )
|
||||
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(),
|
||||
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
|
||||
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():
|
||||
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:
|
||||
cookie_del_status = result.delete_cookie(key=k)
|
||||
return result
|
||||
|
||||
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])
|
||||
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])
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<odoo>
|
||||
<data noupdate="0" >
|
||||
<data noupdate="0">
|
||||
|
||||
<!-- <record model="ir.cron" id="affiliate_ppc_maturity_scheduler_call">
|
||||
<field name="name">Automated ppc maturity Scheduler</field>
|
||||
|
|
@ -15,23 +15,21 @@
|
|||
</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>
|
||||
<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">
|
||||
<!-- 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>
|
||||
|
|
@ -43,27 +41,27 @@
|
|||
<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 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="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()
|
||||
if records:
|
||||
action = records.create_invoice()
|
||||
</field>
|
||||
</record>
|
||||
|
||||
|
|
@ -78,4 +76,4 @@
|
|||
|
||||
|
||||
</data>
|
||||
</odoo>
|
||||
</odoo>
|
||||
|
|
@ -1,51 +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>
|
||||
<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_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_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_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', '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', 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', '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', '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.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)"/>
|
||||
<function
|
||||
model="ir.config_parameter" name="set_param"
|
||||
eval="('auth_signup.allow_uninvited', True)" />
|
||||
|
||||
</data>
|
||||
</odoo>
|
||||
</data>
|
||||
</odoo>
|
||||
|
|
@ -1,435 +1,454 @@
|
|||
<odoo>
|
||||
<data noupdate="1">
|
||||
<!-- set constant in ir.default -->
|
||||
<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_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_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_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_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_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>
|
||||
<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>
|
||||
<!-- 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_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 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_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_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>
|
||||
<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>
|
||||
<!-- 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_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>
|
||||
<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>
|
||||
<!-- 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>
|
||||
<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="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>
|
||||
<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>
|
||||
|
||||
<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>
|
||||
<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>
|
||||
<!-- 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="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_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="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_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="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_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_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_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_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_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="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="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_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_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="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="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>
|
||||
|
||||
|
||||
<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>
|
||||
</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.
|
||||
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.
|
||||
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. -->
|
||||
If the visitor orders, the order will be registered as a sale for you and you will receive a
|
||||
commission for this sale. -->
|
||||
|
|
@ -1,12 +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 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>
|
||||
</data>
|
||||
</odoo>
|
||||
|
|
@ -1,5 +0,0 @@
|
|||
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
|
||||
|
|
@ -21,7 +21,7 @@ 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_request
|
||||
from . import affiliate_image
|
||||
from . import advance_commision
|
||||
from . import affiliate_product_pricelist_item
|
||||
|
|
|
|||
|
|
@ -13,19 +13,19 @@
|
|||
# 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 string
|
||||
import random
|
||||
from odoo.http import request
|
||||
from odoo.exceptions import UserError
|
||||
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")
|
||||
aff_visit_id = fields.One2many('affiliate.visit', 'act_invoice_id', string="Report")
|
||||
|
||||
|
||||
# def write(self, vals):
|
||||
|
|
@ -40,21 +40,18 @@ class AccountInvoiceInherit(models.Model):
|
|||
# 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()
|
||||
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"})
|
||||
visit.write({"state": "paid"})
|
||||
return result
|
||||
|
|
|
|||
|
|
@ -13,18 +13,17 @@
|
|||
# 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, _
|
||||
from odoo.exceptions import UserError
|
||||
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")
|
||||
|
||||
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:
|
||||
|
|
@ -33,20 +32,20 @@ class AffiliateCommision(models.Model):
|
|||
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):
|
||||
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)
|
||||
_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)])
|
||||
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)
|
||||
_logger.info("***====pricelist_id.name=%r======", pricelist_id.name)
|
||||
|
||||
commision_value = False
|
||||
commision_value_type = False
|
||||
adv_commision_amount = False
|
||||
|
||||
# on global product
|
||||
# on global product
|
||||
if pricelist_id.applied_on == "3_global":
|
||||
if pricelist_id.compute_price == "fixed":
|
||||
commision_value = pricelist_id.fixed_price
|
||||
|
|
@ -54,7 +53,7 @@ class AffiliateCommision(models.Model):
|
|||
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 = product_price * (pricelist_id.percent_price / 100)
|
||||
commision_value_type = 'percentage'
|
||||
adv_commision_amount = pricelist_id.percent_price
|
||||
|
||||
|
|
@ -69,13 +68,12 @@ class AffiliateCommision(models.Model):
|
|||
|
||||
else:
|
||||
if pricelist_id.compute_price == "percentage":
|
||||
commision_value = product_price * (pricelist_id.percent_price /100)
|
||||
commision_value = product_price * (pricelist_id.percent_price / 100)
|
||||
commision_value_type = 'percentage'
|
||||
adv_commision_amount = pricelist_id.percent_price
|
||||
|
||||
|
||||
else:
|
||||
# on specific product
|
||||
# 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":
|
||||
|
|
@ -85,16 +83,13 @@ class AffiliateCommision(models.Model):
|
|||
|
||||
else:
|
||||
if pricelist_id.compute_price == "percentage":
|
||||
commision_value = product_price * (pricelist_id.percent_price /100)
|
||||
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
|
||||
|
||||
|
||||
return adv_commision_amount, commision_value, commision_value_type
|
||||
|
|
|
|||
|
|
@ -13,10 +13,10 @@
|
|||
# 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, _
|
||||
from odoo.exceptions import UserError
|
||||
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"
|
||||
|
|
@ -24,12 +24,11 @@ class AffiliateBanner(models.Model):
|
|||
banner_title = fields.Text(string="Banner Text")
|
||||
banner_image = fields.Binary(string="Banner Image")
|
||||
|
||||
|
||||
@api.model_create_multi
|
||||
def create(self,vals_list):
|
||||
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)
|
||||
res = super(AffiliateBanner, self).create(vals)
|
||||
return res
|
||||
|
|
|
|||
|
|
@ -13,10 +13,10 @@
|
|||
# You should have received a copy of the License along with this program.
|
||||
# If not, see <https://store.webkul.com/license.html/>;
|
||||
#################################################################################
|
||||
from odoo.exceptions import UserError
|
||||
from odoo import api, fields, models, _
|
||||
import logging
|
||||
_logger = logging.getLogger(__name__)
|
||||
from odoo import api, fields, models, _
|
||||
from odoo.exceptions import UserError
|
||||
|
||||
class AffiliateConfiguration(models.TransientModel):
|
||||
|
||||
|
|
@ -27,7 +27,7 @@ class AffiliateConfiguration(models.TransientModel):
|
|||
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
|
||||
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([]))
|
||||
|
|
@ -35,36 +35,33 @@ class AffiliateConfiguration(models.TransientModel):
|
|||
for p in prgm:
|
||||
p.unlink()
|
||||
|
||||
|
||||
@api.model
|
||||
def _get_banner(self):
|
||||
return self.env['affiliate.banner'].search([],limit=1).id
|
||||
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)
|
||||
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)
|
||||
|
||||
|
||||
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):
|
||||
|
|
@ -75,11 +72,11 @@ class AffiliateConfiguration(models.TransientModel):
|
|||
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', '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', '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)
|
||||
|
|
@ -90,7 +87,6 @@ class AffiliateConfiguration(models.TransientModel):
|
|||
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())
|
||||
|
|
@ -100,66 +96,65 @@ class AffiliateConfiguration(models.TransientModel):
|
|||
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,
|
||||
'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]
|
||||
template_1 = self.env.ref('affiliate_management.welcome_affiliate_email', raise_if_not_found=False).id
|
||||
template_2 = self.env.ref('affiliate_management.reject_affiliate_email', raise_if_not_found=False).id
|
||||
template_3 = self.env.ref('affiliate_management.join_affiliate_email', raise_if_not_found=False).id
|
||||
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_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,
|
||||
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,
|
||||
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(),
|
||||
)
|
||||
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 ={}
|
||||
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,
|
||||
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,
|
||||
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 {
|
||||
|
|
|
|||
|
|
@ -13,24 +13,22 @@
|
|||
# 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, _
|
||||
from odoo.exceptions import UserError
|
||||
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)
|
||||
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)
|
||||
|
||||
image_active = fields.Boolean(string="Active", default=True)
|
||||
|
||||
def toggle_active_button(self):
|
||||
if self.image_active:
|
||||
|
|
@ -38,12 +36,11 @@ class AffiliateImage(models.Model):
|
|||
else:
|
||||
self.image_active = True
|
||||
|
||||
|
||||
@api.model_create_multi
|
||||
def create(self,vals_list):
|
||||
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)
|
||||
res = super(AffiliateImage, self).create(vals)
|
||||
return res
|
||||
|
|
|
|||
|
|
@ -13,10 +13,10 @@
|
|||
# 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, _
|
||||
from odoo.exceptions import UserError
|
||||
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"
|
||||
|
|
@ -44,9 +44,9 @@ class AffiliateProductPricelistItem(models.Model):
|
|||
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')
|
||||
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.")
|
||||
help="The sequence field is used to define order in which the pricelist item are applied.")
|
||||
|
||||
# @api.multi
|
||||
def write(self, vals):
|
||||
|
|
@ -67,7 +67,7 @@ class AffiliateProductPricelistItem(models.Model):
|
|||
if change_value <= 0:
|
||||
raise UserError("Price List Item value must be greater than zero.")
|
||||
|
||||
return super(AffiliateProductPricelistItem,self).write(vals)
|
||||
return super(AffiliateProductPricelistItem, self).write(vals)
|
||||
|
||||
@api.model_create_multi
|
||||
def create(self, vals_list):
|
||||
|
|
@ -76,10 +76,10 @@ class AffiliateProductPricelistItem(models.Model):
|
|||
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:
|
||||
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)
|
||||
|
||||
res = super(AffiliateProductPricelistItem, self).create(vals)
|
||||
|
||||
return res
|
||||
|
||||
|
|
|
|||
|
|
@ -14,30 +14,29 @@
|
|||
# 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, _
|
||||
from odoo.exceptions import UserError
|
||||
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)
|
||||
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)]")
|
||||
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."))
|
||||
|
||||
|
|
@ -57,8 +56,8 @@ class AffiliateProgram(models.Model):
|
|||
self.amount = 0
|
||||
|
||||
def write(self, vals):
|
||||
if vals.get('work_text') and vals.get('work_text')=='<p><br></p>':
|
||||
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>':
|
||||
if vals.get('term_condition') and vals.get('term_condition') == '<p><br></p>':
|
||||
vals['term_condition'] = None
|
||||
return super(AffiliateProgram, self).write(vals)
|
||||
|
|
|
|||
|
|
@ -13,16 +13,16 @@
|
|||
# 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, _
|
||||
from odoo.http import request
|
||||
from odoo import SUPERUSER_ID
|
||||
from ast import literal_eval
|
||||
import random
|
||||
from odoo.addons.auth_signup.models.res_partner import SignupError, now
|
||||
from datetime import datetime, timedelta
|
||||
from odoo.exceptions import UserError
|
||||
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):
|
||||
|
|
@ -31,19 +31,16 @@ class AffiliateRequest(models.Model):
|
|||
# _inherit = ['ir.needaction_mixin']
|
||||
|
||||
def random_token(self):
|
||||
# the token has an entropy of about 120 bits (6 bits/char * 20 chars)
|
||||
# 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)
|
||||
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_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_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')
|
||||
|
|
@ -54,24 +51,23 @@ class AffiliateRequest(models.Model):
|
|||
('register', 'Pending For Approval'),
|
||||
('cancel', 'Rejected'),
|
||||
('aproove', 'Approved'),
|
||||
], string='Status', readonly=True, default='draft' )
|
||||
|
||||
], 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)
|
||||
_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)
|
||||
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'))])
|
||||
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 = super(AffiliateRequest, self).create(vals)
|
||||
aff_request.signup_token = self.random_token()
|
||||
aff_request.signup_expiration = fields.Datetime.now()
|
||||
aff_request.signup_type = 'signup'
|
||||
|
|
@ -81,22 +77,20 @@ class AffiliateRequest(models.Model):
|
|||
|
||||
# @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)
|
||||
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)])
|
||||
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:
|
||||
|
|
@ -105,15 +99,15 @@ class AffiliateRequest(models.Model):
|
|||
# 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.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}
|
||||
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)
|
||||
res = template_id.with_context({"db": db}).send_mail(self.id, force_send=True, email_values=email_values)
|
||||
return True
|
||||
|
||||
def action_aproove(self):
|
||||
|
|
@ -131,13 +125,10 @@ class AffiliateRequest(models.Model):
|
|||
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)
|
||||
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 """
|
||||
|
|
@ -164,14 +155,13 @@ class AffiliateRequest(models.Model):
|
|||
# copy may failed if asked login is not available.
|
||||
raise SignupError(ustr(e))
|
||||
|
||||
def send_joining_mail(self,aff_request):
|
||||
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)
|
||||
|
||||
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()
|
||||
|
|
@ -185,7 +175,7 @@ class AffiliateRequest(models.Model):
|
|||
# def _needaction_count(self, domain=None):
|
||||
# return len(self.env['affiliate.request'].search([('state','=','register')]))
|
||||
|
||||
def set_group_user(self,user_id):
|
||||
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]
|
||||
|
|
@ -199,13 +189,12 @@ class AffiliateRequest(models.Model):
|
|||
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)])
|
||||
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)])
|
||||
def checkRequeststate(self, user_id):
|
||||
exist = self.search([('user_id', '=', user_id.id)])
|
||||
if len(exist):
|
||||
if exist.state == 'register':
|
||||
return 'pending'
|
||||
|
|
|
|||
|
|
@ -13,29 +13,29 @@
|
|||
# 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,_
|
||||
from odoo.exceptions import UserError
|
||||
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')
|
||||
@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)
|
||||
type_url = '/shop/product/' + str(self.aff_product_id.id)
|
||||
if self.entity == 'category':
|
||||
type_url = '/shop/category/'+str(self.aff_category_id.id)
|
||||
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
|
||||
self.link = base_url + type_url + "?aff_key=" + key
|
||||
else:
|
||||
self.link = ""
|
||||
|
||||
|
|
@ -45,10 +45,10 @@ class AffiliateTool(models.TransientModel):
|
|||
self.aff_category_id = ""
|
||||
self.link = ""
|
||||
name = fields.Char(string="Name")
|
||||
entity = fields.Selection([('product','Product'),('category','Category')],string="Choose Entity",required=True)
|
||||
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')
|
||||
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
|
||||
|
|
@ -56,5 +56,5 @@ class AffiliateTool(models.TransientModel):
|
|||
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)
|
||||
new_url = super(AffiliateTool, self).create(vals)
|
||||
return new_url
|
||||
|
|
|
|||
|
|
@ -13,22 +13,22 @@
|
|||
# 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 datetime
|
||||
from datetime import timedelta
|
||||
from odoo.exceptions import UserError
|
||||
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')
|
||||
name = fields.Char(string="Name", readonly='True')
|
||||
|
||||
# @api.multi
|
||||
@api.depends('affiliate_type','type_id')
|
||||
@api.depends('affiliate_type', 'type_id')
|
||||
def _calc_type_name(self):
|
||||
for record in self:
|
||||
if record.affiliate_type == 'product':
|
||||
|
|
@ -36,44 +36,43 @@ class AffiliateVisit(models.Model):
|
|||
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)]})
|
||||
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" )
|
||||
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)]})
|
||||
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)]})
|
||||
|
||||
|
||||
], 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)
|
||||
new_visit = super(AffiliateVisit, self).create(vals)
|
||||
return new_visit
|
||||
|
||||
# button on view action
|
||||
|
|
@ -86,14 +85,14 @@ class AffiliateVisit(models.Model):
|
|||
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)
|
||||
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) :
|
||||
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 )
|
||||
status = self._get_rate(self.affiliate_method, self.affiliate_type, self.type_id)
|
||||
if status.get('is_error'):
|
||||
raise UserError(status['message'])
|
||||
return True
|
||||
|
|
@ -105,44 +104,43 @@ class AffiliateVisit(models.Model):
|
|||
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)])
|
||||
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)])
|
||||
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("*****filter- visits=%r******", visits)
|
||||
|
||||
_logger.info("****before******before method***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)
|
||||
_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'),
|
||||
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()
|
||||
'partner_id': u.partner_id.id,
|
||||
'invoice_date': fields.Datetime.now().date()
|
||||
}
|
||||
]
|
||||
|
||||
|
|
@ -152,8 +150,7 @@ class AffiliateVisit(models.Model):
|
|||
v.act_invoice_id = inv_id.id
|
||||
return True
|
||||
|
||||
|
||||
def check_enable_ppc_visits(self,visits):
|
||||
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
|
||||
|
|
@ -161,8 +158,6 @@ class AffiliateVisit(models.Model):
|
|||
visits = visits.filtered(lambda v: v.affiliate_method == 'pps')
|
||||
return visits
|
||||
|
||||
|
||||
|
||||
# method call from server action
|
||||
@api.model
|
||||
def create_invoice(self):
|
||||
|
|
@ -173,62 +168,59 @@ class AffiliateVisit(models.Model):
|
|||
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) :
|
||||
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 =[]
|
||||
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]]]
|
||||
# [[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'),
|
||||
}
|
||||
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'),
|
||||
}
|
||||
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()
|
||||
}]
|
||||
{
|
||||
'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))
|
||||
|
||||
msg = _('%s records has been invoiced out of %s') % (len(invoice_ids), 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',
|
||||
'type': 'ir.actions.client',
|
||||
'tag': 'display_notification',
|
||||
'params': {
|
||||
'type': 'success',
|
||||
'message': msg,
|
||||
'next': {'type': 'ir.actions.act_window_close'},
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
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)
|
||||
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
|
||||
|
|
@ -245,117 +237,111 @@ class AffiliateVisit(models.Model):
|
|||
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())
|
||||
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
|
||||
# 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
|
||||
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)
|
||||
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',
|
||||
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()
|
||||
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("----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)
|
||||
_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..'
|
||||
response = {
|
||||
'is_error': 1,
|
||||
'message': 'No commission Category Found for this product..'
|
||||
}
|
||||
|
||||
|
||||
else:
|
||||
response={
|
||||
'is_error':1,
|
||||
'message':'pps_type is advance',
|
||||
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)',
|
||||
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',
|
||||
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)
|
||||
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
|
||||
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) +"%"
|
||||
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)
|
||||
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"
|
||||
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
|
||||
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'),
|
||||
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)
|
||||
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)
|
||||
_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
|
||||
|
||||
|
||||
|
||||
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')])
|
||||
all_ppc_visits = self.search([('affiliate_method', '=', 'ppc'), ('state', '=', 'draft')])
|
||||
if check_enable_ppc:
|
||||
for visit in all_ppc_visits:
|
||||
visit.action_confirm()
|
||||
|
|
|
|||
|
|
@ -1,13 +1,13 @@
|
|||
from odoo.http import root, db_filter, db_list
|
||||
from odoo.tools.func import lazy_property
|
||||
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
|
||||
# 'lang': request.default_lang() # must be set at runtime
|
||||
},
|
||||
'db': None,
|
||||
'debug': '',
|
||||
|
|
@ -21,11 +21,10 @@ DEFAULT_SESSION = {
|
|||
}
|
||||
|
||||
|
||||
|
||||
def _get_session_and_dbname(self):
|
||||
|
||||
sid = (self.httprequest.args.get('session_id')
|
||||
or self.httprequest.headers.get("X-Openerp-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
|
||||
|
|
@ -40,8 +39,6 @@ def _get_session_and_dbname(self):
|
|||
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'):
|
||||
|
|
@ -67,4 +64,5 @@ def _get_session_and_dbname(self):
|
|||
session.is_dirty = False
|
||||
return session, dbname
|
||||
|
||||
|
||||
http.Request._get_session_and_dbname = _get_session_and_dbname
|
||||
|
|
|
|||
|
|
@ -13,38 +13,35 @@
|
|||
# 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 string
|
||||
import random
|
||||
import datetime
|
||||
from odoo.exceptions import UserError
|
||||
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")
|
||||
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()
|
||||
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)])
|
||||
visits = s.env['affiliate.visit'].search([('state', '=', 'confirm'), ('affiliate_partner_id', '=', s.id)])
|
||||
amt = 0
|
||||
for v in visits:
|
||||
amt = amt + v.commission_amt
|
||||
|
|
@ -52,7 +49,7 @@ class ResPartnerInherit(models.Model):
|
|||
|
||||
def _compute_approved_amt(self):
|
||||
for s in self:
|
||||
visits = s.env['affiliate.visit'].search([('state','=','invoice'),('affiliate_partner_id','=',s.id)])
|
||||
visits = s.env['affiliate.visit'].search([('state', '=', 'invoice'), ('affiliate_partner_id', '=', s.id)])
|
||||
amt = 0
|
||||
for v in visits:
|
||||
amt = amt + v.commission_amt
|
||||
|
|
@ -62,16 +59,15 @@ class ResPartnerInherit(models.Model):
|
|||
ran = ''.join(random.choice('0123456789ABCDEFGHIJ0123456789KLMNOPQRSTUVWXYZ') for i in range(8))
|
||||
self.res_affiliate_key = ran
|
||||
|
||||
|
||||
@api.model_create_multi
|
||||
def create(self,vals_list):
|
||||
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 ''
|
||||
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
|
||||
'affiliate_program_id': aff_prgm
|
||||
})
|
||||
new_res_partner = super(ResPartnerInherit,self).create(vals)
|
||||
new_res_partner = super(ResPartnerInherit, self).create(vals)
|
||||
return new_res_partner
|
||||
|
|
|
|||
|
|
@ -13,18 +13,18 @@
|
|||
# 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 string
|
||||
import random
|
||||
from ast import literal_eval
|
||||
from odoo.exceptions import UserError
|
||||
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)
|
||||
_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)
|
||||
|
|
|
|||
|
|
@ -1,101 +1,99 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<odoo>
|
||||
<data noupdate="0">
|
||||
<data noupdate="0">
|
||||
|
||||
<record id="affiliate_security_category" model="ir.module.category">
|
||||
<field name="name">Affiliate Category</field>
|
||||
</record>
|
||||
<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_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>
|
||||
<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>
|
||||
|
||||
<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 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>
|
||||
|
||||
<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 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_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>
|
||||
|
||||
<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>
|
||||
<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>
|
||||
<!-- 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>
|
||||
|
||||
<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 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>
|
||||
|
||||
<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 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>
|
||||
<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>
|
||||
<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>
|
||||
</data>
|
||||
|
||||
|
||||
|
||||
|
||||
</odoo>
|
||||
</odoo>
|
||||
|
|
@ -8,87 +8,88 @@
|
|||
* 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
|
||||
});
|
||||
(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);
|
||||
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);
|
||||
|
|
|
|||
|
|
@ -1,193 +1,167 @@
|
|||
odoo.define('affiliate_management.validation',function(require){
|
||||
"use strict";
|
||||
odoo.define("affiliate_management.validation", function (require) {
|
||||
"use strict";
|
||||
|
||||
var core = require('web.core');
|
||||
var ajax = require('web.ajax');
|
||||
var core = require("web.core");
|
||||
var ajax = require("web.ajax");
|
||||
|
||||
var _t = core._t;
|
||||
var _t = core._t;
|
||||
|
||||
// js for choose button in step 2 of generate product url
|
||||
// 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'>✓</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();
|
||||
// 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;
|
||||
}
|
||||
else{
|
||||
});
|
||||
|
||||
$(".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();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
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);
|
||||
};
|
||||
// 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'>✓</span>");
|
||||
clicked = true;
|
||||
}
|
||||
});
|
||||
|
||||
$("#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){
|
||||
$("#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);
|
||||
$(".aff_box").replaceWith(
|
||||
"<div class='alert_msg_banner_signup' style='margin-top:10px;'>\
|
||||
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' /> <span>"+result+"</span>\
|
||||
<img src='/affiliate_management/static/src/img/Icon_tick.png' /> <span>" +
|
||||
result +
|
||||
"</span>\
|
||||
</span>\
|
||||
</center>\
|
||||
</div>\
|
||||
|
|
@ -196,66 +170,61 @@ function isValidEmailAddress(emailAddress) {
|
|||
<center>\
|
||||
<a href='/shop' class='btn btn-success' style='width:177px;height:37px;' >Continue Shopping</a>\
|
||||
</center>\
|
||||
</div>");
|
||||
</div>"
|
||||
);
|
||||
}
|
||||
});
|
||||
$(".affiliate_loader").hide();
|
||||
return false;
|
||||
} else {
|
||||
console.log("wrong email");
|
||||
alert("Invalid Email type");
|
||||
return false;
|
||||
}
|
||||
});
|
||||
$('.affiliate_loader').hide();
|
||||
return false;
|
||||
}else{
|
||||
console.log("wrong email");
|
||||
alert("Invalid Email type");
|
||||
return false;
|
||||
}
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
|
||||
$("#cpy_cde").click(function() {
|
||||
$("#cpy_cde").click(function () {
|
||||
$("#usr_aff_code").select();
|
||||
$(this).text('copied');
|
||||
setTimeout(function() {
|
||||
$("#cpy_cde").text('copy');
|
||||
$(this).text("copied");
|
||||
setTimeout(function () {
|
||||
$("#cpy_cde").text("copy");
|
||||
}, 2000);
|
||||
document.execCommand('copy');
|
||||
document.execCommand("copy");
|
||||
return false;
|
||||
});
|
||||
|
||||
$("#cpy_url").click(function() {
|
||||
$("#cpy_url").click(function () {
|
||||
$("#usr_aff_url").select();
|
||||
$(this).text('copied')
|
||||
setTimeout(function() {
|
||||
$("#cpy_url").text('copy');
|
||||
$(this).text("copied");
|
||||
setTimeout(function () {
|
||||
$("#cpy_url").text("copy");
|
||||
}, 2000);
|
||||
document.execCommand('copy');
|
||||
document.execCommand("copy");
|
||||
return false;
|
||||
});
|
||||
|
||||
$("#url_anchor").click(function () {
|
||||
$("#affiliate_url_inp").show();
|
||||
$("#affiliate_code_inp").hide();
|
||||
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");
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
$("#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');
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
});
|
||||
|
|
|
|||
|
|
@ -6,27 +6,35 @@
|
|||
<div class="section">
|
||||
<div class="oe_structure">
|
||||
<div class="container mt16">
|
||||
<div class="navbar navbar-expand-md navbar-light" style="background-color: #3aadaa">
|
||||
<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;">
|
||||
<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;">
|
||||
<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;">
|
||||
<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;">
|
||||
<a class="nav-link mt-1 ps-2 ms-1"
|
||||
href="/affiliate/tool"
|
||||
style=" color: white;border-left: 3px solid;">
|
||||
Tools
|
||||
</a>
|
||||
</li>
|
||||
|
|
@ -40,7 +48,7 @@
|
|||
<div class="row justify-content-center">
|
||||
<div class="col-md-7">
|
||||
<div id="affiliate_code_inp">
|
||||
<form >
|
||||
<form>
|
||||
<label for="usr_aff_code" class="ms-2">
|
||||
Your Referral Code
|
||||
</label>
|
||||
|
|
@ -48,10 +56,17 @@
|
|||
<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" />
|
||||
<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;">
|
||||
<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>
|
||||
|
|
@ -59,8 +74,11 @@
|
|||
</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 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">
|
||||
|
|
@ -78,10 +96,17 @@
|
|||
<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" />
|
||||
<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;">
|
||||
<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>
|
||||
|
|
@ -90,8 +115,11 @@
|
|||
</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 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">
|
||||
|
|
@ -111,7 +139,8 @@
|
|||
<t t-esc="pending_amt" />
|
||||
</span>
|
||||
<br />
|
||||
<div style="font-size: 12px;opacity: 76%;color: #23527c;">
|
||||
<div
|
||||
style="font-size: 12px;opacity: 76%;color: #23527c;">
|
||||
(* Report whose state is confirmed but not invoiced)
|
||||
</div>
|
||||
<strong>
|
||||
|
|
@ -121,13 +150,15 @@
|
|||
<t t-esc="currency_id.symbol" />
|
||||
<t t-esc="approved_amt" />
|
||||
</span>
|
||||
<div style="font-size: 12px;opacity: 76%;color: #23527c;">
|
||||
<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 class="divider mt-4"
|
||||
style="border-bottom:2px solid black;opacity:30%">
|
||||
</div>
|
||||
</div>
|
||||
<div class="container-fluid">
|
||||
|
|
@ -150,26 +181,40 @@
|
|||
<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;">
|
||||
</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;" />
|
||||
<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="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;">
|
||||
</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>
|
||||
|
|
@ -183,4 +228,4 @@
|
|||
</template>
|
||||
</data>
|
||||
</odoo>
|
||||
<!-- -->
|
||||
<!-- -->
|
||||
|
|
@ -1,38 +1,39 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<odoo>
|
||||
<data>
|
||||
<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>
|
||||
<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>
|
||||
</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>
|
||||
<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>
|
||||
|
|
@ -4,60 +4,65 @@
|
|||
<field name="name">advance.commission.form</field>
|
||||
<field name="model">advance.commision</field>
|
||||
<field name="arch" type="xml">
|
||||
<form >
|
||||
<sheet>
|
||||
<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 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>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<group>
|
||||
<h1>
|
||||
<field name="name" default_focus="1" nolabel="1" placeholder="Name" />
|
||||
</h1>
|
||||
<group>
|
||||
|
||||
<h1>
|
||||
<field name="name" default_focus="1" nolabel="1" placeholder="Name" />
|
||||
</h1>
|
||||
<group>
|
||||
|
||||
</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" />
|
||||
<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>
|
||||
</tree>
|
||||
</field>
|
||||
|
||||
</sheet>
|
||||
</sheet>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
</record>
|
||||
|
||||
<record model="ir.ui.view" id="advance_commision_view_tree">
|
||||
<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"/>
|
||||
<field name="name" />
|
||||
<field name="active_adv_comsn" />
|
||||
|
||||
|
||||
</tree>
|
||||
</field>
|
||||
</record>
|
||||
</record>
|
||||
|
||||
<record model="ir.actions.act_window" id="advance_commision_action">
|
||||
<field name="name">Affiliate Advance Commission</field>
|
||||
|
|
@ -67,11 +72,11 @@
|
|||
|
||||
|
||||
<menuitem name="Advance Computation"
|
||||
id="advance_commision_sub_menu"
|
||||
parent="configuration_submenu_root"
|
||||
action='advance_commision_action'
|
||||
groups="base.group_system"
|
||||
sequence = "2"
|
||||
id="advance_commision_sub_menu"
|
||||
parent="configuration_submenu_root"
|
||||
action='advance_commision_action'
|
||||
groups="base.group_system"
|
||||
sequence="2"
|
||||
/>
|
||||
</data>
|
||||
</odoo>
|
||||
</odoo>
|
||||
|
|
@ -5,24 +5,26 @@
|
|||
<field name="model">affiliate.banner</field>
|
||||
<field name="arch" type="xml">
|
||||
<form create="false">
|
||||
<sheet>
|
||||
<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>
|
||||
|
||||
<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>
|
||||
|
||||
<!--
|
||||
<!--
|
||||
<record model="ir.actions.act_window" id="affiliate_image_action">
|
||||
<field name="name">Affilaite image</field>
|
||||
<field name="res_model">affiliate.image</field>
|
||||
|
|
@ -31,4 +33,4 @@
|
|||
|
||||
-->
|
||||
</data>
|
||||
</odoo>
|
||||
</odoo>
|
||||
|
|
@ -1,270 +1,294 @@
|
|||
<!-- <?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
|
||||
<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="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 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>
|
||||
|
||||
<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="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">
|
||||
<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>
|
||||
</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">
|
||||
<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 class="mt16">
|
||||
<label class="col-lg-2 o_light_label" string="Product"
|
||||
for="aff_product_id" />
|
||||
<field name="aff_product_id" />
|
||||
</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">
|
||||
|
||||
|
||||
</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 class="content-group">
|
||||
<div class="row mt16">
|
||||
<div class="col-lg-2">
|
||||
<label class="o_light_label" string="Day"
|
||||
for="payment_day" />
|
||||
</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 class="col-lg-4">
|
||||
<field name="payment_day" />
|
||||
</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 class="col-lg-5">
|
||||
<span class="col-lg-5">Day of Every Month</span>
|
||||
</div>
|
||||
</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 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">
|
||||
</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>
|
||||
<h2> Email Configuration</h2>
|
||||
<div class="row mt16 o_settings_container" id="affiliate_program_email" title="Configure your Affiliate Program Email">
|
||||
</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_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_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-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 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>
|
||||
<!-- </div> -->
|
||||
</xpath>
|
||||
<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>
|
||||
|
||||
</field>
|
||||
</record>
|
||||
<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>
|
||||
|
||||
<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>
|
||||
<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>
|
||||
|
||||
|
||||
<menuitem id="setting_submenu_root" name="Settings" parent="configuration_submenu_root"
|
||||
sequence="0" action="affiliate_config_form_action"
|
||||
groups="base.group_system"/>
|
||||
</odoo>
|
||||
</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>
|
||||
|
|
@ -5,52 +5,55 @@
|
|||
<field name="model">affiliate.image</field>
|
||||
<field name="arch" type="xml">
|
||||
<form create="false">
|
||||
<sheet>
|
||||
<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" name="image_active" invisible="1"/>
|
||||
<span attrs="{'invisible':[('image_active','=',True)]}" class="o_field_widget">Inactive</span>
|
||||
<span attrs="{'invisible':[('image_active','=',False)]}" style="color:green" class="o_field_widget" >Active</span>
|
||||
</button>
|
||||
</div>
|
||||
<button name="toggle_active_button" type="object" class="oe_stat_button"
|
||||
icon="fa-archive">
|
||||
<field string="Active" name="image_active" invisible="1" />
|
||||
<span attrs="{'invisible':[('image_active','=',True)]}"
|
||||
class="o_field_widget">Inactive</span>
|
||||
<span attrs="{'invisible':[('image_active','=',False)]}"
|
||||
style="color:green" class="o_field_widget">Active</span>
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<group>
|
||||
<group>
|
||||
<h1>
|
||||
<field name="name" default_focus="1" placeholder="Name" />
|
||||
</h1>
|
||||
</group>
|
||||
</group>
|
||||
<group>
|
||||
<group>
|
||||
<h1>
|
||||
<field name="name" default_focus="1" placeholder="Name" />
|
||||
</h1>
|
||||
</group>
|
||||
</group>
|
||||
|
||||
<group col="2" >
|
||||
<group col="2">
|
||||
|
||||
<group>
|
||||
<group>
|
||||
|
||||
<field name="title"/>
|
||||
<!-- <field name="type"/> -->
|
||||
<field name="banner_height"/>
|
||||
<field name="bannner_width"/>
|
||||
<field name="image" widget="image" />
|
||||
</group>
|
||||
</group>
|
||||
</sheet>
|
||||
<field name="title" />
|
||||
<!-- <field name="type"/> -->
|
||||
<field name="banner_height" />
|
||||
<field name="bannner_width" />
|
||||
<field name="image" widget="image" />
|
||||
</group>
|
||||
</group>
|
||||
</sheet>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
</record>
|
||||
|
||||
<record model="ir.ui.view" id="affiliate_image__view_tree">
|
||||
<record model="ir.ui.view" id="affiliate_image__view_tree">
|
||||
<field name="name">affiliate.image.tree</field>
|
||||
<field name="model">affiliate.image</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree>
|
||||
<field name="name"/>
|
||||
<field name="title"/>
|
||||
<field name="image_active"/>
|
||||
<field name="name" />
|
||||
<field name="title" />
|
||||
<field name="image_active" />
|
||||
|
||||
|
||||
|
||||
</tree>
|
||||
</field>
|
||||
</record>
|
||||
</record>
|
||||
|
||||
<record model="ir.actions.act_window" id="affiliate_image_action">
|
||||
<field name="name">Affiliate Image</field>
|
||||
|
|
@ -60,11 +63,11 @@
|
|||
|
||||
|
||||
<menuitem name="Affiliate Images"
|
||||
id="affiliate_report_sub_image_menu"
|
||||
parent="configuration_submenu_root"
|
||||
action='affiliate_image_action'
|
||||
groups='affiliate_management.affiliate_security_user_group'
|
||||
sequence = "3"
|
||||
id="affiliate_report_sub_image_menu"
|
||||
parent="configuration_submenu_root"
|
||||
action='affiliate_image_action'
|
||||
groups='affiliate_management.affiliate_security_user_group'
|
||||
sequence="3"
|
||||
/>
|
||||
</data>
|
||||
</odoo>
|
||||
</odoo>
|
||||
|
|
@ -2,80 +2,114 @@
|
|||
<odoo>
|
||||
<data>
|
||||
|
||||
<!-- show visit action on click of visit button-->
|
||||
<record id="affiliate_visit_form" model="ir.actions.act_window">
|
||||
<field name="name">Visits</field>
|
||||
<field name="res_model">affiliate.visit</field>
|
||||
<!-- <field name="view_type">form</field> -->
|
||||
<field name="view_mode">tree,form</field>
|
||||
<field name="domain">[('affiliate_partner_id','=', active_id)]</field>
|
||||
<field name="help" type="html">
|
||||
<p class="oe_view_nocontent_create">
|
||||
<!-- show visit action on click of visit button-->
|
||||
<record id="affiliate_visit_form" model="ir.actions.act_window">
|
||||
<field name="name">Visits</field>
|
||||
<field name="res_model">affiliate.visit</field>
|
||||
<!-- <field name="view_type">form</field> -->
|
||||
<field name="view_mode">tree,form</field>
|
||||
<field name="domain">[('affiliate_partner_id','=', active_id)]</field>
|
||||
<field name="help" type="html">
|
||||
<p class="oe_view_nocontent_create">
|
||||
|
||||
</p>
|
||||
</field>
|
||||
</record>
|
||||
</p>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
|
||||
<!-- res.partner new form -->
|
||||
<!-- res.partner new form -->
|
||||
<record id="view_partner_form2" model="ir.ui.view">
|
||||
<field name="name">res.partner.form</field>
|
||||
<field name="model">res.partner</field>
|
||||
<field name="priority" eval="1"/>
|
||||
<field name="priority" eval="1" />
|
||||
<field name="arch" type="xml">
|
||||
<form string="Partners" >
|
||||
<form string="Partners">
|
||||
<sheet>
|
||||
<div class="oe_button_box" name="button_box">
|
||||
<button class="oe_stat_button" type="action" name="%(affiliate_visit_form)d" icon="fa-book" string="Visits" />
|
||||
<button class="oe_stat_button" type="action"
|
||||
name="%(affiliate_visit_form)d" icon="fa-book" string="Visits" />
|
||||
</div>
|
||||
<field name="image_1920" widget='image' class="oe_avatar" options='{"preview_image": "image_128", "size": [90, 90]}'/>
|
||||
<field name="image_1920" widget='image' class="oe_avatar"
|
||||
options='{"preview_image": "image_128", "size": [90, 90]}' />
|
||||
<div class="oe_title">
|
||||
<field name="is_company" invisible="1"/>
|
||||
<field name="commercial_partner_id" invisible="1"/>
|
||||
<field name="company_type" widget="radio" class="oe_edit_only" options="{'horizontal': true}"/>
|
||||
<field name="is_company" invisible="1" />
|
||||
<field name="commercial_partner_id" invisible="1" />
|
||||
<field name="company_type" widget="radio" class="oe_edit_only"
|
||||
options="{'horizontal': true}" />
|
||||
<h1>
|
||||
<field name="name" default_focus="1" placeholder="Name" attrs="{'required' : [('type', '=', 'contact')]}"/>
|
||||
<field name="name" default_focus="1" placeholder="Name"
|
||||
attrs="{'required' : [('type', '=', 'contact')]}" />
|
||||
</h1>
|
||||
<div class="o_row" invisible="1">
|
||||
<field name="parent_id" placeholder="Company" domain="[('is_company', '=', True)]" attrs="{'invisible': ['|', '&', ('is_company','=', True),('parent_id', '=', False),('company_name', '!=', False),('company_name', '!=', '')]}"/>
|
||||
<field name="company_name" attrs="{'invisible': ['|', '|', ('company_name', '=', False), ('company_name', '=', ''), ('is_company', '=', True)]}"/>
|
||||
<button name="create_company" type="object" string="Create company" class="btn btn-sm oe_edit_only fa fa-external-link btn btn-link " attrs="{'invisible': ['|', '|', ('is_company','=', True), ('company_name', '=', ''), ('company_name', '=', False)]}"/>
|
||||
<field name="parent_id" placeholder="Company"
|
||||
domain="[('is_company', '=', True)]"
|
||||
attrs="{'invisible': ['|', '&', ('is_company','=', True),('parent_id', '=', False),('company_name', '!=', False),('company_name', '!=', '')]}" />
|
||||
<field name="company_name"
|
||||
attrs="{'invisible': ['|', '|', ('company_name', '=', False), ('company_name', '=', ''), ('is_company', '=', True)]}" />
|
||||
<button name="create_company" type="object" string="Create company"
|
||||
class="btn btn-sm oe_edit_only fa fa-external-link btn btn-link "
|
||||
attrs="{'invisible': ['|', '|', ('is_company','=', True), ('company_name', '=', ''), ('company_name', '=', False)]}" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<group>
|
||||
<group>
|
||||
<field name="type" attrs="{'invisible': [('parent_id','=', False)]}"/>
|
||||
<label for="street" string="Address"/>
|
||||
<field name="type" attrs="{'invisible': [('parent_id','=', False)]}" />
|
||||
<label for="street" string="Address" />
|
||||
<div class="o_address_format">
|
||||
<div class="oe_edit_only">
|
||||
<button name="open_parent" type="object" string="(edit)" class="oe_link" attrs="{'invisible': ['|', ('parent_id', '=', False), ('type', '!=', 'contact')]}"/>
|
||||
<button name="open_parent" type="object" string="(edit)"
|
||||
class="oe_link"
|
||||
attrs="{'invisible': ['|', ('parent_id', '=', False), ('type', '!=', 'contact')]}" />
|
||||
</div>
|
||||
<field name="street" placeholder="Street..." class="o_address_street" attrs="{'readonly': [('type', '=', 'contact'),('parent_id', '!=', False)]}"/>
|
||||
<field name="street2" placeholder="Street 2..." class="o_address_street" attrs="{'readonly': [('type', '=', 'contact'),('parent_id', '!=', False)]}"/>
|
||||
<field name="city" placeholder="City" class="o_address_city" attrs="{'readonly': [('type', '=', 'contact'),('parent_id', '!=', False)]}"/>
|
||||
<field name="state_id" class="o_address_state" placeholder="State" options='{"no_open": True}' attrs="{'readonly': [('type', '=', 'contact'),('parent_id', '!=', False)]}" context="{'country_id': country_id, 'zip': zip}"/>
|
||||
<field name="zip" placeholder="ZIP" class="o_address_zip" attrs="{'readonly': [('type', '=', 'contact'),('parent_id', '!=', False)]}"/>
|
||||
<field name="country_id" placeholder="Country" class="o_address_country" options='{"no_open": True, "no_create": True}' attrs="{'readonly': [('type', '=', 'contact'),('parent_id', '!=', False)]}"/>
|
||||
<field name="street" placeholder="Street..."
|
||||
class="o_address_street"
|
||||
attrs="{'readonly': [('type', '=', 'contact'),('parent_id', '!=', False)]}" />
|
||||
<field name="street2" placeholder="Street 2..."
|
||||
class="o_address_street"
|
||||
attrs="{'readonly': [('type', '=', 'contact'),('parent_id', '!=', False)]}" />
|
||||
<field name="city" placeholder="City" class="o_address_city"
|
||||
attrs="{'readonly': [('type', '=', 'contact'),('parent_id', '!=', False)]}" />
|
||||
<field name="state_id" class="o_address_state"
|
||||
placeholder="State" options='{"no_open": True}'
|
||||
attrs="{'readonly': [('type', '=', 'contact'),('parent_id', '!=', False)]}"
|
||||
context="{'country_id': country_id, 'zip': zip}" />
|
||||
<field name="zip" placeholder="ZIP" class="o_address_zip"
|
||||
attrs="{'readonly': [('type', '=', 'contact'),('parent_id', '!=', False)]}" />
|
||||
<field name="country_id" placeholder="Country"
|
||||
class="o_address_country"
|
||||
options='{"no_open": True, "no_create": True}'
|
||||
attrs="{'readonly': [('type', '=', 'contact'),('parent_id', '!=', False)]}" />
|
||||
</div>
|
||||
</group>
|
||||
<group>
|
||||
<field name="phone" widget="phone"/>
|
||||
<field name="mobile" widget="phone"/>
|
||||
<field name="user_ids" invisible="1"/>
|
||||
<field name="email" widget="email" attrs="{'required': [('user_ids','!=', [])]}"/>
|
||||
<field name="title" options='{"no_open": True}' attrs="{'invisible': [('is_company', '=', True)]}"/>
|
||||
<field name="lang"/>
|
||||
<field name="phone" widget="phone" />
|
||||
<field name="mobile" widget="phone" />
|
||||
<field name="user_ids" invisible="1" />
|
||||
<field name="email" widget="email"
|
||||
attrs="{'required': [('user_ids','!=', [])]}" />
|
||||
<field name="title" options='{"no_open": True}'
|
||||
attrs="{'invisible': [('is_company', '=', True)]}" />
|
||||
<field name="lang" />
|
||||
</group>
|
||||
</group>
|
||||
<notebook colspan="4">
|
||||
<page name="affilite_detail" string="Affiliate Details">
|
||||
<group col='4'>
|
||||
<group string="Affiliate" name="affiliate" col='4'>
|
||||
<field name="is_affiliate" string="Is a Affiliate" groups="base.group_system,affiliate_management.affiliate_security_manager_group" colspan='4'/>
|
||||
<field name="affiliate_program_id" colspan="4" widget="selection" col='4' readonly="1"/>
|
||||
<field name="res_affiliate_key" string="Affiliate Key" readonly="1" attrs="{'invisible':[('res_affiliate_key','=',False)]}" colspan="4"/>
|
||||
<field name="res_affiliate_key" string="Affiliate Key" readonly="1" attrs="{'invisible':[('res_affiliate_key','!=',False)]}" colspan="3"/>
|
||||
<field name="is_affiliate" string="Is a Affiliate"
|
||||
groups="base.group_system,affiliate_management.affiliate_security_manager_group"
|
||||
colspan='4' />
|
||||
<field name="affiliate_program_id" colspan="4"
|
||||
widget="selection" col='4' readonly="1" />
|
||||
<field name="res_affiliate_key" string="Affiliate Key"
|
||||
readonly="1"
|
||||
attrs="{'invisible':[('res_affiliate_key','=',False)]}"
|
||||
colspan="4" />
|
||||
<field name="res_affiliate_key" string="Affiliate Key"
|
||||
readonly="1"
|
||||
attrs="{'invisible':[('res_affiliate_key','!=',False)]}"
|
||||
colspan="3" />
|
||||
<button
|
||||
name="generate_key"
|
||||
type="object"
|
||||
|
|
@ -99,7 +133,7 @@
|
|||
</record>
|
||||
|
||||
|
||||
<record model="ir.ui.view" id="affiliate_manager_kanban_view">
|
||||
<record model="ir.ui.view" id="affiliate_manager_kanban_view">
|
||||
<field name="name">res.partner.inherit.affiliate.kanban</field>
|
||||
<field name="model">res.partner</field>
|
||||
<field name="type">kanban</field>
|
||||
|
|
@ -139,58 +173,75 @@
|
|||
</kanban> -->
|
||||
|
||||
<kanban class="o_res_partner_kanban">
|
||||
<field name="id"/>
|
||||
<field name="color"/>
|
||||
<field name="display_name"/>
|
||||
<field name="title"/>
|
||||
<field name="email"/>
|
||||
<field name="parent_id"/>
|
||||
<field name="is_company"/>
|
||||
<field name="function"/>
|
||||
<field name="phone"/>
|
||||
<field name="street"/>
|
||||
<field name="street2"/>
|
||||
<field name="zip"/>
|
||||
<field name="city"/>
|
||||
<field name="country_id"/>
|
||||
<field name="mobile"/>
|
||||
<field name="state_id"/>
|
||||
<field name="category_id"/>
|
||||
<field name="image_128"/>
|
||||
<field name="type"/>
|
||||
<field name="id" />
|
||||
<field name="color" />
|
||||
<field name="display_name" />
|
||||
<field name="title" />
|
||||
<field name="email" />
|
||||
<field name="parent_id" />
|
||||
<field name="is_company" />
|
||||
<field name="function" />
|
||||
<field name="phone" />
|
||||
<field name="street" />
|
||||
<field name="street2" />
|
||||
<field name="zip" />
|
||||
<field name="city" />
|
||||
<field name="country_id" />
|
||||
<field name="mobile" />
|
||||
<field name="state_id" />
|
||||
<field name="category_id" />
|
||||
<field name="image_128" />
|
||||
<field name="type" />
|
||||
<templates>
|
||||
<t t-name="kanban-box">
|
||||
<div class="oe_kanban_global_click o_kanban_record_has_image_fill o_res_partner_kanban">
|
||||
<div
|
||||
class="oe_kanban_global_click o_kanban_record_has_image_fill o_res_partner_kanban">
|
||||
<t t-if="!record.is_company.raw_value">
|
||||
<t t-if="record.type.raw_value === 'delivery'" t-set="placeholder" t-value="'/base/static/img/truck.png'"/>
|
||||
<t t-elif="record.type.raw_value === 'invoice'" t-set="placeholder" t-value="'/base/static/img/money.png'"/>
|
||||
<t t-else="" t-set="placeholder" t-value="'/base/static/img/avatar_grey.png'"/>
|
||||
<div class="o_kanban_image_fill_left d-none d-md-block" t-attf-style="background-image:url('#{kanban_image('res.partner', 'image_128', record.id.raw_value, placeholder)}')">
|
||||
<img class="o_kanban_image_inner_pic" t-if="record.parent_id.raw_value" t-att-alt="record.parent_id.value" t-att-src="kanban_image('res.partner', 'image_128', record.parent_id.raw_value)"/>
|
||||
<t t-if="record.type.raw_value === 'delivery'"
|
||||
t-set="placeholder" t-value="'/base/static/img/truck.png'" />
|
||||
<t t-elif="record.type.raw_value === 'invoice'"
|
||||
t-set="placeholder" t-value="'/base/static/img/money.png'" />
|
||||
<t t-else="" t-set="placeholder"
|
||||
t-value="'/base/static/img/avatar_grey.png'" />
|
||||
<div class="o_kanban_image_fill_left d-none d-md-block"
|
||||
t-attf-style="background-image:url('#{kanban_image('res.partner', 'image_128', record.id.raw_value, placeholder)}')">
|
||||
<img class="o_kanban_image_inner_pic"
|
||||
t-if="record.parent_id.raw_value"
|
||||
t-att-alt="record.parent_id.value"
|
||||
t-att-src="kanban_image('res.partner', 'image_128', record.parent_id.raw_value)" />
|
||||
</div>
|
||||
<div class="o_kanban_image rounded-circle d-md-none" t-attf-style="background-image:url('#{kanban_image('res.partner', 'image_128', record.id.raw_value, placeholder)}')">
|
||||
<img class="o_kanban_image_inner_pic" t-if="record.parent_id.raw_value" t-att-alt="record.parent_id.value" t-att-src="kanban_image('res.partner', 'image_128', record.parent_id.raw_value)"/>
|
||||
<div class="o_kanban_image rounded-circle d-md-none"
|
||||
t-attf-style="background-image:url('#{kanban_image('res.partner', 'image_128', record.id.raw_value, placeholder)}')">
|
||||
<img class="o_kanban_image_inner_pic"
|
||||
t-if="record.parent_id.raw_value"
|
||||
t-att-alt="record.parent_id.value"
|
||||
t-att-src="kanban_image('res.partner', 'image_128', record.parent_id.raw_value)" />
|
||||
</div>
|
||||
</t>
|
||||
<t t-else="">
|
||||
<t t-set="placeholder" t-value="'/base/static/img/company_image.png'"/>
|
||||
<div class="o_kanban_image_fill_left o_kanban_image_full" t-attf-style="background-image: url(#{kanban_image('res.partner', 'image_128', record.id.raw_value, placeholder)})" role="img"/>
|
||||
<t t-set="placeholder"
|
||||
t-value="'/base/static/img/company_image.png'" />
|
||||
<div class="o_kanban_image_fill_left o_kanban_image_full"
|
||||
t-attf-style="background-image: url(#{kanban_image('res.partner', 'image_128', record.id.raw_value, placeholder)})"
|
||||
role="img" />
|
||||
</t>
|
||||
<!-- <div cla -->
|
||||
<!-- <div cla -->
|
||||
<div class="oe_kanban_details">
|
||||
<strong class="o_kanban_record_title oe_partner_heading"><field name="display_name"/></strong>
|
||||
<strong class="o_kanban_record_title oe_partner_heading">
|
||||
<field name="display_name" />
|
||||
</strong>
|
||||
<ul>
|
||||
<li >
|
||||
<li>
|
||||
<b>Key : </b>
|
||||
<field name="res_affiliate_key"/>
|
||||
<field name="res_affiliate_key" />
|
||||
</li>
|
||||
<li >
|
||||
<li>
|
||||
<b>Program : </b>
|
||||
<field name="affiliate_program_id"/>
|
||||
<field name="affiliate_program_id" />
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<div class="oe_kanban_partner_links"/>
|
||||
<div class="oe_kanban_partner_links" />
|
||||
</div>
|
||||
</div>
|
||||
</t>
|
||||
|
|
@ -200,45 +251,53 @@
|
|||
</record>
|
||||
|
||||
<!-- Tree view of re.partner or affiliate manager -->
|
||||
<record model="ir.ui.view" id="affiliate_manager_view_tree">
|
||||
<record model="ir.ui.view" id="affiliate_manager_view_tree">
|
||||
<field name="name">res.partner.tree</field>
|
||||
<field name="model">res.partner</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree >
|
||||
<field name="name"/>
|
||||
<field name="phone"/>
|
||||
<field name="email"/>
|
||||
<tree>
|
||||
<field name="name" />
|
||||
<field name="phone" />
|
||||
<field name="email" />
|
||||
</tree>
|
||||
</field>
|
||||
</record>
|
||||
</record>
|
||||
|
||||
<!-- close tree view -->
|
||||
<record id="affiliate_view_search" model="ir.ui.view">
|
||||
<field name="name">Affiliate Manager Search</field>
|
||||
<field name="model">res.partner</field>
|
||||
<field name="inherit_id" ref="base.view_res_partner_filter"/>
|
||||
<field name="arch" type="xml">
|
||||
<filter name="type_company" position="after">
|
||||
<filter string="Affiliate Customer" name="is_affiliate" domain="[('is_affiliate','=',True)]"/>
|
||||
</filter>
|
||||
</field>
|
||||
</record>
|
||||
<!--inherit res.partner form view-->
|
||||
<record id="view_Affiliate_partner_inherit_detail_form" model="ir.ui.view">
|
||||
<field name="name">res.partner.property.form.inherit</field>
|
||||
<field name="model">res.partner</field>
|
||||
<field name="priority">2</field>
|
||||
<field name="inherit_id" ref="base.view_partner_form"/>
|
||||
<field name="arch" type="xml">
|
||||
<page name="sales_purchases" position="after">
|
||||
<page name="affilite_detail" string="Affiliate Details">
|
||||
<field name="name">Affiliate Manager Search</field>
|
||||
<field name="model">res.partner</field>
|
||||
<field name="inherit_id" ref="base.view_res_partner_filter" />
|
||||
<field name="arch" type="xml">
|
||||
<filter name="type_company" position="after">
|
||||
<filter string="Affiliate Customer" name="is_affiliate"
|
||||
domain="[('is_affiliate','=',True)]" />
|
||||
</filter>
|
||||
</field>
|
||||
</record>
|
||||
<!--inherit
|
||||
res.partner form view-->
|
||||
<record id="view_Affiliate_partner_inherit_detail_form" model="ir.ui.view">
|
||||
<field name="name">res.partner.property.form.inherit</field>
|
||||
<field name="model">res.partner</field>
|
||||
<field name="priority">2</field>
|
||||
<field name="inherit_id" ref="base.view_partner_form" />
|
||||
<field name="arch" type="xml">
|
||||
<page name="sales_purchases" position="after">
|
||||
<page name="affilite_detail" string="Affiliate Details">
|
||||
<group col='4'>
|
||||
<group string="Affiliate" name="affiliate" col='4'>
|
||||
<field name="is_affiliate" string="Is a Affiliate"
|
||||
groups="base.group_system,affiliate_management.affiliate_security_manager_group" colspan='4'/>
|
||||
<field name="affiliate_program_id" colspan="4" widget="selection" col='4' readonly="1"/>
|
||||
<field name="res_affiliate_key" string="Affiliate Key" readonly="1" attrs="{'invisible':[('res_affiliate_key','=',False)]}" colspan="4"/>
|
||||
<field name="res_affiliate_key" string="Affiliate Key" readonly="1" attrs="{'invisible':[('res_affiliate_key','!=',False)]}" colspan="3"/>
|
||||
groups="base.group_system,affiliate_management.affiliate_security_manager_group"
|
||||
colspan='4' />
|
||||
<field name="affiliate_program_id" colspan="4" widget="selection"
|
||||
col='4' readonly="1" />
|
||||
<field name="res_affiliate_key" string="Affiliate Key" readonly="1"
|
||||
attrs="{'invisible':[('res_affiliate_key','=',False)]}"
|
||||
colspan="4" />
|
||||
<field name="res_affiliate_key" string="Affiliate Key" readonly="1"
|
||||
attrs="{'invisible':[('res_affiliate_key','!=',False)]}"
|
||||
colspan="3" />
|
||||
<button
|
||||
name="generate_key"
|
||||
type="object"
|
||||
|
|
@ -252,26 +311,27 @@
|
|||
</group>
|
||||
</group>
|
||||
</page>
|
||||
</page>
|
||||
</field>
|
||||
</record>
|
||||
</page>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="affiliate_partner_view" model="ir.actions.act_window">
|
||||
<field name="name">Affiliate Customers</field>
|
||||
<field name="type">ir.actions.act_window</field>
|
||||
<field name="res_model">res.partner</field>
|
||||
<field name="view_mode">kanban,form,tree</field>
|
||||
<field name="view_ids" eval="[(5, 0, 0),
|
||||
<field name="name">Affiliate Customers</field>
|
||||
<field name="type">ir.actions.act_window</field>
|
||||
<field name="res_model">res.partner</field>
|
||||
<field name="view_mode">kanban,form,tree</field>
|
||||
<field name="view_ids"
|
||||
eval="[(5, 0, 0),
|
||||
(0, 0, {'view_mode': 'kanban', 'view_id': ref('affiliate_manager_kanban_view')}),
|
||||
(0, 0, {'view_mode': 'form', 'view_id': ref('view_partner_form2')}),
|
||||
(0, 0, {'view_mode': 'tree', 'view_id': ref('affiliate_manager_view_tree')})
|
||||
]"
|
||||
/>
|
||||
<field name="context">
|
||||
{"search_default_is_affiliate":1,"default_is_affiliate":True,"is_customer":False}
|
||||
</field>
|
||||
<field name="search_view_id" ref="base.view_res_partner_filter"/>
|
||||
</record>
|
||||
<field name="context">
|
||||
{"search_default_is_affiliate":1,"default_is_affiliate":True,"is_customer":False}
|
||||
</field>
|
||||
<field name="search_view_id" ref="base.view_res_partner_filter" />
|
||||
</record>
|
||||
|
||||
|
||||
<menuitem name="Affiliate Manager"
|
||||
|
|
@ -281,18 +341,19 @@
|
|||
web_icon="affiliate_management,static/description/icon.png"
|
||||
/>
|
||||
|
||||
<menuitem name="Affiliate Program" id="affiliate_program_base_root" parent="affiliate_manager_menu_base_root" sequence='1' />
|
||||
<menuitem id="affiliate_submenu_user_root"
|
||||
parent="affiliate_program_base_root"
|
||||
name="All Affiliates"
|
||||
action="affiliate_partner_view"
|
||||
groups='affiliate_management.affiliate_security_user_group'
|
||||
sequence = "2"
|
||||
<menuitem name="Affiliate Program" id="affiliate_program_base_root"
|
||||
parent="affiliate_manager_menu_base_root" sequence='1' />
|
||||
<menuitem id="affiliate_submenu_user_root"
|
||||
parent="affiliate_program_base_root"
|
||||
name="All Affiliates"
|
||||
action="affiliate_partner_view"
|
||||
groups='affiliate_management.affiliate_security_user_group'
|
||||
sequence="2"
|
||||
/>
|
||||
|
||||
<menuitem id="configuration_submenu_root"
|
||||
parent="affiliate_manager_menu_base_root"
|
||||
name="Configuration"
|
||||
/>
|
||||
<menuitem id="configuration_submenu_root"
|
||||
parent="affiliate_manager_menu_base_root"
|
||||
name="Configuration"
|
||||
/>
|
||||
</data>
|
||||
</odoo>
|
||||
</odoo>
|
||||
|
|
@ -1,93 +1,98 @@
|
|||
<odoo>
|
||||
|
||||
<record model="ir.ui.view" id="affiliate_program_view_form">
|
||||
<field name="name">Affiliate Program Form</field>
|
||||
<field name="model">affiliate.program</field>
|
||||
<field name="type">form</field>
|
||||
<field name="priority" eval="1"/>
|
||||
<field name="arch" type="xml">
|
||||
<form create="false">
|
||||
<sheet >
|
||||
<div class="oe_title">
|
||||
<h1>
|
||||
<field name="name" default_focus="1" placeholder="Name"/>
|
||||
</h1>
|
||||
</div>
|
||||
<group col="2" string="Rate For PPC" invisible="context.get('hide_ppc')" >
|
||||
<record model="ir.ui.view" id="affiliate_program_view_form">
|
||||
<field name="name">Affiliate Program Form</field>
|
||||
<field name="model">affiliate.program</field>
|
||||
<field name="type">form</field>
|
||||
<field name="priority" eval="1" />
|
||||
<field name="arch" type="xml">
|
||||
<form create="false">
|
||||
<sheet>
|
||||
<div class="oe_title">
|
||||
<h1>
|
||||
<field name="name" default_focus="1" placeholder="Name" />
|
||||
</h1>
|
||||
</div>
|
||||
<group col="2" string="Rate For PPC" invisible="context.get('hide_ppc')">
|
||||
|
||||
<group>
|
||||
<group>
|
||||
|
||||
<field name="ppc_type" readonly="1"/>
|
||||
<field name="ppc_type" readonly="1" />
|
||||
|
||||
<field name="amount_ppc_fixed" widget="monetary" options="{'currency_field': 'currency_id'}"/>
|
||||
</group>
|
||||
</group>
|
||||
<field name="id" invisible="1"/>
|
||||
<field name="amount_ppc_fixed" widget="monetary"
|
||||
options="{'currency_field': 'currency_id'}" />
|
||||
</group>
|
||||
</group>
|
||||
<field name="id" invisible="1" />
|
||||
|
||||
<group>
|
||||
<group col="2" string="Rate For PPS">
|
||||
<field name="pps_type"/>
|
||||
<field name="matrix_type" attrs="{'invisible': ['|',('pps_type', '=', 'a'),('pps_type', '=', False)]}"/>
|
||||
<group>
|
||||
<group col="2" string="Rate For PPS">
|
||||
<field name="pps_type" />
|
||||
<field name="matrix_type"
|
||||
attrs="{'invisible': ['|',('pps_type', '=', 'a'),('pps_type', '=', False)]}" />
|
||||
|
||||
<label for="amount" attrs="{'invisible': ['|','|',('matrix_type', '=', False),('pps_type','=',False),('pps_type','=','a')]}"/>
|
||||
<div attrs="{'invisible': ['|','|',('matrix_type', '=', False),('pps_type','=',False),('pps_type','=','a')]}">
|
||||
<field name="amount" class="oe_inline"/>⁣
|
||||
<span attrs="{'invisible': [('matrix_type','=','p')]}">
|
||||
<field name="currency_id" readonly="1" class="oe_inline" />
|
||||
</span>
|
||||
<span attrs="{'invisible': [('matrix_type','=','f')]}">
|
||||
<b>%</b>
|
||||
</span>
|
||||
</div>
|
||||
<label for="amount"
|
||||
attrs="{'invisible': ['|','|',('matrix_type', '=', False),('pps_type','=',False),('pps_type','=','a')]}" />
|
||||
<div
|
||||
attrs="{'invisible': ['|','|',('matrix_type', '=', False),('pps_type','=',False),('pps_type','=','a')]}">
|
||||
<field name="amount" class="oe_inline" />⁣ <span
|
||||
attrs="{'invisible': [('matrix_type','=','p')]}">
|
||||
<field name="currency_id" readonly="1" class="oe_inline" />
|
||||
</span>
|
||||
<span
|
||||
attrs="{'invisible': [('matrix_type','=','f')]}">
|
||||
<b>%</b>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<field name="advance_commision_id" string="Advance Computation" attrs="{'invisible': ['|',('pps_type', '=', 's'),('pps_type', '=', False)],'required':[('pps_type', '=', 'a')]}" />
|
||||
<field name="advance_commision_id" string="Advance Computation"
|
||||
attrs="{'invisible': ['|',('pps_type', '=', 's'),('pps_type', '=', False)],'required':[('pps_type', '=', 'a')]}" />
|
||||
|
||||
</group>
|
||||
</group>
|
||||
</group>
|
||||
<notebook>
|
||||
<page name="howitworks" string="How Does It Work?">
|
||||
<group>
|
||||
<field name="work_title" />
|
||||
<field name="work_text" />
|
||||
</group>
|
||||
</page>
|
||||
<page name="howitworks" string="How Does It Work?">
|
||||
<group>
|
||||
<field name="work_title" />
|
||||
<field name="work_text" />
|
||||
</group>
|
||||
</page>
|
||||
|
||||
|
||||
<page name="TandC" string="Terms And Condition">
|
||||
<group>
|
||||
<field name="term_condition" string="Terms and Conditions"/>
|
||||
</group>
|
||||
</page>
|
||||
</notebook>
|
||||
</sheet>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
<record model="ir.ui.view" id="affiliate_program__view_tree">
|
||||
<field name="name">affiliate.program.tree</field>
|
||||
<field name="model">affiliate.program</field>
|
||||
<field name ="arch" type="xml">
|
||||
<tree create="false">
|
||||
<page name="TandC" string="Terms And Condition">
|
||||
<group>
|
||||
<field name="term_condition" string="Terms and Conditions" />
|
||||
</group>
|
||||
</page>
|
||||
</notebook>
|
||||
</sheet>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
<record model="ir.ui.view" id="affiliate_program__view_tree">
|
||||
<field name="name">affiliate.program.tree</field>
|
||||
<field name="model">affiliate.program</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree create="false">
|
||||
|
||||
<field name="name"/>
|
||||
<field name="ppc_type"/>
|
||||
<field name="amount_ppc_fixed"/>
|
||||
<field name="pps_type"/>
|
||||
<field name="matrix_type"/>
|
||||
<field name="amount"/>
|
||||
<field name="name" />
|
||||
<field name="ppc_type" />
|
||||
<field name="amount_ppc_fixed" />
|
||||
<field name="pps_type" />
|
||||
<field name="matrix_type" />
|
||||
<field name="amount" />
|
||||
|
||||
|
||||
|
||||
</tree>
|
||||
</field>
|
||||
</record>
|
||||
<record id="affiliate_program_form_action" model="ir.actions.act_window">
|
||||
<field name="name">Affiliate Program</field>
|
||||
<field name="type">ir.actions.act_window</field>
|
||||
<field name="res_model">affiliate.program</field>
|
||||
<!-- <field name="view_type">form</field> -->
|
||||
<field name="view_mode">tree,form</field>
|
||||
</record>
|
||||
</tree>
|
||||
</field>
|
||||
</record>
|
||||
<record id="affiliate_program_form_action" model="ir.actions.act_window">
|
||||
<field name="name">Affiliate Program</field>
|
||||
<field name="type">ir.actions.act_window</field>
|
||||
<field name="res_model">affiliate.program</field>
|
||||
<!-- <field name="view_type">form</field> -->
|
||||
<field name="view_mode">tree,form</field>
|
||||
</record>
|
||||
|
||||
|
||||
</odoo>
|
||||
</odoo>
|
||||
|
|
@ -2,57 +2,62 @@
|
|||
<data>
|
||||
|
||||
<record model="ir.ui.view" id="aaffiliate_product_pricelist_item_view_form">
|
||||
<field name="name">affiliate.product.pricelist.item.form</field>
|
||||
<field name="model">affiliate.product.pricelist.item</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Pricelist Items">
|
||||
<h1><field name="name" required="1"/></h1>
|
||||
<group col="4">
|
||||
<field name="sequence" colspan="4"/>
|
||||
</group>
|
||||
<group>
|
||||
<group>
|
||||
<field name="applied_on" widget="radio"/>
|
||||
<field name="categ_id" attrs="{'invisible':[('applied_on', '!=', '2_product_category')], 'required':[('applied_on', '=', '2_product_category')]}"/>
|
||||
<field name="product_tmpl_id" attrs="{'invisible':[('applied_on', '!=', '1_product')],'required':[('applied_on', '=', '1_product')]}" string="Product"/>
|
||||
|
||||
</group>
|
||||
|
||||
</group>
|
||||
<separator string="Price Computation"/>
|
||||
<group>
|
||||
<group>
|
||||
<label for="compute_price" string="Compute Price"/>
|
||||
<div>
|
||||
<field name="compute_price" widget="radio"/>
|
||||
<field name="currency_id" invisible="1"/>
|
||||
<div attrs="{'invisible':[('compute_price', '!=', 'fixed')]}">
|
||||
<field name="fixed_price" nolabel= "1" widget='monetary' options="{'currency_field': 'currency_id'}"/></div>
|
||||
<div attrs="{'invisible':[('compute_price', '!=', 'percentage')]}">
|
||||
<field name="percent_price" nolabel="1" class="oe_inline"/>%%
|
||||
</div>
|
||||
</div>
|
||||
</group>
|
||||
</group>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
<field name="name">affiliate.product.pricelist.item.form</field>
|
||||
<field name="model">affiliate.product.pricelist.item</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Pricelist Items">
|
||||
<h1>
|
||||
<field name="name" required="1" />
|
||||
</h1>
|
||||
<group col="4">
|
||||
<field name="sequence" colspan="4" />
|
||||
</group>
|
||||
<group>
|
||||
<group>
|
||||
<field name="applied_on" widget="radio" />
|
||||
<field name="categ_id"
|
||||
attrs="{'invisible':[('applied_on', '!=', '2_product_category')], 'required':[('applied_on', '=', '2_product_category')]}" />
|
||||
<field name="product_tmpl_id"
|
||||
attrs="{'invisible':[('applied_on', '!=', '1_product')],'required':[('applied_on', '=', '1_product')]}"
|
||||
string="Product" />
|
||||
|
||||
</group>
|
||||
|
||||
</group>
|
||||
<separator string="Price Computation" />
|
||||
<group>
|
||||
<group>
|
||||
<label for="compute_price" string="Compute Price" />
|
||||
<div>
|
||||
<field name="compute_price" widget="radio" />
|
||||
<field name="currency_id" invisible="1" />
|
||||
<div attrs="{'invisible':[('compute_price', '!=', 'fixed')]}">
|
||||
<field name="fixed_price" nolabel="1" widget='monetary'
|
||||
options="{'currency_field': 'currency_id'}" />
|
||||
</div>
|
||||
<div attrs="{'invisible':[('compute_price', '!=', 'percentage')]}">
|
||||
<field name="percent_price" nolabel="1" class="oe_inline" />%% </div>
|
||||
</div>
|
||||
</group>
|
||||
</group>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
|
||||
<record model="ir.ui.view" id="aaffiliate_product_pricelist_item_view_tree">
|
||||
<field name="name">affiliate.product.pricelist.item.tree</field>
|
||||
<field name="model">affiliate.product.pricelist.item</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree>
|
||||
<field name="name"/>
|
||||
<field name="sequence"/>
|
||||
|
||||
|
||||
</tree>
|
||||
</field>
|
||||
</record>
|
||||
<field name="name">affiliate.product.pricelist.item.tree</field>
|
||||
<field name="model">affiliate.product.pricelist.item</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree>
|
||||
<field name="name" />
|
||||
<field name="sequence" />
|
||||
|
||||
|
||||
</tree>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
|
||||
|
||||
</data>
|
||||
</odoo>
|
||||
|
|
@ -4,57 +4,61 @@
|
|||
<field name="name">affiliate.request.form</field>
|
||||
<field name="model">affiliate.request</field>
|
||||
<field name="arch" type="xml">
|
||||
<form create="false" edit="false" >
|
||||
<header >
|
||||
<field name="state" widget="statusbar" statusbar_visible="draft,register,cancel,aproove"/>
|
||||
<button name="action_aproove" string="Approve" type="object"
|
||||
attrs="{'invisible':['|',('state','=','aproove'),('state','=','draft')]}"/>
|
||||
<button name="action_cancel" string="Reject" type="object"
|
||||
attrs="{'invisible':['|',('state','=','cancel'),('state','=','draft')]}"/>
|
||||
<form create="false" edit="false">
|
||||
<header>
|
||||
<field name="state" widget="statusbar"
|
||||
statusbar_visible="draft,register,cancel,aproove" />
|
||||
<button name="action_aproove" string="Approve" type="object"
|
||||
attrs="{'invisible':['|',('state','=','aproove'),('state','=','draft')]}" />
|
||||
<button name="action_cancel" string="Reject" type="object"
|
||||
attrs="{'invisible':['|',('state','=','cancel'),('state','=','draft')]}" />
|
||||
</header>
|
||||
<sheet>
|
||||
<group>
|
||||
<field name="name"/>
|
||||
<field name="partner_id"/>
|
||||
<field name="password" invisible="1"/>
|
||||
<field name="signup_token" invisible="0"/>
|
||||
<field name="signup_expiration" invisible="1"/>
|
||||
<field name="signup_type" invisible="1"/>
|
||||
<field name="signup_valid" invisible="1"/>
|
||||
<field name="user_id"/>
|
||||
</group>
|
||||
</sheet>
|
||||
<sheet>
|
||||
<group>
|
||||
<field name="name" />
|
||||
<field name="partner_id" />
|
||||
<field name="password" invisible="1" />
|
||||
<field name="signup_token" invisible="0" />
|
||||
<field name="signup_expiration" invisible="1" />
|
||||
<field name="signup_type" invisible="1" />
|
||||
<field name="signup_valid" invisible="1" />
|
||||
<field name="user_id" />
|
||||
</group>
|
||||
</sheet>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
</record>
|
||||
|
||||
<record model="ir.ui.view" id="affiliate_request__view_tree">
|
||||
<record model="ir.ui.view" id="affiliate_request__view_tree">
|
||||
<field name="name">affiliate.request.tree</field>
|
||||
<field name="model">affiliate.request</field>
|
||||
<field name="arch" type="xml">
|
||||
<!-- <tree colors="blue:state=='register';red:state=='cancel';green:state=='aproove';" create="false"> -->
|
||||
<!-- <tree
|
||||
colors="blue:state=='register';red:state=='cancel';green:state=='aproove';"
|
||||
create="false"> -->
|
||||
|
||||
<tree decoration-danger="state == 'cancel'" decoration-info="state == 'aproove'"
|
||||
decoration-muted="state == 'draft'" create="false">
|
||||
<field name="name"/>
|
||||
decoration-muted="state == 'draft'" create="false">
|
||||
<field name="name" />
|
||||
<field name="state" />
|
||||
</tree>
|
||||
</field>
|
||||
</record>
|
||||
</record>
|
||||
|
||||
|
||||
<record id="view_affiliate_request_filter" model="ir.ui.view">
|
||||
<field name="name">affiliate.request.select</field>
|
||||
<field name="model">affiliate.request</field>
|
||||
<field name="priority">1</field>
|
||||
<field name="arch" type="xml">
|
||||
<search string="Search Request">
|
||||
<field name="state"/>
|
||||
<field name="name"/>
|
||||
<filter name="group_register_request" string="Pending For Approval" domain="[('state','=','register')]" help="Register Request"/>
|
||||
</search>
|
||||
</field>
|
||||
</record>
|
||||
<record id="view_affiliate_request_filter" model="ir.ui.view">
|
||||
<field name="name">affiliate.request.select</field>
|
||||
<field name="model">affiliate.request</field>
|
||||
<field name="priority">1</field>
|
||||
<field name="arch" type="xml">
|
||||
<search string="Search Request">
|
||||
<field name="state" />
|
||||
<field name="name" />
|
||||
<filter name="group_register_request" string="Pending For Approval"
|
||||
domain="[('state','=','register')]" help="Register Request" />
|
||||
</search>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record model="ir.actions.act_window" id="affiliate_request_action">
|
||||
<field name="name">Affiliate Request</field>
|
||||
|
|
@ -65,13 +69,12 @@
|
|||
</record>
|
||||
|
||||
|
||||
|
||||
<menuitem name="Pending Requests"
|
||||
id="affiliate_report_sub_request_menu"
|
||||
parent="affiliate_program_base_root"
|
||||
action='affiliate_request_action'
|
||||
sequence = "1"
|
||||
id="affiliate_report_sub_request_menu"
|
||||
parent="affiliate_program_base_root"
|
||||
action='affiliate_request_action'
|
||||
sequence="1"
|
||||
groups="base.group_system,affiliate_management.affiliate_security_manager_group"
|
||||
/>
|
||||
</data>
|
||||
</odoo>
|
||||
</odoo>
|
||||
|
|
@ -1,26 +1,31 @@
|
|||
<odoo>
|
||||
<data>
|
||||
<record model="ir.ui.view" id="affiliate_generate_link_form">
|
||||
<field name="name">Affiliate tool Form</field>
|
||||
<field name="model">affiliate.tool</field>
|
||||
<field name="type">form</field>
|
||||
<field name="priority" eval="1"/>
|
||||
<field name="arch" type="xml">
|
||||
<form create="false" edit="false">
|
||||
<sheet>
|
||||
<group>
|
||||
<field name='name' invisible='1'/>
|
||||
<field name='entity'/>
|
||||
<field name='aff_category_id' attrs="{'invisible': ['|',('entity', '=', 'product'),('entity', '=', False)],'required':[('entity', '=', 'category')]}" widget="selection"/>
|
||||
<field name='aff_product_id' attrs="{'invisible': ['|',('entity', '=', 'category'),('entity', '=', False)],'required':[('entity', '=', 'product')]}" widget="selection"/>
|
||||
<field name='link' readonly='1' attrs="{'invisible': ['|',('entity', '=', False),('aff_product_id','=',False),'|',('aff_category_id','=',False),('link','=',False)]}"/>
|
||||
<field name='user_id' invisible='1'/>
|
||||
<data>
|
||||
<record model="ir.ui.view" id="affiliate_generate_link_form">
|
||||
<field name="name">Affiliate tool Form</field>
|
||||
<field name="model">affiliate.tool</field>
|
||||
<field name="type">form</field>
|
||||
<field name="priority" eval="1" />
|
||||
<field name="arch" type="xml">
|
||||
<form create="false" edit="false">
|
||||
<sheet>
|
||||
<group>
|
||||
<field name='name' invisible='1' />
|
||||
<field name='entity' />
|
||||
<field name='aff_category_id'
|
||||
attrs="{'invisible': ['|',('entity', '=', 'product'),('entity', '=', False)],'required':[('entity', '=', 'category')]}"
|
||||
widget="selection" />
|
||||
<field name='aff_product_id'
|
||||
attrs="{'invisible': ['|',('entity', '=', 'category'),('entity', '=', False)],'required':[('entity', '=', 'product')]}"
|
||||
widget="selection" />
|
||||
<field name='link' readonly='1'
|
||||
attrs="{'invisible': ['|',('entity', '=', False),('aff_product_id','=',False),'|',('aff_category_id','=',False),('link','=',False)]}" />
|
||||
<field name='user_id' invisible='1' />
|
||||
|
||||
</group>
|
||||
</sheet>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
</group>
|
||||
</sheet>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
|
||||
<!-- <record model="ir.ui.view" id="affiliate_generate_link__view_tree">
|
||||
|
|
@ -41,27 +46,27 @@
|
|||
</field>
|
||||
</record> -->
|
||||
|
||||
<record id="affiliate_generate_link_action" model="ir.actions.act_window">
|
||||
<field name="name">Affiliate Tool</field>
|
||||
<field name="res_model">affiliate.tool</field>
|
||||
<!-- <field name="view_type">form</field> -->
|
||||
<field name="view_mode">form</field>
|
||||
<!-- <field name="res_id"></field>
|
||||
<record id="affiliate_generate_link_action" model="ir.actions.act_window">
|
||||
<field name="name">Affiliate Tool</field>
|
||||
<field name="res_model">affiliate.tool</field>
|
||||
<!-- <field name="view_type">form</field> -->
|
||||
<field name="view_mode">form</field>
|
||||
<!-- <field name="res_id"></field>
|
||||
<field name="target">current</field> -->
|
||||
|
||||
</record>
|
||||
</record>
|
||||
|
||||
|
||||
<!-- <menuitem name="Tool"
|
||||
<!-- <menuitem name="Tool"
|
||||
id="affiliate_tool_menu"
|
||||
parent="affiliate_manager_menu_base_root"
|
||||
sequence='3'
|
||||
/> -->
|
||||
<!-- <menuitem name="Generate Link"
|
||||
<!-- <menuitem name="Generate Link"
|
||||
id="affiliate_generate_link_menu"
|
||||
parent="affiliate_tool_menu"
|
||||
action='affiliate_generate_link_action'
|
||||
groups='affiliate_management.affiliate_security_user_group'
|
||||
/> -->
|
||||
</data>
|
||||
</odoo>
|
||||
</data>
|
||||
</odoo>
|
||||
|
|
@ -5,100 +5,113 @@
|
|||
<field name="model">affiliate.visit</field>
|
||||
<field name="arch" type="xml">
|
||||
<form create='false'>
|
||||
<header >
|
||||
<field name="state" widget="statusbar" statusbar_visible="draft,cancel,confirm,invoice,paid"/>
|
||||
<header>
|
||||
<field name="state" widget="statusbar"
|
||||
statusbar_visible="draft,cancel,confirm,invoice,paid" />
|
||||
|
||||
<!-- <button name="action_confirm" id="action_confirm"
|
||||
string="Confirm" class="btn-primary" type="object"
|
||||
attrs="{'invisible': [('state', 'not in', ['sent'])]}"/> -->
|
||||
|
||||
<button name="action_confirm" string="Confirm" type="object"
|
||||
<button name="action_confirm" string="Confirm" type="object"
|
||||
attrs="{'invisible':['|','|','|',('state','=','cancel'),('state','=','confirm'),('state','=','invoice'),('state','=','paid')]}"
|
||||
groups="base.group_system,affiliate_management.affiliate_security_manager_group"/>
|
||||
groups="base.group_system,affiliate_management.affiliate_security_manager_group" />
|
||||
<button name="action_cancel" type="object" string="Cancel"
|
||||
attrs="{'invisible':['|','|',('state','=','invoice'),('state','=','paid'),('state','=','cancel')]}"
|
||||
groups="base.group_system,affiliate_management.affiliate_security_manager_group"/>
|
||||
<button name="action_paid" type="object" string="Paid"
|
||||
attrs="{'invisible':['|','|','|',('state','=','draft'),('state','=','cancel'),('state','=','confirm'),('state','=','paid')]}"
|
||||
invisible="1"
|
||||
groups="base.group_system,affiliate_management.affiliate_security_manager_group"/>
|
||||
</header>
|
||||
attrs="{'invisible':['|','|',('state','=','invoice'),('state','=','paid'),('state','=','cancel')]}"
|
||||
groups="base.group_system,affiliate_management.affiliate_security_manager_group" />
|
||||
<button name="action_paid" type="object" string="Paid"
|
||||
attrs="{'invisible':['|','|','|',('state','=','draft'),('state','=','cancel'),('state','=','confirm'),('state','=','paid')]}"
|
||||
invisible="1"
|
||||
groups="base.group_system,affiliate_management.affiliate_security_manager_group" />
|
||||
</header>
|
||||
<sheet>
|
||||
|
||||
<label for="name" />
|
||||
<field name="name" class="h1" readonly="1"/>
|
||||
<field name="name" class="h1" readonly="1" />
|
||||
|
||||
<group>
|
||||
<group class="mt-4" string="Commission Details">
|
||||
<field name="affiliate_program_id" />
|
||||
<field name="affiliate_method" />
|
||||
<field name="affiliate_type" />
|
||||
<field name="affiliate_type" />
|
||||
<field name="commission_amt" />
|
||||
<field name="amt_type" string="Commission Matrix"/>
|
||||
<field name="url" attrs="{'invisible':[('affiliate_method','=','pps')]}" groups="base.group_system,affiliate_management.affiliate_security_manager_group"/>
|
||||
<field name="ip_address" groups="base.group_system,affiliate_management.affiliate_security_manager_group"/>
|
||||
<field name="is_converted" attrs="{'invisible':[('affiliate_method','=','pps')]}"/>
|
||||
<field name="convert_date" string="Date"/>
|
||||
<field name="affiliate_partner_id" />
|
||||
<field name="amt_type" string="Commission Matrix" />
|
||||
<field name="url"
|
||||
attrs="{'invisible':[('affiliate_method','=','pps')]}"
|
||||
groups="base.group_system,affiliate_management.affiliate_security_manager_group" />
|
||||
<field name="ip_address"
|
||||
groups="base.group_system,affiliate_management.affiliate_security_manager_group" />
|
||||
<field name="is_converted"
|
||||
attrs="{'invisible':[('affiliate_method','=','pps')]}" />
|
||||
<field name="convert_date" string="Date" />
|
||||
<field name="affiliate_partner_id" />
|
||||
<field name="affiliate_key" />
|
||||
<field name="act_invoice_id"/>
|
||||
<field name="act_invoice_id" />
|
||||
</group>
|
||||
<group class="mt-4" string="Order Details">
|
||||
<field name="type_id" />
|
||||
<field name="type_name"/>
|
||||
<field name="sales_order_line_id" string="Order" attrs="{'invisible':[('affiliate_method','=','ppc')]}" />
|
||||
<field name="product_quantity" string="Product Quantity" attrs="{'invisible':[('affiliate_method','=','ppc')]}"/>
|
||||
<field name="unit_price" attrs="{'invisible':[('affiliate_method','=','ppc')]}"/>
|
||||
<field name="price_total" attrs="{'invisible':[('affiliate_method','=','ppc')]}" />
|
||||
<field name="type_name" />
|
||||
<field name="sales_order_line_id" string="Order"
|
||||
attrs="{'invisible':[('affiliate_method','=','ppc')]}" />
|
||||
<field name="product_quantity" string="Product Quantity"
|
||||
attrs="{'invisible':[('affiliate_method','=','ppc')]}" />
|
||||
<field name="unit_price"
|
||||
attrs="{'invisible':[('affiliate_method','=','ppc')]}" />
|
||||
<field name="price_total"
|
||||
attrs="{'invisible':[('affiliate_method','=','ppc')]}" />
|
||||
</group>
|
||||
</group>
|
||||
</sheet>
|
||||
</sheet>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
</record>
|
||||
|
||||
<record model="ir.ui.view" id="affiliate_visit__view_tree">
|
||||
<record model="ir.ui.view" id="affiliate_visit__view_tree">
|
||||
<field name="name">affiliate.visit.tree</field>
|
||||
<field name="model">affiliate.visit</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree create="false">
|
||||
<!-- <field name="id"/> -->
|
||||
<field name="name"/>
|
||||
<field name="name" />
|
||||
<field name="affiliate_method" />
|
||||
<!-- <field name="affiliate_type" /> -->
|
||||
<field name="is_converted" />
|
||||
<!-- <field name="type_id" /> -->
|
||||
<field name="affiliate_key" />
|
||||
<field name="affiliate_partner_id" />
|
||||
<field name="create_date" string="Date"/>
|
||||
<field name="create_date" string="Date" />
|
||||
<field name="commission_amt" />
|
||||
<field name="state" />
|
||||
|
||||
|
||||
</tree>
|
||||
</field>
|
||||
</record>
|
||||
</record>
|
||||
|
||||
<record id="webkul_employees_view_search" model="ir.ui.view">
|
||||
<field name="name">affiliate.visit Search</field>
|
||||
<field name="model">affiliate.visit</field>
|
||||
<field name="arch" type="xml">
|
||||
<search string="Search Employees">
|
||||
<field name="commission_amt" />
|
||||
<field name="state" />
|
||||
<filter string="Not Invoiced" name="state" domain="[('state','!=','invoice')]"/>
|
||||
<group string="Group By">
|
||||
<filter string="Method" name="affiliate_method" domain="[]" context="{'group_by':'affiliate_method'}"/>
|
||||
<filter string="Type" name="affiliate_type" domain="[]" context="{'group_by':'affiliate_type'}"/>
|
||||
<filter string="Converted" name="is_converted" domain="[]" context="{'group_by':'is_converted'}"/>
|
||||
<filter string="Partner" name="affiliate_partner_id" domain="[]" context="{'group_by':'affiliate_partner_id'}"/>
|
||||
<record id="webkul_employees_view_search" model="ir.ui.view">
|
||||
<field name="name">affiliate.visit Search</field>
|
||||
<field name="model">affiliate.visit</field>
|
||||
<field name="arch" type="xml">
|
||||
<search string="Search Employees">
|
||||
<field name="commission_amt" />
|
||||
<field name="state" />
|
||||
<filter string="Not Invoiced" name="state" domain="[('state','!=','invoice')]" />
|
||||
<group string="Group By">
|
||||
<filter string="Method" name="affiliate_method" domain="[]"
|
||||
context="{'group_by':'affiliate_method'}" />
|
||||
<filter string="Type" name="affiliate_type" domain="[]"
|
||||
context="{'group_by':'affiliate_type'}" />
|
||||
<filter string="Converted" name="is_converted" domain="[]"
|
||||
context="{'group_by':'is_converted'}" />
|
||||
<filter string="Partner" name="affiliate_partner_id" domain="[]"
|
||||
context="{'group_by':'affiliate_partner_id'}" />
|
||||
|
||||
|
||||
</group>
|
||||
</search>
|
||||
</field>
|
||||
</record>
|
||||
<record model="ir.actions.act_window" id="affiliate_pps_visit_action">
|
||||
</group>
|
||||
</search>
|
||||
</field>
|
||||
</record>
|
||||
<record model="ir.actions.act_window" id="affiliate_pps_visit_action">
|
||||
<field name="name">Order Report</field>
|
||||
<field name="res_model">affiliate.visit</field>
|
||||
<field name="view_mode">tree,form</field>
|
||||
|
|
@ -108,7 +121,6 @@
|
|||
</record>
|
||||
|
||||
|
||||
|
||||
<record model="ir.actions.act_window" id="affiliate_ppc_visit_action">
|
||||
<field name="name">Traffic Report</field>
|
||||
<field name="res_model">affiliate.visit</field>
|
||||
|
|
@ -117,32 +129,32 @@
|
|||
</record>
|
||||
|
||||
<menuitem name="Reports"
|
||||
id="affiliate_report_visit_menu"
|
||||
parent="affiliate_manager_menu_base_root"
|
||||
id="affiliate_report_visit_menu"
|
||||
parent="affiliate_manager_menu_base_root"
|
||||
sequence='2'
|
||||
/>
|
||||
<menuitem name="Order Report"
|
||||
id="affiliate_order_report_visit_menu"
|
||||
groups='affiliate_management.affiliate_security_user_group'
|
||||
parent="affiliate_report_visit_menu"
|
||||
action="affiliate_pps_visit_action"
|
||||
id="affiliate_order_report_visit_menu"
|
||||
groups='affiliate_management.affiliate_security_user_group'
|
||||
parent="affiliate_report_visit_menu"
|
||||
action="affiliate_pps_visit_action"
|
||||
/>
|
||||
<menuitem name="Traffic Report"
|
||||
id="affiliate_traffic_report_visit_menu"
|
||||
groups='affiliate_management.affiliate_security_user_group'
|
||||
parent="affiliate_report_visit_menu"
|
||||
action="affiliate_ppc_visit_action"
|
||||
id="affiliate_traffic_report_visit_menu"
|
||||
groups='affiliate_management.affiliate_security_user_group'
|
||||
parent="affiliate_report_visit_menu"
|
||||
action="affiliate_ppc_visit_action"
|
||||
/>
|
||||
<menuitem name="Invoicing"
|
||||
id="affiliate_invoicing_visit_menu"
|
||||
parent="affiliate_manager_menu_base_root"
|
||||
id="affiliate_invoicing_visit_menu"
|
||||
parent="affiliate_manager_menu_base_root"
|
||||
sequence='3'
|
||||
/>
|
||||
<menuitem name="Invoice"
|
||||
id="affiliate_invoice_visit_menu"
|
||||
parent="affiliate_invoicing_visit_menu"
|
||||
action="action_move_out_affiliate_invoice_type"
|
||||
id="affiliate_invoice_visit_menu"
|
||||
parent="affiliate_invoicing_visit_menu"
|
||||
action="action_move_out_affiliate_invoice_type"
|
||||
groups='affiliate_management.affiliate_security_user_group'
|
||||
/>
|
||||
</data>
|
||||
</odoo>
|
||||
</odoo>
|
||||
|
|
@ -0,0 +1,11 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<odoo>
|
||||
|
||||
<template id="assets_frontend" name="" inherit_id="website.assets_frontend">
|
||||
<xpath expr="." position="inside">
|
||||
<link rel="stylesheet" type="text/css" href="/affiliate_management/static/src/css/website_affiliate.css"/>
|
||||
<script type="text/javascript" src="/affiliate_management/static/src/js/validation.js"/>
|
||||
</xpath>
|
||||
</template>
|
||||
|
||||
</odoo>
|
||||
|
|
@ -1,29 +1,33 @@
|
|||
<odoo>
|
||||
|
||||
<template id="my_account_link" name="Link to frontend portal" inherit_id="website.footer_custom">
|
||||
<xpath expr="//div[@id='footer']/section/div/div/div/ul" position="inside">
|
||||
<template id="my_account_link" name="Link to frontend portal" inherit_id="website.footer_custom">
|
||||
<xpath expr="//div[@id='footer']/section/div/div/div/ul" position="inside">
|
||||
|
||||
<li><a href="/affiliate/">Affiliate</a></li>
|
||||
<!-- <li>
|
||||
<li>
|
||||
<a href="/affiliate/">Affiliate</a>
|
||||
</li>
|
||||
<!-- <li>
|
||||
<span t-esc="user_id.partner_id.is_affiliate"></span>
|
||||
</li>
|
||||
-->
|
||||
</xpath>
|
||||
</template>
|
||||
</xpath>
|
||||
</template>
|
||||
|
||||
<template id="my_affiliate_link" name="Link to My Affiliate Account" inherit_id="portal.user_dropdown">
|
||||
<xpath expr="//div[@id='o_logout_divider']" position="before">
|
||||
<template id="my_affiliate_link" name="Link to My Affiliate Account"
|
||||
inherit_id="portal.user_dropdown">
|
||||
<xpath expr="//div[@id='o_logout_divider']" position="before">
|
||||
|
||||
<t t-if="user_id.partner_id.is_affiliate">
|
||||
<!-- <li><a href="/affiliate/about" role="menuitem">My Affiliate</a></li> -->
|
||||
<a class="dropdown-item" href="/affiliate/about" role="menuitem"><i class="fa fa-user-circle-o fa-fw me-1 small text-muted"></i> My Affiliate</a>
|
||||
</t>
|
||||
<t t-if="user_id.partner_id.is_affiliate">
|
||||
<!-- <li><a href="/affiliate/about" role="menuitem">My Affiliate</a></li> -->
|
||||
<a class="dropdown-item" href="/affiliate/about" role="menuitem"><i
|
||||
class="fa fa-user-circle-o fa-fw me-1 small text-muted"></i> My Affiliate</a>
|
||||
</t>
|
||||
|
||||
</xpath>
|
||||
</xpath>
|
||||
|
||||
</template>
|
||||
</template>
|
||||
|
||||
<!-- <template id="1" name="1" inherit_id="portal.frontend_layout">
|
||||
<!-- <template id="1" name="1" inherit_id="portal.frontend_layout">
|
||||
<xpath expr="//a[@id='o_logout']" position="before">
|
||||
<t t-if="user_id.partner_id.is_affiliate"> -->
|
||||
<!-- <li><a href="/affiliate/about" role="menuitem">My Affiliate</a></li> -->
|
||||
|
|
@ -34,4 +38,4 @@
|
|||
|
||||
</template> -->
|
||||
|
||||
</odoo>
|
||||
</odoo>
|
||||
|
|
@ -1,12 +1,14 @@
|
|||
<odoo>
|
||||
<!-- <template id="assets_frontend_affiliate" inherit_id="website.assets_frontend" name="Website Affiliate">
|
||||
<!-- <template id="assets_frontend_affiliate" inherit_id="website.assets_frontend" name="Website
|
||||
Affiliate">
|
||||
<xpath expr="." position="inside">
|
||||
<link rel="stylesheet" href="/affiliate_management/static/src/css/website_affiliate.css" />
|
||||
<script type="text/javascript" src="/affiliate_management/static/src/js/validation.js">
|
||||
</script>
|
||||
</xpath>
|
||||
</template> -->
|
||||
<template id="show_sign_in" customize_show="True" inherit_id="website.layout" name="Show Sign In">
|
||||
<template id="show_sign_in" customize_show="True" inherit_id="website.layout"
|
||||
name="Show Sign In">
|
||||
<xpath expr="//header" position="attributes">
|
||||
<attribute name="t-att-style">
|
||||
'display: none;' if affiliate_website and website.user_id == user_id else 'display:;'
|
||||
|
|
@ -22,16 +24,23 @@
|
|||
<div class="col-lg-6">
|
||||
<div class="navbar-header">
|
||||
<a href="/" class="navbar-brand logo">
|
||||
<!-- <img src="/logo.png" t-att-alt="'Logo of %s' % res_company.name" t-att-title="res_company.name" /> -->
|
||||
<span t-field="website.logo" t-options="{'widget': 'image', 'width': 95, 'height': 40}" role="img" t-att-aria-label="'Logo of %s' % website.name" t-att-title="website.name"/>
|
||||
<!-- <img src="/logo.png" t-att-alt="'Logo of %s' %
|
||||
res_company.name" t-att-title="res_company.name" /> -->
|
||||
<span t-field="website.logo"
|
||||
t-options="{'widget': 'image', 'width': 95, 'height': 40}"
|
||||
role="img"
|
||||
t-att-aria-label="'Logo of %s' % website.name"
|
||||
t-att-title="website.name" />
|
||||
</a>
|
||||
<div style="margin-top:-29px;">
|
||||
<span class="" style="margin-right: 15px;margin-left: 15px;">
|
||||
<span class=""
|
||||
style="margin-right: 15px;margin-left: 15px;">
|
||||
<a href="/" class="">
|
||||
Home
|
||||
</a>
|
||||
</span>
|
||||
<span class="" style="margin-right: 15px;margin-left: 15px;">
|
||||
<span class=""
|
||||
style="margin-right: 15px;margin-left: 15px;">
|
||||
<a href="/shop" class="">
|
||||
Shop
|
||||
</a>
|
||||
|
|
@ -41,20 +50,38 @@
|
|||
</div>
|
||||
<div class="col-lg-6">
|
||||
<t t-if="enable_login">
|
||||
<form role="form" t-attf-action="/web/login" method="post" onsubmit="this.action = this.action + location.hash">
|
||||
<input type="hidden" name="csrf_token" t-att-value="request.csrf_token()" />
|
||||
<input type="hidden" name="affiliate_login_form" value="True" />
|
||||
<form role="form" t-attf-action="/web/login"
|
||||
method="post"
|
||||
onsubmit="this.action = this.action + location.hash">
|
||||
<input type="hidden" name="csrf_token"
|
||||
t-att-value="request.csrf_token()" />
|
||||
<input type="hidden" name="affiliate_login_form"
|
||||
value="True" />
|
||||
<div class="row">
|
||||
<ul class="navbar-nav ms-auto" id="wk_top_menu" style="padding:10px;">
|
||||
<li class="nav-link field-login pe-1 ps-1 me-0">
|
||||
<input type="text" name="login" t-att-value="login if test else '' " id="login" class="form-control" required="required" autofocus="autofocus" placeholder="Email Id" />
|
||||
<ul class="navbar-nav ms-auto" id="wk_top_menu"
|
||||
style="padding:10px;">
|
||||
<li
|
||||
class="nav-link field-login pe-1 ps-1 me-0">
|
||||
<input type="text" name="login"
|
||||
t-att-value="login if test else '' "
|
||||
id="login" class="form-control"
|
||||
required="required"
|
||||
autofocus="autofocus"
|
||||
placeholder="Email Id" />
|
||||
</li>
|
||||
<li class="nav-link field-password ps-1 ms-0">
|
||||
<input type="password" name="password" id="password" class="form-control" required="required" t-att-autofocus="'autofocus' if login else None" placeholder="Password" />
|
||||
<li
|
||||
class="nav-link field-password ps-1 ms-0">
|
||||
<input type="password" name="password"
|
||||
id="password" class="form-control"
|
||||
required="required"
|
||||
t-att-autofocus="'autofocus' if login else None"
|
||||
placeholder="Password" />
|
||||
</li>
|
||||
<input type="hidden" name="redirect" t-att-value="redirect" />
|
||||
<input type="hidden" name="redirect"
|
||||
t-att-value="redirect" />
|
||||
<li class="clearfix oe_login_buttons mt-2">
|
||||
<button type="submit" class="btn btn-primary">
|
||||
<button type="submit"
|
||||
class="btn btn-primary">
|
||||
Log in
|
||||
</button>
|
||||
</li>
|
||||
|
|
@ -85,9 +112,10 @@
|
|||
-->
|
||||
<!--
|
||||
<xpath expr="//header" position="attributes">
|
||||
<attribute name="t-att-style">'display:;' if affiliate_website and (website.user_id != user_id) else 'display:none;' </attribute>
|
||||
<attribute name="t-att-style">'display:;' if affiliate_website and (website.user_id != user_id)
|
||||
else 'display:none;' </attribute>
|
||||
|
||||
</xpath>
|
||||
-->
|
||||
</template>
|
||||
</odoo>
|
||||
</odoo>
|
||||
|
|
@ -11,8 +11,10 @@
|
|||
<p class="alert alert-success" t-if="success">
|
||||
<t t-esc="success" />
|
||||
</p>
|
||||
<!-- <div class='affiliate_banner' t-attf-style="background-image: url('data:image/png;base64,#{banner_image}'),url('/affiliate_management/static/src/img/cover-banner.jpg');height:400px"> -->
|
||||
<div class="d-md-flex justify-content-center align-items-center affiliate_banner" t-attf-style="background-image: url('data:image/png;base64,#{banner_image}'),url('/affiliate_management/static/src/img/cover-banner.jpg');background-size: cover;">
|
||||
<!-- <div class='affiliate_banner' t-attf-style="background-image:
|
||||
url('data:image/png;base64,#{banner_image}'),url('/affiliate_management/static/src/img/cover-banner.jpg');height:400px"> -->
|
||||
<div class="d-md-flex justify-content-center align-items-center affiliate_banner"
|
||||
t-attf-style="background-image: url('data:image/png;base64,#{banner_image}'),url('/affiliate_management/static/src/img/cover-banner.jpg');background-size: cover;">
|
||||
<div style="padding:2em;">
|
||||
<div class="banner_detail">
|
||||
<div class="banner_text">
|
||||
|
|
@ -26,15 +28,14 @@
|
|||
<div style="color: white;">
|
||||
<div class="row justify-content-md-center">
|
||||
<div class="col-md-8 text-center">
|
||||
<img class="mt-1" src="/affiliate_management/static/src/img/icon-check.svg" />
|
||||
Generate Links & Banners   
|
||||
<img class="mt-1" src="/affiliate_management/static/src/img/icon-check.svg" />
|
||||
Root Traffic To "
|
||||
<t t-esc="website_name" />
|
||||
"  
|
||||
<img class="mt-1" src="/affiliate_management/static/src/img/icon-check.svg" />
|
||||
Earn commission
|
||||
</div>
|
||||
<img class="mt-1"
|
||||
src="/affiliate_management/static/src/img/icon-check.svg" />
|
||||
Generate Links & Banners    <img class="mt-1"
|
||||
src="/affiliate_management/static/src/img/icon-check.svg" />
|
||||
Root Traffic To " <t t-esc="website_name" /> "   <img
|
||||
class="mt-1"
|
||||
src="/affiliate_management/static/src/img/icon-check.svg" />
|
||||
Earn commission </div>
|
||||
</div>
|
||||
</div>
|
||||
<t t-if="website.user_id == user_id ">
|
||||
|
|
@ -43,10 +44,19 @@
|
|||
</div>
|
||||
<div class="aff_box" style="padding-bottom:15px;">
|
||||
<br />
|
||||
<form role="form" class="form-inline justify-content-center d-flex">
|
||||
<!-- <input type="hidden" name="csrf_token" t-att-value="request.csrf_token()"/> -->
|
||||
<input type="email" name="email" t-att-value="login" id="register_login" class="mt-2 form-control signup_input" required="required" autofocus="autofocus" placeholder="Enter Your Email" style="width:450px;height:50px;font-size: 18px;" />
|
||||
<button type="submit" id="join-btn" class="btn btn-success mt-2" style="width:250px;height:50px;">
|
||||
<form role="form"
|
||||
class="form-inline justify-content-center d-flex">
|
||||
<!-- <input type="hidden" name="csrf_token"
|
||||
t-att-value="request.csrf_token()"/> -->
|
||||
<input type="email" name="email" t-att-value="login"
|
||||
id="register_login"
|
||||
class="mt-2 form-control signup_input"
|
||||
required="required" autofocus="autofocus"
|
||||
placeholder="Enter Your Email"
|
||||
style="width:450px;height:50px;font-size: 18px;" />
|
||||
<button type="submit" id="join-btn"
|
||||
class="btn btn-success mt-2"
|
||||
style="width:250px;height:50px;">
|
||||
JOIN NOW FOR FREE
|
||||
</button>
|
||||
</form>
|
||||
|
|
@ -54,10 +64,14 @@
|
|||
</t>
|
||||
</t>
|
||||
<t t-if="not website.user_id == user_id ">
|
||||
<t t-if="not user_id.partner_id.is_affiliate and ( not request.env['affiliate.request'].sudo().checkRequestExists(user_id))">
|
||||
<div id="aff_req_btn" style="padding-bottom: 15px;margin-top:10px;">
|
||||
<t
|
||||
t-if="not user_id.partner_id.is_affiliate and ( not request.env['affiliate.request'].sudo().checkRequestExists(user_id))">
|
||||
<div id="aff_req_btn"
|
||||
style="padding-bottom: 15px;margin-top:10px;">
|
||||
<center>
|
||||
<button t-att-id="'yes_btn_uid_%s'%(user_id.id)" class="btn btn-success" style="width:250px;height:47px;">
|
||||
<button t-att-id="'yes_btn_uid_%s'%(user_id.id)"
|
||||
class="btn btn-success"
|
||||
style="width:250px;height:47px;">
|
||||
JOIN NOW FOR FREE
|
||||
</button>
|
||||
</center>
|
||||
|
|
@ -68,52 +82,63 @@
|
|||
<div class="alert_msg_banner">
|
||||
<center>
|
||||
<span style="color:white">
|
||||
<img src="/affiliate_management/static/src/img/Icon_tick.png" />
|
||||
Your Request has been submitted sucessfully. Soon you will be notify by email.
|
||||
</span>
|
||||
<img
|
||||
src="/affiliate_management/static/src/img/Icon_tick.png" />
|
||||
Your Request has been submitted sucessfully. Soon you will
|
||||
be notify by email. </span>
|
||||
</center>
|
||||
</div>
|
||||
<!-- message for pending state -->
|
||||
<t t-if="request.env['affiliate.request'].sudo().checkRequeststate(user_id) == 'pending'">
|
||||
<t
|
||||
t-if="request.env['affiliate.request'].sudo().checkRequeststate(user_id) == 'pending'">
|
||||
<div class="alert_msg_banner_1" style="margin-top:10px;">
|
||||
<center>
|
||||
<span style="color:white">
|
||||
<img src="/affiliate_management/static/src/img/alert.png" />
|
||||
Your application is currently being reviewed, soon you will receive an Approval confirmation mail and thereafter you will able to access your Affiliate account on our website.
|
||||
</span>
|
||||
<img
|
||||
src="/affiliate_management/static/src/img/alert.png" />
|
||||
Your application is currently being reviewed, soon you
|
||||
will receive an Approval confirmation mail and
|
||||
thereafter you will able to access your Affiliate
|
||||
account on our website. </span>
|
||||
</center>
|
||||
</div>
|
||||
<div style="margin-top:10px;">
|
||||
<center>
|
||||
<a href="/shop" class="btn btn-success" style="width:177px;height:37px;position:relative;">
|
||||
<a href="/shop" class="btn btn-success"
|
||||
style="width:177px;height:37px;position:relative;">
|
||||
Continue Shopping
|
||||
</a>
|
||||
</center>
|
||||
</div>
|
||||
</t>
|
||||
<!-- message for cancel stage -->
|
||||
<t t-if="request.env['affiliate.request'].sudo().checkRequeststate(user_id) == 'cancel'">
|
||||
<t
|
||||
t-if="request.env['affiliate.request'].sudo().checkRequeststate(user_id) == 'cancel'">
|
||||
<div class="alert_msg_banner_1" style="margin-top:10px;">
|
||||
<center>
|
||||
<span style="color:white">
|
||||
<img src="/affiliate_management/static/src/img/error.png" />
|
||||
Sorry to say! your request to become an affiliate for us is rejected by Admin.
|
||||
</span>
|
||||
<img
|
||||
src="/affiliate_management/static/src/img/error.png" />
|
||||
Sorry to say! your request to become an affiliate for us
|
||||
is rejected by Admin. </span>
|
||||
</center>
|
||||
</div>
|
||||
<div style="margin-top:10px;">
|
||||
<center>
|
||||
<a href="/shop" class="btn btn-success" style="width:177px;height:37px;position:relative;">
|
||||
<a href="/shop" class="btn btn-success"
|
||||
style="width:177px;height:37px;position:relative;">
|
||||
Continue Shopping
|
||||
</a>
|
||||
</center>
|
||||
</div>
|
||||
</t>
|
||||
<t t-if="request.env['affiliate.request'].sudo().search([('user_id','=',user_id.id)]).state == 'aproove'">
|
||||
<t
|
||||
t-if="request.env['affiliate.request'].sudo().search([('user_id','=',user_id.id)]).state == 'aproove'">
|
||||
<div>
|
||||
<center>
|
||||
<div style="margin-top:10px;">
|
||||
<a href="/affiliate/about" class="btn btn-success" style="width:250px;height:37px;position:relative;">
|
||||
<a href="/affiliate/about" class="btn btn-success"
|
||||
style="width:250px;height:37px;position:relative;">
|
||||
View My Affiliate Account
|
||||
</a>
|
||||
</div>
|
||||
|
|
@ -125,16 +150,20 @@
|
|||
</div>
|
||||
<!-- </div> -->
|
||||
<div class="container-fluid">
|
||||
<div class="row justify-content-md-center" style="background-color: #dee0e2; text-align: center;">
|
||||
<div class="row justify-content-md-center"
|
||||
style="background-color: #dee0e2; text-align: center;">
|
||||
<div class="col-md-8">
|
||||
<div style="padding:20px">
|
||||
<h3>
|
||||
About Our Affiliate Program
|
||||
</h3>
|
||||
Affiliate Management is a program where you can earn commission just by advertising our products on your website/blog .
|
||||
Commission will be earned by you everytime when a user makes a purchase by visiting us through you (means through the product link which you publish on your website/blog).
|
||||
There is zero cost involvement in joining the affiliate program which makes it distinct, low risk and high reward marketing and sales strategy as compared to others.
|
||||
</div>
|
||||
</h3> Affiliate
|
||||
Management is a program where you can earn commission just by
|
||||
advertising our products on your website/blog . Commission will be
|
||||
earned by you everytime when a user makes a purchase by visiting us
|
||||
through you (means through the product link which you publish on
|
||||
your website/blog). There is zero cost involvement in joining the
|
||||
affiliate program which makes it distinct, low risk and high reward
|
||||
marketing and sales strategy as compared to others. </div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row justify-content-md-center">
|
||||
|
|
@ -156,20 +185,27 @@
|
|||
<div class="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>
|
||||
<img src="/affiliate_management/static/src/img/icon-stats-management.svg" class="col-lg-3 mt-4" style="height: 180px;" />
|
||||
</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>
|
||||
<img src="/affiliate_management/static/src/img/icon-stats-management.svg"
|
||||
class="col-lg-3 mt-4" style="height: 180px;" />
|
||||
</div>
|
||||
<div class="row justify-content-md-center" id="affilaite_tool" style="text-align: left;">
|
||||
<img src="/affiliate_management/static/src/img/icon-affiliate-tools.svg" class="col-lg-3 mt-4" style="height: 180px;" />
|
||||
<div class="row justify-content-md-center" id="affilaite_tool"
|
||||
style="text-align: left;">
|
||||
<img src="/affiliate_management/static/src/img/icon-affiliate-tools.svg"
|
||||
class="col-lg-3 mt-4" 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 easliy manage his affiliate program.
|
||||
Through our tools, its easy to build the affiliate product links and banners and earn money.
|
||||
</div>
|
||||
</h3> Through our specially designed
|
||||
Affiliate Tools namely “Affiliate Link Generator” and “Product Link
|
||||
Generator” user can easliy manage his affiliate program. Through our
|
||||
tools, its easy to build the affiliate product links and banners and
|
||||
earn money. </div>
|
||||
</div>
|
||||
<div class="text-center" id="affilaite_faq">
|
||||
</div>
|
||||
|
|
@ -179,4 +215,4 @@
|
|||
</t>
|
||||
</template>
|
||||
</data>
|
||||
</odoo>
|
||||
</odoo>
|
||||
|
|
@ -2,33 +2,40 @@
|
|||
<data>
|
||||
|
||||
<record id="join_affiliate_email" model="mail.template">
|
||||
<field name="name">Affiliate Request Connection</field>
|
||||
<field name="model_id" ref="affiliate_management.model_affiliate_request"/>
|
||||
<field name="email_from">"{{ object.partner_id.company_id.name or user.name}}" <{{ (object.partner_id.company_id.email or user.email) }}></field>
|
||||
<field name="email_to">{{ object.partner_id.email_formatted or object.name or '' }}</field>
|
||||
<field name="subject"> Invitation to connect on Affiliate Program</field>
|
||||
<field name="body_html" type="html">
|
||||
<field name="name">Affiliate Request Connection</field>
|
||||
<field name="model_id" ref="affiliate_management.model_affiliate_request" />
|
||||
<field name="email_from">"{{ object.partner_id.company_id.name or user.name}}" <{{
|
||||
(object.partner_id.company_id.email or user.email) }}></field>
|
||||
<field name="email_to">{{ object.partner_id.email_formatted or object.name or '' }}</field>
|
||||
<field name="subject"> Invitation to connect on Affiliate Program</field>
|
||||
<field name="body_html" type="html">
|
||||
|
||||
<div style="padding:0px;width:600px;margin:auto;background:#FFFFFF repeat top /100%;color:#777777;">
|
||||
<p>Dear <t t-out="object.partner_id.name or object.name or ''">Marc Demo</t>,</p>
|
||||
<div
|
||||
style="padding:0px;width:600px;margin:auto;background:#FFFFFF repeat top /100%;color:#777777;">
|
||||
<p>Dear <t t-out="object.partner_id.name or object.name or ''">Marc Demo</t>,</p>
|
||||
<p>
|
||||
You have been invited to connect to Affiliate Program in order to get access to your Account please complete your sign up process.
|
||||
</p>
|
||||
You have been invited to connect to Affiliate Program in order to get access to your
|
||||
Account please complete your sign up process.
|
||||
</p>
|
||||
<p>
|
||||
To accept the invitation, click on the following link:
|
||||
</p>
|
||||
<div style="text-align: center; margin-top: 16px;">
|
||||
<a t-attf-href="/affiliate/signup?db={{ object.env.cr.dbname }}&token={{ object.signup_token or 'testtoken'}}" style="padding: 5px 10px; font-size: 12px; line-height: 18px; color: #FFFFFF; border-color:#875A7B; text-decoration: none; display: inline-block; margin-bottom: 0px; font-weight: 400; text-align: center; vertical-align: middle; cursor: pointer; white-space: nowrap; background-image: none; background-color: #875A7B; border: 1px solid #875A7B; border-radius:3px">Accept invitation to Affiliate Program</a>
|
||||
</div>
|
||||
Best regards,<br/>
|
||||
<t t-if="user.signature">
|
||||
<br/>
|
||||
<t t-out="user.signature or ''">--<br/>Mitchell Admin</t>
|
||||
</t>
|
||||
</div>
|
||||
To accept the invitation, click on the following link:
|
||||
</p>
|
||||
<div
|
||||
style="text-align: center; margin-top: 16px;">
|
||||
<a
|
||||
t-attf-href="/affiliate/signup?db={{ object.env.cr.dbname }}&token={{ object.signup_token or 'testtoken'}}"
|
||||
style="padding: 5px 10px; font-size: 12px; line-height: 18px; color: #FFFFFF; border-color:#875A7B; text-decoration: none; display: inline-block; margin-bottom: 0px; font-weight: 400; text-align: center; vertical-align: middle; cursor: pointer; white-space: nowrap; background-image: none; background-color: #875A7B; border: 1px solid #875A7B; border-radius:3px">Accept
|
||||
invitation to Affiliate Program</a>
|
||||
</div> Best regards,<br />
|
||||
<t
|
||||
t-if="user.signature">
|
||||
<br />
|
||||
<t t-out="user.signature or ''">--<br />Mitchell Admin</t>
|
||||
</t>
|
||||
</div>
|
||||
|
||||
</field>
|
||||
</record>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
</data>
|
||||
</odoo>
|
||||
</odoo>
|
||||
|
|
@ -1,210 +1,231 @@
|
|||
<odoo>
|
||||
<data>
|
||||
<data>
|
||||
<template id="payment_tree" name="Payment Index">
|
||||
<t t-call="website.layout">
|
||||
<t t-if="user_id.partner_id.is_affiliate">
|
||||
<div class="oe_structure">
|
||||
<div class="container mt16">
|
||||
<div class="navbar navbar-expand-md navbar-light" style="background-color: #3aadaa">
|
||||
<div>
|
||||
<t t-call="website.layout">
|
||||
<t t-if="user_id.partner_id.is_affiliate">
|
||||
<div class="oe_structure">
|
||||
<div class="container mt16">
|
||||
<div class="navbar navbar-expand-md navbar-light" style="background-color: #3aadaa">
|
||||
<div>
|
||||
|
||||
<div>
|
||||
<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>
|
||||
<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>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- add form here tree view -->
|
||||
<div class="container mt16">
|
||||
<h3 class="page-header">Your Payments</h3>
|
||||
<t t-if="not invoices">
|
||||
<p>There are currently no invoices for your account.</p>
|
||||
</t>
|
||||
<t t-if="invoices">
|
||||
<table class="table table-hover o_my_status_table">
|
||||
<thead>
|
||||
<tr class="active">
|
||||
<th>Invoice Number </th>
|
||||
<th>Amount</th>
|
||||
<th>Date</th>
|
||||
<th>State</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<t t-foreach="invoices" t-as="i">
|
||||
<tr>
|
||||
<td>
|
||||
<a t-attf-href="/my/invoice/{{i.id}}?{{keep_query()}}"><t t-esc="i.name"/></a>
|
||||
</td>
|
||||
<td><span t-field="i.amount_total"/></td>
|
||||
<td><span t-field="i.invoice_date"/></td>
|
||||
<td><span t-field="i.payment_state" /></td>
|
||||
</tr>
|
||||
</t>
|
||||
</table>
|
||||
<div t-if="pager" class="o_portal_pager text-center">
|
||||
<t t-call="website.pager"/>
|
||||
</div>
|
||||
</t>
|
||||
</div>
|
||||
<!-- add form here tree view -->
|
||||
<div class="container mt16">
|
||||
<h3 class="page-header">Your Payments</h3>
|
||||
<t t-if="not invoices">
|
||||
<p>There are currently no invoices for your account.</p>
|
||||
</t>
|
||||
<t t-if="invoices">
|
||||
<table class="table table-hover o_my_status_table">
|
||||
<thead>
|
||||
<tr class="active">
|
||||
<th>Invoice Number </th>
|
||||
<th>Amount</th>
|
||||
<th>Date</th>
|
||||
<th>State</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<t t-foreach="invoices" t-as="i">
|
||||
<tr>
|
||||
<td>
|
||||
<a t-attf-href="/my/invoice/{{i.id}}?{{keep_query()}}">
|
||||
<t t-esc="i.name" />
|
||||
</a>
|
||||
</td>
|
||||
<td>
|
||||
<span t-field="i.amount_total" />
|
||||
</td>
|
||||
<td>
|
||||
<span t-field="i.invoice_date" />
|
||||
</td>
|
||||
<td>
|
||||
<span t-field="i.payment_state" />
|
||||
</td>
|
||||
</tr>
|
||||
</t>
|
||||
</table>
|
||||
<div t-if="pager" class="o_portal_pager text-center">
|
||||
<t t-call="website.pager" />
|
||||
</div>
|
||||
</t>
|
||||
</div>
|
||||
</t>
|
||||
</template>
|
||||
</t>
|
||||
</template>
|
||||
|
||||
|
||||
|
||||
|
||||
<template id="payment_form" name="Payment Show">
|
||||
<t t-call="website.layout">
|
||||
<t t-if="user_id.partner_id.is_affiliate">
|
||||
<template id="payment_form" name="Payment Show">
|
||||
<t t-call="website.layout">
|
||||
<t t-if="user_id.partner_id.is_affiliate">
|
||||
<t t-if="invoice">
|
||||
<div class="oe_structure">
|
||||
<div class="container mt16">
|
||||
<div class="oe_structure">
|
||||
<div class="container mt16">
|
||||
<div class="navbar navbar-expand-md navbar-light" style="background-color: #3aadaa">
|
||||
<!-- <a class="navbar-brand" t-attf-href="/forum/#{slug(forum)}">
|
||||
<!-- <a class="navbar-brand" t-attf-href="/forum/#{slug(forum)}">
|
||||
<span t-field="forum.name"/>
|
||||
</a> -->
|
||||
<!-- <button type="button" class="navbar-toggler" data-toggle="collapse" data-target="#oe-help-navbar-collapse">
|
||||
<!-- <button type="button" class="navbar-toggler" data-toggle="collapse"
|
||||
data-target="#oe-help-navbar-collapse">
|
||||
<span class="navbar-toggler-icon"/>
|
||||
</button> -->
|
||||
<div>
|
||||
<div>
|
||||
|
||||
<ul class="navbar-nav">
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" href="/affiliate/about" style="color:#fff;">
|
||||
<i class="fa fa-home fa-2x"></i>
|
||||
</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link mt-1 ps-2 ms-1" href="/affiliate/payment" style="color:#fff;border-left: 3px solid;">
|
||||
Payment
|
||||
</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link mt-1 ps-2 ms-1" t-attf-href="/my/invoice/{{invoice.id}}?{{keep_query()}}" style="color:#fff;border-left: 3px solid;">
|
||||
Invoice <t t-esc="invoice.name"/>
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<ul class="navbar-nav">
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" href="/affiliate/about" style="color:#fff;">
|
||||
<i class="fa fa-home fa-2x"></i>
|
||||
</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link mt-1 ps-2 ms-1" href="/affiliate/payment"
|
||||
style="color:#fff;border-left: 3px solid;">
|
||||
Payment
|
||||
</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link mt-1 ps-2 ms-1"
|
||||
t-attf-href="/my/invoice/{{invoice.id}}?{{keep_query()}}"
|
||||
style="color:#fff;border-left: 3px solid;"> Invoice <t
|
||||
t-esc="invoice.name" />
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</t>
|
||||
</div>
|
||||
</t>
|
||||
|
||||
<div class="container mt16 mb-3">
|
||||
<div class="panel-body">
|
||||
<div class="mb8">
|
||||
<strong>Date :</strong> <span t-field="invoice.invoice_date" t-options='{"widget": "date"}'/>
|
||||
</div>
|
||||
<div class="container mt16 mb-3">
|
||||
<div class="panel-body">
|
||||
<div class="mb8">
|
||||
<strong>Date :</strong>
|
||||
<span t-field="invoice.invoice_date" t-options='{"widget": "date"}' />
|
||||
</div>
|
||||
|
||||
<div class="mb8">
|
||||
<strong>Invoice State :</strong> <span t-field="invoice.payment_state"/>
|
||||
</div>
|
||||
<div class="mb8">
|
||||
<strong>Invoice State :</strong>
|
||||
<span t-field="invoice.payment_state" />
|
||||
</div>
|
||||
|
||||
<!-- <t t-if="invoice.aff_visit_id.sales_order_line_id">
|
||||
<!-- <t t-if="invoice.aff_visit_id.sales_order_line_id">
|
||||
<div class="mb8">
|
||||
<strong>Source :</strong> <span t-field="invoice.aff_visit_id.sales_order_line_id.order_id.name"/>
|
||||
</div>
|
||||
</t> -->
|
||||
<hr/>
|
||||
<h1>Invoice <span t-field="invoice.name"/></h1>
|
||||
<hr />
|
||||
<h1>Invoice <span t-field="invoice.name" /></h1>
|
||||
|
||||
|
||||
<table class="table table-hover o_my_status_table">
|
||||
<thead>
|
||||
<tr class="active">
|
||||
|
||||
<table class="table table-hover o_my_status_table">
|
||||
<thead>
|
||||
<tr class="active">
|
||||
<th>Click To Check Details</th>
|
||||
<th>Item Name</th>
|
||||
<th>Item Type</th>
|
||||
<th>Conversion Date</th>
|
||||
<!-- <t t-if="invoice.aff_visit_id.sales_order_line_id"> -->
|
||||
<th>Commission Matrix</th>
|
||||
<!-- </t> -->
|
||||
<th>Commission Value</th>
|
||||
|
||||
<th>Click To Check Details</th>
|
||||
<th>Item Name</th>
|
||||
<th>Item Type</th>
|
||||
<th>Conversion Date</th>
|
||||
<!-- <t t-if="invoice.aff_visit_id.sales_order_line_id"> -->
|
||||
<th>Commission Matrix</th>
|
||||
<!-- </t> -->
|
||||
<th>Commission Value</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<t t-foreach="invoice.aff_visit_id" t-as="i">
|
||||
<tr>
|
||||
<t t-if="i.sales_order_line_id">
|
||||
<td>
|
||||
<a t-attf-href="/my/order/{{i.id}}?{{keep_query()}}">
|
||||
<t t-esc="i.name" />
|
||||
</a>
|
||||
</td>
|
||||
</t>
|
||||
|
||||
</tr>
|
||||
</thead>
|
||||
<t t-foreach="invoice.aff_visit_id" t-as="i">
|
||||
<tr>
|
||||
<t t-if="i.sales_order_line_id">
|
||||
<td>
|
||||
<a t-attf-href="/my/order/{{i.id}}?{{keep_query()}}">
|
||||
<t t-esc="i.name"/>
|
||||
</a>
|
||||
</td>
|
||||
</t>
|
||||
<t t-if="not i.sales_order_line_id">
|
||||
<td>
|
||||
<a t-attf-href="/my/traffic/{{i.id}}?{{keep_query()}}">
|
||||
<t t-esc="i.name" />
|
||||
</a>
|
||||
</td>
|
||||
</t>
|
||||
|
||||
<t t-if="not i.sales_order_line_id">
|
||||
<td>
|
||||
<a t-attf-href="/my/traffic/{{i.id}}?{{keep_query()}}">
|
||||
<t t-esc="i.name"/>
|
||||
</a>
|
||||
</td>
|
||||
</t>
|
||||
<td>
|
||||
<span t-field="i.type_name" />
|
||||
</td>
|
||||
<td>
|
||||
<span t-field="i.affiliate_type" />
|
||||
</td>
|
||||
<td>
|
||||
<span t-field="i.convert_date" />
|
||||
</td>
|
||||
<td>
|
||||
<!-- <t t-if="i.sales_order_line_id"> -->
|
||||
<span t-field="i.amt_type" />
|
||||
<!-- </t> -->
|
||||
</td>
|
||||
<td>
|
||||
<span t-field="i.commission_amt" />
|
||||
</td>
|
||||
|
||||
<td><span t-field="i.type_name"/></td>
|
||||
<td><span t-field="i.affiliate_type" /></td>
|
||||
<td><span t-field="i.convert_date" /></td>
|
||||
<td>
|
||||
<!-- <t t-if="i.sales_order_line_id"> -->
|
||||
<span t-field="i.amt_type"/>
|
||||
<!-- </t> -->
|
||||
</td>
|
||||
<td><span t-field="i.commission_amt" /></td>
|
||||
|
||||
</tr>
|
||||
</t>
|
||||
</table>
|
||||
</tr>
|
||||
</t>
|
||||
</table>
|
||||
|
||||
|
||||
<hr />
|
||||
<div class="row">
|
||||
|
||||
<hr/>
|
||||
<div class="row">
|
||||
|
||||
<span class="col-md-10 text-end">
|
||||
<strong>Total :</strong>
|
||||
</span>
|
||||
<span class="col-md-2 text-start">
|
||||
<span t-field="invoice.amount_total"/>
|
||||
</span>
|
||||
<span class="col-md-10 text-end">
|
||||
<strong>Total :</strong>
|
||||
</span>
|
||||
<span class="col-md-2 text-start">
|
||||
<span t-field="invoice.amount_total" />
|
||||
</span>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</t>
|
||||
</t>
|
||||
</template>
|
||||
</t>
|
||||
</template>
|
||||
|
||||
|
||||
</data>
|
||||
</odoo>
|
||||
</odoo>
|
||||
|
|
@ -1,28 +1,30 @@
|
|||
<odoo>
|
||||
<data>
|
||||
<data>
|
||||
|
||||
<record id="reject_affiliate_email" model="mail.template">
|
||||
<field name="name">Affiliate reject mail Connection</field>
|
||||
<field name="model_id" ref="affiliate_management.model_affiliate_request"/>
|
||||
<field name="email_from">"{{ object.partner_id.company_id.name or user.name }}" <{{ (object.partner_id.company_id.email or user.email) }}></field>
|
||||
<field name="email_to">{{ object.partner_id.email_formatted or object.name or '' }}</field>
|
||||
<field name="subject"> Reject your request on Affiliate Program</field>
|
||||
<field name="body_html" type="html">
|
||||
<record id="reject_affiliate_email" model="mail.template">
|
||||
<field name="name">Affiliate reject mail Connection</field>
|
||||
<field name="model_id" ref="affiliate_management.model_affiliate_request" />
|
||||
<field name="email_from">"{{ object.partner_id.company_id.name or user.name }}" <{{
|
||||
(object.partner_id.company_id.email or user.email) }}></field>
|
||||
<field name="email_to">{{ object.partner_id.email_formatted or object.name or '' }}</field>
|
||||
<field name="subject"> Reject your request on Affiliate Program</field>
|
||||
<field name="body_html" type="html">
|
||||
|
||||
<div style="padding:0px;width:600px;margin:auto;background: #FFFFFF repeat top /100%;color:#777777">
|
||||
<p>Dear <t t-out="object.partner_id.name or object.name or ''">Marc Demo</t>,</p>
|
||||
<div
|
||||
style="padding:0px;width:600px;margin:auto;background: #FFFFFF repeat top /100%;color:#777777">
|
||||
<p>Dear <t t-out="object.partner_id.name or object.name or ''">Marc Demo</t>,</p>
|
||||
<p>
|
||||
Sorry your Affiliate Program request is rejected.
|
||||
</p>
|
||||
Best regards,<br/>
|
||||
Sorry your Affiliate Program request is rejected.
|
||||
</p>
|
||||
Best regards,<br />
|
||||
<t t-if="user.signature">
|
||||
<br/>
|
||||
<t t-out="user.signature or ''">--<br/>Mitchell Admin</t>
|
||||
</t>
|
||||
</div>
|
||||
<br />
|
||||
<t t-out="user.signature or ''">--<br />Mitchell Admin</t>
|
||||
</t>
|
||||
</div>
|
||||
|
||||
</field>
|
||||
</record>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
</data>
|
||||
</odoo>
|
||||
</data>
|
||||
</odoo>
|
||||
|
|
@ -5,27 +5,35 @@
|
|||
<t t-if="user_id.partner_id.is_affiliate">
|
||||
<div class="oe_structure">
|
||||
<div class="container mt16">
|
||||
<div class="navbar navbar-expand-md navbar-light" style="background-color: #3aadaa">
|
||||
<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;">
|
||||
<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;">
|
||||
<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;">
|
||||
<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;">
|
||||
<a class="nav-link mt-1 ps-2 ms-1"
|
||||
href="/affiliate/tool"
|
||||
style=" color: white;border-left: 3px solid;">
|
||||
Tools
|
||||
</a>
|
||||
</li>
|
||||
|
|
@ -44,58 +52,69 @@
|
|||
</strong>
|
||||
</h2>
|
||||
<div class="container">
|
||||
<div class="p-2" style="border: 2px solid #3aadaa;border-radius: 20px;">
|
||||
<div class="p-2"
|
||||
style="border: 2px solid #3aadaa;border-radius: 20px;">
|
||||
<h4>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="#3aadaa" class="bi bi-currency-exchange" viewBox="0 0 16 16">
|
||||
<path d="M0 5a5.002 5.002 0 0 0 4.027 4.905 6.46 6.46 0 0 1 .544-2.073C3.695 7.536 3.132 6.864 3 5.91h-.5v-.426h.466V5.05c0-.046 0-.093.004-.135H2.5v-.427h.511C3.236 3.24 4.213 2.5 5.681 2.5c.316 0 .59.031.819.085v.733a3.46 3.46 0 0 0-.815-.082c-.919 0-1.538.466-1.734 1.252h1.917v.427h-1.98c-.003.046-.003.097-.003.147v.422h1.983v.427H3.93c.118.602.468 1.03 1.005 1.229a6.5 6.5 0 0 1 4.97-3.113A5.002 5.002 0 0 0 0 5zm16 5.5a5.5 5.5 0 1 1-11 0 5.5 5.5 0 0 1 11 0zm-7.75 1.322c.069.835.746 1.485 1.964 1.562V14h.54v-.62c1.259-.086 1.996-.74 1.996-1.69 0-.865-.563-1.31-1.57-1.54l-.426-.1V8.374c.54.06.884.347.966.745h.948c-.07-.804-.779-1.433-1.914-1.502V7h-.54v.629c-1.076.103-1.808.732-1.808 1.622 0 .787.544 1.288 1.45 1.493l.358.085v1.78c-.554-.08-.92-.376-1.003-.787H8.25zm1.96-1.895c-.532-.12-.82-.364-.82-.732 0-.41.311-.719.824-.809v1.54h-.005zm.622 1.044c.645.145.943.38.943.796 0 .474-.37.8-1.02.86v-1.674l.077.018z" />
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="24"
|
||||
height="24" fill="#3aadaa"
|
||||
class="bi bi-currency-exchange"
|
||||
viewBox="0 0 16 16">
|
||||
<path
|
||||
d="M0 5a5.002 5.002 0 0 0 4.027 4.905 6.46 6.46 0 0 1 .544-2.073C3.695 7.536 3.132 6.864 3 5.91h-.5v-.426h.466V5.05c0-.046 0-.093.004-.135H2.5v-.427h.511C3.236 3.24 4.213 2.5 5.681 2.5c.316 0 .59.031.819.085v.733a3.46 3.46 0 0 0-.815-.082c-.919 0-1.538.466-1.734 1.252h1.917v.427h-1.98c-.003.046-.003.097-.003.147v.422h1.983v.427H3.93c.118.602.468 1.03 1.005 1.229a6.5 6.5 0 0 1 4.97-3.113A5.002 5.002 0 0 0 0 5zm16 5.5a5.5 5.5 0 1 1-11 0 5.5 5.5 0 0 1 11 0zm-7.75 1.322c.069.835.746 1.485 1.964 1.562V14h.54v-.62c1.259-.086 1.996-.74 1.996-1.69 0-.865-.563-1.31-1.57-1.54l-.426-.1V8.374c.54.06.884.347.966.745h.948c-.07-.804-.779-1.433-1.914-1.502V7h-.54v.629c-1.076.103-1.808.732-1.808 1.622 0 .787.544 1.288 1.45 1.493l.358.085v1.78c-.554-.08-.92-.376-1.003-.787H8.25zm1.96-1.895c-.532-.12-.82-.364-.82-.732 0-.41.311-.719.824-.809v1.54h-.005zm.622 1.044c.645.145.943.38.943.796 0 .474-.37.8-1.02.86v-1.674l.077.018z" />
|
||||
</svg>
|
||||
<a href="/my/order">
|
||||
Earning by Orders(Pay Per Sale)
|
||||
<small class="ml8">
|
||||
<a href="/my/order"> Earning by Orders(Pay Per Sale) <small
|
||||
class="ml8">
|
||||
<t t-if="pps_count">
|
||||
<span class="badge bg-primary">
|
||||
<t t-esc="pps_count" />
|
||||
</span>
|
||||
</t>
|
||||
<t t-if="not pps_count">
|
||||
There are currently no earnings for your account.
|
||||
There are currently no earnings for your
|
||||
account.
|
||||
</t>
|
||||
</small>
|
||||
</a>
|
||||
</h4>
|
||||
With Pay Per Sale Program of Affiliate Management, publisher will get paid (certain amount of commission) for every
|
||||
<b>
|
||||
With Pay Per Sale Program of Affiliate Management,
|
||||
publisher will get paid (certain amount of commission)
|
||||
for every <b>
|
||||
Sale Generated
|
||||
</b>
|
||||
by the advertisement which he published on his website.
|
||||
</div>
|
||||
</b> by the
|
||||
advertisement which he published on his website. </div>
|
||||
<br />
|
||||
<t t-if="enable_ppc">
|
||||
<div class="p-2" style="border: 2px solid #3aadaa;border-radius: 20px;">
|
||||
<div class="p-2"
|
||||
style="border: 2px solid #3aadaa;border-radius: 20px;">
|
||||
<h4>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="#3aadaa" class="bi bi-currency-exchange" viewBox="0 0 16 16">
|
||||
<path d="M0 5a5.002 5.002 0 0 0 4.027 4.905 6.46 6.46 0 0 1 .544-2.073C3.695 7.536 3.132 6.864 3 5.91h-.5v-.426h.466V5.05c0-.046 0-.093.004-.135H2.5v-.427h.511C3.236 3.24 4.213 2.5 5.681 2.5c.316 0 .59.031.819.085v.733a3.46 3.46 0 0 0-.815-.082c-.919 0-1.538.466-1.734 1.252h1.917v.427h-1.98c-.003.046-.003.097-.003.147v.422h1.983v.427H3.93c.118.602.468 1.03 1.005 1.229a6.5 6.5 0 0 1 4.97-3.113A5.002 5.002 0 0 0 0 5zm16 5.5a5.5 5.5 0 1 1-11 0 5.5 5.5 0 0 1 11 0zm-7.75 1.322c.069.835.746 1.485 1.964 1.562V14h.54v-.62c1.259-.086 1.996-.74 1.996-1.69 0-.865-.563-1.31-1.57-1.54l-.426-.1V8.374c.54.06.884.347.966.745h.948c-.07-.804-.779-1.433-1.914-1.502V7h-.54v.629c-1.076.103-1.808.732-1.808 1.622 0 .787.544 1.288 1.45 1.493l.358.085v1.78c-.554-.08-.92-.376-1.003-.787H8.25zm1.96-1.895c-.532-.12-.82-.364-.82-.732 0-.41.311-.719.824-.809v1.54h-.005zm.622 1.044c.645.145.943.38.943.796 0 .474-.37.8-1.02.86v-1.674l.077.018z" />
|
||||
<svg xmlns="http://www.w3.org/2000/svg"
|
||||
width="24" height="24" fill="#3aadaa"
|
||||
class="bi bi-currency-exchange"
|
||||
viewBox="0 0 16 16">
|
||||
<path
|
||||
d="M0 5a5.002 5.002 0 0 0 4.027 4.905 6.46 6.46 0 0 1 .544-2.073C3.695 7.536 3.132 6.864 3 5.91h-.5v-.426h.466V5.05c0-.046 0-.093.004-.135H2.5v-.427h.511C3.236 3.24 4.213 2.5 5.681 2.5c.316 0 .59.031.819.085v.733a3.46 3.46 0 0 0-.815-.082c-.919 0-1.538.466-1.734 1.252h1.917v.427h-1.98c-.003.046-.003.097-.003.147v.422h1.983v.427H3.93c.118.602.468 1.03 1.005 1.229a6.5 6.5 0 0 1 4.97-3.113A5.002 5.002 0 0 0 0 5zm16 5.5a5.5 5.5 0 1 1-11 0 5.5 5.5 0 0 1 11 0zm-7.75 1.322c.069.835.746 1.485 1.964 1.562V14h.54v-.62c1.259-.086 1.996-.74 1.996-1.69 0-.865-.563-1.31-1.57-1.54l-.426-.1V8.374c.54.06.884.347.966.745h.948c-.07-.804-.779-1.433-1.914-1.502V7h-.54v.629c-1.076.103-1.808.732-1.808 1.622 0 .787.544 1.288 1.45 1.493l.358.085v1.78c-.554-.08-.92-.376-1.003-.787H8.25zm1.96-1.895c-.532-.12-.82-.364-.82-.732 0-.41.311-.719.824-.809v1.54h-.005zm.622 1.044c.645.145.943.38.943.796 0 .474-.37.8-1.02.86v-1.674l.077.018z" />
|
||||
</svg>
|
||||
<a href="/my/traffic">
|
||||
Earning by Traffic(Pay Per Click)
|
||||
<small class="ml8">
|
||||
<a href="/my/traffic"> Earning by Traffic(Pay
|
||||
Per Click) <small class="ml8">
|
||||
<t t-if="ppc_count">
|
||||
<span class="badge bg-primary">
|
||||
<t t-esc="ppc_count" />
|
||||
</span>
|
||||
</t>
|
||||
<t t-if="not ppc_count">
|
||||
There are currently no earnings for your account.
|
||||
There are currently no earnings for
|
||||
your account.
|
||||
</t>
|
||||
</small>
|
||||
</a>
|
||||
</h4>
|
||||
With Pay Per Click Program of Affiliate Mangement, publisher will get paid (certain amount of commission) for
|
||||
<b>
|
||||
With Pay Per Click Program of Affiliate Mangement,
|
||||
publisher will get paid (certain amount of
|
||||
commission) for <b>
|
||||
Directing Traffic
|
||||
</b>
|
||||
to advertiser website from the ad which he advertise on his site.
|
||||
</div>
|
||||
</b> to
|
||||
advertiser website from the ad which he advertise on
|
||||
his site. </div>
|
||||
</t>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -132,22 +151,27 @@
|
|||
<t t-call="website.layout">
|
||||
<div class="oe_structure">
|
||||
<div class="container mt16">
|
||||
<div class="navbar navbar-expand-md navbar-light" style="background-color: #3aadaa">
|
||||
<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;">
|
||||
<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;">
|
||||
<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="/my/traffic" style=" color: white;border-left: 3px solid;">
|
||||
<a class="nav-link mt-1 ps-2 ms-1" href="/my/traffic"
|
||||
style=" color: white;border-left: 3px solid;">
|
||||
Traffic Earnings
|
||||
</a>
|
||||
</li>
|
||||
|
|
@ -199,12 +223,14 @@
|
|||
</td>
|
||||
<td>
|
||||
<t t-if="t.affiliate_type == 'product'">
|
||||
<a t-attf-href="/shop/product/{{t.type_id}}?{{keep_query()}}">
|
||||
<a
|
||||
t-attf-href="/shop/product/{{t.type_id}}?{{keep_query()}}">
|
||||
<t t-esc="t.type_name" />
|
||||
</a>
|
||||
</t>
|
||||
<t t-if="t.affiliate_type == 'category'">
|
||||
<a t-attf-href="/shop/category/{{t.type_id}}?{{keep_query()}}">
|
||||
<a
|
||||
t-attf-href="/shop/category/{{t.type_id}}?{{keep_query()}}">
|
||||
<t t-esc="t.type_name" />
|
||||
</a>
|
||||
</t>
|
||||
|
|
@ -216,7 +242,8 @@
|
|||
<span t-field="t.convert_date" />
|
||||
</td>
|
||||
<td>
|
||||
<span t-field="t.commission_amt" t-options='{"widget": "monetary", "display_currency": t.currency_id}'/>
|
||||
<span t-field="t.commission_amt"
|
||||
t-options='{"widget": "monetary", "display_currency": t.currency_id}' />
|
||||
</td>
|
||||
<td>
|
||||
<span t-field="t.state" />
|
||||
|
|
@ -236,29 +263,35 @@
|
|||
<t t-if="traffic_detail">
|
||||
<div class="oe_structure">
|
||||
<div class="container mt16">
|
||||
<div class="navbar navbar-expand-md navbar-light" style="background-color: #3aadaa">
|
||||
<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;">
|
||||
<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;">
|
||||
<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="/my/traffic" style=" color: white;border-left: 3px solid;">
|
||||
<a class="nav-link mt-1 ps-2 ms-1" href="/my/traffic"
|
||||
style=" color: white;border-left: 3px solid;">
|
||||
Traffic Earnings
|
||||
</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link mt-1 ps-2 ms-1" t-attf-href="/my/traffic/{{traffic_detail.id}}?{{keep_query()}}" style=" color: white;border-left: 3px solid;">
|
||||
Traffic
|
||||
<t t-esc="traffic_detail.name" />
|
||||
<a class="nav-link mt-1 ps-2 ms-1"
|
||||
t-attf-href="/my/traffic/{{traffic_detail.id}}?{{keep_query()}}"
|
||||
style=" color: white;border-left: 3px solid;">
|
||||
Traffic <t t-esc="traffic_detail.name" />
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
|
|
@ -287,7 +320,8 @@
|
|||
<a href="/my/traffic">Traffic Earnings </a>
|
||||
</li>
|
||||
<li>
|
||||
<a t-attf-href="/my/traffic/{{traffic_detail.id}}?{{keep_query()}}" style="color:#3caeed;">Traffic <t t-esc="traffic_detail.name"/></a>
|
||||
<a t-attf-href="/my/traffic/{{traffic_detail.id}}?{{keep_query()}}" style="color:#3caeed;">Traffic
|
||||
<t t-esc="traffic_detail.name"/></a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
|
@ -303,7 +337,8 @@
|
|||
<strong>
|
||||
Date :
|
||||
</strong>
|
||||
<span t-field="traffic_detail.convert_date" t-options='{"widget": "date"}' />
|
||||
<span t-field="traffic_detail.convert_date"
|
||||
t-options='{"widget": "date"}' />
|
||||
</div>
|
||||
<div class="mb8">
|
||||
<strong>
|
||||
|
|
@ -354,9 +389,7 @@
|
|||
</strong>
|
||||
</span>
|
||||
<span class="col-md-2 text-start">
|
||||
<span t-field="traffic_detail.amt_type" />
|
||||
per item
|
||||
</span>
|
||||
<span t-field="traffic_detail.amt_type" /> per item </span>
|
||||
</div>
|
||||
<div class="row">
|
||||
<span class="col-md-2 text-end">
|
||||
|
|
@ -373,7 +406,8 @@
|
|||
</strong>
|
||||
</span>
|
||||
<span class="col-md-2 text-start">
|
||||
<span t-field="traffic_detail.commission_amt" t-options='{"widget": "monetary", "display_currency": traffic_detail.currency_id}' />
|
||||
<span t-field="traffic_detail.commission_amt"
|
||||
t-options='{"widget": "monetary", "display_currency": traffic_detail.currency_id}' />
|
||||
</span>
|
||||
</div>
|
||||
<div class="row">
|
||||
|
|
@ -386,7 +420,8 @@
|
|||
<span t-field="traffic_detail.act_invoice_id.state" />
|
||||
<t t-if="traffic_detail.act_invoice_id.state == 'paid'">
|
||||
<span>
|
||||
<a t-attf-href="/my/invoice/{{traffic_detail.act_invoice_id.id}}?{{keep_query()}}">
|
||||
<a
|
||||
t-attf-href="/my/invoice/{{traffic_detail.act_invoice_id.id}}?{{keep_query()}}">
|
||||
<t t-esc="traffic_detail.act_invoice_id.number" />
|
||||
</a>
|
||||
</span>
|
||||
|
|
@ -403,22 +438,27 @@
|
|||
<t t-call="website.layout">
|
||||
<div class="oe_structure">
|
||||
<div class="container mt16">
|
||||
<div class="navbar navbar-expand-md navbar-light" style="background-color: #3aadaa">
|
||||
<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;">
|
||||
<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;">
|
||||
<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="/my/order" style=" color: white;border-left: 3px solid;">
|
||||
<a class="nav-link mt-1 ps-2 ms-1" href="/my/order"
|
||||
style=" color: white;border-left: 3px solid;">
|
||||
Order Earnings
|
||||
</a>
|
||||
</li>
|
||||
|
|
@ -497,7 +537,8 @@
|
|||
</td>
|
||||
<td>
|
||||
<!-- <span t-field="t.type_name"/> -->
|
||||
<a t-attf-href="/shop/product/{{t.type_id}}?{{keep_query()}}">
|
||||
<a
|
||||
t-attf-href="/shop/product/{{t.type_id}}?{{keep_query()}}">
|
||||
<t t-esc="t.type_name" />
|
||||
</a>
|
||||
</td>
|
||||
|
|
@ -509,7 +550,8 @@
|
|||
</td>
|
||||
<!-- <td><span t-field="t.amt_type"/></td> -->
|
||||
<td>
|
||||
<span t-field="t.commission_amt" t-options='{"widget": "monetary", "display_currency": t.currency_id}' />
|
||||
<span t-field="t.commission_amt"
|
||||
t-options='{"widget": "monetary", "display_currency": t.currency_id}' />
|
||||
</td>
|
||||
<td>
|
||||
<span t-field="t.state" />
|
||||
|
|
@ -529,29 +571,35 @@
|
|||
<t t-if="order_visit_detail">
|
||||
<div class="oe_structure">
|
||||
<div class="container mt16">
|
||||
<div class="navbar navbar-expand-md navbar-light" style="background-color: #3aadaa">
|
||||
<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:#fff;">
|
||||
<a class="nav-link" href="/affiliate/about"
|
||||
style="color:#fff;">
|
||||
<i class="fa fa-home fa-2x">
|
||||
</i>
|
||||
</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link mt-1 ps-2 ms-1" href="/affiliate/report" style="color:#fff;border-left: 3px solid;">
|
||||
<a class="nav-link mt-1 ps-2 ms-1"
|
||||
href="/affiliate/report"
|
||||
style="color:#fff;border-left: 3px solid;">
|
||||
Reports
|
||||
</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link mt-1 ps-2 ms-1" href="/my/order" style="color:#fff;border-left: 3px solid;">
|
||||
<a class="nav-link mt-1 ps-2 ms-1" href="/my/order"
|
||||
style="color:#fff;border-left: 3px solid;">
|
||||
Order Earnings
|
||||
</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link mt-1 ps-2 ms-1" t-attf-href="/my/order/{{order_visit_detail.id}}?{{keep_query()}}" style="color:#fff;border-left: 3px solid white;">
|
||||
Order
|
||||
<t t-esc="order_visit_detail.name" />
|
||||
<a class="nav-link mt-1 ps-2 ms-1"
|
||||
t-attf-href="/my/order/{{order_visit_detail.id}}?{{keep_query()}}"
|
||||
style="color:#fff;border-left: 3px solid white;">
|
||||
Order <t t-esc="order_visit_detail.name" />
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
|
|
@ -579,7 +627,8 @@
|
|||
<a href="/my/order">Order Earnings </a>
|
||||
</li>
|
||||
<li>
|
||||
<a t-attf-href="/my/order/{{order_visit_detail.id}}?{{keep_query()}}" style="color:#3caeed;">Order <t t-esc="order_visit_detail.name"/></a>
|
||||
<a t-attf-href="/my/order/{{order_visit_detail.id}}?{{keep_query()}}" style="color:#3caeed;">Order
|
||||
<t t-esc="order_visit_detail.name"/></a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
|
@ -595,7 +644,8 @@
|
|||
<strong>
|
||||
Date:
|
||||
</strong>
|
||||
<span t-field="order_visit_detail.convert_date" t-options='{"widget": "date"}' />
|
||||
<span t-field="order_visit_detail.convert_date"
|
||||
t-options='{"widget": "date"}' />
|
||||
</div>
|
||||
<div class="mb8">
|
||||
<strong>
|
||||
|
|
@ -636,18 +686,14 @@
|
|||
</strong>
|
||||
</span>
|
||||
<span class="col-md-4 text-start">
|
||||
<span t-field="order_visit_detail.amt_type" />
|
||||
per item
|
||||
</span>
|
||||
<span t-field="order_visit_detail.amt_type" /> per item </span>
|
||||
<span class=" col-md-2 text-end">
|
||||
<strong>
|
||||
Commission On:
|
||||
</strong>
|
||||
</span>
|
||||
<span class="col-md-2 text-start">
|
||||
<span t-field="order_visit_detail.affiliate_type" />
|
||||
per item
|
||||
</span>
|
||||
<span t-field="order_visit_detail.affiliate_type" /> per item </span>
|
||||
</div>
|
||||
<div class="row">
|
||||
<span class="col-md-2 text-end">
|
||||
|
|
@ -697,7 +743,8 @@
|
|||
<span t-field="order_visit_detail.act_invoice_id.state" />
|
||||
<t t-if="order_visit_detail.act_invoice_id.state == 'paid'">
|
||||
<span>
|
||||
<a t-attf-href="/my/invoice/{{order_visit_detail.act_invoice_id.id}}?{{keep_query()}}">
|
||||
<a
|
||||
t-attf-href="/my/invoice/{{order_visit_detail.act_invoice_id.id}}?{{keep_query()}}">
|
||||
<t t-esc="order_visit_detail.act_invoice_id.number" />
|
||||
</a>
|
||||
</span>
|
||||
|
|
@ -711,4 +758,4 @@
|
|||
</t>
|
||||
</template>
|
||||
</data>
|
||||
</odoo>
|
||||
</odoo>
|
||||
|
|
@ -6,12 +6,12 @@
|
|||
<field name="name">res.users.inherit.affiliate.form</field>
|
||||
<field name="model">res.users</field>
|
||||
<field name="inherit_id" ref="base.view_users_form" />
|
||||
<field name="arch" type="xml">
|
||||
<field name="arch" type="xml">
|
||||
|
||||
<xpath expr="//group/field[@name='partner_id']" position="after">
|
||||
<field name="res_affiliate_key" readonly="1"/>
|
||||
</xpath>
|
||||
<xpath expr="//group/field[@name='partner_id']" position="after">
|
||||
<field name="res_affiliate_key" readonly="1" />
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
</data>
|
||||
</odoo>
|
||||
</odoo>
|
||||
|
|
@ -1,127 +1,140 @@
|
|||
<odoo>
|
||||
|
||||
<template id="register" name="Signup Form">
|
||||
<template id="register" name="Signup Form">
|
||||
|
||||
|
||||
<t t-call="web.login_layout">
|
||||
|
||||
<t t-call="web.login_layout">
|
||||
<p class="alert alert-danger" t-if="not token">
|
||||
You already got registered with this link.
|
||||
</p>
|
||||
|
||||
<p class="alert alert-danger" t-if="not token">
|
||||
You already got registered with this link.
|
||||
</p>
|
||||
<form class="oe_signup_form" role="form" t-attf-action="/affiliate/register" method="post">
|
||||
<input type="hidden" name="csrf_token" t-att-value="request.csrf_token()" />
|
||||
|
||||
<form class="oe_signup_form" role="form" t-attf-action="/affiliate/register" method="post" >
|
||||
<input type="hidden" name="csrf_token" t-att-value="request.csrf_token()"/>
|
||||
<div class="mb-3">
|
||||
<label for="login" class="form-label">Email</label>
|
||||
<input type="text" name="login" t-att-value="login" id="login" class="form-control"
|
||||
required="required" autofocus="autofocus" autocapitalize="off" readonly='1' />
|
||||
</div>
|
||||
|
||||
<div class="mb-3">
|
||||
<label for="login" class="form-label">Email</label>
|
||||
<input type="text" name="login" t-att-value="login" id="login" class="form-control" required="required" autofocus="autofocus" autocapitalize="off" readonly='1'/>
|
||||
</div>
|
||||
|
||||
<div class="mb-3">
|
||||
<label for="name" class="form-label">User Name</label>
|
||||
<input type="text" name="name" t-att-value="name" id="name" class="form-control" required="required" autofocus="autofocus" autocapitalize="off" />
|
||||
</div>
|
||||
<div class="mb-3">
|
||||
<label for="name" class="form-label">User Name</label>
|
||||
<input type="text" name="name" t-att-value="name" id="name" class="form-control"
|
||||
required="required" autofocus="autofocus" autocapitalize="off" />
|
||||
</div>
|
||||
|
||||
|
||||
<div class="mb-3">
|
||||
<label for="password" class="form-label">Enter Your Password</label>
|
||||
<input type="password" name="password" id="password" class="form-control"
|
||||
required="required" autocomplete="current-password" autofocus="autofocus"
|
||||
maxlength="4096" />
|
||||
</div>
|
||||
|
||||
<div class="mb-3">
|
||||
<label for="password" class="form-label">Enter Your Password</label>
|
||||
<input type="password" name="password" id="password" class="form-control" required="required" autocomplete="current-password" autofocus="autofocus" maxlength="4096"/>
|
||||
</div>
|
||||
<div class="mb-3">
|
||||
<label for="confirm_password" class="form-label"> Confirm Password</label>
|
||||
<input type="password" name="confirm_password" id="confirm_password" class="form-control"
|
||||
required="required" autocomplete="current-password" autofocus="autofocus"
|
||||
maxlength="4096" />
|
||||
</div>
|
||||
<div class="mb-3">
|
||||
<label for="phone" class="form-label"> Enter Your Phone No.</label>
|
||||
<input type="text" name="phone" id="phone" class="form-control" required="required"
|
||||
autofocus="autofocus" maxlength="10" />
|
||||
</div>
|
||||
|
||||
<div class="mb-3">
|
||||
<label for="confirm_password" class="form-label"> Confirm Password</label>
|
||||
<input type="password" name="confirm_password" id="confirm_password" class="form-control" required="required" autocomplete="current-password" autofocus="autofocus" maxlength="4096"/>
|
||||
</div>
|
||||
<div class="mb-3">
|
||||
<label for="phone" class="form-label"> Enter Your Phone No.</label>
|
||||
<input type="text" name="phone" id="phone" class="form-control" required="required" autofocus="autofocus" maxlength="10"/>
|
||||
</div>
|
||||
<div class="mb-3">
|
||||
<label for="comment" class="form-label">Comment:</label>
|
||||
<textarea name="comment" id="comment" class="form-control" rows="5" required="required"
|
||||
autofocus="autofocus"></textarea>
|
||||
</div>
|
||||
<input name="token" type="hidden" t-att-value="token" />
|
||||
<input name="is_affiliate" type="hidden" t-att-value="true" />
|
||||
|
||||
<div class="mb-3">
|
||||
<label for="comment" class="form-label">Comment:</label>
|
||||
<textarea name="comment" id="comment" class="form-control" rows="5" required="required" autofocus="autofocus"></textarea>
|
||||
</div>
|
||||
<input name="token" type="hidden" t-att-value="token"/>
|
||||
<input name="is_affiliate" type="hidden" t-att-value="true"/>
|
||||
<p class="alert alert-danger" id="term_condition_error" style="display:none">
|
||||
Please indicate that you accept with the Terms and conditions.
|
||||
|
||||
<p class="alert alert-danger" id="term_condition_error" style="display:none">
|
||||
Please indicate that you accept with the Terms and conditions.
|
||||
</p>
|
||||
<p class="alert alert-danger" t-if="error">
|
||||
<t t-esc="error" />
|
||||
|
||||
</p>
|
||||
<p class="alert alert-danger" t-if="error">
|
||||
<t t-esc="error"/>
|
||||
|
||||
</p>
|
||||
<p class="alert alert-success" t-if="message">
|
||||
<t t-esc="message"/>
|
||||
</p>
|
||||
<p class="alert alert-success" t-if="message">
|
||||
<t t-esc="message" />
|
||||
|
||||
|
||||
</p>
|
||||
</p>
|
||||
|
||||
|
||||
<div class="checkbox mb-3">
|
||||
<!-- <label><input type="checkbox" id="tc-signup-checkbox"/>
|
||||
<div class="checkbox mb-3">
|
||||
<!-- <label><input type="checkbox" id="tc-signup-checkbox"/>
|
||||
I agree to all <a href="/affiliate/terms" id="term_condition_anchor">Term and Condition</a>
|
||||
</label> -->
|
||||
<label>
|
||||
<input type="checkbox" id="tc-signup-checkbox"/>
|
||||
<a href='#' class="terms_link terms_condition" data-bs-toggle="modal" data-bs-target="#myModal1">
|
||||
I agree to all Terms and Conditions
|
||||
</a>
|
||||
</label>
|
||||
<label>
|
||||
<input type="checkbox" id="tc-signup-checkbox" />
|
||||
<a href='#' class="terms_link terms_condition" data-bs-toggle="modal"
|
||||
data-bs-target="#myModal1">
|
||||
I agree to all Terms and Conditions
|
||||
</a>
|
||||
</label>
|
||||
|
||||
<div id="myModal1" class="modal fade" role="dialog" tabindex="-1">
|
||||
<div class="modal-dialog">
|
||||
<!-- Modal content-->
|
||||
<div class="modal-content">
|
||||
<div class="modal-header" style="background-color:#CCCCCC; border-radius:5px;" >
|
||||
<h4 class="modal-title text-center"><em><u><strong>Terms and Conditions</strong></u></em></h4>
|
||||
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
|
||||
<div id="myModal1" class="modal fade" role="dialog" tabindex="-1">
|
||||
<div class="modal-dialog">
|
||||
<!-- Modal content-->
|
||||
<div class="modal-content">
|
||||
<div class="modal-header" style="background-color:#CCCCCC; border-radius:5px;">
|
||||
<h4 class="modal-title text-center">
|
||||
<em>
|
||||
<u>
|
||||
<strong>Terms and Conditions</strong>
|
||||
</u>
|
||||
</em>
|
||||
</h4>
|
||||
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
|
||||
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<!-- <div class="terms"> -->
|
||||
<t t-if="not term_condition">
|
||||
terms and conditions for affiliate program
|
||||
</t>
|
||||
<t t-if="term_condition">
|
||||
|
||||
<t t-esc="term_condition"/>
|
||||
</t>
|
||||
<!-- </div> -->
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-secondary" data-bs-dismiss="modal">Close</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<input type="hidden" name="redirect" t-att-value="redirect"/>
|
||||
<div class="clearfix oe_signup_buttons">
|
||||
<button type="submit" class="btn btn-primary signup-btn">Register</button>
|
||||
</div>
|
||||
</form>
|
||||
</t>
|
||||
</template>
|
||||
<div class="modal-body">
|
||||
<!-- <div class="terms"> -->
|
||||
<t t-if="not term_condition">
|
||||
terms and conditions for affiliate program
|
||||
</t>
|
||||
<t t-if="term_condition">
|
||||
|
||||
<t t-esc="term_condition" />
|
||||
</t>
|
||||
<!-- </div> -->
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-secondary" data-bs-dismiss="modal">Close</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<!-- <template id="term_condition" name="terms_and_condition"> -->
|
||||
<!-- <t t-call="web.login_layout">
|
||||
<input type="hidden" name="redirect" t-att-value="redirect" />
|
||||
<div class="clearfix oe_signup_buttons">
|
||||
<button type="submit" class="btn btn-primary signup-btn">Register</button>
|
||||
</div>
|
||||
</form>
|
||||
</t>
|
||||
</template>
|
||||
|
||||
|
||||
<!-- <template id="term_condition" name="terms_and_condition"> -->
|
||||
<!-- <t t-call="web.login_layout">
|
||||
hello here is all term and conditon
|
||||
<t t-esc="term_condition"/>
|
||||
|
||||
</t> -->
|
||||
|
||||
<!-- <div id="myqna_modal" class="modal fade" role="dialog">
|
||||
<!-- <div id="myqna_modal" class="modal fade" role="dialog">
|
||||
<div class="modal-dialog">
|
||||
-->
|
||||
<!-- Modal content-->
|
||||
<!-- <div class="modal-content">
|
||||
<!-- Modal content-->
|
||||
<!-- <div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h4 class="modal-title">Terms and Condition</h4>
|
||||
</div>
|
||||
|
|
@ -137,7 +150,6 @@
|
|||
</div> -->
|
||||
|
||||
|
||||
<!-- </template> -->
|
||||
|
||||
<!-- </template> -->
|
||||
|
||||
</odoo>
|
||||
</odoo>
|
||||
|
|
@ -1,7 +1,8 @@
|
|||
<odoo>
|
||||
<data>
|
||||
|
||||
<!-- <template id="assets_frontend_affiliate" inherit_id="website.assets_frontend" name="Website Affiliate">
|
||||
<!-- <template id="assets_frontend_affiliate" inherit_id="website.assets_frontend" name="Website
|
||||
Affiliate">
|
||||
<xpath expr="." position="inside">
|
||||
<link rel='stylesheet' href='/affiliate_management/static/src/css/website_affiliate.css'/>
|
||||
<script type="text/javascript" src='/affiliate_management/static/src/js/validation.js'></script>
|
||||
|
|
@ -9,87 +10,95 @@
|
|||
</xpath>
|
||||
</template> -->
|
||||
|
||||
<!-- # tool 2 view -->
|
||||
<template id="product_link" name="Product Link">
|
||||
<t t-call="website.layout">
|
||||
<t t-if="user_id.partner_id.is_affiliate">
|
||||
<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/tool" style=" color: white;border-left: 3px solid;">
|
||||
Tools
|
||||
</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link mt-1 ps-2 ms-1" href="/tool/product_link" style=" color: white;border-left: 3px solid;">
|
||||
Generate Product Link
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- # tool 2 view -->
|
||||
<template id="product_link" name="Product Link">
|
||||
<t t-call="website.layout">
|
||||
<t t-if="user_id.partner_id.is_affiliate">
|
||||
<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/tool"
|
||||
style=" color: white;border-left: 3px solid;">
|
||||
Tools
|
||||
</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link mt-1 ps-2 ms-1" href="/tool/product_link"
|
||||
style=" color: white;border-left: 3px solid;">
|
||||
Generate Product Link
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="container mt16">
|
||||
<div class="container mt16">
|
||||
<div style="text-align:center;padding-bottom:20px;">
|
||||
<span class="step">1</span>
|
||||
<span class="step1-text" style="display:inline-block;border-bottom:1px solid black;padding-bottom:2px;">
|
||||
Choose Product
|
||||
</span>  
|
||||
<span class="step">2</span>
|
||||
<span class="step">1</span>
|
||||
<span class="step1-text"
|
||||
style="display:inline-block;border-bottom:1px solid black;padding-bottom:2px;">
|
||||
Choose Product
|
||||
</span>   <span
|
||||
class="step">2</span>
|
||||
<span class="step1-text" style="color:grey;">
|
||||
Choose your Image
|
||||
</span>  
|
||||
|
||||
<span class="step">3</span>
|
||||
</span>   <span
|
||||
class="step">3</span>
|
||||
<span class="step1-text" style="color:grey;">
|
||||
Copy Generated Code
|
||||
Copy Generated Code
|
||||
</span>
|
||||
|
||||
<div style="font-size: 25px;text-align:center;padding-top: 30px;">Step 1: Choose Product</div>
|
||||
<div
|
||||
style="font-size: 25px;text-align:center;padding-top: 30px;">Step 1: Choose
|
||||
Product</div>
|
||||
<div style="text-align:center">
|
||||
Enter the Product and select a category of it below
|
||||
</div>
|
||||
Enter the Product and select a category of it below
|
||||
</div>
|
||||
</div>
|
||||
<div class="container" style="text-align:center;width:58%;">
|
||||
<form role="form" t-attf-action="/search/product" method="post">
|
||||
<div class="input-group">
|
||||
<input type="hidden" name="csrf_token" t-att-value="request.csrf_token()"/>
|
||||
<input type="name" name="name" t-att-value="name" id="name" class="form-control" required="required" autofocus="autofocus" placeholder="eg. Ipad mini" style="width:440px;"/>
|
||||
<select style="width:auto;" type="text" name="categories" class="form-control">
|
||||
<option selected="selected">All Categories</option>
|
||||
<t t-foreach="category" t-as="c">
|
||||
<option><span t-field="c.name"/></option>
|
||||
</t>
|
||||
</select>
|
||||
<div class="container" style="text-align:center;width:58%;">
|
||||
<form role="form" t-attf-action="/search/product" method="post">
|
||||
<div class="input-group">
|
||||
<input type="hidden" name="csrf_token" t-att-value="request.csrf_token()" />
|
||||
<input type="name" name="name" t-att-value="name" id="name" class="form-control"
|
||||
required="required" autofocus="autofocus" placeholder="eg. Ipad mini"
|
||||
style="width:440px;" />
|
||||
<select style="width:auto;" type="text" name="categories" class="form-control">
|
||||
<option selected="selected">All Categories</option>
|
||||
<t t-foreach="category" t-as="c">
|
||||
<option>
|
||||
<span t-field="c.name" />
|
||||
</option>
|
||||
</t>
|
||||
</select>
|
||||
|
||||
<span>
|
||||
<button style="margin-right:3px;" type="submit" class="btn btn-primary">Fetch</button>
|
||||
</span>
|
||||
</div>
|
||||
</form>
|
||||
<span>
|
||||
<button style="margin-right:3px;" type="submit" class="btn btn-primary">Fetch</button>
|
||||
</span>
|
||||
</div>
|
||||
<br/>
|
||||
<t t-if="search_products">
|
||||
<!-- ######################################### -->
|
||||
<div id="products_grid" class="col">
|
||||
</form>
|
||||
</div>
|
||||
<br />
|
||||
<t t-if="search_products">
|
||||
<!-- ######################################### -->
|
||||
<div id="products_grid" class="col">
|
||||
|
||||
<div class="o_wsale_products_grid_table_wrapper">
|
||||
<div class="o_wsale_products_grid_table_wrapper">
|
||||
|
||||
|
||||
<table class="table table-borderless m-0" width="100%">
|
||||
<tbody>
|
||||
<!-- <tr t-foreach="bins" t-as="tr_product">
|
||||
<table class="table table-borderless m-0" width="100%">
|
||||
<tbody>
|
||||
<!-- <tr t-foreach="bins" t-as="tr_product">
|
||||
<t t-foreach="tr_product" t-as="td_product">
|
||||
<t t-if="td_product">
|
||||
<t t-set="product" t-value="td_product['product']" />
|
||||
|
|
@ -97,7 +106,8 @@
|
|||
t-att-rowspan="td_product['y'] != 1 and td_product['y']"
|
||||
t-attf-class="oe_product"
|
||||
t-att-data-ribbon-id="td_product['ribbon'].id">
|
||||
<div t-attf-class="o_wsale_product_grid_wrapper o_wsale_product_grid_wrapper_#{td_product['x']}_#{td_product['y']}">
|
||||
<div t-attf-class="o_wsale_product_grid_wrapper
|
||||
o_wsale_product_grid_wrapper_#{td_product['x']}_#{td_product['y']}">
|
||||
<t t-call="website_sale.products_item">
|
||||
<t t-set="product_image_big" t-value="td_product['x'] + td_product['y'] > 2"/>
|
||||
</t>
|
||||
|
|
@ -108,129 +118,162 @@
|
|||
</t>
|
||||
</tr> -->
|
||||
|
||||
<tr t-foreach="bins" t-as="tr_product">
|
||||
<t t-foreach="tr_product" t-as="td_product">
|
||||
<t t-if="td_product">
|
||||
<t t-set="product" t-value="td_product['product']" />
|
||||
<t t-set="combination_info" t-value="product._get_combination_info(only_template=True, add_qty=add_qty or 1, pricelist=pricelist)"/>
|
||||
<t t-set="product_image_big" t-value="td_product['x'] + td_product['y'] > 2"/>
|
||||
<tr t-foreach="bins" t-as="tr_product">
|
||||
<t t-foreach="tr_product" t-as="td_product">
|
||||
<t t-if="td_product">
|
||||
<t t-set="product" t-value="td_product['product']" />
|
||||
<t t-set="combination_info"
|
||||
t-value="product._get_combination_info(only_template=True, add_qty=add_qty or 1, pricelist=pricelist)" />
|
||||
<t t-set="product_image_big"
|
||||
t-value="td_product['x'] + td_product['y'] > 2" />
|
||||
|
||||
<td t-att-colspan="td_product['x'] != 1 and td_product['x']" t-att-rowspan="td_product['y'] != 1 and td_product['y']" t-attf-class="oe_product #{ td_product['ribbon'] }" >
|
||||
<div t-attf-class ="o_wsale_product_grid_wrapper o_wsale_product_grid_wrapper_#{td_product['y']}_#{td_product['y']}">
|
||||
<div class="card oe_product_cart"
|
||||
t-att-data-publish="product.website_published and 'on' or 'off'"
|
||||
itemscope="itemscope" itemtype="http://schema.org/Product">
|
||||
<div class="card-body p-1 oe_product_image">
|
||||
<input type="hidden" name="csrf_token" t-att-value="request.csrf_token()" />
|
||||
<!-- <div class="ribbon-wrapper">
|
||||
<td t-att-colspan="td_product['x'] != 1 and td_product['x']"
|
||||
t-att-rowspan="td_product['y'] != 1 and td_product['y']"
|
||||
t-attf-class="oe_product #{ td_product['ribbon'] }">
|
||||
<div
|
||||
t-attf-class="o_wsale_product_grid_wrapper o_wsale_product_grid_wrapper_#{td_product['y']}_#{td_product['y']}">
|
||||
<div class="card oe_product_cart"
|
||||
t-att-data-publish="product.website_published and 'on' or 'off'"
|
||||
itemscope="itemscope" itemtype="http://schema.org/Product">
|
||||
<div class="card-body p-1 oe_product_image">
|
||||
<input type="hidden" name="csrf_token"
|
||||
t-att-value="request.csrf_token()" />
|
||||
<!-- <div class="ribbon-wrapper">
|
||||
<a href="#" role="button" class="ribbon btn btn-danger">Sale</a>
|
||||
</div> -->
|
||||
<a t-attf-href="/shop/product/{{td_product.get('product').id}}?{{keep_query()}}" class="d-block h-100" itemprop="url">
|
||||
<span class="d-flex h-100 justify-content-center align-items-center" t-field="product.image_1920"
|
||||
t-options="{'widget': 'image', 'preview_image': 'image_1024' if product_image_big else 'image_256'}"
|
||||
/>
|
||||
</a>
|
||||
</div>
|
||||
<div t-attf-class="card-body p-0 o_wsale_product_information {{'card_large_product' if product_image_big else 'text-center'}}">
|
||||
<div class="p-2 o_wsale_product_information_text">
|
||||
<h6 class="o_wsale_products_item_title">
|
||||
<a itemprop="name" t-attf-href="/shop/product/{{td_product.get('product').id}}?{{keep_query()}}" t-att-content="product.name" t-field="product.name" />
|
||||
</h6>
|
||||
<div class="product_price" itemprop="offers" itemscope="itemscope" itemtype="http://schema.org/Offer">
|
||||
<del t-attf-class="text-danger me-2 {{'' if combination_info['has_discounted_price'] else 'd-none'}}" style="white-space: nowrap;" t-esc="combination_info['list_price']" t-options="{'widget': 'monetary', 'display_currency': website.currency_id}" />
|
||||
<span t-if="combination_info['price']" t-esc="combination_info['price']" t-options="{'widget': 'monetary', 'display_currency': website.currency_id}"/>
|
||||
<span itemprop="price" style="display:none;" t-esc="combination_info['price']" />
|
||||
<span itemprop="priceCurrency" style="display:none;" t-esc="website.currency_id.name" />
|
||||
<a
|
||||
t-attf-href="/shop/product/{{td_product.get('product').id}}?{{keep_query()}}"
|
||||
class="d-block h-100" itemprop="url">
|
||||
<span
|
||||
class="d-flex h-100 justify-content-center align-items-center"
|
||||
t-field="product.image_1920"
|
||||
t-options="{'widget': 'image', 'preview_image': 'image_1024' if product_image_big else 'image_256'}"
|
||||
/>
|
||||
</a>
|
||||
</div>
|
||||
<div
|
||||
t-attf-class="card-body p-0 o_wsale_product_information {{'card_large_product' if product_image_big else 'text-center'}}">
|
||||
<div class="p-2 o_wsale_product_information_text">
|
||||
<h6 class="o_wsale_products_item_title">
|
||||
<a itemprop="name"
|
||||
t-attf-href="/shop/product/{{td_product.get('product').id}}?{{keep_query()}}"
|
||||
t-att-content="product.name" t-field="product.name" />
|
||||
</h6>
|
||||
<div class="product_price" itemprop="offers"
|
||||
itemscope="itemscope" itemtype="http://schema.org/Offer">
|
||||
<del
|
||||
t-attf-class="text-danger me-2 {{'' if combination_info['has_discounted_price'] else 'd-none'}}"
|
||||
style="white-space: nowrap;"
|
||||
t-esc="combination_info['list_price']"
|
||||
t-options="{'widget': 'monetary', 'display_currency': website.currency_id}" />
|
||||
<span t-if="combination_info['price']"
|
||||
t-esc="combination_info['price']"
|
||||
t-options="{'widget': 'monetary', 'display_currency': website.currency_id}" />
|
||||
<span itemprop="price" style="display:none;"
|
||||
t-esc="combination_info['price']" />
|
||||
<span itemprop="priceCurrency" style="display:none;"
|
||||
t-esc="website.currency_id.name" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div t-attf-class="card-body o_wsale_product_information ">
|
||||
<div class="row">
|
||||
<div class="col-md-6 text-center text-sm-start text-md-end">
|
||||
<div>
|
||||
<form role="form" t-attf-action="/tool/generate_banner"
|
||||
method="post">
|
||||
<input type="hidden" name="csrf_token"
|
||||
t-att-value="request.csrf_token()" />
|
||||
<input type="hidden" name="product_id"
|
||||
t-att-value="int(td_product.get('product').id)" />
|
||||
<button type="submit"
|
||||
class="btn btn-success py-1 my-2">Generate Banner
|
||||
</button>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6 text-center text-sm-start">
|
||||
<div class="copy button">
|
||||
|
||||
<input type="text" name="Element To Be Copied"
|
||||
t-att-id="'copy-me_%s'%(td_product.get('product').id)"
|
||||
t-att-value="'%s/shop/product/%s?db=%s&aff_key=%s'%(base_url,int(td_product.get('product').id),db,partner_key)"
|
||||
style="display:none" />
|
||||
<button class="btn btn-success py-1 my-2"
|
||||
t-att-id="'copy-btn_%s'%(td_product.get('product').id)">Copy
|
||||
to Clipboard</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
</t>
|
||||
<td t-if="not td_product" class="oe-height-2" />
|
||||
</t>
|
||||
</tr>
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div t-attf-class="card-body o_wsale_product_information ">
|
||||
<div class ="row">
|
||||
<div class="col-md-6 text-center text-sm-start text-md-end">
|
||||
<div>
|
||||
<form role="form" t-attf-action="/tool/generate_banner" method="post">
|
||||
<input type="hidden" name="csrf_token" t-att-value="request.csrf_token()"/>
|
||||
<input type="hidden" name="product_id" t-att-value="int(td_product.get('product').id)"/>
|
||||
<button type="submit" class="btn btn-success py-1 my-2">Generate Banner
|
||||
</button>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6 text-center text-sm-start">
|
||||
<div class="copy button" >
|
||||
|
||||
<input type="text" name="Element To Be Copied" t-att-id="'copy-me_%s'%(td_product.get('product').id)" t-att-value="'%s/shop/product/%s?db=%s&aff_key=%s'%(base_url,int(td_product.get('product').id),db,partner_key)" style="display:none" />
|
||||
<button class="btn btn-success py-1 my-2" t-att-id="'copy-btn_%s'%(td_product.get('product').id)" >Copy to Clipboard</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
</t>
|
||||
<td t-if="not td_product" class="oe-height-2" />
|
||||
<div t-if="pager" class="o_portal_pager text-center">
|
||||
<t t-call="website.pager" />
|
||||
</div>
|
||||
</t>
|
||||
</tr>
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<t t-if="not search_products">
|
||||
<div style='text-align:center'>
|
||||
No Item Search In this Category
|
||||
</div>
|
||||
</t>
|
||||
</div>
|
||||
|
||||
|
||||
<div t-if="pager" class="o_portal_pager text-center">
|
||||
<t t-call="website.pager"/>
|
||||
</div>
|
||||
</t>
|
||||
<t t-if="not search_products">
|
||||
<div style='text-align:center'>
|
||||
No Item Search In this Category
|
||||
</div>
|
||||
</t>
|
||||
</t>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
|
||||
</div>
|
||||
</t>
|
||||
</t>
|
||||
</template>
|
||||
|
||||
|
||||
<template id="generate_banner" name="Generate Banner">
|
||||
<t t-call="website.layout">
|
||||
<t t-if="user_id.partner_id.is_affiliate">
|
||||
<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/tool" style=" color: white;border-left: 3px solid;">
|
||||
Tools
|
||||
</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link mt-1 ps-2 ms-1" href="/tool/product_link" style=" color: white;border-left: 3px solid;">
|
||||
Generate Product Link
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<template id="generate_banner" name="Generate Banner">
|
||||
<t t-call="website.layout">
|
||||
<t t-if="user_id.partner_id.is_affiliate">
|
||||
<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/tool"
|
||||
style=" color: white;border-left: 3px solid;">
|
||||
Tools
|
||||
</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link mt-1 ps-2 ms-1" href="/tool/product_link"
|
||||
style=" color: white;border-left: 3px solid;">
|
||||
Generate Product Link
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="container mt16">
|
||||
<span>
|
||||
<!-- <div style="font-size: 30px;">Generate Product Link</div> -->
|
||||
<!-- <div style="font-size: 30px;">Generate Product Link</div> -->
|
||||
|
||||
</span>
|
||||
</div>
|
||||
|
|
@ -238,166 +281,195 @@
|
|||
|
||||
<div style="text-align:center;padding-bottom:20px;">
|
||||
|
||||
<span class="step" style="background: green;">✓</span>
|
||||
<span class="step1-text" style="color:grey;">
|
||||
Choose Product
|
||||
</span>  
|
||||
<span class="step" style="background: green;">✓</span>
|
||||
<span class="step1-text"
|
||||
style="color:grey;">
|
||||
Choose Product
|
||||
</span>
|
||||
  
|
||||
|
||||
|
||||
<span class="step">2</span>
|
||||
<span class="step1-text" style="display:inline-block;border-bottom:1px solid black;padding-bottom:2px;">
|
||||
Choose your Image
|
||||
</span>  
|
||||
<span
|
||||
class="step1-text"
|
||||
style="display:inline-block;border-bottom:1px solid black;padding-bottom:2px;">
|
||||
Choose your Image
|
||||
</span>
|
||||
  
|
||||
|
||||
<span class="step">3</span>
|
||||
<span class="step1-text" style="color:grey;">
|
||||
Copy Generated Code
|
||||
</span>
|
||||
<span
|
||||
class="step1-text" style="color:grey;">
|
||||
Copy Generated Code
|
||||
</span>
|
||||
|
||||
|
||||
<div style="font-size: 25px;text-align:center;padding-top: 30px;">Step 2: Choose your Image</div>
|
||||
<div
|
||||
style="font-size: 25px;text-align:center;padding-top: 30px;">Step 2: Choose your
|
||||
Image</div>
|
||||
<div style="text-align:center">
|
||||
Select a image from the below and hit Apply
|
||||
</div>
|
||||
Select a image from the below and hit Apply
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="container">
|
||||
<div class="row justify-content-center">
|
||||
<div class="col-md-offset-1 col-md-3" style="padding-bottom: 20%;">
|
||||
<div class="form_container1 mt-5">
|
||||
<form role="form" t-attf-action="/tool/generate_button_link" method="post">
|
||||
<input type="hidden" name="csrf_token" t-att-value="request.csrf_token()"/>
|
||||
<input type="hidden" name="product_id" t-att-value="product.id"/>
|
||||
<t t-foreach="banner_button" t-as="b">
|
||||
<input class="o_form_radio" type="radio" t-att-id="'button_%s'%(b.id)" name="choose_banner" t-att-value="'button_%s'%(b.id)"/>
|
||||
<label class="o_form_label text-capitalize" t-att-for="'button_%s'%(b.id)"><t t-esc="b.name" /></label>
|
||||
<!-- (size <t t-esc="b.bannner_width"/>*<t t-esc="b.banner_height"/>) -->
|
||||
|
||||
<!-- [UPD]: Checked condition that banner height and banner width is present or not -->
|
||||
<t t-if="b.bannner_width != 0 and b.banner_height != 0 " >(size <t t-esc="b.bannner_width"/>*<t t-esc="b.banner_height"/>)</t>
|
||||
<br/>
|
||||
</t>
|
||||
<input class="o_form_radio_product" type="radio" t-att-id="'product_%s'%(product.id)" name="choose_banner" t-att-value="'product_%s'%(product.id)" checked="True"/>
|
||||
<label class="o_form_label" t-att-for="product.id">
|
||||
<a t-attf-href="/shop/product/{{product.id}}?{{keep_query()}}"> <t t-esc="product.name"/></a>
|
||||
</label>
|
||||
<br/>
|
||||
<button type="submit" class="btn btn-primary" style="position: absolute;">Apply</button>
|
||||
</form>
|
||||
</div>
|
||||
<div class="col-md-offset-1 col-md-3" style="padding-bottom: 20%;">
|
||||
<div class="form_container1 mt-5">
|
||||
<form role="form" t-attf-action="/tool/generate_button_link" method="post">
|
||||
<input type="hidden" name="csrf_token" t-att-value="request.csrf_token()" />
|
||||
<input type="hidden" name="product_id" t-att-value="product.id" />
|
||||
<t t-foreach="banner_button" t-as="b">
|
||||
<input class="o_form_radio" type="radio" t-att-id="'button_%s'%(b.id)"
|
||||
name="choose_banner" t-att-value="'button_%s'%(b.id)" />
|
||||
<label class="o_form_label text-capitalize" t-att-for="'button_%s'%(b.id)">
|
||||
<t t-esc="b.name" />
|
||||
</label>
|
||||
<!-- (size <t t-esc="b.bannner_width"/>*<t t-esc="b.banner_height"/>) -->
|
||||
|
||||
<!-- [UPD]: Checked condition that banner height and banner width is present
|
||||
or not -->
|
||||
<t t-if="b.bannner_width != 0 and b.banner_height != 0 ">(size <t
|
||||
t-esc="b.bannner_width" />*<t t-esc="b.banner_height" />)</t>
|
||||
<br />
|
||||
</t>
|
||||
<input class="o_form_radio_product" type="radio"
|
||||
t-att-id="'product_%s'%(product.id)" name="choose_banner"
|
||||
t-att-value="'product_%s'%(product.id)" checked="True" />
|
||||
<label class="o_form_label" t-att-for="product.id">
|
||||
<a t-attf-href="/shop/product/{{product.id}}?{{keep_query()}}">
|
||||
<t t-esc="product.name" />
|
||||
</a>
|
||||
</label>
|
||||
<br />
|
||||
<button type="submit" class="btn btn-primary" style="position: absolute;">
|
||||
Apply</button>
|
||||
</form>
|
||||
</div>
|
||||
<div class ="col-md-7" >
|
||||
<div style="border:solid #3aadaa;" class ="mb-4" >
|
||||
<div class="banner_image_box" style="width:600px;">
|
||||
<t t-foreach="banner_button" t-as="b">
|
||||
<img t-attf-src="data:image/jpg;base64,{{ b.image }}" class="button_image_generate_url my-4" t-att-id="'image_%s'%(b.id)"/>
|
||||
</t>
|
||||
<div t-att-id="'product-text_%s'%(product.id)" style="font-size:30px;">
|
||||
<div style="text-align:center;text-decoration: underline;" >
|
||||
<t t-esc="product.name"/>
|
||||
</div>
|
||||
<div style = "text-align: center;" class = "mt-2">
|
||||
<img t-attf-src="data:image/jpg;base64,{{ product.image_1920 }}" class="product_image my-4" t-att-id="'image_%s'%(product.id)"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-7">
|
||||
<div style="border:solid #3aadaa;" class="mb-4">
|
||||
<div class="banner_image_box" style="width:600px;">
|
||||
<t t-foreach="banner_button" t-as="b">
|
||||
<img t-attf-src="data:image/jpg;base64,{{ b.image }}"
|
||||
class="button_image_generate_url my-4" t-att-id="'image_%s'%(b.id)" />
|
||||
</t>
|
||||
<div t-att-id="'product-text_%s'%(product.id)" style="font-size:30px;">
|
||||
<div style="text-align:center;text-decoration: underline;">
|
||||
<t t-esc="product.name" />
|
||||
</div>
|
||||
<div style="text-align: center;" class="mt-2">
|
||||
<img t-attf-src="data:image/jpg;base64,{{ product.image_1920 }}"
|
||||
class="product_image my-4" t-att-id="'image_%s'%(product.id)" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</t>
|
||||
</t>
|
||||
</template>
|
||||
</t>
|
||||
</t>
|
||||
</template>
|
||||
|
||||
|
||||
|
||||
<template id="generate_button_link" name="Generate Button Link">
|
||||
<t t-call="website.layout">
|
||||
<t t-if="user_id.partner_id.is_affiliate">
|
||||
<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/tool" style=" color: white;border-left: 3px solid;">
|
||||
Tools
|
||||
</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link mt-1 ps-2 ms-1" href="/tool/product_link" style=" color: white;border-left: 3px solid;">
|
||||
Generate Product Link
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class = "mt-2" style="text-align:center;padding-bottom:20px;">
|
||||
|
||||
<span class="step" style="background: green;">✓</span>
|
||||
<span class="step1-text" style="color:grey;">
|
||||
Choose Product
|
||||
</span>  
|
||||
|
||||
|
||||
<span class="step" style="background: green;">✓</span>
|
||||
<span class="step1-text" style="color:grey;" >
|
||||
Choose your Image
|
||||
</span>  
|
||||
|
||||
<span class="step" id="step3">3</span>
|
||||
<span class="step1-text" style="display:inline-block;border-bottom:1px solid black;padding-bottom:2px;">
|
||||
Copy Generated Code
|
||||
</span>
|
||||
|
||||
<div style="font-size: 25px;text-align:center;padding-top: 30px;">Step 3: Copy Generated Code</div>
|
||||
<div class="col-md-12" style="text-align:center">
|
||||
Copy the HTML code and paste it to your website source
|
||||
<template id="generate_button_link" name="Generate Button Link">
|
||||
<t t-call="website.layout">
|
||||
<t t-if="user_id.partner_id.is_affiliate">
|
||||
<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/tool"
|
||||
style=" color: white;border-left: 3px solid;">
|
||||
Tools
|
||||
</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link mt-1 ps-2 ms-1" href="/tool/product_link"
|
||||
style=" color: white;border-left: 3px solid;">
|
||||
Generate Product Link
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="container mt16">
|
||||
<h4>Html Code created below.</h4>
|
||||
<div class="form-group" style="text-align:center">
|
||||
|
||||
<div style="float:right;">
|
||||
<button id="banner_copy_button" class="btn btn-primary my-3">Copy</button>
|
||||
</div>
|
||||
|
||||
<textarea class="form-control bg-white" rows="5" readonly="1" id="banner_html_code">
|
||||
<t t-if="button">
|
||||
<a t-attf-href="{{ base_url }}/shop/product/{{ product_id }}?db={{ db }}&aff_key={{ partner_key }}">
|
||||
<img t-attf-src="{{ base_url }}/web/image/affiliate.image/{{button.id}}/image?db={{ db }}" t-attf-style="width:{{button.bannner_width}}px;height:{{button.banner_height}}px" />
|
||||
</a>
|
||||
</t>
|
||||
<t t-if="is_product">
|
||||
<a t-attf-href="{{ base_url }}/shop/product/{{ product_id }}??db={{ db }}&aff_key={{ partner_key }}">
|
||||
<img t-attf-src="{{ base_url }}/web/image/product.template/{{product_id}}/image_1024?db={{ db }}" style="width:400px;height:200px" />
|
||||
</a>
|
||||
</t>
|
||||
</textarea>
|
||||
<h5> Copy the Html Code and paste it into your website</h5>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="mt-2" style="text-align:center;padding-bottom:20px;">
|
||||
|
||||
<span class="step" style="background: green;">✓</span>
|
||||
<span class="step1-text"
|
||||
style="color:grey;">
|
||||
Choose Product
|
||||
</span>   <span
|
||||
class="step" style="background: green;">✓</span>
|
||||
<span class="step1-text"
|
||||
style="color:grey;">
|
||||
Choose your Image
|
||||
</span>   <span
|
||||
class="step" id="step3">3</span>
|
||||
<span class="step1-text"
|
||||
style="display:inline-block;border-bottom:1px solid black;padding-bottom:2px;">
|
||||
Copy Generated Code
|
||||
</span>
|
||||
|
||||
<div
|
||||
style="font-size: 25px;text-align:center;padding-top: 30px;">Step 3: Copy Generated
|
||||
Code</div>
|
||||
<div class="col-md-12" style="text-align:center">
|
||||
Copy the HTML code and paste it to your website source
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="container mt16">
|
||||
<h4>Html Code created below.</h4>
|
||||
<div class="form-group" style="text-align:center">
|
||||
|
||||
<div style="float:right;">
|
||||
<button id="banner_copy_button" class="btn btn-primary my-3">Copy</button>
|
||||
</div>
|
||||
|
||||
<textarea class="form-control bg-white" rows="5" readonly="1" id="banner_html_code">
|
||||
<t t-if="button">
|
||||
<a
|
||||
t-attf-href="{{ base_url }}/shop/product/{{ product_id }}?db={{ db }}&aff_key={{ partner_key }}">
|
||||
<img
|
||||
t-attf-src="{{ base_url }}/web/image/affiliate.image/{{button.id}}/image?db={{ db }}"
|
||||
t-attf-style="width:{{button.bannner_width}}px;height:{{button.banner_height}}px" />
|
||||
</a>
|
||||
</t>
|
||||
<t t-if="is_product">
|
||||
<a
|
||||
t-attf-href="{{ base_url }}/shop/product/{{ product_id }}??db={{ db }}&aff_key={{ partner_key }}">
|
||||
<img
|
||||
t-attf-src="{{ base_url }}/web/image/product.template/{{product_id}}/image_1024?db={{ db }}"
|
||||
style="width:400px;height:200px" />
|
||||
</a>
|
||||
</t>
|
||||
</textarea>
|
||||
<h5> Copy the Html Code and paste it into your website</h5>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</t>
|
||||
</t>
|
||||
</t>
|
||||
|
||||
</template>
|
||||
</template>
|
||||
|
||||
</data>
|
||||
</odoo>
|
||||
</data>
|
||||
</odoo>
|
||||
|
|
@ -5,27 +5,35 @@
|
|||
<t t-if="user_id.partner_id.is_affiliate">
|
||||
<div class="oe_structure">
|
||||
<div class="container mt16">
|
||||
<div class="navbar navbar-expand-md navbar-light" style="background-color: #3aadaa">
|
||||
<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;">
|
||||
<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;">
|
||||
<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;">
|
||||
<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;">
|
||||
<a class="nav-link mt-1 ps-2 ms-1"
|
||||
href="/affiliate/tool"
|
||||
style=" color: white;border-left: 3px solid;">
|
||||
Tools
|
||||
</a>
|
||||
</li>
|
||||
|
|
@ -41,34 +49,47 @@
|
|||
</h2>
|
||||
<div class="container row ms-2">
|
||||
<div class="row">
|
||||
<div class="col-md-8 p-2" style="border: 2px solid #3aadaa;border-radius: 20px;">
|
||||
<div class="col-md-8 p-2"
|
||||
style="border: 2px solid #3aadaa;border-radius: 20px;">
|
||||
<h4>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="26" fill="3aadaa" class="bi bi-link-45deg" viewBox="0 0 16 16">
|
||||
<path d="M4.715 6.542 3.343 7.914a3 3 0 1 0 4.243 4.243l1.828-1.829A3 3 0 0 0 8.586 5.5L8 6.086a1.002 1.002 0 0 0-.154.199 2 2 0 0 1 .861 3.337L6.88 11.45a2 2 0 1 1-2.83-2.83l.793-.792a4.018 4.018 0 0 1-.128-1.287z" />
|
||||
<path d="M6.586 4.672A3 3 0 0 0 7.414 9.5l.775-.776a2 2 0 0 1-.896-3.346L9.12 3.55a2 2 0 1 1 2.83 2.83l-.793.792c.112.42.155.855.128 1.287l1.372-1.372a3 3 0 1 0-4.243-4.243L6.586 4.672z" />
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="24"
|
||||
height="26" fill="3aadaa" class="bi bi-link-45deg"
|
||||
viewBox="0 0 16 16">
|
||||
<path
|
||||
d="M4.715 6.542 3.343 7.914a3 3 0 1 0 4.243 4.243l1.828-1.829A3 3 0 0 0 8.586 5.5L8 6.086a1.002 1.002 0 0 0-.154.199 2 2 0 0 1 .861 3.337L6.88 11.45a2 2 0 1 1-2.83-2.83l.793-.792a4.018 4.018 0 0 1-.128-1.287z" />
|
||||
<path
|
||||
d="M6.586 4.672A3 3 0 0 0 7.414 9.5l.775-.776a2 2 0 0 1-.896-3.346L9.12 3.55a2 2 0 1 1 2.83 2.83l-.793.792c.112.42.155.855.128 1.287l1.372-1.372a3 3 0 1 0-4.243-4.243L6.586 4.672z" />
|
||||
</svg>
|
||||
<a href="/tool/link_generator">
|
||||
Affiliate Link Generator
|
||||
</a>
|
||||
</h4>
|
||||
With our this tool, a link will be generated with key for the publisher just by entering a valid url and clicking on ‘Generate’ which he can showcase on his website.
|
||||
</div>
|
||||
With our this tool, a link will be generated with key for
|
||||
the publisher just by entering a valid url and clicking on
|
||||
‘Generate’ which he can showcase on his website. </div>
|
||||
</div>
|
||||
<br />
|
||||
<br />
|
||||
<div class="row mt-3">
|
||||
<div class="col-md-8 p-2" style="border: 2px solid #3aadaa;border-radius: 20px;">
|
||||
<div class="col-md-8 p-2"
|
||||
style="border: 2px solid #3aadaa;border-radius: 20px;">
|
||||
<h4>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="26" fill="3aadaa" class="bi bi-link-45deg" viewBox="0 0 16 16">
|
||||
<path d="M4.715 6.542 3.343 7.914a3 3 0 1 0 4.243 4.243l1.828-1.829A3 3 0 0 0 8.586 5.5L8 6.086a1.002 1.002 0 0 0-.154.199 2 2 0 0 1 .861 3.337L6.88 11.45a2 2 0 1 1-2.83-2.83l.793-.792a4.018 4.018 0 0 1-.128-1.287z" />
|
||||
<path d="M6.586 4.672A3 3 0 0 0 7.414 9.5l.775-.776a2 2 0 0 1-.896-3.346L9.12 3.55a2 2 0 1 1 2.83 2.83l-.793.792c.112.42.155.855.128 1.287l1.372-1.372a3 3 0 1 0-4.243-4.243L6.586 4.672z" />
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="24"
|
||||
height="26" fill="3aadaa" class="bi bi-link-45deg"
|
||||
viewBox="0 0 16 16">
|
||||
<path
|
||||
d="M4.715 6.542 3.343 7.914a3 3 0 1 0 4.243 4.243l1.828-1.829A3 3 0 0 0 8.586 5.5L8 6.086a1.002 1.002 0 0 0-.154.199 2 2 0 0 1 .861 3.337L6.88 11.45a2 2 0 1 1-2.83-2.83l.793-.792a4.018 4.018 0 0 1-.128-1.287z" />
|
||||
<path
|
||||
d="M6.586 4.672A3 3 0 0 0 7.414 9.5l.775-.776a2 2 0 0 1-.896-3.346L9.12 3.55a2 2 0 1 1 2.83 2.83l-.793.792c.112.42.155.855.128 1.287l1.372-1.372a3 3 0 1 0-4.243-4.243L6.586 4.672z" />
|
||||
</svg>
|
||||
<a href="/tool/product_link">
|
||||
Generate Product Link
|
||||
</a>
|
||||
</h4>
|
||||
With our this tool, the publisher can generate a unique product link by following below three simple steps. First Choose Your Product, Second Choose your Image and Last Copy Generated Code
|
||||
</div>
|
||||
With our this tool, the publisher can generate a unique
|
||||
product link by following below three simple steps. First
|
||||
Choose Your Product, Second Choose your Image and Last Copy
|
||||
Generated Code </div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -82,22 +103,28 @@
|
|||
<t t-if="user_id.partner_id.is_affiliate">
|
||||
<div class="oe_structure">
|
||||
<div class="container mt16">
|
||||
<div class="navbar navbar-expand-md navbar-light" style="background-color: #3aadaa">
|
||||
<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;">
|
||||
<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/tool" style=" color: white;border-left: 3px solid;">
|
||||
<a class="nav-link mt-1 ps-2 ms-1 namitm"
|
||||
href="/affiliate/tool"
|
||||
style=" color: white;border-left: 3px solid;">
|
||||
Tools
|
||||
</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link mt-1 ps-2 ms-1 namitm" href="/tool/link_generator" style=" color: white;border-left: 3px solid;">
|
||||
<a class="nav-link mt-1 ps-2 ms-1 namitm"
|
||||
href="/tool/link_generator"
|
||||
style=" color: white;border-left: 3px solid;">
|
||||
Affiliate Link Generator
|
||||
</a>
|
||||
</li>
|
||||
|
|
@ -110,15 +137,21 @@
|
|||
Affiliate Link Generator
|
||||
</h3>
|
||||
<div class="container">
|
||||
<form role="form" class="mb-5" t-attf-action="/tool/create_link" method="post">
|
||||
<input type="hidden" name="csrf_token" t-att-value="request.csrf_token()" />
|
||||
<form role="form" class="mb-5" t-attf-action="/tool/create_link"
|
||||
method="post">
|
||||
<input type="hidden" name="csrf_token"
|
||||
t-att-value="request.csrf_token()" />
|
||||
|
||||
<div class="d-flex">
|
||||
<div class="w-50 me-2">
|
||||
<input type="link" name="link" t-att-value="link" id="link" class="form-control inp_style" required="required" autofocus="autofocus" placeholder="eg. www.localhost:8069/shop/product/e-com10-apple-wireless-keyboard-16" />
|
||||
<input type="link" name="link" t-att-value="link"
|
||||
id="link" class="form-control inp_style"
|
||||
required="required" autofocus="autofocus"
|
||||
placeholder="eg. www.localhost:8069/shop/product/e-com10-apple-wireless-keyboard-16" />
|
||||
</div>
|
||||
<div class="ps-2">
|
||||
<button type="submit" class="btn btn-primary ms-2" style="top:12px;border-radius:24px;">
|
||||
<div class="ps-2">
|
||||
<button type="submit" class="btn btn-primary ms-2"
|
||||
style="top:12px;border-radius:24px;">
|
||||
Generate
|
||||
</button>
|
||||
</div>
|
||||
|
|
@ -135,17 +168,23 @@
|
|||
<t t-if="generate_link">
|
||||
<div class="row">
|
||||
<div class="col-md-9">
|
||||
<p class="border p-2" style="background-color:#f0f8ff">
|
||||
<strong><t t-esc="generate_link" /></strong>
|
||||
<p class="border p-2"
|
||||
style="background-color:#f0f8ff">
|
||||
<strong>
|
||||
<t t-esc="generate_link" />
|
||||
</strong>
|
||||
</p>
|
||||
<button id="link_copy_button" class="btn btn-success ms-2" style="border-radius:24px;">
|
||||
<button id="link_copy_button"
|
||||
class="btn btn-success ms-2"
|
||||
style="border-radius:24px;">
|
||||
Copy
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</t>
|
||||
|
||||
<textarea class="form-control" rows="2" readonly="1" id="copy_link" style="display:none;">
|
||||
|
||||
<textarea class="form-control" rows="2" readonly="1"
|
||||
id="copy_link" style="display:none;">
|
||||
<t t-if="generate_link">
|
||||
<t t-esc="generate_link" />
|
||||
</t>
|
||||
|
|
@ -165,4 +204,4 @@
|
|||
</t>
|
||||
</template>
|
||||
</data>
|
||||
</odoo>
|
||||
</odoo>
|
||||
|
|
@ -1,34 +1,40 @@
|
|||
<odoo>
|
||||
<data>
|
||||
<data>
|
||||
|
||||
<record id="welcome_affiliate_email" model="mail.template">
|
||||
<field name="name">Affiliate welcome mail Connection</field>
|
||||
<field name="model_id" ref="affiliate_management.model_affiliate_request"/>
|
||||
<field name="email_from">"{{ object.partner_id.company_id.name or user.name}}" <{{ (object.partner_id.company_id.email or user.email) }}></field>
|
||||
<field name="email_to">{{ object.partner_id.email_formatted or object.name or '' }}</field>
|
||||
<field name="subject"> Welcome on Affiliate Program</field>
|
||||
<field name="body_html" type="html">
|
||||
<record id="welcome_affiliate_email" model="mail.template">
|
||||
<field name="name">Affiliate welcome mail Connection</field>
|
||||
<field name="model_id" ref="affiliate_management.model_affiliate_request" />
|
||||
<field name="email_from">"{{ object.partner_id.company_id.name or user.name}}" <{{
|
||||
(object.partner_id.company_id.email or user.email) }}></field>
|
||||
<field name="email_to">{{ object.partner_id.email_formatted or object.name or '' }}</field>
|
||||
<field name="subject"> Welcome on Affiliate Program</field>
|
||||
<field name="body_html" type="html">
|
||||
|
||||
<div style="padding:0px;width:600px;margin:auto;background: #FFFFFF repeat top /100%;color:#777777">
|
||||
<p>Dear <t t-out="object.partner_id.name or object.name or ''">Marc Demo</t>,</p>
|
||||
<div
|
||||
style="padding:0px;width:600px;margin:auto;background: #FFFFFF repeat top /100%;color:#777777">
|
||||
<p>Dear <t t-out="object.partner_id.name or object.name or ''">Marc Demo</t>,</p>
|
||||
<p>
|
||||
Welcome to Affiliate Program, In order to get access to your Account please Log In .
|
||||
</p>
|
||||
Welcome to Affiliate Program, In order to get access to your Account please Log
|
||||
In .
|
||||
</p>
|
||||
<p>
|
||||
click on the following link for Log In:
|
||||
</p>
|
||||
<div style="text-align: center; margin-top: 16px;">
|
||||
<a t-attf-href="/affiliate?db={{ object.env.cr.dbname }}" style="padding: 5px 10px; font-size: 12px; line-height: 18px; color: #FFFFFF; border-color:#875A7B; text-decoration: none; display: inline-block; margin-bottom: 0px; font-weight: 400; text-align: center; vertical-align: middle; cursor: pointer; white-space: nowrap; background-image: none; background-color: #875A7B; border: 1px solid #875A7B; border-radius:3px">For Log In to Affiliate Program</a>
|
||||
</div>
|
||||
Best regards,<br/>
|
||||
<t t-if="user.signature">
|
||||
<br/>
|
||||
<t t-out="user.signature or ''">--<br/>Mitchell Admin</t>
|
||||
</t>
|
||||
</div>
|
||||
click on the following link for Log In:
|
||||
</p>
|
||||
<div
|
||||
style="text-align: center; margin-top: 16px;">
|
||||
<a t-attf-href="/affiliate?db={{ object.env.cr.dbname }}"
|
||||
style="padding: 5px 10px; font-size: 12px; line-height: 18px; color: #FFFFFF; border-color:#875A7B; text-decoration: none; display: inline-block; margin-bottom: 0px; font-weight: 400; text-align: center; vertical-align: middle; cursor: pointer; white-space: nowrap; background-image: none; background-color: #875A7B; border: 1px solid #875A7B; border-radius:3px">For
|
||||
Log In to Affiliate Program</a>
|
||||
</div> Best regards,<br />
|
||||
<t
|
||||
t-if="user.signature">
|
||||
<br />
|
||||
<t t-out="user.signature or ''">--<br />Mitchell Admin</t>
|
||||
</t>
|
||||
</div>
|
||||
|
||||
</field>
|
||||
</record>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
</data>
|
||||
</odoo>
|
||||
</data>
|
||||
</odoo>
|
||||
|
|
@ -1 +0,0 @@
|
|||
# import wizard_invoice
|
||||
|
|
@ -1,8 +0,0 @@
|
|||
# from odoo import models, fields, api
|
||||
# import logging
|
||||
# _logger = logging.getLogger(__name__)
|
||||
# from odoo.exceptions import UserError
|
||||
# class WizardInvoice(models.TransientModel):
|
||||
# _name = 'wizard.invoice'
|
||||
#
|
||||
#
|
||||
|
|
@ -1,25 +0,0 @@
|
|||
<odoo>
|
||||
<data>
|
||||
<!-- <record id="wizard_invoice_type_form" model="ir.ui.view">
|
||||
<field name="name"> invoice type wizard</field>
|
||||
<field name="model">wizard.invoice</field>
|
||||
<field name="type">form</field>
|
||||
<field name="arch" type="xml">
|
||||
<form>
|
||||
|
||||
<footer/>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="wizard_invoice_action" model="ir.actions.act_window">
|
||||
<field name="name">Invoice type wizard</field>
|
||||
<field name="res_model">wizard.invoice</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_mode">form</field>
|
||||
<field name="view_id" ref="wizard_invoice_type_form"/>
|
||||
<field name="target">new</field>
|
||||
</record> -->
|
||||
|
||||
</data>
|
||||
</odoo>
|
||||
|
|
@ -1,16 +1,16 @@
|
|||
Automatic Database Backup To Local Server, Remote Server, Google Drive And Dropbox
|
||||
==================================================================================
|
||||
Automatic Database Backup
|
||||
=========================
|
||||
* Generate Database Backups and store to multiple locations
|
||||
|
||||
Installation
|
||||
============
|
||||
- www.odoo.com/documentation/16.0/setup/install.html
|
||||
- www.odoo.com/documentation/14.0/setup/install.html
|
||||
- Install our custom addon
|
||||
|
||||
License
|
||||
-------
|
||||
General Public License, Version 3 (LGPL v3).
|
||||
(https://www.odoo.com/documentation/user/16.0/legal/licenses/licenses.html)
|
||||
(https://www.odoo.com/documentation/user/14.0/legal/licenses/licenses.html)
|
||||
|
||||
Company
|
||||
-------
|
||||
|
|
@ -19,8 +19,7 @@ Company
|
|||
Credits
|
||||
-------
|
||||
* Developer:
|
||||
(v15) Midilaj @ Cybrosys
|
||||
(v16) Midilaj @ Cybrosys
|
||||
(v14) Midilaj @ Cybrosys, Farhana Jahan PT @ Cybrosys,
|
||||
|
||||
|
||||
Contacts
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
#
|
||||
# Cybrosys Technologies Pvt. Ltd.
|
||||
#
|
||||
# Copyright (C) 2022-TODAY Cybrosys Technologies(<https://www.cybrosys.com>)
|
||||
# Copyright (C) 2021-TODAY Cybrosys Technologies(<https://www.cybrosys.com>)
|
||||
# Author: Cybrosys Techno Solutions(<https://www.cybrosys.com>)
|
||||
#
|
||||
# You can modify it under the terms of the GNU LESSER
|
||||
|
|
@ -19,7 +19,6 @@
|
|||
# If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
#############################################################################
|
||||
|
||||
from . import controllers
|
||||
from . import models
|
||||
from . import wizard
|
||||
from . import controllers
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
#
|
||||
# Cybrosys Technologies Pvt. Ltd.
|
||||
#
|
||||
# Copyright (C) 2022-TODAY Cybrosys Technologies(<https://www.cybrosys.com>)
|
||||
# Copyright (C) 2021-TODAY Cybrosys Technologies(<https://www.cybrosys.com>)
|
||||
# Author: Cybrosys Techno Solutions(<https://www.cybrosys.com>)
|
||||
#
|
||||
# You can modify it under the terms of the GNU LESSER
|
||||
|
|
@ -19,26 +19,29 @@
|
|||
# If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
#############################################################################
|
||||
|
||||
{
|
||||
'name': "Automatic Database Backup To Local Server, Remote Server, Google Drive, Dropbox and Onedrive",
|
||||
'version': '16.0.1.0.0',
|
||||
'summary': """Generate automatic backup of databases and store to local, google drive, dropbox, onedrive or remote server""",
|
||||
'description': """This module has been developed for creating database backups automatically
|
||||
and store it to the different locations.""",
|
||||
'name': "Automatic Database Backup",
|
||||
'version': '14.0.2.0.2',
|
||||
'summary': 'Generate automatic backup of databases and store to local, '
|
||||
'google drive or remote server',
|
||||
'description': 'his module has been developed for creating '
|
||||
'database backups automatically '
|
||||
'and store it to the different locations.',
|
||||
'author': "Cybrosys Techno Solutions",
|
||||
'website': "https://www.cybrosys.com",
|
||||
'company': 'Cybrosys Techno Solutions',
|
||||
'maintainer': 'Cybrosys Techno Solutions',
|
||||
'category': 'Tools',
|
||||
'depends': ['base', 'mail'],
|
||||
'depends': ['base', 'mail', 'google_drive'],
|
||||
'data': [
|
||||
'security/ir.model.access.csv',
|
||||
'data/data.xml',
|
||||
'views/db_backup_configure_views.xml',
|
||||
'wizard/authentication_wizard_views.xml',
|
||||
'wizard/dropbox_auth_code_views.xml'
|
||||
],
|
||||
'external_dependencies': {'python': ['dropbox']},
|
||||
'external_dependencies': {
|
||||
'python': ['dropbox', 'pyncclient', 'boto3', 'nextcloud-api-wrapper', 'paramiko']
|
||||
},
|
||||
'license': 'LGPL-3',
|
||||
'images': ['static/description/banner.gif'],
|
||||
'installable': True,
|
||||
|
|
|
|||
|
|
@ -1,10 +1,10 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
#############################################################################
|
||||
###############################################################################
|
||||
#
|
||||
# Cybrosys Technologies Pvt. Ltd.
|
||||
#
|
||||
# Copyright (C) 2022-TODAY Cybrosys Technologies(<https://www.cybrosys.com>)
|
||||
# Author: Cybrosys Techno Solutions(<https://www.cybrosys.com>)
|
||||
# Copyright (C) 2023-TODAY Cybrosys Technologies(<https://www.cybrosys.com>)
|
||||
# Author: Cybrosys Techno Solutions (odoo@cybrosys.com)
|
||||
#
|
||||
# You can modify it under the terms of the GNU LESSER
|
||||
# GENERAL PUBLIC LICENSE (LGPL v3), Version 3.
|
||||
|
|
@ -17,5 +17,6 @@
|
|||
# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE
|
||||
# (LGPL v3) along with this program.
|
||||
# If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
from . import main
|
||||
#
|
||||
###############################################################################
|
||||
from . import auto_database_backup
|
||||
|
|
|
|||
|
|
@ -1,10 +1,10 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
#############################################################################
|
||||
###############################################################################
|
||||
#
|
||||
# Cybrosys Technologies Pvt. Ltd.
|
||||
#
|
||||
# Copyright (C) 2022-TODAY Cybrosys Technologies(<https://www.cybrosys.com>)
|
||||
# Author: Cybrosys Techno Solutions(<https://www.cybrosys.com>)
|
||||
# Copyright (C) 2023-TODAY Cybrosys Technologies(<https://www.cybrosys.com>)
|
||||
# Author: Cybrosys Techno Solutions (odoo@cybrosys.com)
|
||||
#
|
||||
# You can modify it under the terms of the GNU LESSER
|
||||
# GENERAL PUBLIC LICENSE (LGPL v3), Version 3.
|
||||
|
|
@ -17,27 +17,37 @@
|
|||
# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE
|
||||
# (LGPL v3) along with this program.
|
||||
# If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
#
|
||||
###############################################################################
|
||||
import json
|
||||
|
||||
from odoo import http
|
||||
from odoo.http import request
|
||||
|
||||
|
||||
class OnedriveAuth(http.Controller):
|
||||
|
||||
"""Controller for handling authentication with OneDrive and Google Drive."""
|
||||
@http.route('/onedrive/authentication', type='http', auth="public")
|
||||
def oauth2callback(self, **kw):
|
||||
"""
|
||||
Callback function for OneDrive authentication.
|
||||
|
||||
:param kw: A dictionary of keyword arguments.
|
||||
:return: A redirect response.
|
||||
"""
|
||||
state = json.loads(kw['state'])
|
||||
backup_config = request.env['db.backup.configure'].sudo().browse(state.get('backup_config_id'))
|
||||
backup_config = request.env['db.backup.configure'].sudo().browse(
|
||||
state.get('backup_config_id'))
|
||||
backup_config.get_onedrive_tokens(kw.get('code'))
|
||||
url_return = state.get('url_return')
|
||||
return request.redirect(url_return)
|
||||
backup_config.hide_active = True
|
||||
backup_config.active = True
|
||||
return http.local_redirect(state.get('url_return'))
|
||||
|
||||
@http.route('/google_drive/authentication', type='http', auth="public")
|
||||
def gdrive_oauth2callback(self, **kw):
|
||||
"""Callback function for Google Drive authentication."""
|
||||
state = json.loads(kw['state'])
|
||||
backup_config = request.env['db.backup.configure'].sudo().browse(state.get('backup_config_id'))
|
||||
backup_config = request.env['db.backup.configure'].sudo().browse(
|
||||
state.get('backup_config_id'))
|
||||
backup_config.get_gdrive_tokens(kw.get('code'))
|
||||
url_return = state.get('url_return')
|
||||
return request.redirect(url_return)
|
||||
backup_config.active = True
|
||||
return http.local_redirect(state.get('url_return'))
|
||||
|
|
@ -1,9 +1,7 @@
|
|||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
|
||||
<odoo>
|
||||
|
||||
<data noupdate="1">
|
||||
<!-- Schedule action for generating automatic database backup-->
|
||||
<!-- Schedule action for generating automatic database backup-->
|
||||
<record id="ir_cron_auto_db_backup" model="ir.cron">
|
||||
<field name="name">Backup : Automatic Database Backup</field>
|
||||
<field name="model_id" ref="model_db_backup_configure"/>
|
||||
|
|
@ -12,171 +10,129 @@
|
|||
<field name="interval_number">1</field>
|
||||
<field name="interval_type">days</field>
|
||||
<field name="numbercall">-1</field>
|
||||
<field name="active">False</field>
|
||||
<field name="active">True</field>
|
||||
</record>
|
||||
|
||||
</data>
|
||||
|
||||
<data>
|
||||
<!-- Database backup operation Successful email template-->
|
||||
<record id="mail_template_data_db_backup_successful" model="mail.template">
|
||||
<!--Database backup operation Successful email template-->
|
||||
<record id="mail_template_data_db_backup_successful"
|
||||
model="mail.template">
|
||||
<field name="name">Database Backup: Notification Successful</field>
|
||||
<field name="model_id" ref="auto_database_backup.model_db_backup_configure"/>
|
||||
<field name="subject">Database Backup Successful: {{ object.db_name }}</field>
|
||||
<field name="email_to">{{ object.user_id.email_formatted }}</field>
|
||||
<field name="body_html" type="html">
|
||||
<div style="margin: 0px; padding: 0px;">
|
||||
<p style="margin: 0px;">
|
||||
<span>Dear <t t-out="object.user_id.name"/>,
|
||||
</span>
|
||||
<field name="model_id"
|
||||
ref="auto_database_backup.model_db_backup_configure"/>
|
||||
<field name="subject">Database Backup Successful:
|
||||
${object.db_name}
|
||||
</field>
|
||||
<field name="email_to">${object.user_id.email_formatted | safe}
|
||||
</field>
|
||||
<field name="body_html" type="xml">
|
||||
<p style="margin: 0px;">
|
||||
<span>Dear ${object.user_id.sudo().name},
|
||||
</span>
|
||||
<br/>
|
||||
<br/>
|
||||
<span style="margin-top: 8px;">Backup of the database <i>
|
||||
${object.db_name}
|
||||
</i> has been successfully
|
||||
generated and stored to
|
||||
% if object.backup_destination in ('local'):
|
||||
<i>Local</i>
|
||||
% elif object.backup_destination in ('google_drive'):
|
||||
<i>Google Drive</i>
|
||||
% elif object.backup_destination in ('ftp'):
|
||||
<i>FTP Server</i>
|
||||
% elif object.backup_destination in ('sftp'):
|
||||
<i>SFTP Server</i>
|
||||
% endif
|
||||
.
|
||||
<br/>
|
||||
<br/>
|
||||
<span style="margin-top: 8px;">Backup of the database
|
||||
<i>
|
||||
<t t-out="object.db_name"/>
|
||||
</i>
|
||||
has been successfully generated and stored to
|
||||
<t t-if="object.backup_destination == 'local'">
|
||||
<i>Local</i>
|
||||
</t>
|
||||
<t t-elif="object.backup_destination == 'google_drive'">
|
||||
<i>Google Drive</i>
|
||||
</t>
|
||||
<t t-elif="object.backup_destination == 'ftp'">
|
||||
<i>FTP Server</i>
|
||||
</t>
|
||||
<t t-elif="object.backup_destination == 'sftp'">
|
||||
<i>SFTP Server</i>
|
||||
</t>
|
||||
<t t-elif="object.backup_destination == 'dropbox'">
|
||||
<i>Dropbox</i>
|
||||
</t>
|
||||
<t t-elif="object.backup_destination == 'onedrive'">
|
||||
<i>Onedrive</i>
|
||||
</t>
|
||||
.
|
||||
<br/>
|
||||
<br/>
|
||||
Database Name:
|
||||
<t t-out="object.db_name"/>
|
||||
<br/>
|
||||
Destination:
|
||||
<t t-if="object.backup_destination == 'local'">
|
||||
Local
|
||||
</t>
|
||||
<t t-elif="object.backup_destination == 'google_drive'">
|
||||
Google Drive
|
||||
</t>
|
||||
<t t-elif="object.backup_destination == 'ftp'">
|
||||
FTP Server
|
||||
</t>
|
||||
<t t-elif="object.backup_destination == 'sftp'">
|
||||
SFTP Server
|
||||
</t>
|
||||
<t t-elif="object.backup_destination == 'dropbox'">
|
||||
Dropbox
|
||||
</t>
|
||||
<t t-elif="object.backup_destination == 'onedrive'">
|
||||
Onedrive
|
||||
</t>
|
||||
<t t-if="object.backup_destination in ('local', 'ftp', 'sftp', 'dropbox')">
|
||||
<br/>
|
||||
Backup Path:
|
||||
<t t-if="object.backup_destination == 'local'">
|
||||
<t t-out="object.backup_path"/>
|
||||
</t>
|
||||
<t t-elif="object.backup_destination == 'ftp'">
|
||||
<t t-out="object.ftp_path"/>
|
||||
</t>
|
||||
<t t-elif="object.backup_destination == 'sftp'">
|
||||
<t t-out="object.sftp_path"/>
|
||||
</t>
|
||||
<t t-elif="object.backup_destination == 'dropbox'">
|
||||
<t t-out="object.dropbox_folder"/>
|
||||
</t>
|
||||
</t>
|
||||
<br/>
|
||||
Backup Type:
|
||||
<t t-out="object.backup_format"/>
|
||||
<br/>
|
||||
Backup FileName:
|
||||
<t t-out="object.backup_filename"/>
|
||||
</span>
|
||||
</p>
|
||||
</div>
|
||||
Database Name: ${object.db_name}
|
||||
<br/>
|
||||
Destination:
|
||||
% if object.backup_destination in ('local'):
|
||||
<i>Local</i>
|
||||
% elif object.backup_destination in ('google_drive'):
|
||||
<i>Google Drive</i>
|
||||
% elif object.backup_destination in ('ftp'):
|
||||
<i>FTP Server</i>
|
||||
% elif object.backup_destination in ('sftp'):
|
||||
<i>SFTP Server</i>
|
||||
% endif
|
||||
% if object.backup_destination in ('local', 'ftp',
|
||||
'sftp')
|
||||
<br/>
|
||||
Backup Path:
|
||||
% if object.backup_destination in ('local'):
|
||||
${object.backup_path}
|
||||
% elif object.backup_destination in ('ftp'):
|
||||
${object.ftp_path}
|
||||
% elif object.backup_destination in ('sftp'):
|
||||
${object.sftp_path}
|
||||
% endif
|
||||
% endif
|
||||
<br/>
|
||||
Backup Type: ${object.backup_format}
|
||||
<br/>
|
||||
Backup FileName: ${object.backup_filename}
|
||||
</span>
|
||||
</p>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<!-- Database backup operation failed email templated-->
|
||||
<!--Database backup operation failed email templated-->
|
||||
<record id="mail_template_data_db_backup_failed" model="mail.template">
|
||||
<field name="name">Database Backup: Notification Failed</field>
|
||||
<field name="model_id" ref="auto_database_backup.model_db_backup_configure"/>
|
||||
<field name="subject">Database Backup Failed: {{ object.db_name }}</field>
|
||||
<field name="email_to">{{ object.user_id.email_formatted }}</field>
|
||||
<field name="body_html" type="html">
|
||||
<div style="margin: 0px; padding: 0px;">
|
||||
<p style="margin: 0px;">
|
||||
<span>Dear <t t-out="object.user_id.name"/>,
|
||||
</span>
|
||||
<field name="model_id"
|
||||
ref="auto_database_backup.model_db_backup_configure"/>
|
||||
<field name="subject">Database Backup Failed: ${object.db_name}
|
||||
</field>
|
||||
<field name="email_to">${object.user_id.email_formatted | safe}
|
||||
</field>
|
||||
<field name="body_html" type="xml">
|
||||
<p style="margin: 0px;">
|
||||
<span>Dear ${object.user_id.sudo().name},
|
||||
</span>
|
||||
<br/>
|
||||
<br/>
|
||||
<span style="margin-top: 8px;">Backup generation of the
|
||||
database <i>${object.db_name}</i> has been
|
||||
Failed.
|
||||
<br/>
|
||||
<br/>
|
||||
<span style="margin-top: 8px;">Backup generation of the database
|
||||
<i>
|
||||
<t t-out="object.db_name"/>
|
||||
</i>
|
||||
has been Failed.
|
||||
<br/>
|
||||
<br/>
|
||||
Database Name: <t t-out="object.db_name"/>
|
||||
<br/>
|
||||
Destination:
|
||||
<t t-if="object.backup_destination == 'local'">
|
||||
Local
|
||||
</t>
|
||||
<t t-elif="object.backup_destination == 'google_drive'">
|
||||
Google Drive
|
||||
</t>
|
||||
<t t-elif="object.backup_destination == 'ftp'">
|
||||
FTP Server
|
||||
</t>
|
||||
<t t-elif="object.backup_destination == 'sftp'">
|
||||
SFTP Server
|
||||
</t>
|
||||
<t t-elif="object.backup_destination == 'dropbox'">
|
||||
Dropbox
|
||||
</t>
|
||||
<t t-elif="object.backup_destination == 'onedrive'">
|
||||
Onedrive
|
||||
</t>
|
||||
<t t-if="object.backup_destination in ('local', 'ftp', 'sftp', 'dropbox')">
|
||||
<br/>
|
||||
Backup Path:
|
||||
<t t-if="object.backup_destination == 'local'">
|
||||
<t t-out="object.backup_path"/>
|
||||
</t>
|
||||
<t t-elif="object.backup_destination == 'ftp'">
|
||||
<t t-out="object.ftp_path"/>
|
||||
</t>
|
||||
<t t-elif="object.backup_destination == 'sftp'">
|
||||
<t t-out="object.sftp_path"/>
|
||||
</t>
|
||||
<t t-elif="object.backup_destination == 'dropbox'">
|
||||
<t t-out="object.dropbox_folder"/>
|
||||
</t>
|
||||
</t>
|
||||
<br/>
|
||||
Backup Type: <t t-out="object.backup_format"/>
|
||||
<br/>
|
||||
<br/>
|
||||
<b>Error Message:</b>
|
||||
<br/>
|
||||
<i><t t-out="object.generated_exception"/></i>
|
||||
</span>
|
||||
</p>
|
||||
</div>
|
||||
Database Name: ${object.db_name}
|
||||
<br/>
|
||||
Destination:
|
||||
% if object.backup_destination in ('local'):
|
||||
<i>Local</i>
|
||||
% elif object.backup_destination in ('google_drive'):
|
||||
<i>Google Drive</i>
|
||||
% elif object.backup_destination in ('ftp'):
|
||||
<i>FTP Server</i>
|
||||
% elif object.backup_destination in ('sftp'):
|
||||
<i>SFTP Server</i>
|
||||
% endif
|
||||
% if object.backup_destination in ('local', 'ftp',
|
||||
'sftp')
|
||||
<br/>
|
||||
Backup Path:
|
||||
% if object.backup_destination in ('local'):
|
||||
${object.backup_path}
|
||||
% elif object.backup_destination in ('ftp'):
|
||||
${object.ftp_path}
|
||||
% elif object.backup_destination in ('sftp'):
|
||||
${object.sftp_path}
|
||||
% endif
|
||||
% endif
|
||||
<br/>
|
||||
Backup Type: ${object.backup_format}
|
||||
<br/>
|
||||
<br/>
|
||||
<b>Error Message:</b>
|
||||
<br/>
|
||||
<i>${object.generated_exception}</i>
|
||||
</span>
|
||||
</p>
|
||||
</field>
|
||||
</record>
|
||||
</data>
|
||||
|
||||
|
||||
</odoo>
|
||||
</odoo>
|
||||
|
|
|
|||
|
|
@ -1,6 +1,31 @@
|
|||
## Module <auto_database_backup>
|
||||
|
||||
#### 31.10.2022
|
||||
#### Version 16.0.1.0.0
|
||||
#### 20.04.2022
|
||||
#### Version 14.0.1.0.0
|
||||
#### ADD
|
||||
- Initial commit for auto_database_backup
|
||||
|
||||
#### 16.02.2024
|
||||
#### Version 14.0.1.0.1
|
||||
#### ADD
|
||||
- Dropbox integration added. Backup can be stored in to dropbox.
|
||||
|
||||
#### 16.02.2024
|
||||
#### Version 14.0.1.0.1
|
||||
#### ADD
|
||||
- Onedrive integration added. Backup can be stored in to onedrive.
|
||||
|
||||
#### 16.02.2024
|
||||
#### Version 14.0.1.0.1
|
||||
#### ADD
|
||||
- Google Drive authentication updated.
|
||||
|
||||
#### 16.02.2024
|
||||
#### Version 14.0.1.0.1
|
||||
#### ADD
|
||||
- Nextcloud and Amazon S3 integration added. Backup can be stored into Nextcloud and Amazon S3.
|
||||
|
||||
#### 24.10.2024
|
||||
#### Version 14.0.2.0.2
|
||||
#### UPDT
|
||||
- Fixed the errors while inputting list_db = False in odoo conf file.
|
||||
|
|
|
|||
|
|
@ -1,10 +1,10 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
#############################################################################
|
||||
###############################################################################
|
||||
#
|
||||
# Cybrosys Technologies Pvt. Ltd.
|
||||
#
|
||||
# Copyright (C) 2022-TODAY Cybrosys Technologies(<https://www.cybrosys.com>)
|
||||
# Author: Cybrosys Techno Solutions(<https://www.cybrosys.com>)
|
||||
# Copyright (C) 2023-TODAY Cybrosys Technologies(<https://www.cybrosys.com>)
|
||||
# Author: Cybrosys Techno Solutions (odoo@cybrosys.com)
|
||||
#
|
||||
# You can modify it under the terms of the GNU LESSER
|
||||
# GENERAL PUBLIC LICENSE (LGPL v3), Version 3.
|
||||
|
|
@ -17,5 +17,6 @@
|
|||
# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE
|
||||
# (LGPL v3) along with this program.
|
||||
# If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
#
|
||||
###############################################################################
|
||||
from . import db_backup_configure
|
||||
|
|
|
|||
|
|
@ -1,3 +1,3 @@
|
|||
id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink
|
||||
access_db_backup_configure,access.db.backup.configure,model_db_backup_configure,base.group_user,1,1,1,1
|
||||
access_authentication_wizard,access.authentication.wizard,model_authentication_wizard,base.group_user,1,1,1,1
|
||||
access_dropbox_auth_code_user,access.dropbox.auth.code.user,model_dropbox_auth_code,base.group_user,1,1,1,1
|
||||
|
|
|
|||
|
|
Before Width: | Height: | Size: 3.4 KiB After Width: | Height: | Size: 3.4 KiB |
|
Before Width: | Height: | Size: 1.5 KiB |
|
Before Width: | Height: | Size: 1.1 KiB |
|
Before Width: | Height: | Size: 1.9 KiB |
|
Before Width: | Height: | Size: 1.1 KiB |
|
Before Width: | Height: | Size: 2.1 KiB |
|
Before Width: | Height: | Size: 4.4 KiB |
|
Before Width: | Height: | Size: 589 B |
|
Before Width: | Height: | Size: 1.7 KiB |
|
Before Width: | Height: | Size: 2.3 KiB |
|
Before Width: | Height: | Size: 967 B |
|
Before Width: | Height: | Size: 1.6 KiB |
|
Before Width: | Height: | Size: 3.8 KiB |
|
Before Width: | Height: | Size: 5.0 KiB |
|
Before Width: | Height: | Size: 60 KiB |
|
Before Width: | Height: | Size: 56 KiB |
|
Before Width: | Height: | Size: 56 KiB |
|
Before Width: | Height: | Size: 59 KiB |
|
Before Width: | Height: | Size: 1.8 MiB |
|
Before Width: | Height: | Size: 57 KiB |