-
Notifications
You must be signed in to change notification settings - Fork 2
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
[3337][ADD] vendor_bill_final_price_check #41
base: 16.0
Are you sure you want to change the base?
Conversation
@AungKoKoLin1997 I think we should add some log in the chatter once the manager click confirm bool and save the record. this is to notify the accounting user that the invoice he/she handled has been confirmed since the boolean itself is only can be seen by the manager. how do you think? the scenario would be:
|
@api.onchange("price_unit") | ||
def _onchange_price_unit(self): | ||
for line in self: | ||
if not line.move_id.move_type == "in_invoice": | ||
return | ||
|
||
if not line.purchase_line_id: | ||
return | ||
|
||
if line.product_id and line.product_id.cost_method != "standard": | ||
line._origin.move_id.write({"is_change_price": True}) |
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 only covers a partial (minor) scenario and we cannot rely on this approach. This logic doesn't cover, for example, the case where SVL is generated due to exchange rate difference between receipt and vendor bill. What I had in mind was to insert a check where SVL record is created.
Here are the Functional test result:
|
3337