oca / e-commerce Goto Github PK
View Code? Open in Web Editor NEWOdoo E-Commerce server automation addons
License: GNU Affero General Public License v3.0
Odoo E-Commerce server automation addons
License: GNU Affero General Public License v3.0
In website_sale_hide_price, how can I hide the price in the popup window after clicking Add to Cart button?
I can't figure out a way to do this, so new module in planning. Please let me know if I'm missing something stupid because this really seems like it should exist, or if you have any additional thoughts ๐
By creating a pricelist that has multiple of the same product on it just with different a min qty
option, you are able to create pricing tiers to incentivize bulk purchases.
The pricing itself works great if you use the qty
field during the website shopping process, but the customer has to know that these pricing tiers exist.
My proposal is to handle pricelist tiers similar to variants, providing a radio selection with the min qty and the price for that qty.
The radios themselves would only need to have some JS that would manipulate the existing qty field, triggering the existing pricing handler.
cc @LasLabs
There is an error caused by website_sale_product_brand
when you perform a search in the Shop (website_sale search):
Traceback (most recent call last):
File "/root/odoo-9.0/addons/website/models/ir_http.py", line 242, in _handle_exception
response = super(ir_http, self)._handle_exception(exception)
File "/.repo_requirements/odoo/openerp/addons/base/ir/ir_http.py", line 158, in _handle_exception
return request._handle_exception(exception)
File "/.repo_requirements/odoo/openerp/http.py", line 786, in _handle_exception
return super(HttpRequest, self)._handle_exception(exception)
File "/.repo_requirements/odoo/openerp/addons/base/ir/ir_http.py", line 183, in _dispatch
result = request.dispatch()
File "/.repo_requirements/odoo/openerp/http.py", line 845, in dispatch
r = self._call_function(**self.params)
File "/.repo_requirements/odoo/openerp/http.py", line 321, in _call_function
return checked_call(self.db, *args, **kwargs)
File "/.repo_requirements/odoo/openerp/service/model.py", line 118, in wrapper
return f(dbname, *args, **kwargs)
File "/.repo_requirements/odoo/openerp/http.py", line 314, in checked_call
result = self.endpoint(*a, **kw)
File "/.repo_requirements/odoo/openerp/http.py", line 964, in __call__
return self.method(*args, **kw)
File "/.repo_requirements/odoo/openerp/http.py", line 514, in response_wrap
response = f(*args, **kw)
File "/root/build/OCA/e-commerce/website_sale_wishlist/controllers/main.py", line 22, in shop
page, category, search, ppg, **post)
File "/.repo_requirements/odoo/openerp/http.py", line 514, in response_wrap
response = f(*args, **kw)
File "/root/build/OCA/e-commerce/website_sale_product_brand/controllers/main.py", line 26, in shop
context.setdefault('brand_id', int(brand))
ValueError: invalid literal for int() with base 10: 'imac'
I have reproduced on v9 Runbot. v8 is fine.
Hi,
This discussion has already done here:
This issue is to determinate and know specifically which modules in e-commerce are incorrect pushed and we must move to other repo, mainly: https://github.com/OCA/sale-workflow
In fact there is a PR about this here: OCA/sale-workflow#172
AS @bguillot said:
And existing PR:
Thanks
Hi!
while install
pip install odoo-addon-connector-woocommerce
there is the following error:
...Collecting odoo-addon-sale-payment-method<9.0a,>=8.0a (from odoo-addon-sale-payment-method-automatic-workflow<9.0a,>=8.0a->odoo-addon-connector-ecommerce<9.0a,>=8.0a->odoo-addon-connector-woocommerce)
Could not find a version that satisfies the requirement odoo-addon-sale-payment-method<9.0a,>=8.0a (from odoo-addon-sale-payment-method-automatic-workflow<9.0a,>=8.0a->odoo-addon-connector-ecommerce<9.0a,>=8.0a->odoo-addon-connector-woocommerce) (from versions: )
No matching distribution found for odoo-addon-sale-payment-method<9.0a,>=8.0a (from odoo-addon-sale-payment-method-automatic-workflow<9.0a,>=8.0a->odoo-addon-connector-ecommerce<9.0a,>=8.0a->odoo-addon-connector-woocommerce)
I have a older installation where the connector-woocommerce is working, but I am not able to build up a simple odoo v8 where I can install the connector.
For me it seems that there where some changes to this module which have broken the requirements, but I am not sure.
So I hope anyone can help.
Thank you.
Edit:
Hi, I installed the connector-woocommerce at this way:
odoo$: sudo apt install python-pip
odoo$: sudo pip install woocommerce
then download the following module from here (includes all the dependencies)
https://www.odoo.com/apps/modules/8.0/connector_woocommerce/
odoo$: wget https://apps.odoo.com/loempia/download/connector_woocommerce/8.0.1.0.1/5X67fKLxEBADalRAktjsZw.zip
odoo$: unzip 5X67fKLxEBADalRAktjsZw.zip
odoo$: sudo mv connector_woocommerce /usr/lib/python2.7/dist-packages/openerp/addons/
Now the connector is working.
Hi all,
The module correctly hide the price on shop page or product page but still you can add to cart the product and view the price on cart.
Best regards,
The "product" controller calls super's product method with empty string as values for the "category" and "search" parameters instead of the values passed as arguments.
This module will provide a template for directly viewing product.product
records, instead of just product.template
. The variant pages will operate in a nearly identical fashion to the template pages.
The publication of the variant pages should be independent from the publication of the template pages. If a variant is not published, it should not be a selectable variant in the store.
The variant pages will be provided under the route:
/shop/product/<string:product_template_slug>/<string:product_variant_slug>
What I'm not quite sure of is what we should make product_variant_slug
equal. It should obviously be something meaningful to differentiate the variant, but also something not duplicating the template slug. Maybe just the database ID, but that's pretty crappy SEO IMO.
It will add an option into the Customize
menu of the current product view to enable/disable the variant pages.
A hook will be added into the current JS that fires when a variant is selected (the one that changes the price, etc). If the variant page option is enabled, instead of changing the price, the page will be loaded.
Fairly simple plan I think. Anyone know anything I can base on, or some strategies that are currently in use?
In the current implementation, when you add a link from product a to product b, the reverse link is not shown on product b (even if the information exists). Moreover it's not possible to define new types of link without extending the addon.
I propose to improve the implementation to fix these to issues. It could look like
class ProductLinkType(models.Model):
_name='product.link.type"
name = fields.Char()
inverse_name = fields.Char()
class ProductLink(models.Model):
_name='product.link"
product_tmpl_id_left = fiedls.Many2one()
product_tmpl_id_right = fiedls.Many2one()
product_link_type = fields.Many2one()
link_type_name = fields.Char(related="product_link_type.name") # left to right
link_type_inverse_name = fields.Char(related="product_link_type.invese_name") # right to left
@api.multi
@api.constrains("product_tmpl_id_left", "product_tmpl_id_right")
def _check_products(self):
"""
This method checks whether:
- the two products are different
- there is only link between the same two templates for the same type
:raise: ValidationError if not ok
"""
pass
class ProductTemplate(models.Model):
_inherit = "product.template"
product_link_ids = fields.One2many(comodel_name="product.link")
compute="_compute_product_link_ids",
)
@api.multi
def _compute_product_link_ids(self):
link_model = self.env["product.link"]
domain = [
"|",
("product_tmpl_id_left", "in", self.ids),
("product_tmpl_id_right", "in", self.ids),
]
links = link_model.search(domain)
links_by_product_id = defaultdict(link_model.browse)
for link in links:
links_by_product_id[link.product_tmpl_id_left.id] |= link
links_by_product_id[link.product_tmpl_id_right.id] |= link
for record in self:
record.product_link_ids = links_by_product_id[
record.id
]
With this kind of implementation:
Hello, we installed the website_sale_suggest_create_account module, enabled it in the settings, and the new button is there. After clicking on it, got a new form Filled that form, send it and got a Bad Request error. In the odoo error log we found:
2017-06-26 14:40:19,242 2370 WARNING reproplan odoo.http: CSRF validation failed on path '/web/signup'
2017-06-26 14:40:19,245 2370 WARNING reproplan odoo.addons.website.models.ir_ui_view: Could not find view object with xml_id 'website.400'
Since we're new to odoo we have no idea, where this comes from an why.
Our odoo is odoo 10 community edition.
Thanks.
https://github.com/OCA/e-commerce/blob/12.0/website_sale_require_legal/static/src/js/tour.js#L11
The pull request odoo/odoo#32718 has been merge.
How to fix the hack?
Thanks
I set discount for 20% off for all product for quantity over 10 in pricelist:
Unit price on product page do not judge the pricelist discounts.
If I switch to uom Dozens or set default sale uom to Dozens, the unit price should display the discounted price similar as the following default one.
On the cart page, the discount do implemented:
I was reviewing the code, and cant find the customize_show="True"
and active="False"
attrs on the main templates, this two attrs are very useful becacuse we can enable or disable features in the website with no need of uninstall the app itself, can you please add this?, if this is done the feature will be selectable on the customize menu.
Here an example : https://github.com/odoo/odoo/blob/8.0/addons/website_sale/views/templates.xml#L261
When clicking on a sales order this errors popsup (also in runbot):
Traceback (most recent call last):
File "/usr/lib/python2.7/dist-packages/odoo/http.py", line 642, in _handle_exception
return super(JsonRequest, self)._handle_exception(exception)
File "/usr/lib/python2.7/dist-packages/odoo/http.py", line 684, in dispatch
result = self._call_function(**self.params)
File "/usr/lib/python2.7/dist-packages/odoo/http.py", line 334, in _call_function
return checked_call(self.db, *args, **kwargs)
File "/usr/lib/python2.7/dist-packages/odoo/service/model.py", line 101, in wrapper
return f(dbname, *args, **kwargs)
File "/usr/lib/python2.7/dist-packages/odoo/http.py", line 327, in checked_call
result = self.endpoint(*a, **kw)
File "/usr/lib/python2.7/dist-packages/odoo/http.py", line 942, in call
return self.method(*args, **kw)
File "/usr/lib/python2.7/dist-packages/odoo/http.py", line 507, in response_wrap
response = f(*args, **kw)
File "/usr/lib/python2.7/dist-packages/odoo/addons/web/controllers/main.py", line 895, in call_kw
return self._call_kw(model, method, args, kwargs)
File "/usr/lib/python2.7/dist-packages/odoo/addons/web/controllers/main.py", line 887, in _call_kw
return call_kw(request.env[model], method, args, kwargs)
File "/usr/lib/python2.7/dist-packages/odoo/api.py", line 689, in call_kw
return call_kw_multi(method, model, args, kwargs)
File "/usr/lib/python2.7/dist-packages/odoo/api.py", line 680, in call_kw_multi
result = method(recs, *args, **kwargs)
File "/usr/lib/python2.7/dist-packages/odoo/models.py", line 3028, in read
values[name] = field.convert_to_read(record[name], record, use_name_get)
File "/usr/lib/python2.7/dist-packages/odoo/models.py", line 5236, in getitem
return self._fields[key].get(self, type(self))
File "/usr/lib/python2.7/dist-packages/odoo/fields.py", line 915, in get
self.determine_value(record)
File "/usr/lib/python2.7/dist-packages/odoo/fields.py", line 1027, in determine_value
self.compute_value(recs)
File "/usr/lib/python2.7/dist-packages/odoo/fields.py", line 981, in compute_value
self._compute_value(records)
File "/usr/lib/python2.7/dist-packages/odoo/fields.py", line 972, in _compute_value
getattr(records, self.compute)()
File "/mnt/extra-addons/sale_early_payment_discount/models/sale.py", line 22, in _amount_all
if not self.early_payment_discount:
File "/usr/lib/python2.7/dist-packages/odoo/fields.py", line 909, in get
record.ensure_one()
File "/usr/lib/python2.7/dist-packages/odoo/models.py", line 4848, in ensure_one
raise ValueError("Expected singleton: %s" % self)
ValueError: Expected singleton: sale.order(18, 20)
In v9 with you module website_sale_qty
we cannot test any module in runbot because in shop if you select a product it gives you an error:
403: Forbidden
The page you were looking for could not be authorized.
Maybe you were looking for one of these popular pages ?
Homepage
Contact Us
When uninstalling you module it works.
Please could you review and update v9 module's version like v10?
Thanks!
https://github.com/OCA/maintainer-tools/wiki/Migration-to-version-9.0
https://github.com/OCA/maintainer-tools/wiki/Migration-to-version-11.0
sale_automatic_workflow tries to reconcile entries that have not the same accounts or partners, resulting in errors. It must skip them.
The errors appear in the logs until the lines are reconciled manually.
From the logs:
2014-08-29 13:30:00,973 18012 ERROR openerp_trunk_qoqa openerp.addons.sale_automatic_workflow.automatic_workflow_job: Error during an automatic workflow action.
Traceback (most recent call last):
File "/home/gbaconnier/dev/parts/e-commerce/sale_automatic_workflow/automatic_workflow_job.py", line 65, in commit
yield
File "/home/gbaconnier/dev/parts/e-commerce/sale_automatic_workflow/automatic_workflow_job.py", line 103, in _reconcile_invoices
context=context)
File "/home/gbaconnier/dev/parts/e-commerce/sale_automatic_workflow/invoice.py", line 153, in reconcile_invoice
self._reconcile_invoice(cr, uid, invoice, context=context)
File "/home/gbaconnier/dev/parts/e-commerce/sale_automatic_workflow/invoice.py", line 135, in _reconcile_invoice
move_line_obj.reconcile(cr, uid, line_ids, context=context)
File "/home/gbaconnier/dev/parts/addons/account/account_move_line.py", line 938, in reconcile
'line_partial_ids': map(lambda x: (3, x, False), ids)
File "/home/gbaconnier/dev/parts/connector/connector/producer.py", line 42, in create
record_id = create_original(self, cr, uid, vals, context=context)
File "/home/gbaconnier/dev/parts/server/openerp/osv/orm.py", line 4543, in create
self._validate(cr, user, [id_new], context)
File "/home/gbaconnier/dev/parts/server/openerp/osv/orm.py", line 1557, in _validate
raise except_orm('ValidateError', '\n'.join(error_msgs))
except_orm: ('ValidateError', u'Une erreur est apparue lors de la validation du/des champ(s) line_id: You can only reconcile journal items with the same partner.')
2014-08-29 13:30:04,675 18012 ERROR openerp_trunk_qoqa openerp.addons.sale_automatic_workflow.automatic_workflow_job: Error during an automatic workflow action.
Traceback (most recent call last):
File "/home/gbaconnier/dev/parts/e-commerce/sale_automatic_workflow/automatic_workflow_job.py", line 65, in commit
yield
File "/home/gbaconnier/dev/parts/e-commerce/sale_automatic_workflow/automatic_workflow_job.py", line 103, in _reconcile_invoices
context=context)
File "/home/gbaconnier/dev/parts/e-commerce/sale_automatic_workflow/invoice.py", line 153, in reconcile_invoice
self._reconcile_invoice(cr, uid, invoice, context=context)
File "/home/gbaconnier/dev/parts/e-commerce/sale_automatic_workflow/invoice.py", line 135, in _reconcile_invoice
move_line_obj.reconcile(cr, uid, line_ids, context=context)
File "/home/gbaconnier/dev/parts/addons/account/account_move_line.py", line 857, in reconcile
raise osv.except_osv(_('Error'), _('Entries are not of the same account or already reconciled ! '))
https://github.com/OCA/maintainer-tools/wiki/Migration-to-version-12.0
Hi,
I'm trying to login through xmlRPC and I have this kind of issue :
2017-06-26 15:38:22,795 4749 ERROR revivre openerp.http: object unbound
Traceback (most recent call last):
File "/home/florent/DEV/EclipseWorkSpace/Odoo/Revivre/odoo/openerp/http.py", line 115, in dispatch_rpc
result = dispatch(method, params)
File "/home/florent/DEV/EclipseWorkSpace/Odoo/Revivre/odoo/openerp/service/common.py", line 57, in dispatch
return g[exp_method_name](*params)
File "/home/florent/DEV/EclipseWorkSpace/Odoo/Revivre/odoo/openerp/service/common.py", line 23, in exp_login
res = security.login(db, login, password)
File "/home/florent/DEV/EclipseWorkSpace/Odoo/Revivre/odoo/openerp/service/security.py", line 9, in login
return res_users._login(db, login, password)
File "/home/florent/DEV/EclipseWorkSpace/Odoo/Revivre/odoo/openerp/addons/base/res/res_users.py", line 462, in _login
self.check_credentials(cr, user_id, password)
File "/home/florent/DEV/EclipseWorkSpace/Odoo/Revivre/odoo/openerp/api.py", line 250, in wrapper
return old_api(self, *args, **kwargs)
File "/home/florent/DEV/EclipseWorkSpace/Odoo/Revivre/odoo/openerp/api.py", line 354, in old_api
result = method(recs, *args, **kwargs)
File "/home/florent/DEV/EclipseWorkSpace/Odoo/Revivre/Libs/OCA-ecommerce/website_sale_wishlist/models/res_users.py", line 27, in check_credentials
self.env["product.wishlist"]._join_current_user_and_session()
File "/home/florent/DEV/EclipseWorkSpace/Odoo/Revivre/odoo/openerp/api.py", line 248, in wrapper
return new_api(self, *args, **kwargs)
File "/home/florent/DEV/EclipseWorkSpace/Odoo/Revivre/Libs/OCA-ecommerce/website_sale_wishlist/models/product_wishlist.py", line 72, in _join_current_user_and_session
("session", "=", request.session.id),
File "/usr/lib/python2.7/site-packages/werkzeug/local.py", line 347, in __getattr__
return getattr(self._get_current_object(), name)
File "/usr/lib/python2.7/site-packages/werkzeug/local.py", line 306, in _get_current_object
return self.__local()
File "/usr/lib/python2.7/site-packages/werkzeug/local.py", line 135, in _lookup
raise RuntimeError('object unbound')
RuntimeError: object unbound
Anyone could help me on this ?
The usual connexion through the UI works perfectly.
regards
Hi,
I have the following error through API :
Traceback (most recent call last):
File "/usr/lib/python2.7/site-packages/openerp/service/wsgi_server.py", line 56, in xmlrpc_return
result = openerp.http.dispatch_rpc(service, method, params)
File "/usr/lib/python2.7/site-packages/openerp/http.py", line 114, in dispatch_rpc
result = dispatch(method, params)
File "/usr/lib/python2.7/site-packages/openerp/service/common.py", line 57, in dispatch
return g[exp_method_name](*params)
File "/usr/lib/python2.7/site-packages/openerp/service/common.py", line 23, in exp_login
res = security.login(db, login, password)
File "/usr/lib/python2.7/site-packages/openerp/service/security.py", line 9, in login
return res_users._login(db, login, password)
File "/usr/lib/python2.7/site-packages/openerp/addons/base/res/res_users.py", line 462, in _login
self.check_credentials(cr, user_id, password)
File "/usr/lib/python2.7/site-packages/openerp/api.py", line 250, in wrapper
return old_api(self, *args, **kwargs)
File "/usr/lib/python2.7/site-packages/openerp/api.py", line 354, in old_api
result = method(recs, *args, **kwargs)
File "/opt/odoo/additional_repos/OCA-ecommerce/website_sale_wishlist/models/res_users.py", line 27, in check_credentials
self.env["product.wishlist"]._join_current_user_and_session()
File "/usr/lib/python2.7/site-packages/openerp/api.py", line 248, in wrapper
return new_api(self, *args, **kwargs)
File "/opt/odoo/additional_repos/OCA-ecommerce/website_sale_wishlist/models/product_wishlist.py", line 72, in _join_current_user_and_session
("session", "=", request.session.sid),
File "/usr/lib/python2.7/site-packages/werkzeug/local.py", line 343, in __getattr__
return getattr(self._get_current_object(), name)
File "/usr/lib/python2.7/site-packages/werkzeug/local.py", line 302, in _get_current_object
return self.__local()
File "/usr/lib/python2.7/site-packages/werkzeug/local.py", line 135, in _lookup
raise RuntimeError('object unbound')
RuntimeError: object unbound
Impossible to connect via the API
OCA Transbot created i18n folder for product_multi_link module which is available for 9.0 version only.
https://github.com/OCA/e-commerce/tree/8.0/product_multi_link/i18n
This issue seems very weird to me.
I dont know whats happend, i cant reproduce the error. Message:
odoo.tools.translate: loading /usr/share/odoo/3rd-addons/website_sale_suggest_create_account/i18n/de.po
2018-11-18 17:17:02,844 27 ERROR buergerwerk odoo.sql_db: bad query: b" INSERT INTO ir_translation(name, lang, res_id, src, type, value, module, state, comments)\n SELECT name, lang, res_id, src, type, value, module, state, comments\n FROM tmp_ir_translation_import\n WHERE type = 'model'\n AND noupdate IS NOT TRUE\n ON CONFLICT (type, lang, name, res_id) WHERE type = 'model'\n DO UPDATE SET (name, lang, res_id, src, type, value, module, state, comments) = (EXCLUDED.name, EXCLUDED.lang, EXCLUDED.res_id, EXCLUDED.src, EXCLUDED.type, EXCLUDED.value, EXCLUDED.module, EXCLUDED.state, EXCLUDED.comments);\n "
ERROR: ON CONFLICT DO UPDATE command cannot affect row a second time
HINT: Ensure that no rows proposed for insertion within the same command have duplicate constrained values.
This module will provide an affiliate program for website_sale
. I was contemplating on leveraging res_partner_affiliate
for some of this, but after upgrading it I feel it misses most of what I need. Furthermore, the parent_id
architecture doesn't quite work for e-commerce IMO, where the affiliation may not carry on past one purchase.
We will create a new model sale.affiliate
with the following fields:
name
(char, required): Canonical name of the affiliationpartner_id
(m2o res.partner
, optional): Partner associated with the affiliationcompany_id
(m2o res.company
, required): Company for affiliationsequence_id
(m2o ir.sequence
, required): Sequence to use for affiliate request namingrequest_ids
(o2m sale.affiliation.request
, inverse=affiliation_id
): Requests generated by the affiliatevalid_hours
(int, required, default=24): If the request is more than this many hours old, it will not be counted as a qualified conversion if a sale takes place. Use negative numbers to indicate infinity.valid_sales
(int, required, default=1): If the request is already associated with this many sales, it will not be counted as a qualified conversion in the event of a new sale. Use negative numbers to indicate infinity.We will create another model sale.affiliate.request
with the following fields:
affliate_id
(m2o sale.affiliate
, required): Affiliate that referred this requestname
(str, required): The request identifier. If none submitted, use the next in the affiliate_id.sequence
date
(datetime, required, default=Datetime.now
): Date and time of the initial requestip
(str, required, default=lambda s: request.httprequest.headers.environ.get("REMOTE_ADDR")
): Client IPreferrer
(str, required, default=lambda s: ...environ.get('HTTP_REFERER')
): Request session referrer headeruser_agent
(str, required, default=lambda s: ...environ.get('HTTP_USER_AGENT')
): Request session user agentaccept_language
(str, required, default=lambda s: ...environ.get('HTTP_ACCEPT_LANGUAGE')
): Request session user agentsale_ids
(o2m sale.order
, inverse=affiliation_request_id
): Qualified conversions generated as a result of this affiliate requestWe will add two kwargs to the shop and product listings - affiliate_id
and affiliate_key
. These will be added into the user session when present, replacing any existing affiliations that may be there:
affiliate_id
: The ID of the sale.affiliate
recordaffiliate_key
: This is a unique identifier string that can be sent by the affiliate for tracking purposes (to be used in sale.affiliate.request.name
)affiliate_request_id
will be added to sale.order
. We will hook into the sale.order
create method, if the affiliate_id
key is present:
sale.affiliation.request
affiliate_id
and either the affiliate_key
if present or fallback to the IPsale.affiliation.request
is not found, create onesale.affiliation.request
is a qualified conversion (affiliate_id.valid_*
)affiliate_id
to the sale orderI am specifically leaving affiliation contracts & billing out of this RFC, as I feel they expand the scope outside of what is needed simply for tracking purposes. Doing so will allow this module to also be used for things like advertising tracking & the such.
Does anyone have any suggestions, or know of any modules we can base on?
Dived into the code to look for a solution and I think changing the $('div > li > ul > li.has-children')
to $('ul > li.has-children')
line in the frontend.js file might be part of the solution. But then there's still a css issue ... the li elements are horizontally placed instead of vertically so that elements overlap when descending the hierarchy.
Hi all,
The need is to save carts in the e-commerce to recover them in other moment
Like https://apps.odoo.com/apps/modules/11.0/website_save_cart/
Thanks
Regards
Hi all and @OCA/website-maintainers ,
I would like to know if someone has developed a module to show in the Odoo ecommerce prices with and without taxes.
Like:
Thanks in advance
Best regards
In
/e-commerce/sale_payment_method/payment_method.py
there is missing an _inherit = "payment.method"
in Line 27
without that, the model is rewritten and I got KeyErrors for partner_id, which not exist in that (co)model
Greets
Karsten
https://github.com/OCA/maintainer-tools/wiki/Migration-to-version-13.0
Missing module? Check https://github.com/OCA/maintainer-tools/wiki/%5BFAQ%5D-Missing-modules-in-migration-issue-list
This repo is named e-commerce with a dash, while connector-ecommerce doesn't have a dash. It doesn't help to find repository, and I find this boring. Can we add both writings in the names (the option is in each repository settings) ?
Hello,
I am here to discuss about moving the modules sale_automatic_workflow (and derived) and sale_payment_method (and derived) to the project sale-workflow.
First of all those modules are very linked with other sale-workflow modules, it leads to loop dependencies for travis for instance (modules in e-commerce depends on modules in sale-workflow).
That's why @gurneyalex and @sebastienbeau suggested to move at least sale_payment_method in my PR OCA/sale-workflow#121
Moreover, thoses modules can be used even in a non e-commerce company (you may want to automate the validation of sale_orders or invoices without having an e-commerce shop).
So after discussing with @guewen it appears that maybe sale_automatic_workflow, sale_payment_method and sale_payment_method_automatic_workflow would be better in sale-workflow project (product_links is still relevant in e-commerce).
That makes also sense for the unpported modules : sale_quick_payment, sale_automatic_workflow_exceptions and sale_payment_method_transaction_id (thoses are glues modules).
Before extracting the branches I would like to have your opinions about that and what will be the best procedure to do it (indeed thoses modules are concerned by some PR's).
I can first do it with sale_payment_method (no PR in 7 or 8).
Thanks for your feedbacks
Hi,
I have noticed that in v 8.0 of the module sale_payment_method, there is a raise if you try to cancel a sale order with payments.
The problem is sometimes you want to cancel a sale order but you already received the payment so you want to keep the payment and maybe its better to keep the link between the sale order and the payment.
Should we remove the check in the cancel method or do something else ?
Thank you for you replies
I have been using similar code. But I have also removed the Add to cart button and variants.
You don't want the user to see variant prices, like 16GB/32GB ipod
And you don't want users to "add to cart" and see the price
I would suggest to enhance this mod with that.
The code sample I use in v11 ( specific for Public user ) Your mode is more general:-)
<t t-if="not user_id._is_public()">
<t t-call="website_sale.product_price"/>
<p t-if="len(product.product_variant_ids) > 1" class="css_not_available_msg bg-danger" style="padding:15px;">This combination does not exist.</p>
<a id="add_to_cart" class="btn btn-primary btn-lg mt8 js_check_product a-submit" href="#">Add to Cart</a>
</t>
Curently, the module use products view to display the wishlist. It is simple and works well. But every layout feature activated (with customize menu) on the products view comes also in the wishlist view (like cart button, stock amount, etc.).
Don't know if it is possible, but it would useful to customize the wishlist separatly from the product list view.
Use case
I suggest to add email sharing as a wishlist feature.
Wishlist are often used as bookmarks of interesting products. Sharing it is obviously the best way to receive gifts one's like.
Hello Community,
I am facing the issue in importing website_sale class of website_sale module.
The Issue is raised because of the pythonic override of website_sale class.
Here you will find the reference.
https://github.com/OCA/e-commerce/blob/9.0/website_sale_product_brand/controllers/main.py#L59
Can anybody please help me to fix this issue ?
Regards.
#103
When we install module and we active Product Comparison tool option ocurrs this error in shop:
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/odoo/addons/base/ir/ir_qweb/qweb.py", line 343, in _compiled_fn
return compiled(self, append, new, options, log)
File "<template>", line 1, in template_website_sale_products_item_708
File "/usr/lib/python3/dist-packages/odoo/models.py", line 4789, in __getitem__
return self._browse((self._ids[key],), self.env)
IndexError: tuple index out of range
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/odoo/addons/base/ir/ir_http.py", line 208, in _dispatch
result = request.dispatch()
File "/usr/lib/python3/dist-packages/odoo/http.py", line 830, in dispatch
r = self._call_function(**self.params)
File "/usr/lib/python3/dist-packages/odoo/http.py", line 342, in _call_function
return checked_call(self.db, *args, **kwargs)
File "/usr/lib/python3/dist-packages/odoo/service/model.py", line 97, in wrapper
return f(dbname, *args, **kwargs)
File "/usr/lib/python3/dist-packages/odoo/http.py", line 338, in checked_call
result.flatten()
File "/usr/lib/python3/dist-packages/odoo/http.py", line 1270, in flatten
self.response.append(self.render())
File "/usr/lib/python3/dist-packages/odoo/http.py", line 1263, in render
return env["ir.ui.view"].render_template(self.template, self.qcontext)
File "/usr/lib/python3/dist-packages/odoo/addons/base/ir/ir_ui_view.py", line 1211, in render_template
return self.browse(self.get_view_id(template)).render(values, engine)
File "/usr/lib/python3/dist-packages/odoo/addons/website/models/ir_ui_view.py", line 113, in render
return super(View, self).render(values, engine=engine)
File "/usr/lib/python3/dist-packages/odoo/addons/web_editor/models/ir_ui_view.py", line 27, in render
return super(IrUiView, self).render(values=values, engine=engine)
File "/usr/lib/python3/dist-packages/odoo/addons/base/ir/ir_ui_view.py", line 1220, in render
return self.env[engine].render(self.id, qcontext)
File "/usr/lib/python3/dist-packages/odoo/addons/base/ir/ir_qweb/ir_qweb.py", line 57, in render
return super(IrQWeb, self).render(id_or_xml_id, values=values, **context)
File "/usr/lib/python3/dist-packages/odoo/addons/base/ir/ir_qweb/qweb.py", line 272, in render
self.compile(template, options)(self, body.append, values or {})
File "/usr/lib/python3/dist-packages/odoo/addons/base/ir/ir_qweb/qweb.py", line 345, in _compiled_fn
raise e
File "/usr/lib/python3/dist-packages/odoo/addons/base/ir/ir_qweb/qweb.py", line 343, in _compiled_fn
return compiled(self, append, new, options, log)
File "<template>", line 1, in template_838_683
File "<template>", line 2, in body_call_content_682
File "<template>", line 49, in foreach_679
File "<template>", line 50, in foreach_678
File "/usr/lib/python3/dist-packages/odoo/addons/base/ir/ir_qweb/qweb.py", line 350, in _compiled_fn
raise QWebException("Error to render compiling AST", e, path, node and etree.tostring(node[0], encoding='unicode'), name)
odoo.addons.base.ir.ir_qweb.qweb.QWebException: tuple index out of range
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/odoo/addons/base/ir/ir_qweb/qweb.py", line 343, in _compiled_fn
return compiled(self, append, new, options, log)
File "<template>", line 1, in template_website_sale_products_item_708
File "/usr/lib/python3/dist-packages/odoo/models.py", line 4789, in __getitem__
return self._browse((self._ids[key],), self.env)
IndexError: tuple index out of range
Error to render compiling AST
IndexError: tuple index out of range
Template: website_sale.products_item
Path: /templates/t/form/div/section/div/a
Node: <a class="hidden-xs btn btn-default btn-xs o_add_compare" title="Compare" t-att-data-product-product-id="product.product_variant_ids[0].id" data-action="o_comparelist" data-oe-id="930" data-oe-xpath="/data/xpath/a" data-oe-model="ir.ui.view" data-oe-field="arch"><span class="fa fa-exchange"/></a>
FIX:
change this line by:
product.product_variant_ids and website.website_show_price
Because in this view exist this validate and this module overwrite t-if.
https://github.com/odoo/odoo/blob/11.0/addons/website_sale/views/templates.xml#L109
I don't see travis checks in this repo PRs... is it normal?
I am using Prestashop-connector to import sales order with rule as PAID. With the help of automatic_workflow module, invoice is validated for the corresponding Sales order but the payment is NOT PAID.
So, why is this process not DONE? Is there any special case.
For now, I have tried to use "sale_quick_payment" module and used the pay_sale_order(..) method to create the payment at Sales order. But I need to know whether I can do this?
I don't know how to prevent odoo to extract string which shouldn't be translated
https://github.com/OCA/e-commerce/blob/8.0/website_sale_require_login/views/website_sale.xml#L15-L20
Don't you think it could have side effect if we translate ?
https://github.com/OCA/e-commerce/blob/8.0/website_sale_require_login/i18n/it.po#L23-L30
Thanks dear experts @yajo @pedrobaeza
I would like to display a product on my website wathever storable, service or consumable.
But availibility selection is based strictly on storable product.
Hi,
I've been working on the 3c92adb for a while and I recently made a pull of the repo on the 8.0 branch. From now, when I try to reach a sale.order I have this error
Programming error: ERREUR: la colonne sale_workflow_process.section_id n'existe pas
LIGNE 1 : ...e_invoice","sale_workflow_process"."order_policy","sale_work...
^
, in query SELECT "sale_workflow_process"."picking_policy","sale_workflow_process"."validate_picking","sale_workflow_process"."create_invoice_on","sale_workflow_process"."invoice_date_is_order_date","sale_workflow_process"."validate_invoice","sale_workflow_process"."order_policy","sale_workflow_process"."section_id","sale_workflow_process"."write_uid","sale_workflow_process"."validate_order","sale_workflow_process"."invoice_quantity","sale_workflow_process"."warning","sale_workflow_process"."write_date","sale_workflow_process"."create_date","sale_workflow_process"."create_uid","sale_workflow_process"."name","sale_workflow_process"."id" FROM "sale_workflow_process"
WHERE "sale_workflow_process".id IN %s ORDER BY "sale_workflow_process"."id"
Is there any way to connect odoo with nosql database?
The module website_sale_product_brand
causes an Odoo server error when one clicks on it to see the modules description in Local Modules list or icon view.
Here is the error:
Traceback (most recent call last):
File "/usr/lib/python2.7/site-packages/openerp/http.py", line 537, in _handle_exception
return super(JsonRequest, self)._handle_exception(exception)
File "/usr/lib/python2.7/site-packages/openerp/http.py", line 574, in dispatch
result = self._call_function(**self.params)
File "/usr/lib/python2.7/site-packages/openerp/http.py", line 310, in _call_function
return checked_call(self.db, *args, **kwargs)
File "/usr/lib/python2.7/site-packages/openerp/service/model.py", line 113, in wrapper
return f(dbname, *args, **kwargs)
File "/usr/lib/python2.7/site-packages/openerp/http.py", line 307, in checked_call
return self.endpoint(*a, **kw)
File "/usr/lib/python2.7/site-packages/openerp/http.py", line 803, in __call__
return self.method(*args, **kw)
File "/usr/lib/python2.7/site-packages/openerp/http.py", line 403, in response_wrap
response = f(*args, **kw)
File "/usr/lib/python2.7/site-packages/openerp/addons/web/controllers/main.py", line 948, in call_kw
return self._call_kw(model, method, args, kwargs)
File "/usr/lib/python2.7/site-packages/openerp/addons/web/controllers/main.py", line 940, in _call_kw
return checked_call(request.db, *args, **kwargs)
File "/usr/lib/python2.7/site-packages/openerp/service/model.py", line 113, in wrapper
return f(dbname, *args, **kwargs)
File "/usr/lib/python2.7/site-packages/openerp/addons/web/controllers/main.py", line 939, in checked_call
return getattr(request.registry.get(model), method)(request.cr, request.uid, *args, **kwargs)
File "/usr/lib/python2.7/site-packages/openerp/api.py", line 241, in wrapper
return old_api(self, *args, **kwargs)
File "/usr/lib/python2.7/site-packages/openerp/models.py", line 3143, in read
result = BaseModel.read(records, fields, load=load)
File "/usr/lib/python2.7/site-packages/openerp/api.py", line 239, in wrapper
return new_api(self, *args, **kwargs)
File "/usr/lib/python2.7/site-packages/openerp/models.py", line 3178, in read
self._read_from_database(stored, inherited)
File "/usr/lib/python2.7/site-packages/openerp/api.py", line 239, in wrapper
return new_api(self, *args, **kwargs)
File "/usr/lib/python2.7/site-packages/openerp/models.py", line 3357, in _read_from_database
res2 = self._columns[f].get(cr, self._model, ids, f, user, context=context, values=result)
File "/usr/lib/python2.7/site-packages/openerp/osv/fields.py", line 1453, in get
result = self._fnct(obj, cr, uid, ids, name, self._arg, context)
File "/usr/lib/python2.7/site-packages/openerp/addons/base/module/module.py", line 187, in _get_desc
output = publish_string(source=module.description or '', settings_overrides=overrides, writer=MyWriter())
File "/usr/lib/python2.7/site-packages/docutils/core.py", line 414, in publish_string
enable_exit_status=enable_exit_status)
File "/usr/lib/python2.7/site-packages/docutils/core.py", line 662, in publish_programmatically
output = pub.publish(enable_exit_status=enable_exit_status)
File "/usr/lib/python2.7/site-packages/docutils/core.py", line 217, in publish
self.settings)
File "/usr/lib/python2.7/site-packages/docutils/readers/__init__.py", line 72, in read
self.parse()
File "/usr/lib/python2.7/site-packages/docutils/readers/__init__.py", line 78, in parse
self.parser.parse(self.input, document)
File "/usr/lib/python2.7/site-packages/docutils/parsers/rst/__init__.py", line 172, in parse
self.statemachine.run(inputlines, document, inliner=self.inliner)
File "/usr/lib/python2.7/site-packages/docutils/parsers/rst/states.py", line 170, in run
input_source=document['source'])
File "/usr/lib/python2.7/site-packages/docutils/statemachine.py", line 239, in run
context, state, transitions)
File "/usr/lib/python2.7/site-packages/docutils/statemachine.py", line 460, in check_line
return method(match, context, next_state)
File "/usr/lib/python2.7/site-packages/docutils/parsers/rst/states.py", line 2961, in text
self.section(title.lstrip(), source, style, lineno + 1, messages)
File "/usr/lib/python2.7/site-packages/docutils/parsers/rst/states.py", line 327, in section
self.new_subsection(title, lineno, messages)
File "/usr/lib/python2.7/site-packages/docutils/parsers/rst/states.py", line 395, in new_subsection
node=section_node, match_titles=True)
File "/usr/lib/python2.7/site-packages/docutils/parsers/rst/states.py", line 282, in nested_parse
node=node, match_titles=match_titles)
File "/usr/lib/python2.7/site-packages/docutils/parsers/rst/states.py", line 195, in run
results = StateMachineWS.run(self, input_lines, input_offset)
File "/usr/lib/python2.7/site-packages/docutils/statemachine.py", line 239, in run
context, state, transitions)
File "/usr/lib/python2.7/site-packages/docutils/statemachine.py", line 460, in check_line
return method(match, context, next_state)
File "/usr/lib/python2.7/site-packages/docutils/parsers/rst/states.py", line 2726, in underline
self.section(title, source, style, lineno - 1, messages)
File "/usr/lib/python2.7/site-packages/docutils/parsers/rst/states.py", line 327, in section
self.new_subsection(title, lineno, messages)
File "/usr/lib/python2.7/site-packages/docutils/parsers/rst/states.py", line 395, in new_subsection
node=section_node, match_titles=True)
File "/usr/lib/python2.7/site-packages/docutils/parsers/rst/states.py", line 282, in nested_parse
node=node, match_titles=match_titles)
File "/usr/lib/python2.7/site-packages/docutils/parsers/rst/states.py", line 195, in run
results = StateMachineWS.run(self, input_lines, input_offset)
File "/usr/lib/python2.7/site-packages/docutils/statemachine.py", line 239, in run
context, state, transitions)
File "/usr/lib/python2.7/site-packages/docutils/statemachine.py", line 460, in check_line
return method(match, context, next_state)
File "/usr/lib/python2.7/site-packages/docutils/parsers/rst/states.py", line 2738, in text
source=src, line=srcline)
File "/usr/lib/python2.7/site-packages/docutils/utils/__init__.py", line 227, in error
return self.system_message(self.ERROR_LEVEL, *args, **kwargs)
File "/usr/lib/python2.7/site-packages/docutils/utils/__init__.py", line 191, in system_message
self.stream.write(msg.astext() + '\n')
File "/usr/lib/python2.7/site-packages/docutils/utils/error_reporting.py", line 189, in write
self.stream.write(data)
IOError: [Errno 32] Broken pipe
https://github.com/OCA/maintainer-tools/wiki/Migration-to-version-10.0
I am planning a module website_sale_search_fuzzy
, which will implement the PSQL GIN index from base_search_fuzzy
on product.template.name
.
From there, we will override the get_search_domain
method in website_sale & update the name
query to use a %
instead, thus applying the fuzzy search.
The implementation seems simple enough, but I was wondering:
And the most important part, does anyone know anything pre-existing for this or similar?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.