-
-
Notifications
You must be signed in to change notification settings - Fork 511
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
[9.0][ADD] contract_mandate: New module #75
Conversation
Please rebase. |
Please @carlosdauden rebase |
e47f043
to
c2e4df8
Compare
@pedrobaeza @rafaelbn rebased |
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.
Tested in runbot 👍
Dear @OCA/project-service-maintainers , this module is necessary as:
Please review! 😄 |
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 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
@chienandalu This error is related with other module review fix #82 😃 |
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.
Approved since related bug is already fixed
This module allows to set a mandate mode on contract for creating the invoices with this mandate.
@Tecnativa