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

[FIX] sale_expense: ability to reinvoice an expense product more than… #21088

Closed
wants to merge 1 commit into from

Conversation

huysmki
Copy link
Contributor

@huysmki huysmki commented Nov 20, 2017

… once on same so

Description of the issue/feature this PR addresses:
Ability to reinvoice an expense product more than ones on same SO

Current behavior before PR:
Only the first time an expense product was posted it was added to the so to reinvoice. A second time expensing the same product, the quantity delivered was not updated

Desired behavior after PR is merged:
One can expense the same product on a so multiple times

--
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr

… once on same so

Before this commit, only the first time an expense product was posted it was added to the so to reinvoice. A second time expensing the same product, the quantity delivered was not updated
After this commit, one can expense the same product on a so multimple times
@mart-e
Copy link
Contributor

mart-e commented Nov 21, 2017

The fact that the tests are failing is a proof you are changing the application behaviour. Because of this, the pull request should target the master branch, not a stable version.

cc @bst-odoo what do you think about adding this feature?

@bst-odoo
Copy link
Contributor

When the product is "reinvoce at sales price", it should already be the case.
When the product is "reinvoice at cost", it is normal that a new line is added because the cost == the amount on the expense and it generally changes from one expense to another.

@huysmki
Copy link
Contributor Author

huysmki commented Nov 22, 2017 via email

@dafaallah-expsa
Copy link

I do pull last update form odoo community 11.0 , after running , I have error below :


Traceback (most recent call last):
File "/opt/server/odoo/addons/base/ir/ir_cron.py", line 223, in _process_jobs
registry[cls._name]._process_job(job_cr, job, lock_cr)
File "/opt/server/odoo/addons/base/ir/ir_cron.py", line 129, in _process_job
now = fields.Datetime.context_timestamp(cron, datetime.now())
File "/opt/server/odoo/fields.py", line 1580, in context_timestamp
tz_name = record._context.get('tz') or record.env.user.tz
File "/opt/server/odoo/fields.py", line 944, in get
self.determine_value(record)
File "/opt/server/odoo/fields.py", line 1055, in determine_value
self.compute_value(recs)
File "/opt/server/odoo/fields.py", line 1011, in compute_value
self._compute_value(records)
File "/opt/server/odoo/fields.py", line 999, in _compute_value
for record in records:
File "/opt/server/odoo/models.py", line 4659, in iter
yield self._browse((id,), self.env, self._prefetch, False)
TypeError: _browse() takes from 3 to 4 positional arguments but 5 were given
2019-02-26 12:41:33,216 4363 ERROR test2 odoo.addons.base.ir.ir_cron: Unexpected exception while processing cron job {'priority': 5, 'ir_actions_server_id': 78, 'create_uid': 1, 'write_date': '2019-02-21 06:13:18.376535', 'interval_number': 3, 'active': True, 'numbercall': -1, 'user_id': 1, 'nextcall': '2019-02-21 15:13:18', 'doall': False, 'create_date': '2019-02-21 06:13:18.376535', 'id': 3, 'write_uid': 1, 'interval_type': 'hours', 'cron_name': 'Update user roles'}
Traceback (most recent call last):
File "/opt/server/odoo/fields.py", line 940, in get
value = record.env.cache.get(record, self)
File "/opt/server/odoo/api.py", line 967, in get
value = self._data[key][field][record._ids[0]]
KeyError: 1


help me ?

@C3POdoo C3POdoo added the Sales Sales label Dec 18, 2020
@C3POdoo
Copy link
Contributor

C3POdoo commented Feb 16, 2021

Dear @huysmki,

Thank you for your contribution but the version 11.0 is no longer supported.
We only support the last 3 stable versions so no longer accepts patches into this branch.

We apology if we could not look at your request in time.
If the contribution still makes sense for the upper version, please let us know and do not hesitate to recreate one for the recent versions. We will try to check it as soon as possible.

This is an automated message.

@C3POdoo C3POdoo closed this Feb 16, 2021
@robodoo
Copy link
Contributor

robodoo commented Feb 16, 2021

@robodoo
Copy link
Contributor

robodoo commented Feb 16, 2021

Sorry, I didn't know about this PR and had to retrieve its information, you may have to re-approve it.

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

Successfully merging this pull request may close these issues.

None yet

6 participants