Deepen all business modules: methods, validations, workflows
Account: - action_post: partner validation, line count check, sequence number assignment (JOURNAL/YYYY/NNNN format) - action_register_payment: opens payment wizard from invoice - remove_move_reconcile: undo reconciliation, reset residuals - Register Payment button in invoice form (visible when posted+unpaid) Sale: - action_cancel: cancels linked draft invoices + SO state - action_draft: reset cancelled SO to draft - action_view_invoice: navigate to linked invoices - Cancel/Reset buttons in form view header Purchase: - button_draft: reset cancelled PO to draft - action_create_bill already existed Stock: - action_cancel on picking: cancels moves + picking state CRM: - action_set_won_rainbowman: sets Won stage + rainbow effect - convert_opportunity: lead→opportunity type switch HR: - hr.contract model (name, employee, wage, dates, state) Project: - action_blocked on task (kanban_state) - Task stage seed data (New, In Progress, Done, Cancelled) Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -580,6 +580,8 @@ func seedViews(ctx context.Context, tx pgx.Tx) {
|
||||
<header>
|
||||
<button name="action_confirm" string="Confirm" type="object" class="btn-primary" invisible="state != ''draft''"/>
|
||||
<button name="create_invoices" string="Create Invoice" type="object" class="btn-primary" invisible="state != ''sale''"/>
|
||||
<button name="action_cancel" string="Cancel" type="object" invisible="state not in (''draft'',''sale'')"/>
|
||||
<button name="action_draft" string="Reset to Draft" type="object" invisible="state != ''cancel''"/>
|
||||
<field name="state" widget="statusbar" clickable="1"/>
|
||||
</header>
|
||||
<sheet>
|
||||
@@ -622,6 +624,7 @@ func seedViews(ctx context.Context, tx pgx.Tx) {
|
||||
('invoice.form', 'account.move', 'form', '<form>
|
||||
<header>
|
||||
<button name="action_post" string="Post" type="object" class="btn-primary" invisible="state != ''draft''"/>
|
||||
<button name="action_register_payment" string="Register Payment" type="object" class="btn-primary" invisible="state != ''posted'' or payment_state == ''paid''"/>
|
||||
<button name="button_cancel" string="Cancel" type="object" invisible="state != ''draft''"/>
|
||||
<button name="button_draft" string="Reset to Draft" type="object" invisible="state != ''cancel''"/>
|
||||
<field name="state" widget="statusbar" clickable="1"/>
|
||||
@@ -1263,6 +1266,14 @@ func seedDemoData(ctx context.Context, tx pgx.Tx) {
|
||||
(3, 'Peter Weber', 3, 1, 'peter@bauer-bau.de')
|
||||
ON CONFLICT (id) DO NOTHING`)
|
||||
|
||||
// Project task stages
|
||||
tx.Exec(ctx, `INSERT INTO project_task_type (id, name, sequence, fold) VALUES
|
||||
(1, 'New', 1, false),
|
||||
(2, 'In Progress', 5, false),
|
||||
(3, 'Done', 10, true),
|
||||
(4, 'Cancelled', 20, true)
|
||||
ON CONFLICT (id) DO NOTHING`)
|
||||
|
||||
// Projects
|
||||
tx.Exec(ctx, `INSERT INTO project_project (id, name, partner_id, company_id, active) VALUES
|
||||
(1, 'Website Redesign', 5, 1, true),
|
||||
|
||||
Reference in New Issue
Block a user