Skip to content

Instantly share code, notes, and snippets.

@ovnicraft
Last active June 23, 2020 23:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ovnicraft/a5cfb0312b16921a9268a1803f01f818 to your computer and use it in GitHub Desktop.
Save ovnicraft/a5cfb0312b16921a9268a1803f01f818 to your computer and use it in GitHub Desktop.
def portal_purchase_order_details(self, c_id, upload=None, **kw):
...
...
...
order.write(po_values)
order.save_quoted_lines()
if upload:
class PurchaseOrder():
_inherit = "purchase.order"
...
...
def save_quoted_lines(self):
for line in self.order_line:
line_data = line.copy_data()
self.env['purchase.quoted.line'].create(line_data)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment