-
-
Notifications
You must be signed in to change notification settings - Fork 206
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
7.0 search payment methods with company #52
7.0 search payment methods with company #52
Conversation
@@ -905,6 +905,7 @@ def store_id(self, record): | |||
'non existing storeview') | |||
storeview = self.session.browse('magento.storeview', storeview_id) | |||
shop_id = storeview.store_id.openerp_id.id | |||
self.session.context['shop'] = shop_id |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The context should not be mutated directly in the session, it should be changed with with self.session.change_context(...):
. It should not be modifier in the Mapper since the Mapper should only take data in and return data out, and not use a side effect on the state of the Importer. The Importer has the responsibility to change the context for example before calling the creation or update of the record.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll change that one. Thanks.
The multi-company is currently not well supported and this fix is aiming to a better support, so thanks for you proposal. However, this is not the approach I would take. Here is mine: Each website or store view should be linked to a company, and each company should have a new field Here is an example of implementation: https://gist.github.com/guewen/3528fe4be6bf527ed9d9 and a thread discussing that: https://www.mail-archive.com/openerp-connector-community@lists.launchpad.net/msg00091.html The big benefit of this approach is that we don't need to change every domain in all the mappings to ensure they filter on the company. This is also the only way to be sure that the property fields are set correctly and the internal OpenERP code (function fields, ...) use the correct company. |
guewen, Thanks for spending your valuable time and putting comment here. |
When importing a sales order, it is linked to a shop which has a In the Magento importer, it will give something like that:
|
How does a new user per company play with Odoo pricing? Do you know if such users would be considered active and charged for under the support contract? If so, this might be an issue for some customers who have several companies but only a few users per company (and none of those user can be reused for magento sync). |
@mistotebe only users who have logged in at least 1 time should be charged. |
Is this going to be continued? |
Unlikely, there is no v7 multi-company with Magento integration that we need it for anymore. |
Test release 1.1.6
Fix for issue #51