-
-
Notifications
You must be signed in to change notification settings - Fork 150
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
[16.0][MIG] connector_ecommerce #75
[16.0][MIG] connector_ecommerce #75
Conversation
Hey @juliocabrerizo, thank you for your Pull Request. It looks like some users haven't signed our Contributor License Agreement, yet.
Appreciation of efforts, |
bd39525
to
bc7ad39
Compare
42dd416
to
3b42e7a
Compare
[FIX] decimal_precision import does not use openerp.addons namespace
[FIX] remove an old view not installable
[IMP] finish onchange support, add doc string, support tax. The option use external taxe will be not implemented, as re-computing tax in OpenERP is the best option. If you need it, create a independant module for it, fix copyright [REF] refactor introduce the class SaleOrderOnChange
…ork, + support adding extra s.o. lines on the fly add comments on the internals of SaleOrderOnChange.play()
[IMP] work on stock.picking.out instead of stock.picking [REM] clean delivery carrier old code [ADD] a connector hook in the stock.picking.out view [FIX] action_done is not called on stock.picking.out but only on stock.picking [CHG] rename base_sale_data.xml to ecommerce_data.xml [ADD] hook in invoice view for connectors [ADD] account_invoice.origin_order_id, link to the order which created the invoice [REF] moved sale.py code to old_stuff.py [ADD] copy the order id to the invoice it creates [REM] remove code [REF] move content of partner.py to old_stuff.py [REF] move partner_view.xml content to old_xml_stuff.xml [REF] moved code from product.py to old_stuff.py [REF] removed views and act_window links to ir.model.data from sale_view.xml [REF] removed external.referential.category.csv [REF] remove obsolete access groups [REF] comment out the sale exception until its reimplementation [REF] removed the import order wizard [REF] removed connector.py [FIX] style [REF] moved external_referential.py code to old_stuff.py [REF] remove empty files [ADD] hook for connectors in sale view [FIX] do not load removed file [REF] updated __openerp__ manifest, changed copyright attribution to reflect the facts, changed the license from GPL to AGPL-3 [FIX] reintroduce methods used for the import of magento sale orders [FIX] connector_ecommerce: replace dependencies on sale_quick_payment by sale_quick_payment [ADD] connector_ecommerce: add import_rule and days_before_cancel in payment.method, theses fields will be used by the connectors [IMP] connector_ecommerce: call the onchanges on the sale order to apply the workflow default values [IMP] connector_ecommerce: activate the options 'Allow different addresses', 'Multiple shop', 'Discount on SO lines' [FIX] noupdate=1 on the global settings activation [FIX] missing name in a view [IMP] add hints in payment method view to help in the choice of the import rules [ADD] on_product_price_changed Event, fired when the price of a product could have changed As the price is a fields.function based on the contextual pricelist, we can never be sure that a price has changed, it depends on the context. So we search all the base fields used to compute the price, and if one of these has changed, the event is fired. [FIX] initialize the context when None [IMP] reviewed the connector_ecommerce's description in the manifest __openerp__.py [FIX] remove obsolete sale exception [ADD] fields cancelled_in_backend and cancellation_resolved to handle the cancellation of the sales orders from a backend [IMP] add a notification when a user choose to not cancel a sales order cancelled on the backend [ADD] notification when a sales order is cancelled on the backend [IMP] ignore the cancellation from the backend should be done by a sales manager only [IMP] ask for a reason when the sale order is not cancelled despite the cancellation on the backend [FIX] filter on cancels should exclude the resolved cancels [ADD] a parent_id field on the sale order, base implementation, the logic needs to be implemented in the connectors due to their own specificities [ADD] button to open the parent sale order [ADD] sale exception preventing confirmation of a sale order when it has a parent order cancelled on the backend [IMP] add the sales manager rights to the connector manager because they usually need these rights [IMP] fields 'need_cancel' and 'parent_need_cancel' [FIX] spells cancelled with the US form: canceled [FIX] typos in views [FIX] hide the 'keep open' button in canceled state [ADD] when we write 'canceled_in_backend' in a sales order, try to automatically cancel it [FIX] filter out already cancelled sales orders from the filter 'to cancel' [FIX] domain for the invisible attribute of the 'keep open' button, logic was reversed [IMP] add a note on the related pickings and invoices of an order cancelled from backend [FIX] cancelation of sales order: quotation states requires to be canceled via the workflow, sales order states with the action_cancel method. Some states can not be canceled. [ADD] sale exception when an ordered product has a pending connector checkpoint [ADD] french translation
…horized by a payment institute but not paid yet.
… orders (shipping, ...), need a refactoring of the Mapper though. WIP
…ry to store non existing fields in db)
…ne for prestashoperpconnect in a first place to be able to add or not the tax on delivery lines)
[ADD] a test which check if on_invoice_validated is correctly fired [ADD] test the fire of 'on_invoice_paid' [FIX] formatting of the onchange test [FIX] fix the failing test: the payment_method_id and workflow_payment_id are not mandatory in a sale order [FIX] fr_FR.po files not loaded, should be named fr.po [FIX] context not propagated [ADD] docstring [CHG] rename ExtraOrderLineBuilder to SpecialOrderLineBuilder [FIX] use session [ADD] deprecation warning [IMP] allow to use a product id or a product browse_record in lines builders [FIX] Sales Orders onchanges: allow to have lines with other commands than (0, 0, {values}). [FIX] simplify last change [FIX] in lines builders, product_ref is not mandatory if we provide a product, renames 'product_id' to 'product', keeping ambiguity as we can have an int or browse_record. [IMP] propagate the 'shop_id' in the context if it exists so the fiscal position rules (from openerp-fiscal-rules' project) can apply automatically [FIX] 'int' object is not iterable error [FIX] 'int' object is not iterable error, again
…ity by default so they are likely to appear at the bottom, shipping line being the last one
@@ -0,0 +1,7 @@ | |||
from openupgradelib import openupgrade |
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.
this directory must be deleted
return res | ||
|
||
def notify_invoice_validate(self): | ||
for record in self.filtered(lambda m: m.move_type == "out_invoice"): |
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 would change this to
for record in self:
if move_type != "out_invoice":
continue
return result | ||
|
||
@api.model | ||
def create(self, vals): |
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.
2023-03-10 15:28:49,600 1 WARNING gl_433 odoo.api.create: The model odoo.addons.connector_ecommerce.models.product is not overriding the create method in batch
connector_ecommerce/models/sale.py
Outdated
invoice.message_post(body=message) | ||
|
||
@api.model | ||
def create(self, values): |
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.
2023-03-10 15:28:49,601 1 WARNING gl_433 odoo.api.create: The model odoo.addons.connector_ecommerce.models.sale is not overriding the create method in batch
self._event("on_product_price_changed").notify(product) | ||
|
||
def write(self, vals): | ||
result = super(ProductTemplate, self).write(vals) |
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.
Apply PEP 3135 (28-Apr-2007) to "super()."
self.sequence = 999 | ||
|
||
def get_line(self): | ||
values = super(ShippingLineBuilder, self).get_line() |
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.
Apply PEP 3135 (28-Apr-2007) to "super()."
_usage = "order.line.builder.cod" | ||
|
||
def __init__(self, work_context): | ||
super(CashOnDeliveryLineBuilder, self).__init__(work_context) |
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.
Apply PEP 3135 (28-Apr-2007) to "super()."
_usage = "order.line.builder.gift" | ||
|
||
def __init__(self, work_context): | ||
super(GiftOrderLineBuilder, self).__init__(work_context) |
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.
Apply PEP 3135 (28-Apr-2007) to "super()."
self.sequence = 990 | ||
|
||
def get_line(self): | ||
line = super(GiftOrderLineBuilder, self).get_line() |
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.
Apply PEP 3135 (28-Apr-2007) to "super()."
def _compute_tax_group_id(self): | ||
self.ensure_one() | ||
taxes = self.taxes_id | ||
self.tax_group_id = taxes[:-1].tax_group_id.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.
I think this is not correct, if you can some taxes_id and you make taxes[:-1] get more result.
>>> list_element = [1,2,3,4]
>>> list_element[:-1]
[1, 2, 3]
and if after you get tax_group_id some element you can get singleton.
>>> self.env["account.tax"].search([]).tax_group_id.id
Traceback (most recent call last):
File "<console>", line 1, in <module>
File "/mnt/environment/odoo-server/odoo/fields.py", line 5035, in __get__
raise ValueError("Expected singleton: %s" % record)
ValueError: Expected singleton: account.tax.group(1, 2)
I think the right thing to do is
taxes[-1:].tax_group_id.id
>>> list_element = [1,2,3,4]
>>> list_element[-1:]
[4]
>>> list_element = []
>>> list_element[-1:]
[]
|
||
@api.model | ||
def _price_changed_fields(self): | ||
return {"list_price", "lst_price", "standard_price"} |
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.
lst_price does not exist in product template
|
||
@api.model | ||
def _price_changed_fields(self): | ||
return {"lst_price", "standard_price", "price", "price_extra"} |
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.
price field dead in V16 May he rest in peace
I would change the return to
@api.model
def _price_changed_fields(self):
return {
"lst_price",
"price_extra",
} | self.product_tmpl_id._price_changed_fields()
Hi @RodrigoBM ! Thank you very much for the suggested changes. Could you check again the PR proposal ? Regards |
9191596
to
791a828
Compare
791a828
to
6cfac49
Compare
@RodrigoBM can you merge this? |
This PR has the |
@john-herholz-dt I wish I could, but I have not yet been blessed with that power. |
/ocabot merge |
Hi @john-herholz-dt. Your command failed:
Ocabot commands
More information
|
/ocabot migration connector_ecommerce |
Sorry @john-herholz-dt you are not allowed to mark the addon tobe migrated. To do so you must either have push permissions on the repository, or be a declared maintainer of all modified addons. If you wish to adopt an addon and become it's maintainer, open a pull request to add your GitHub login to the |
@lmignon can you merge this PR? |
/ocabot merge nobump |
On my way to merge this fine PR! |
Congratulations, your PR was merged at 0c1d739. Thanks a lot for contributing to OCA. ❤️ |
Thanks @lmignon you helped a lot with this. I can finally continue using this module for production. |
Related issue: #74
Dependencies:
OCA/connector#441