diff --git a/dev/odoo-server-dev-aw.conf b/dev/odoo-server-dev-aw.conf new file mode 100644 index 00000000..97c3e679 --- /dev/null +++ b/dev/odoo-server-dev-aw.conf @@ -0,0 +1,26 @@ +[options] + +xmlrpc_port = 8080 +; This is the password that allows database operations: +; admin_passwd = admin +db_host = False +db_port = 5432 +db_user = False +db_password = False + +addons_path = ext/odoo/addons,ext/custom-addons,ext/3rd-party-addons,ext/clarico-addons +; For enterprise use the addons path bellow +; addons_path = ext/enterprise-addons,ext/odoo/addons,ext/3rd-party-addons,ext/custom-addons,dmi/run1 +timezone = Europe/Vienna + +#dbfilter_test = ['.*',] +show_debug = 1 + +workers = 0 +server_wide_modules = web,base_sparse_field,queue_job + +portal_url = https://erp.tzaustria.info +portal_secret = secret + +[queue_job] +channels = root:4 \ No newline at end of file diff --git a/ext/3rd-party-addons/ir_rule_website/README.rst b/ext/3rd-party-addons/ir_rule_website/README.rst new file mode 100644 index 00000000..b55252ef --- /dev/null +++ b/ext/3rd-party-addons/ir_rule_website/README.rst @@ -0,0 +1,55 @@ +========================================= + Multi-website support in Security Rules +========================================= + +Allows to use ``website_id`` (current website) in ``domain_force`` field of Record Rules (``ir.rule``), e.g.: + +* ``[('website_ids', 'in', [website_id])]`` +* ``[('website_id', '=', website_id)]`` + + +Example of usage: + +* Show a blog on specific websites only (TODO: add link to the module) +* Show an event on specific websites only (TODO: add link to the module) +* Show a product on specific websites only (TODO: add link to the module) + +Odoo 12.0+ +========== + +We hope this feature will be built-in since Odoo 12.0 at least: https://github.com/odoo/odoo/pull/22743 + +Credits +======= + +Contributors +------------ +* `Ivan Yelizariev `__ +* `Ildar Nasyrov `__ + +Sponsors +-------- +* `IT-Projects LLC `__ + +Maintainers +----------- +* `IT-Projects LLC `__ + + To get a guaranteed support you are kindly requested to purchase the module at `odoo apps store `__. + + Thank you for understanding! + + `IT-Projects Team `__ + +Further information +=================== + +Demo: http://runbot.it-projects.info/demo/access-addons/11.0 + +HTML Description: https://apps.odoo.com/apps/modules/11.0/ir_rule_website + +Usage instructions: ``_ + +Changelog: ``_ + +Tested on Odoo 11.0 dc61861f90d15797b19f8ebddfb0c8a66d0afa88 diff --git a/ext/3rd-party-addons/ir_rule_website/__init__.py b/ext/3rd-party-addons/ir_rule_website/__init__.py new file mode 100644 index 00000000..a0fdc10f --- /dev/null +++ b/ext/3rd-party-addons/ir_rule_website/__init__.py @@ -0,0 +1,2 @@ +# -*- coding: utf-8 -*- +from . import models diff --git a/ext/3rd-party-addons/ir_rule_website/__manifest__.py b/ext/3rd-party-addons/ir_rule_website/__manifest__.py new file mode 100644 index 00000000..05ec03fb --- /dev/null +++ b/ext/3rd-party-addons/ir_rule_website/__manifest__.py @@ -0,0 +1,36 @@ +# -*- coding: utf-8 -*- +{ + "name": """Multi-website support in Security Rules""", + "summary": """Provide access depending on current website""", + "category": "Access", + # "live_test_url": "", + "images": [], + "version": "1.0.0", + "application": False, + + "author": "IT-Projects LLC, Ildar Nasyrov", + "support": "apps@it-projects.info", + "website": "https://it-projects.info/team/iledarn", + "license": "LGPL-3", + "price": 20.00, + "currency": "EUR", + + "depends": [ + "base", + ], + "external_dependencies": {"python": [], "bin": []}, + "data": [ + ], + "qweb": [ + ], + "demo": [ + ], + + "post_load": None, + "pre_init_hook": None, + "post_init_hook": None, + "uninstall_hook": None, + + "auto_install": False, + "installable": True, +} diff --git a/ext/3rd-party-addons/ir_rule_website/doc/changelog.rst b/ext/3rd-party-addons/ir_rule_website/doc/changelog.rst new file mode 100644 index 00000000..9ee2b48b --- /dev/null +++ b/ext/3rd-party-addons/ir_rule_website/doc/changelog.rst @@ -0,0 +1,4 @@ +`1.0.0` +------- + +- Init version diff --git a/ext/3rd-party-addons/ir_rule_website/doc/index.rst b/ext/3rd-party-addons/ir_rule_website/doc/index.rst new file mode 100644 index 00000000..1a61c813 --- /dev/null +++ b/ext/3rd-party-addons/ir_rule_website/doc/index.rst @@ -0,0 +1,30 @@ +========================================= + Multi-website support in Security Rules +========================================= + +Installation +============ + +* `Install `__ this module in a usual way + +Configuration +============= + +This is a core technical module - no configurations are needed + +Usage +===== + +* If you have a model accessible through a website (by means of controller methods) - specify this module into the "depends" section of your manifest file +* Now you can create security rules using `website_id` in `domain_force` fields. For example, + +:: + + + + + Blogs available only for specifed websites + + [('website_ids', 'in', [website_id])] + + diff --git a/ext/3rd-party-addons/ir_rule_website/models/__init__.py b/ext/3rd-party-addons/ir_rule_website/models/__init__.py new file mode 100644 index 00000000..3605b081 --- /dev/null +++ b/ext/3rd-party-addons/ir_rule_website/models/__init__.py @@ -0,0 +1,2 @@ +# -*- coding: utf-8 -*- +from . import ir_rule diff --git a/ext/3rd-party-addons/ir_rule_website/models/ir_rule.py b/ext/3rd-party-addons/ir_rule_website/models/ir_rule.py new file mode 100644 index 00000000..f9626568 --- /dev/null +++ b/ext/3rd-party-addons/ir_rule_website/models/ir_rule.py @@ -0,0 +1,19 @@ +# -*- coding: utf-8 -*- + +from odoo import api, models, tools +from odoo.addons.base.ir.ir_rule import IrRule as IrRuleOriginal + + +class IrRule(models.Model): + _inherit = 'ir.rule' + + @api.model + def _eval_context(self): + context = super(IrRule, self)._eval_context() + context['website_id'] = self._context.get('website_id') + return context + + @api.model + @tools.ormcache_context('self._uid', 'model_name', 'mode', keys=["website_id"]) + def _compute_domain(self, model_name, mode="read"): + return IrRuleOriginal._compute_domain.__wrapped__(self, model_name, mode=mode) diff --git a/ext/3rd-party-addons/ir_rule_website/static/description/icon.png b/ext/3rd-party-addons/ir_rule_website/static/description/icon.png new file mode 100644 index 00000000..b43a0a13 Binary files /dev/null and b/ext/3rd-party-addons/ir_rule_website/static/description/icon.png differ diff --git a/ext/3rd-party-addons/ir_rule_website/static/description/index.html b/ext/3rd-party-addons/ir_rule_website/static/description/index.html new file mode 100644 index 00000000..53e7264f --- /dev/null +++ b/ext/3rd-party-addons/ir_rule_website/static/description/index.html @@ -0,0 +1,89 @@ +
+
+
+

