Skip to content
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

Add sale_payment_method_automatic_workflow #34

Merged
merged 10 commits into from
May 8, 2015

Conversation

guewen
Copy link
Member

@guewen guewen commented Feb 13, 2015

Previously, the module sale_automatic_workflow had a dependency on
sale_payment_method. The dependency was there to automatically reconcile
the payments made by sale_payment_method.

Depends on

@guewen guewen force-pushed the 8.0-sale_payment_method_automatic_reconcile branch 2 times, most recently from bf0868a to 079cf21 Compare February 13, 2015 13:27
@guewen guewen changed the title [WIP] Add sale_payment_method_automatic_reconcile [WIP] Add sale_payment_method_automatic_workflow Feb 13, 2015
@guewen guewen force-pushed the 8.0-sale_payment_method_automatic_reconcile branch from 079cf21 to 5711ce1 Compare February 13, 2015 13:31
@coveralls
Copy link

Coverage Status

Coverage decreased (-39.05%) to 49.32% when pulling 5711ce1 on guewen:8.0-sale_payment_method_automatic_reconcile into 41af5c7 on OCA:8.0.

@coveralls
Copy link

Coverage Status

Coverage decreased (-39.05%) to 49.32% when pulling 5711ce1 on guewen:8.0-sale_payment_method_automatic_reconcile into 41af5c7 on OCA:8.0.

1 similar comment
@coveralls
Copy link

Coverage Status

Coverage decreased (-39.05%) to 49.32% when pulling 5711ce1 on guewen:8.0-sale_payment_method_automatic_reconcile into 41af5c7 on OCA:8.0.

@guewen guewen force-pushed the 8.0-sale_payment_method_automatic_reconcile branch from 5711ce1 to bd1d8fc Compare February 13, 2015 14:02
@coveralls
Copy link

Coverage Status

Coverage decreased (-39.05%) to 49.32% when pulling bd1d8fc on guewen:8.0-sale_payment_method_automatic_reconcile into 41af5c7 on OCA:8.0.

guewen referenced this pull request in pedrobaeza/connector-ecommerce Feb 19, 2015
@guewen guewen force-pushed the 8.0-sale_payment_method_automatic_reconcile branch 2 times, most recently from 4b2fc3f to 28da673 Compare March 5, 2015 21:21
@guewen guewen changed the title [WIP] Add sale_payment_method_automatic_workflow Add sale_payment_method_automatic_workflow Mar 11, 2015
=============

The payment methods can be configured in **Sales > Configuration >
Sales > Payment Methods**.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not sure if the '**' work well with line breaks...

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, it works, because lines with same indentation are joined when parsing. You can check it pressing 'View' on top of here 😉

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok

@gurneyalex
Copy link
Member

code review, no test, nothing really bad found, just one place where I would like to see a comment (the currency bit), and the author field in metadata needing update.

once done -> 👍

@guewen guewen force-pushed the 8.0-sale_payment_method_automatic_reconcile branch 2 times, most recently from 9d28325 to 4893010 Compare March 12, 2015 10:29
@guewen guewen force-pushed the 8.0-sale_payment_method_automatic_reconcile branch from 4893010 to 307bdba Compare March 23, 2015 09:09
@coveralls
Copy link

Coverage Status

Coverage decreased (-38.79%) to 49.58% when pulling 307bdba on guewen:8.0-sale_payment_method_automatic_reconcile into 13a941d on OCA:8.0.

@tremlin
Copy link

tremlin commented Mar 26, 2015

I reviewed and tested the code (as a part of magentoerpconnect) and I recommend this module for merging 👍

@matthieuchoplin
Copy link

I have tried to install the module connector_ecommerce from guewen:8.0-sale_payment_method_automatic_reconcile but I am getting this error:

