Purchase

Vendors and purchase orders

MarketplaceOperationsVersion 0.1.0manifest

What it is for ​

Keep vendors and the purchase orders you send them, with order lines and a draft to received flow. Totals are entered, not summed from the lines.

What the package does and does not do ​

Vendors, purchase orders and order lines with a draft, sent, confirmed, received and cancelled flow. Order totals are entered, not summed from the lines.

Models ​

purchase_vendor ​

Purchasing terms for a contact you buy from

Read group: purchase.user. Write group: purchase.manager.

FieldKindData classPersonal dataGroupAgents seeDescription
party_idref → partynonenopurchase.userin clearThe contact record of the vendor
vendor_referencetextnonenopurchase.userin clearYour customer number at this vendor
payment_terms_daysnumbernonenopurchase.userin clearDays allowed to pay an invoice
lead_time_daysnumbernonenopurchase.userin clearUsual days between order and delivery
ibantextfinancialyespurchase.managerwithheldBank account the vendor is paid into
activeboolnonenopurchase.userin clearWhether you still buy from this vendor

purchase_order ​

A request to a vendor to supply goods or services

Read group: purchase.user. Write group: purchase.user.

FieldKindData classPersonal dataGroupAgents seeDescription
referencetextnonenopurchase.userin clearOrder number printed on the document
vendor_idref → purchase_vendornonenopurchase.userin clearThe vendor ordered from
ordered_ondatenonenopurchase.userin clearDate the order was placed (YYYY-MM-DD)
expected_ondatenonenopurchase.userin clearDate the goods are expected (YYYY-MM-DD)
currencytextnonenopurchase.userin clearISO 4217 currency code, for example EUR
totalmoneynonenopurchase.userin clearOrder total as agreed with the vendor (minor currency units, e.g. cents)
noteslongtextnonenopurchase.userin clearDelivery instructions and remarks for the vendor
stateselect (draft, sent, confirmed, received, cancelled)nonenopurchase.userin clearOrder status: draft, sent, confirmed, received, cancelled

purchase_order_line ​

One product or service on a purchase order

Read group: purchase.user. Write group: purchase.user.

FieldKindData classPersonal dataGroupAgents seeDescription
order_idref → purchase_ordernonenopurchase.userin clearThe order the line belongs to
product_idref → productnonenopurchase.userin clearThe product ordered
descriptiontextnonenopurchase.userin clearWording for the vendor if different from the product name
quantitynumbernonenopurchase.userin clearUnits ordered
unit_pricemoneynonenopurchase.userin clearAgreed price per unit (minor currency units, e.g. cents)
received_quantitynumbernonenopurchase.userin clearUnits received so far

Workflows ​

purchase_order ​

ActionMovesWho may run itApproval
purchase_order.sendstate: draft → sentpurchase.userno
purchase_order.confirmstate: sent → confirmedpurchase.manageryes
purchase_order.receivestate: confirmed → receivedpurchase.userno
purchase_order.cancelstate: draft → cancelledpurchase.userno

Permission groups ​

Groups used by this app:

  • purchase.manager
  • purchase.user

Approval steps ​

Steps an agent can only propose:

  • purchase_order.confirm

What agents can and cannot do ​

An agent can read, search, create and update records of this app, and run the actions that need no approval, within the permission groups of its token.

It can only propose these steps, and a person must approve them: purchase_order.confirm, purchase_vendor.delete, purchase_order.delete, purchase_order_line.delete.

These fields are withheld from agents entirely: purchase_vendor.iban.

Dependencies ​

  • base
  • product

Install ​

Install it from the Customize app (Marketplace), or from the command line:

bash
obop modules install-from purchase

Needs a database and administrator rights.

Build your own ​

The module guide shows how apps like this one are written