[9.0][ADD] contract_mandate: New module - #75
Merged
Conversation
Member
|
Please rebase. |
Member
|
Please @carlosdauden rebase |
carlosdauden
force-pushed
the
9.0-contract_mandate
branch
from
June 9, 2017 07:15
e47f043 to
c2e4df8
Compare
Contributor
Author
|
@pedrobaeza @rafaelbn rebased |
Member
|
Dear @OCA/project-service-maintainers , this module is necessary as:
Please review! 😄 |
chienandalu
reviewed
Aug 1, 2017
chienandalu
left a comment
Member
There was a problem hiding this comment.
I got this server error. Steps to reproduce:
- Create a contract
- Select a partner.
- Create a mandate for that partner.
- Click Generate recurring invoices automatically checkbox.
- Add a product to invoice.
- Click on invoice smart button
- Create an invoice.
- Select partner on contract (it doesn't get the context)
- The mandate is properly selected
- Save invoice and get this error:
Odoo Server Error
Traceback (most recent call last):
File "/.repo_requirements/odoo/openerp/http.py", line 650, in _handle_exception
return super(JsonRequest, self)._handle_exception(exception)
File "/.repo_requirements/odoo/openerp/http.py", line 687, in dispatch
result = self._call_function(**self.params)
File "/.repo_requirements/odoo/openerp/http.py", line 323, 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 316, in checked_call
result = self.endpoint(*a, **kw)
File "/.repo_requirements/odoo/openerp/http.py", line 966, in __call__
return self.method(*args, **kw)
File "/.repo_requirements/odoo/openerp/http.py", line 516, in response_wrap
response = f(*args, **kw)
File "/home/odoo/odoo-9.0/addons/web/controllers/main.py", line 895, in call_kw
return self._call_kw(model, method, args, kwargs)
File "/home/odoo/odoo-9.0/addons/web/controllers/main.py", line 887, in _call_kw
return getattr(request.registry.get(model), method)(request.cr, request.uid, *args, **kwargs)
File "/.repo_requirements/odoo/openerp/api.py", line 250, in wrapper
return old_api(self, *args, **kwargs)
File "/.repo_requirements/odoo/openerp/api.py", line 354, in old_api
result = method(recs, *args, **kwargs)
File "/home/odoo/dependencies/bank-payment/account_banking_mandate/models/account_invoice.py", line 48, in create
return super(AccountInvoice, self).create(vals)
File "/.repo_requirements/odoo/openerp/api.py", line 248, in wrapper
return new_api(self, *args, **kwargs)
File "/home/odoo/dependencies/bank-payment/account_payment_partner/models/account_invoice.py", line 62, in create
return super(AccountInvoice, self).create(vals)
File "/.repo_requirements/odoo/openerp/api.py", line 248, in wrapper
return new_api(self, *args, **kwargs)
File "/home/odoo/odoo-9.0/addons/account/models/account_invoice.py", line 344, in create
invoice = super(AccountInvoice, self.with_context(mail_create_nolog=True)).create(vals)
File "/.repo_requirements/odoo/openerp/api.py", line 248, in wrapper
return new_api(self, *args, **kwargs)
File "/home/odoo/odoo-9.0/addons/mail/models/mail_thread.py", line 235, in create
thread = super(MailThread, self).create(values)
File "/.repo_requirements/odoo/openerp/api.py", line 248, in wrapper
return new_api(self, *args, **kwargs)
File "/home/odoo/dependencies/connector/connector/producer.py", line 48, in create
record_id = create_original(self, vals)
File "/.repo_requirements/odoo/openerp/api.py", line 248, in wrapper
return new_api(self, *args, **kwargs)
File "/.repo_requirements/odoo/openerp/models.py", line 4154, in create
vals = self._add_missing_default_values(vals)
File "/.repo_requirements/odoo/openerp/api.py", line 248, in wrapper
return new_api(self, *args, **kwargs)
File "/.repo_requirements/odoo/openerp/api.py", line 490, in new_api
result = method(self._model, cr, uid, *args, **old_kwargs)
File "/.repo_requirements/odoo/openerp/models.py", line 1785, in _add_missing_default_values
defaults = self.default_get(cr, uid, list(missing_defaults), context)
File "/.repo_requirements/odoo/openerp/api.py", line 250, in wrapper
return old_api(self, *args, **kwargs)
File "/.repo_requirements/odoo/openerp/api.py", line 354, in old_api
result = method(recs, *args, **kwargs)
File "/.repo_requirements/odoo/openerp/models.py", line 1345, in default_get
defaults = self._convert_to_cache(defaults, validate=False)
File "/.repo_requirements/odoo/openerp/models.py", line 5507, in _convert_to_cache
for name, value in values.iteritems()
File "/.repo_requirements/odoo/openerp/models.py", line 5508, in <dictcomp>
if name in fields
File "/.repo_requirements/odoo/openerp/fields.py", line 1796, in convert_to_cache
raise ValueError("Wrong value for %s: %s" % (self, value))
ValueError: Wrong value for account.invoice.analytic_account_ids: 19
Contributor
Author
|
@chienandalu This error is related with other module review fix #82 😃 |
chienandalu
approved these changes
Aug 31, 2017
chienandalu
left a comment
Member
There was a problem hiding this comment.
Approved since related bug is already fixed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This module allows to set a mandate mode on contract for creating the invoices with this mandate.
@Tecnativa