2015-04-23 14:24:57,510 20507 INFO test_failure openerp.modules.loading: loading sale_exceptions/wizard/sale_exception_confirm_view.xml
2015-04-23 14:24:57,541 20507 INFO test_failure openerp.modules.loading: loading sale_exceptions/security/ir.model.access.csv
2015-04-23 14:24:57,562 20507 INFO test_failure openerp.modules.loading: loading sale_exceptions/settings/sale.exception.csv
2015-04-23 14:24:58,712 20507 INFO test_failure openerp.modules.module: module sale_payment_method: creating or updating database tables
2015-04-23 14:24:58,796 20507 ERROR test_failure openerp.http: Exception during JSON request handling.
Traceback (most recent call last):
  File "/home/matt/work/odoo/odoo-custom/community-apps/odoo/openerp/http.py", line 530, in _handle_exception
    return super(JsonRequest, self)._handle_exception(exception)
  File "/home/matt/work/odoo/odoo-custom/community-apps/odoo/openerp/http.py", line 567, in dispatch
    result = self._call_function(**self.params)
  File "/home/matt/work/odoo/odoo-custom/community-apps/odoo/openerp/http.py", line 303, in _call_function
    return checked_call(self.db, *args, **kwargs)
  File "/home/matt/work/odoo/odoo-custom/community-apps/odoo/openerp/service/model.py", line 113, in wrapper
    return f(dbname, *args, **kwargs)
  File "/home/matt/work/odoo/odoo-custom/community-apps/odoo/openerp/http.py", line 300, in checked_call
    return self.endpoint(*a, **kw)
  File "/home/matt/work/odoo/odoo-custom/community-apps/odoo/openerp/http.py", line 796, in __call__
    return self.method(*args, **kw)
  File "/home/matt/work/odoo/odoo-custom/community-apps/odoo/openerp/http.py", line 396, in response_wrap
    response = f(*args, **kw)
  File "/home/matt/work/odoo/odoo-custom/community-apps/odoo/addons/web/controllers/main.py", line 940, in call_button
    action = self._call_kw(model, method, args, {})
  File "/home/matt/work/odoo/odoo-custom/community-apps/odoo/addons/web/controllers/main.py", line 928, in _call_kw
    return getattr(request.registry.get(model), method)(request.cr, request.uid, *args, **kwargs)
  File "/home/matt/work/odoo/odoo-custom/community-apps/odoo/openerp/api.py", line 241, in wrapper
    return old_api(self, *args, **kwargs)
  File "/home/matt/work/odoo/odoo-custom/community-apps/odoo/openerp/addons/base/module/module.py", line 450, in button_immediate_install
    return self._button_immediate_function(cr, uid, ids, self.button_install, context=context)
  File "/home/matt/work/odoo/odoo-custom/community-apps/odoo/openerp/api.py", line 241, in wrapper
    return old_api(self, *args, **kwargs)
  File "/home/matt/work/odoo/odoo-custom/community-apps/odoo/openerp/addons/base/module/module.py", line 498, in _button_immediate_function
    registry = openerp.modules.registry.RegistryManager.new(cr.dbname, update_module=True)
  File "/home/matt/work/odoo/odoo-custom/community-apps/odoo/openerp/modules/registry.py", line 368, in new
    openerp.modules.load_modules(registry._db, force_demo, status, update_module)
  File "/home/matt/work/odoo/odoo-custom/community-apps/odoo/openerp/modules/loading.py", line 355, in load_modules
    loaded_modules, update_module)
  File "/home/matt/work/odoo/odoo-custom/community-apps/odoo/openerp/modules/loading.py", line 255, in load_marked_modules
    loaded, processed = load_module_graph(cr, graph, progressdict, report=report, skip_modules=loaded_modules, perform_checks=perform_checks)
  File "/home/matt/work/odoo/odoo-custom/community-apps/odoo/openerp/modules/loading.py", line 157, in load_module_graph
    init_module_models(cr, package.name, models)
  File "/home/matt/work/odoo/odoo-custom/community-apps/odoo/openerp/modules/module.py", line 286, in init_module_models
    result = obj._auto_init(cr, {'module': module_name})
  File "/home/matt/work/odoo/odoo-custom/community-apps/odoo/openerp/api.py", line 241, in wrapper
    return old_api(self, *args, **kwargs)
  File "/home/matt/work/odoo/odoo-custom/community-apps/odoo/openerp/models.py", line 2620, in _auto_init
    self._set_default_value_on_column(cr, k, context=context)
  File "/home/matt/work/odoo/odoo-custom/community-apps/odoo/openerp/api.py", line 241, in wrapper
    return old_api(self, *args, **kwargs)
  File "/home/matt/work/odoo/odoo-custom/community-apps/odoo/openerp/models.py", line 2387, in _set_default_value_on_column
    default = default(self, cr, SUPERUSER_ID, context)
  File "/home/matt/work/odoo/odoo-custom/community-apps/odoo/openerp/api.py", line 241, in wrapper
    return old_api(self, *args, **kwargs)
  File "/home/matt/work/odoo/odoo-custom/community-apps/odoo/openerp/api.py", line 336, in old_api
    result = method(recs, *args, **kwargs)
  File "/home/matt/work/odoo/odoo-custom/community-apps/odoo/openerp/fields.py", line 417, in <lambda>
    lambda recs: self.convert_to_write(value(recs))
  File "/home/matt/work/odoo/odoo-custom/community-apps/odoo/openerp/fields.py", line 1564, in convert_to_write
    return value.id
AttributeError: 'int' object has no attribute 'id'

Maybe this is why the runbot failed.. I cannot see the logs from the runbot.

guewen and others added 10 commits April 23, 2015 16:35
Previously, the module sale_automatic_workflow had a dependency on
sale_payment_method.  The dependency was there to automatically reconcile the
payments made by sale_payment_method.

In Odoo 8.0, the dependency has been removed, so this new module adds the
missing bits between the modules.
…_automatic_workflow

Because it goes further than only reconciliation
So it installs when both sale_payment_method and sale_automatic_workflow are installed.
This module acts as the glue between them
@guewen guewen force-pushed the 8.0-sale_payment_method_automatic_reconcile branch from 307bdba to 9934fef Compare April 23, 2015 14:36
@guewen
Copy link
Member Author