Multi-website support in Security Rules

+

Make website-dependent access to pages, products, etc.

+
+
+
+ +
+
+
+ +
+ Technical module that allows implementing different features. For example: +
    + +
  • + + Show a blog on specific websites only +
  • + +
  • + + Show an event on specific websites only +
  • + +
  • + + Show a product on specific websites only +
  • + +
+
+ +
+
+
+ +
+
+
+

Need our service?

+

Contact us by email or fill out request form

+ +
+
+
+
+ Tested on Odoo
11.0 community +
+ +
+
+
+
diff --git a/ext/3rd-party-addons/ir_rule_website/tests/__init__.py b/ext/3rd-party-addons/ir_rule_website/tests/__init__.py new file mode 100644 index 00000000..e254f1d6 --- /dev/null +++ b/ext/3rd-party-addons/ir_rule_website/tests/__init__.py @@ -0,0 +1,2 @@ +# -*- coding: utf-8 -*- +from . import test_compute_domain diff --git a/ext/3rd-party-addons/ir_rule_website/tests/test_compute_domain.py b/ext/3rd-party-addons/ir_rule_website/tests/test_compute_domain.py new file mode 100644 index 00000000..7a4ae46a --- /dev/null +++ b/ext/3rd-party-addons/ir_rule_website/tests/test_compute_domain.py @@ -0,0 +1,23 @@ +# -*- coding: utf-8 -*- +from openerp.tests.common import TransactionCase + + +class TestComputeDomain(TransactionCase): + at_install = True + post_install = True + + def setUp(self): + super(TestComputeDomain, self).setUp() + self.demo_user = self.env.ref('base.user_demo') + self.env['ir.rule'].create({'name': 'test ir_rule_website', + 'model_id': self.env.ref('base.model_res_partner').id, + 'domain_force': "[('parent_id', 'in', [website_id])]"}) + + def _cached_compute_domain(self, website_id): + test_domain = ('parent_id', 'in', [website_id]) + domain = self.env['ir.rule'].sudo(user=self.demo_user.id).with_context(website_id=website_id)._compute_domain('res.partner') + self.assertTrue(test_domain in domain) + + def test_cache(self): + self._cached_compute_domain(1) + self._cached_compute_domain(2) diff --git a/ext/3rd-party-addons/website_multi_company_sale/README.rst b/ext/3rd-party-addons/website_multi_company_sale/README.rst new file mode 100644 index 00000000..73b098da --- /dev/null +++ b/ext/3rd-party-addons/website_multi_company_sale/README.rst @@ -0,0 +1,45 @@ +========================================== + Real Multi Website (eCommerce extension) +========================================== + +Multi Website support in eCommerce: + +* adds field ``website_ids`` to payment.acquirer +* adds field ``website_ids`` to product.template +* adds field ``website_ids`` to product.public.category +* use separate sale order (cart) for different companies -- works by adding ``company_dependent`` attribute to ``last_website_so_id`` field + + +Credits +======= + +Contributors +------------ +* `Ivan Yelizariev `__ + +Sponsors +-------- +* `IT-Projects LLC `__ + +Maintainers +----------- +* `IT-Projects LLC `__ + + To get a guaranteed support you are kindly requested to purchase the module at `odoo apps store `__. + + Thank you for understanding! + + `IT-Projects Team `__ + +Further information +=================== + +Demo: http://runbot.it-projects.info/demo/website-addons/11.0 + +HTML Description: https://apps.odoo.com/apps/modules/11.0/website_multi_company_sale/ + +Usage instructions: ``_ + +Changelog: ``_ + +Tested on Odoo 11.0 f34d4d33a09d33a12e427c2490b6526546114486 diff --git a/ext/3rd-party-addons/website_multi_company_sale/__init__.py b/ext/3rd-party-addons/website_multi_company_sale/__init__.py new file mode 100644 index 00000000..f7209b17 --- /dev/null +++ b/ext/3rd-party-addons/website_multi_company_sale/__init__.py @@ -0,0 +1,2 @@ +from . import models +from . import controllers diff --git a/ext/3rd-party-addons/website_multi_company_sale/__manifest__.py b/ext/3rd-party-addons/website_multi_company_sale/__manifest__.py new file mode 100644 index 00000000..82cdb1da --- /dev/null +++ b/ext/3rd-party-addons/website_multi_company_sale/__manifest__.py @@ -0,0 +1,42 @@ +{ + "name": """Real Multi Website (eCommerce extension)""", + "summary": """Multi Website support in eCommerce""", + "category": "eCommerce", + "live_test_url": "http://apps.it-projects.info/shop/product/website-multi-company?version=11.0", + "images": ["images/website_multi_company_sale_main.png"], + "version": "11.0.1.2.0", + "application": False, + + "author": "IT-Projects LLC, Ivan Yelizariev", + "support": "apps@it-projects.info", + "website": "https://it-projects.info/team/yelizariev", + "license": "LGPL-3", + "price": 9.00, + "currency": "EUR", + + "depends": [ + "website_multi_company", + "website_sale", + "ir_rule_website", + ], + "external_dependencies": {"python": [], "bin": []}, + "data": [ + "views/product_public_category_views.xml", + "views/website_views.xml", + "views/product_template_views.xml", + "views/payment_views.xml", + "security/website_multi_company_sale_security.xml", + ], + "qweb": [ + ], + "demo": [ + ], + + "post_load": None, + "pre_init_hook": None, + "post_init_hook": None, + "uninstall_hook": None, + + "auto_install": False, + "installable": True, +} diff --git a/ext/3rd-party-addons/website_multi_company_sale/controllers/__init__.py b/ext/3rd-party-addons/website_multi_company_sale/controllers/__init__.py new file mode 100644 index 00000000..12a7e529 --- /dev/null +++ b/ext/3rd-party-addons/website_multi_company_sale/controllers/__init__.py @@ -0,0 +1 @@ +from . import main diff --git a/ext/3rd-party-addons/website_multi_company_sale/controllers/main.py b/ext/3rd-party-addons/website_multi_company_sale/controllers/main.py new file mode 100644 index 00000000..9aaff502 --- /dev/null +++ b/ext/3rd-party-addons/website_multi_company_sale/controllers/main.py @@ -0,0 +1,19 @@ +from odoo import http +from odoo.http import request +from odoo.addons.website_sale.controllers.main import WebsiteSale + + +class WebsiteMultiCompanySale(WebsiteSale): + @http.route() + def shop(self, page=0, category=None, search='', ppg=False, **post): + response = super(WebsiteMultiCompanySale, self).shop(page=page, category=category, search=search, ppg=ppg, **post) + categs = request.env['product.public.category'].search([ + ('parent_id', '=', False), + '|', + ('website_ids', '=', False), + ('website_ids', 'in', [request.website.id]), + ]) + response.qcontext.update({ + 'categories': categs, + }) + return response diff --git a/ext/3rd-party-addons/website_multi_company_sale/doc/changelog.rst b/ext/3rd-party-addons/website_multi_company_sale/doc/changelog.rst new file mode 100644 index 00000000..61cd61f5 --- /dev/null +++ b/ext/3rd-party-addons/website_multi_company_sale/doc/changelog.rst @@ -0,0 +1,24 @@ +`1.2.0` +------- + +- **ADD:** you can now specify allowed websites for your payment acquirers + +`1.1.0` +------- + +- **ADD:** you can now specify allowed websites for your products + +`1.0.2` +------- + +- **ADD:** possibility to specify Salesperson, Sales Channel per each website + +`1.0.1` +------- + +- **FIX:** add multi-company support for carts + +`1.0.0` +------- + +- Init version diff --git a/ext/3rd-party-addons/website_multi_company_sale/doc/index.rst b/ext/3rd-party-addons/website_multi_company_sale/doc/index.rst new file mode 100644 index 00000000..0de660a1 --- /dev/null +++ b/ext/3rd-party-addons/website_multi_company_sale/doc/index.rst @@ -0,0 +1,72 @@ +========================================== + Real Multi Website (eCommerce extension) +========================================== + +Installation +============ + +* `Install `__ this module in a usual way + +Configuration +============= + +Follow instruction of the base module `Real Multi Website `__. + +Website Orders +-------------- + +* Open menu ``[[ Website ]] >> Configuration >> Websites`` +* For each website configure **Salesperson** and **Sales Channel** fields +* RESULT: new orders made via website will be assigned to proper Salesperson and Sales Channel + +Multi-categories +---------------- + +* Open menu ``[[ Website ]] >> Configuration >> Products >> eCommerce Categories`` +* Only for top-level (i.e. without ``parent_id``) categories: specify **Websites** field + +Multi-products +-------------- +* Open menu ``[[ Sales ]] >> Sales >> Products`` +* Specify **Allowed websites** for your products +* Websites company and product company should be equal. But if you want different company websites then leave the **Company** field empty in your product - in such case you can specify any websites + +Multi-payment-acquirers +----------------------- +* Open menu ``[[ Website ]] >> Configuration >> eCommerce >> Payment Acquirers`` +* Specify **Allowed websites** for your payment acquirer. If no website is specified then the acquirer will be available on any website with the same company +* Choosen websites companies and acquirer's company should be equal + + +Usage +===== + +Multi-categories +---------------- + +* Open shop at some of your websites +* Login as Administrator +* In ``Customize`` section activate ``[x] eCommerce Categories`` +* RESULT: parent categories for current website and categories without value at **Websites** fields are shown only. **Websites** value of child categories are ignored. + +Multi-cart +---------- + +* Login as portal or internal user at some of your websites +* Add some products to the cart +* Open another website that belongs to another company +* Login as the same user +* RESULT: you have empty cart, rather than one from previous website + +Multi-products +-------------- + +* Open website shop +* RESULT: you should only see products allowed for this website or products with no websites specified + +Multi-payment-acquirers +----------------------- + +* Open website shop +* Buy a product +* On Payment step of checkout there should be available only specified acquirers diff --git a/ext/3rd-party-addons/website_multi_company_sale/images/website_multi_company_sale_main.png b/ext/3rd-party-addons/website_multi_company_sale/images/website_multi_company_sale_main.png new file mode 100644 index 00000000..2478e3c9 Binary files /dev/null and b/ext/3rd-party-addons/website_multi_company_sale/images/website_multi_company_sale_main.png differ diff --git a/ext/3rd-party-addons/website_multi_company_sale/models/__init__.py b/ext/3rd-party-addons/website_multi_company_sale/models/__init__.py new file mode 100644 index 00000000..62909dc0 --- /dev/null +++ b/ext/3rd-party-addons/website_multi_company_sale/models/__init__.py @@ -0,0 +1,4 @@ +from . import product_public_category +from . import sale_order +from . import product_template +from . import payment_acquirer diff --git a/ext/3rd-party-addons/website_multi_company_sale/models/payment_acquirer.py b/ext/3rd-party-addons/website_multi_company_sale/models/payment_acquirer.py new file mode 100644 index 00000000..d121c383 --- /dev/null +++ b/ext/3rd-party-addons/website_multi_company_sale/models/payment_acquirer.py @@ -0,0 +1,20 @@ +from odoo import api, fields, models, _ +from odoo.exceptions import ValidationError + + +class PaymentAcquirer(models.Model): + _inherit = 'payment.acquirer' + + website_ids = fields.Many2many('website', string='Allowed websites', + help='Set the websites this payment acquirer should be available on. Leave empty to allow all.') + + @api.onchange('company_id') + def _onchange_company_id(self): + return self.company_id and {'domain': {'website_ids': [('company_id', '=', self.company_id.id)]}} or {'domain': {'website_ids': []}} + + @api.constrains('company_id', 'website_ids') + def _check_websites_in_company(self): + for record in self: + website_company = record.website_ids.mapped('company_id') + if record.company_id and record.website_ids and (len(website_company) > 1 or website_company[0] != record.company_id): + raise ValidationError(_("Error! Only the company's websites are allowed")) diff --git a/ext/3rd-party-addons/website_multi_company_sale/models/product_public_category.py b/ext/3rd-party-addons/website_multi_company_sale/models/product_public_category.py new file mode 100644 index 00000000..aba874e8 --- /dev/null +++ b/ext/3rd-party-addons/website_multi_company_sale/models/product_public_category.py @@ -0,0 +1,11 @@ +from odoo import models, fields + + +class ProductPublicCategory(models.Model): + _inherit = "product.public.category" + + website_ids = fields.Many2many( + 'website', + string="Websites", + help="On which websites show category. Keep empty to show at all websites. The value is ignored if there is Parent Category" + ) diff --git a/ext/3rd-party-addons/website_multi_company_sale/models/product_template.py b/ext/3rd-party-addons/website_multi_company_sale/models/product_template.py new file mode 100644 index 00000000..f67a1ebe --- /dev/null +++ b/ext/3rd-party-addons/website_multi_company_sale/models/product_template.py @@ -0,0 +1,22 @@ + +from odoo import api, fields, models, _ +from odoo.exceptions import ValidationError + + +class ProductTemplate(models.Model): + _inherit = "product.template" + + website_ids = fields.Many2many('website', string='Allowed websites', + help='Set the websites this product should be available on. Leave empty to allow all.') + + @api.onchange('company_id') + def _onchange_company_id(self): + return self.company_id and {'domain': {'website_ids': [('company_id', '=', self.company_id.id)]}} or {'domain': {'website_ids': []}} + + @api.constrains('company_id', 'website_ids') + def _check_websites_in_company(self): + for record in self: + website_company = record.website_ids.mapped('company_id') + if record.company_id and record.website_ids and (len(website_company) > 1 or website_company[0] != record.company_id): + raise ValidationError(_("Error! Only the company's websites are allowed. \ + Leave the Company field empty if you want websites from different companies")) diff --git a/ext/3rd-party-addons/website_multi_company_sale/models/sale_order.py b/ext/3rd-party-addons/website_multi_company_sale/models/sale_order.py new file mode 100644 index 00000000..d9c11383 --- /dev/null +++ b/ext/3rd-party-addons/website_multi_company_sale/models/sale_order.py @@ -0,0 +1,24 @@ +from odoo import models, api, fields +from odoo.http import request + + +class Website(models.Model): + _inherit = 'website' + + @api.multi + def sale_get_order(self, force_create=False, code=None, update_pricelist=False, force_pricelist=False): + company = request.website.company_id + if not request.session.get('sale_order_id'): + # original sale_get_order uses last_website_so_id only when there is + # sale_order_id in the session + + # company.id seems to be the same as self.id, but let's use variant + # from original sale_get_order + self = self.with_context(force_company=company.id) + return super(Website, self).sale_get_order(force_create, code, update_pricelist, force_pricelist) + + +class ResPartner(models.Model): + _inherit = 'res.partner' + + last_website_so_id = fields.Many2one(company_dependent=True) diff --git a/ext/3rd-party-addons/website_multi_company_sale/security/website_multi_company_sale_security.xml b/ext/3rd-party-addons/website_multi_company_sale/security/website_multi_company_sale_security.xml new file mode 100644 index 00000000..201f0330 --- /dev/null +++ b/ext/3rd-party-addons/website_multi_company_sale/security/website_multi_company_sale_security.xml @@ -0,0 +1,13 @@ + + + + Products available only for specifed websites (shops) + + ['|', ('website_ids', 'in', [website_id]), ('website_ids', '=', False)] + + + Payment acquirers available only for specifed websites (shops) + + ['|', ('website_ids', 'in', [website_id]), ('website_ids', '=', False)] + + diff --git a/ext/3rd-party-addons/website_multi_company_sale/static/description/icon.png b/ext/3rd-party-addons/website_multi_company_sale/static/description/icon.png new file mode 100644 index 00000000..213cccf5 Binary files /dev/null and b/ext/3rd-party-addons/website_multi_company_sale/static/description/icon.png differ diff --git a/ext/3rd-party-addons/website_multi_company_sale/static/description/index.html b/ext/3rd-party-addons/website_multi_company_sale/static/description/index.html new file mode 100644 index 00000000..dbd32caa --- /dev/null +++ b/ext/3rd-party-addons/website_multi_company_sale/static/description/index.html @@ -0,0 +1,92 @@ +
+
+
+

Real Multi Website (eCommerce extension)

+
+
+
+ +
+
+
+ +
+ Key features: +
    + +
  • + + All features of Real Multi Website module +
  • + +
  • + + Each eCommerce has configurable list of product categories +
  • +
  • + + eCommerce carts are separate per each company to avoid accounting problems +
  • +
  • + + The same product can be available on several websites (shops) +
  • + +
+
+ +
+
+
+ +
+
+
+

Need our service?

+

Contact us by email or fill out request form

+ +
+
+
+
+ Tested on Odoo
11.0 community +
+
+ Tested on Odoo
11.0 enterprise +
+
+
+
+
+ diff --git a/ext/3rd-party-addons/website_multi_company_sale/views/payment_views.xml b/ext/3rd-party-addons/website_multi_company_sale/views/payment_views.xml new file mode 100644 index 00000000..7e521ec5 --- /dev/null +++ b/ext/3rd-party-addons/website_multi_company_sale/views/payment_views.xml @@ -0,0 +1,14 @@ + + + + payment.acquirer.form.inherit.website_multi_company_sale + payment.acquirer + + + + + + + + + diff --git a/ext/3rd-party-addons/website_multi_company_sale/views/product_public_category_views.xml b/ext/3rd-party-addons/website_multi_company_sale/views/product_public_category_views.xml new file mode 100644 index 00000000..8e6a1397 --- /dev/null +++ b/ext/3rd-party-addons/website_multi_company_sale/views/product_public_category_views.xml @@ -0,0 +1,26 @@ + + + + + product.public.category.form + product.public.category + + + + + + + + + + product.public.category.tree + product.public.category + + + + + + + + + diff --git a/ext/3rd-party-addons/website_multi_company_sale/views/product_template_views.xml b/ext/3rd-party-addons/website_multi_company_sale/views/product_template_views.xml new file mode 100644 index 00000000..71819d87 --- /dev/null +++ b/ext/3rd-party-addons/website_multi_company_sale/views/product_template_views.xml @@ -0,0 +1,13 @@ + + + + product.template.form.inherit.website_multi_company_sale + product.template + + + + + + + + diff --git a/ext/3rd-party-addons/website_multi_company_sale/views/website_views.xml b/ext/3rd-party-addons/website_multi_company_sale/views/website_views.xml new file mode 100644 index 00000000..3f7ce963 --- /dev/null +++ b/ext/3rd-party-addons/website_multi_company_sale/views/website_views.xml @@ -0,0 +1,17 @@ + + + + + website + + + + + + + + + + + + diff --git a/ext/custom-addons/dp_custom/models/sale.py b/ext/custom-addons/dp_custom/models/sale.py index 4e04c433..185f490a 100644 --- a/ext/custom-addons/dp_custom/models/sale.py +++ b/ext/custom-addons/dp_custom/models/sale.py @@ -490,7 +490,7 @@ class SaleOrderLine(models.Model): if vals.get('lot_id', False): vals.update(intrastat_id=self.env['stock.production.lot'].browse(vals['lot_id']).intrastat_id.id) elif vals.get('product_id', False): - vals.update(intrastat_id=self.env['product.template'].browse(vals['product_id']).intrastat_id.id) + vals.update(intrastat_id=self.env['product.product'].browse(vals['product_id']).intrastat_id.id) return super(SaleOrderLine, self).create(vals) @api.multi diff --git a/setup/lib/environments.py b/setup/lib/environments.py index e0eb137e..177f0f3f 100644 --- a/setup/lib/environments.py +++ b/setup/lib/environments.py @@ -52,6 +52,10 @@ ENVIRONMENTS = { 'ab-tz' : Environment('http://localhost', '8080', 'tz-austria_1', 'tz-admin', 'x', 'admin', config = ConfigTZA()), 'ab-glaser' : Environment('http://localhost', '8080', 'tz-austria_1', 'glaser-admin', 'x', 'admin', config = ConfigGlaser()), + 'aw' : Environment('http://localhost', '8080', 'tz-austria_1', 'admin', 'x', 'admin', config = ConfigTZA()), + 'aw-tz' : Environment('http://localhost', '8080', 'tz-austria_1', 'tz-admin', 'x', 'admin', config = ConfigTZA()), + 'aw-glaser' : Environment('http://localhost', '8080', 'tz-austria_1', 'glaser-admin', 'x', 'admin', config = ConfigGlaser()), + # Remote environments are always listed without passwords! # Do not store them here, you have to type them anyway! 'test': Environment('https://erp.tzaustria.info', '443', 'odoo-test', 'admin', config = ConfigTZA()),