Organizations and Sale Orders in Odoo #55

Closed
opened 2025-05-07 13:10:52 +00:00 by tobru · 0 comments
Owner

Stories

As a system, I want to manage Sale Orders in Odoo regarding organizations

An organization in Servala is represented as a Sale Order in Odoo (model sale.order).

Implementation Notes

When creating an organization, we also need to create a Sale Order in Odoo and set the partner_id and partner_invoice_id to the values from the billing entity (see #54).

Store the id and name of the created Sale Order record in the organization so that we can reference it accordingly.

Sales Order are in the sale.order model of Odoo. The following fields must be set when creating a record:

  • partner_id = Organization.billing_entity.odoo_company_id
  • partner_invoice_id = Organization.billing_entity.odoo_invoice_id
  • state = "sale"
  • client_order_ref = f"Servala (Organization: ${Organization.name})"
  • internal_note = "auto-generated by Servala Portal"

See also https://github.com/appuio/control-api/blob/master/controllers/saleorder/saleorder_storage.go#L53

## Stories _As a system, I want to manage Sale Orders in Odoo regarding organizations_ An organization in Servala is represented as a Sale Order in Odoo (model `sale.order`). ## Implementation Notes When creating an organization, we also need to create a Sale Order in Odoo and set the `partner_id` and `partner_invoice_id` to the values from the billing entity (see #54). Store the `id` and `name` of the created Sale Order record in the organization so that we can reference it accordingly. Sales Order are in the `sale.order` model of Odoo. The following fields must be set when creating a record: * `partner_id` = `Organization.billing_entity.odoo_company_id` * `partner_invoice_id` = `Organization.billing_entity.odoo_invoice_id` * `state` = "sale" * `client_order_ref` = f"Servala (Organization: ${Organization.name})" * `internal_note` = "auto-generated by Servala Portal" See also https://github.com/appuio/control-api/blob/master/controllers/saleorder/saleorder_storage.go#L53
tobru added the
enhancement
label 2025-05-07 13:10:52 +00:00
tobru added this to the Development Planning project 2025-05-07 13:10:52 +00:00
tobru closed this issue 2025-06-23 07:31:31 +00:00
Sign in to join this conversation.
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: servala/servala-portal#55
No description provided.