guewen commented Apr 23, 2015

Rebased on 8.0. Waiting for build status.

@matthieuchoplin is it on a fresh database or do you have data in there? The error appears to be in sale_payment_method which is already merged and has a green build.

@matthieuchoplin
Copy link

I tried again and I managed to install it on fresh database, thanks!
I see an other errors when triggering the tests at the installation but I am not sure it is related to your branch:

2015-04-23 14:48:44,895 21160 INFO connector_ecommerce openerp.modules.module: openerp.addons.connector_ecommerce.tests.test_onchange running tests.
2015-04-23 14:48:44,896 21160 INFO connector_ecommerce openerp.addons.connector_ecommerce.tests.test_onchange: test_play_onchange (openerp.addons.connector_ecommerce.tests.test_onchange.TestOnchange)
2015-04-23 14:48:44,896 21160 INFO connector_ecommerce openerp.addons.connector_ecommerce.tests.test_onchange: ` Play the onchange ConnectorUnit on a sale order
2015-04-23 14:48:44,929 21160 WARNING connector_ecommerce openerp.addons.connector_ecommerce.tests.test_onchange: Deprecated: class Environment must be replaced by ConnectorEnvironment at line 50
2015-04-23 14:48:45,586 21160 ERROR connector_ecommerce openerp.addons.connector_ecommerce.tests.test_onchange: FAIL
2015-04-23 14:48:45,586 21160 INFO connector_ecommerce openerp.addons.connector_ecommerce.tests.test_onchange: ======================================================================
2015-04-23 14:48:45,586 21160 ERROR connector_ecommerce openerp.addons.connector_ecommerce.tests.test_onchange: FAIL: test_play_onchange (openerp.addons.connector_ecommerce.tests.test_onchange.TestOnchange)
2015-04-23 14:48:45,586 21160 ERROR connector_ecommerce openerp.addons.connector_ecommerce.tests.test_onchange: ` Play the onchange ConnectorUnit on a sale order
2015-04-23 14:48:45,587 21160 ERROR connector_ecommerce openerp.addons.connector_ecommerce.tests.test_onchange: Traceback (most recent call last):
2015-04-23 14:48:45,587 21160 ERROR connector_ecommerce openerp.addons.connector_ecommerce.tests.test_onchange: `   File "/home/matt/work/odoo/odoo-custom/magentoconnector/connector-ecommerce/connector_ecommerce/tests/test_onchange.py", line 107, in test_play_onchange
2015-04-23 14:48:45,587 21160 ERROR connector_ecommerce openerp.addons.connector_ecommerce.tests.test_onchange: `     self.assertEqual(line['tax_id'], [tax.id])
2015-04-23 14:48:45,587 21160 ERROR connector_ecommerce openerp.addons.connector_ecommerce.tests.test_onchange: ` AssertionError: Lists differ: [(6, 0, [4])] != [4]
2015-04-23 14:48:45,587 21160 ERROR connector_ecommerce openerp.addons.connector_ecommerce.tests.test_onchange: ` 
2015-04-23 14:48:45,587 21160 ERROR connector_ecommerce openerp.addons.connector_ecommerce.tests.test_onchange: ` First differing element 0:
2015-04-23 14:48:45,587 21160 ERROR connector_ecommerce openerp.addons.connector_ecommerce.tests.test_onchange: ` (6, 0, [4])
2015-04-23 14:48:45,587 21160 ERROR connector_ecommerce openerp.addons.connector_ecommerce.tests.test_onchange: ` 4
2015-04-23 14:48:45,587 21160 ERROR connector_ecommerce openerp.addons.connector_ecommerce.tests.test_onchange: ` 
2015-04-23 14:48:45,587 21160 ERROR connector_ecommerce openerp.addons.connector_ecommerce.tests.test_onchange: ` - [(6, 0, [4])]
2015-04-23 14:48:45,587 21160 ERROR connector_ecommerce openerp.addons.connector_ecommerce.tests.test_onchange: ` + [4]
2015-04-23 14:48:45,587 21160 INFO connector_ecommerce openerp.addons.connector_ecommerce.tests.test_onchange: Ran 1 test in 0.692s
2015-04-23 14:48:45,587 21160 ERROR connector_ecommerce openerp.addons.connector_ecommerce.tests.test_onchange: FAILED
2015-04-23 14:48:45,587 21160 INFO connector_ecommerce openerp.addons.connector_ecommerce.tests.test_onchange:  (failures=1)
2015-04-23 14:48:45,588 21160 ERROR connector_ecommerce openerp.modules.module: Module connector_ecommerce: 1 failures, 0 errors
2015-04-23 14:48:45,588 21160 INFO connector_ecommerce openerp.modules.module: openerp.addons.connector_ecommerce.tests.test_picking_event running tests.

@guewen
Copy link
Member Author

guewen commented Apr 24, 2015

I see an other errors when triggering the tests at the installation but I am not sure it is related to your branch:

Thanks, I fixed that on OCA/connector-ecommerce#18

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

7 participants