-
Notifications
You must be signed in to change notification settings - Fork 105
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by lmignon
- Loading branch information
Showing
92 changed files
with
13,758 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
../../../../shopinvader_restapi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
import setuptools | ||
|
||
setuptools.setup( | ||
setup_requires=['setuptools-odoo'], | ||
odoo_addon=True, | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,113 @@ | ||
=========== | ||
Shopinvader | ||
=========== | ||
|
||
.. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! | ||
!! This file is generated by oca-gen-addon-readme !! | ||
!! changes will be overwritten. !! | ||
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! | ||
.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png | ||
:target: https://odoo-community.org/page/development-status | ||
:alt: Beta | ||
.. |badge2| image:: https://img.shields.io/badge/licence-AGPL--3-blue.png | ||
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html | ||
:alt: License: AGPL-3 | ||
.. |badge3| image:: https://img.shields.io/badge/github-shopinvader%2Fodoo--shopinvader-lightgray.png?logo=github | ||
:target: https://github.com/shopinvader/odoo-shopinvader/tree/14.0/shopinvader | ||
:alt: shopinvader/odoo-shopinvader | ||
|
||
|badge1| |badge2| |badge3| | ||
|
||
This is shopinvader the odoo module for the new generation of e-commerce. | ||
|
||
ShopInvader is an ecommerce software to create and manage easily your online store with Odoo. | ||
|
||
This is the Odoo side of the `Shopinvader E-commerce Solution`_. | ||
|
||
.. _Shopinvader E-commerce Solution: https://shopinvader.com | ||
|
||
**Table of contents** | ||
|
||
.. contents:: | ||
:local: | ||
|
||
Known issues / Roadmap | ||
====================== | ||
|
||
* Customer validation limitation | ||
|
||
Customer validation is global: enable/disable affects all websites, if you have more than one. | ||
|
||
Technical | ||
~~~~~~~~~ | ||
|
||
* Create methods should be rewritten to support multi | ||
* The logic to bind / unbind products and categories should be implemented as | ||
component in place of wizard. | ||
Previously it was possible to work with in-memory record of the wizard to | ||
call the same logic from within odoo. In Odoo 13 it's no more the case. | ||
That means that to rebind thousand of records we must create thousand of | ||
rows into the database to reuse the logic provided by the wizard. | ||
* On product.category the name is no more translatable in V13. | ||
This functionality has been restored into shopinvader. | ||
This should be moved into a dedicated addon | ||
|
||
Changelog | ||
========= | ||
|
||
10.0.1.0.0 (2017-04-11) | ||
~~~~~~~~~~~~~~~~~~~~~~~ | ||
|
||
* First real version : [REF] rename project to the real name : shoptor is dead long live to shopinvader", 2017-04-11) | ||
|
||
12.0.1.0.0 (2019-05-10) | ||
~~~~~~~~~~~~~~~~~~~~~~~ | ||
|
||
* [12.0][MIG] shopinvader | ||
|
||
Bug Tracker | ||
=========== | ||
|
||
Bugs are tracked on `GitHub Issues <https://github.com/shopinvader/odoo-shopinvader/issues>`_. | ||
In case of trouble, please check there if your issue has already been reported. | ||
If you spotted it first, help us smashing it by providing a detailed and welcomed | ||
`feedback <https://github.com/shopinvader/odoo-shopinvader/issues/new?body=module:%20shopinvader%0Aversion:%2014.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_. | ||
|
||
Do not contact contributors directly about support or help with technical issues. | ||
|
||
Credits | ||
======= | ||
|
||
Authors | ||
~~~~~~~ | ||
|
||
* Akretion | ||
|
||
Contributors | ||
~~~~~~~~~~~~ | ||
|
||
* Sebastien BEAU <[email protected]> | ||
* Simone Orsi <[email protected]> | ||
* Laurent Mignon <[email protected]> | ||
* Raphaël Reverdy <[email protected]> | ||
* Kevin Khao <[email protected]> | ||
|
||
Other credits | ||
~~~~~~~~~~~~~ | ||
|
||
The development of this module has been financially supported by: | ||
|
||
* Akretion | ||
* Adaptoo | ||
* Encresdubuit | ||
* Abilis | ||
* Camptocamp | ||
* Cosanum | ||
|
||
Maintainers | ||
~~~~~~~~~~~ | ||
|
||
This module is part of the `shopinvader/odoo-shopinvader <https://github.com/shopinvader/odoo-shopinvader/tree/14.0/shopinvader>`_ project on GitHub. | ||
|
||
You are welcome to contribute. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
from . import components | ||
from . import models | ||
from . import services | ||
from . import wizards | ||
from .hooks import pre_init_hook |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
# Copyright 2016 Akretion (http://www.akretion.com) | ||
# Sébastien BEAU <[email protected]> | ||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). | ||
|
||
{ | ||
"name": "Shopinvader", | ||
"summary": "Shopinvader", | ||
"version": "16.0.1.0.0", | ||
"category": "e-commerce", | ||
"website": "https://github.com/shopinvader/odoo-shopinvader", | ||
"author": "Akretion,ACSONE SA/NV", | ||
"license": "AGPL-3", | ||
"application": True, | ||
"installable": True, | ||
"external_dependencies": {"python": ["cerberus", "unidecode"], "bin": []}, | ||
"depends": [ | ||
"base_rest", | ||
"jsonifier", | ||
"base_sparse_field_list_support", | ||
"base_vat", | ||
"component_event", | ||
"sale", | ||
"sale_cart", | ||
"sale_discount_display_amount", | ||
"server_environment", | ||
"onchange_helper", | ||
"queue_job", | ||
"mail", | ||
"base", | ||
], | ||
"data": [ | ||
"security/shopinvader_security.xml", | ||
"security/ir.model.access.csv", | ||
"security/shopinvader_backend_security.xml", | ||
"security/shopinvader_partner_security.xml", | ||
"wizards/shopinvader_partner_binding.xml", | ||
"views/shopinvader_menu.xml", | ||
"views/shopinvader_cart_step_view.xml", | ||
"views/shopinvader_partner_view.xml", | ||
"views/res_config_settings.xml", | ||
"views/sale_view.xml", | ||
"views/shopinvader_sale_view.xml", | ||
"views/partner_view.xml", | ||
"views/shopinvader_backend_view.xml", | ||
"data/res_partner.xml", | ||
"data/cart_step.xml", | ||
"data/mail_activity_data.xml", | ||
"data/queue_job_channel_data.xml", | ||
"data/queue_job_function_data.xml", | ||
], | ||
"demo": [ | ||
"demo/account_demo.xml", | ||
"demo/pricelist_demo.xml", | ||
"demo/backend_demo.xml", | ||
"demo/partner_demo.xml", | ||
"demo/sale_demo.xml", | ||
"demo/email_demo.xml", | ||
"demo/notification_demo.xml", | ||
], | ||
"qweb": [], | ||
"pre_init_hook": "pre_init_hook", | ||
"development_status": "Alpha", | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
from . import core | ||
from . import access_info | ||
from . import service_context_provider |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,80 @@ | ||
# Copyright 2019 Camptocamp (http://www.camptocamp.com). | ||
# @author Simone Orsi <[email protected]> | ||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). | ||
|
||
from odoo.addons.component.core import Component | ||
|
||
|
||
class PartnerAccess(Component): | ||
"""Define access rules to partner from client side.""" | ||
|
||
_name = "shopinvader.partner.access" | ||
_inherit = "base.shopinvader.component" | ||
_usage = "access.info" | ||
_apply_on = "res.partner" | ||
|
||
@property | ||
def service_work(self): | ||
return getattr(self.work, "service_work", None) | ||
|
||
@property | ||
def partner(self): | ||
return getattr(self.work, "partner", None) | ||
|
||
@property | ||
def invader_partner(self): | ||
return getattr(self.work, "invader_partner", None) | ||
|
||
@property | ||
def partner_user(self): | ||
return getattr(self.work, "partner_user", self.partner) | ||
|
||
@property | ||
def invader_partner_user(self): | ||
return getattr(self.work, "invader_partner_user", self.partner) | ||
|
||
def is_main_partner(self): | ||
return self.partner == self.partner_user | ||
|
||
def is_owner(self, partner_id): | ||
return partner_id == self.partner_user.id | ||
|
||
def for_profile(self, partner_id): | ||
info = {"read": True, "update": True, "delete": False} | ||
if not self.is_main_partner() and partner_id != self.partner_user.id: | ||
info["update"] = False | ||
return info | ||
|
||
def for_address(self, address_id): | ||
info = {"read": True, "update": True, "delete": True} | ||
if self.partner_user is not None: | ||
if not self.is_main_partner(): | ||
if not self.is_owner(address_id): | ||
info.update({"read": True, "update": False, "delete": False}) | ||
else: | ||
# only main partner can delete your address | ||
info["delete"] = False | ||
return info | ||
|
||
def permissions(self): | ||
"""Current user permissions mapping. | ||
:returns: a dictionary in the format | ||
{$component_usage: {$method: $permission_flag}} | ||
""" | ||
if self.partner is None: | ||
return {"address": {}, "cart": {}} | ||
return { | ||
# scope: permissions | ||
"addresses": { | ||
# can create addresses only if profile partner is enabled | ||
"create": self.invader_partner.is_shopinvader_active, | ||
}, | ||
"cart": { | ||
# can hit the button to add to cart | ||
"add_item": self.invader_partner.is_shopinvader_active, | ||
# can go on w/ checkout steps | ||
"update_item": self.invader_partner.is_shopinvader_active, | ||
}, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
# Copyright 2019 Camptocamp (http://www.camptocamp.com). | ||
# @author Simone Orsi <[email protected]> | ||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). | ||
|
||
from odoo.addons.component.core import AbstractComponent | ||
|
||
|
||
class BaseShopinvaderComponent(AbstractComponent): | ||
"""Base Shopinvader Component. | ||
All components of this module and inheriting ones should inherit from it. | ||
""" | ||
|
||
_name = "base.shopinvader.component" | ||
_collection = "shopinvader.backend" | ||
|
||
@property | ||
def backend(self): | ||
return self.collection |
Oops, something went wrong.