Workflow

How to Create an Article

Verified end to end. This workflow was executed in the OfficeGest demo Back Office on 2026-05-19 and verified through the UI table and authenticated AJAX responses.

Evidence Summary

Route
/stocks/artigos
Page title
OG - Articles
Workflow run
create-article-20260519T021105Z
Created article
AI-DEMO-20260519-021105
Verification
DT_Select_ArtigosIVA returned recordsFiltered: 1
Duplicate validation
article-duplicate-validation-20260519T090211Z returned T:AI Demo Article 20260519T021105Z
Evidence file
raw/playwright/workflows/latest-create-article.json

Create article workflow diagram

When to Use This

Use this workflow when a user needs a new stock/service article available for sales documents, purchasing documents, stock views, or article lookups. The article starts with zero stock in warehouses unless a separate stock movement is created later.

Step-by-Step

  1. Open Stocks and then Articles, or navigate directly to /stocks/artigos.
  2. Click Create New Article. OfficeGest opens the article modal and loads it through action=loadForm&form=artigo&id=novoartigo.
  3. Fill Article ID. This is the unique code users will search for later. During the verified run, OfficeGest called SearchIfExistCodArtigo for the entered ID.
  4. If the Article ID already exists, OfficeGest clears the typed value after the duplicate lookup. Choose a different Article ID before continuing.
  5. Fill Description. This is the human-readable item name shown in lists and document lines.
  6. Keep or change Article Type. The observed default for a normal stock item is N, displayed as Standard.
  7. Optionally fill Brand, Family, Sub-Family, Sub-Sub-Family, Bar Code, and Unit.
  8. Fill required pricing fields: Purchasing Price, Selling Price, and VAT. OfficeGest recalculates related margin and selling-price-with-VAT values in the modal.
  9. If needed, enable Use Serial N., Uses Lots, complementary article options, or tire-specific fields before saving.
  10. Click Save. Use Save and New only when creating several articles in sequence.
  11. Return to the Articles list and use the global search or the Article ID column search to confirm the new article appears.

Fields Observed in the Create Modal

GroupFields and behavior
IdentityArticle ID, Description, Article Type, Brand, Family, Sub-Family, Sub-Sub-Family, Bar Code, Unit.
RequiredArticle ID, Description, Purchasing Price, Selling Price, VAT.
Stock trackingUse Serial N. and Uses Lots checkboxes are available at creation time.
PricingPurchasing Price, Profit Margin %, Selling Price, Selling Price w/VAT, VAT, and exemption reason.
CompositionComplementary article toggle, complementary article selector, extra designation, quantity, complementary price, multiply by quantity, and required flag.
Tire articleIt is tire?, EPREL Code, Measure, Type Tire, Season, Load Index, Speed index, Energy efficiency, Security, Noise outside, Width, Height, Diameter.
Footer actionsUndo, Save and New, Save.

Backend and API Notes

ActionObserved purposeEvidence
loadFormFetches the HTML modal for form=artigo and id=novoartigo.Triggered immediately after clicking Create New Article.
SearchIfExistCodArtigoChecks whether the entered Article ID already exists.During creation, payload included id1=AI-DEMO-20260519-021105. During the duplicate negative test, the existing code returned T:AI Demo Article 20260519T021105Z and the visible input value was cleared.
createNovoArtigoCreates the article with identity, unit, pricing, VAT, complementary article, and tire fields.Payload included CodArtigo, Designacao, PrecoCusto, PrecoVenda, PVP, and CodIva.
dt_list_recalc_stock_articles_lojasLoads warehouse stock rows for the created article.Returned rows for warehouses such as Armazem de Entradas with zero stock.
DT_Select_ArtigosIVALists and searches articles in the DataTables grid.Search for the created article returned recordsTotal: 1911 and recordsFiltered: 1.

The create endpoint response itself was observed as a terse F:/blank response, so the reliable success proof is the follow-up article table lookup and stock-by-warehouse lookup.

Verification Artifacts

Known Gaps