Files
project_v19/custom_subscriptions/models/__pycache__/subscription.cpython-312.pyc
T

44 lines
9.9 KiB
Plaintext
Raw Normal View History

2026-07-01 14:41:49 +07:00
Ë
ôoj^ãóÂddlmZmZmZmZddlmZddlmZmZddl m
Z
Gddej«Z Gddej«Z
Gd „d
ej«Zy ) é)ÚmodelsÚfieldsÚapiÚ_)Ú UserError)ÚdatetimeÚ timedelta)Ú
relativedeltacó¶eZdZdZdZdZejdd¬«Zejdd¬ «Z
ejd
d d¬ «Z ejgd
¢ddd¬ «Z
ejdd¬ «Zej ddd¬«Zej$dd¬ «Zej$dd¬«Zej d¬«Zej,d¬«ZdZy)ÚSubscriptionTemplateúsubscription.templateúSubscription Templatezsequence, namez
Template NameT©ÚstringÚrequiredÚSequenceé
©rÚdefaultz
Invoice Everyé)rrr))ÚdaysÚDays)ÚweeksÚWeeks)ÚmonthsÚMonths)ÚyearsÚYearsz
Interval TyperÚActivezproduct.productÚProductÚQuantitygð?ÚPricezproduct_id.list_price)rÚrelatedzproduct_id.currency_id©r#Ú Description©rcó¤g}|D]H}|jd|jd|jd}|j|j|f«ŒJ|S)Nz ú))ÚnameÚinterval_numberÚ
interval_typeÚappendÚid)ÚselfÚresultÚrecordr*s ú=/mnt/extra-addons/custom_subscriptions/models/subscription.pyÚname_getzSubscriptionTemplate.name_get s]؈Øò -ˆ—kk] " V×%;Ñ%;Ð$<¸A¸f×>RÑ>RÐ=SÐSTÐUˆ M‰M˜6Ÿ9™9  ˆ
óN)Ú__name__Ú
__module__Ú __qualname__Ú_nameÚ _descriptionÚ_orderrÚCharr*ÚIntegerÚsequencer+Ú Selectionr,ÚBooleanÚactiveÚMany2oneÚ
product_idÚFloatÚquantityÚ
price_unitÚ currency_idÚTextÚ descriptionr3©r4r2r r Ø #€EØ*€LØ
€Fà ˆ6;‰;˜o¸Ô =€D؈v~‰~ Z¸Ô<€HØ$f—nn¨OÀQÐQUÔV€OØ$F×&ð
 x¸$ô @€Mð ˆV^‰^ 8°TÔ
:€Fà Ð!2¸9ÈtÔT€J؈v|‰| :°sÔ;€Hð WÐ6MÔN€JØ!&—//Ð*BÔC€Kà&—++ 3€Kór4r cóheZdZdZdZddgZdZejddddd¬ «Z ejd
d d¬ «Z ejd
dd¬ «Z ejdddd¬«Z
ejddejj¬«Zejddd¬«Zejd¬«Zejdd¬«Zej(gd¢dddd¬«Zejd¬«Zej.d ¬«Zej.d!¬«Zej.d"d#d¬$«Zej6d%d&¬'«Zej:d(d)d*¬«Zej>d+¬«Z ejBd,d¬-«Z"e#jHˆfd.„«Z%d/„Z&d0„Z'd1„Z(d2„Z)d3„Z*d4„Z+d5„Z,d6„Z-ˆxZ.S)7Ú Subscriptionúsubscription.subscriptionz mail.threadzmail.activity.mixinzcreate_date descÚ ReferenceTFÚNew)rrÚcopyÚreadonlyrr
rrz res.partnerÚCustomerz res.companyÚCompanycó.|jjS©N)ÚenvÚcompany©r/s r2ú<lambda>zSubscription.<lambda>1sÐfj×fnÑfn×fvÑfv€r4)rrrz
Start DatezNext Invoice Date)rrrOzEnd Dater&zLast Invoice Date)rrO))ÚdraftÚDraft)r@r)ÚclosedÚClosed)Ú cancelledÚ CancelledÚStatusrY)rrÚtrackingrOztemplate_id.currency_idr$ztemplate_id.price_unitztemplate_id.quantityzRecurring PriceÚ_compute_recurring_total)rÚcomputeÚstorez
Invoice CountÚ_compute_invoice_count)rrbú account.moveÚsubscription_idÚInvoicesÚNotesrrcó–|jdd«dk(r%|jdjd«xsd|d<t||«S)Nr*rNz ir.sequencerL)ÚgetrUÚ next_by_codeÚsuperÚcreate)r/ÚvalsÚ __class__s €r2rmzSubscription.createSsIø€à 8‰8F˜ "  Ÿ8™8 2×?Ð@[ÓeÐ`eˆD‰L܉w‰~˜#r4cóN|D] }|j|jz|_Œ"yrT)rErDÚrecurring_total©r/Úsubs r2raz%Subscription._compute_recurring_totalYs(Øò @ˆCØ"%§.¡.°3·<±<Ñ"?ˆ ñ @r4cóF|D]}t|j«|_ŒyrT)ÚlenÚ invoice_idsÚ
invoice_countrrs r2rdz#Subscription._compute_invoice_count]s"Øò 5ˆCÜ # C§O¡OÓ 4ˆ ñ 5r4có@|jd|jdœ«y)Nr@)ÚstateÚnext_invoice_dateT)ÚwriteÚ
start_daterWs r2Úaction_start_subscriptionz&Subscription.action_start_subscriptionas"Ø
ØØ!%§¡ñ
ô ðr4có*|jddi«y)Nryr[r{rWs r2Úaction_close_subscriptionz&Subscription.action_close_subscriptionhsØ
G˜r4có*|jddi«y)Nryr]TrrWs r2Úaction_cancel_subscriptionz'Subscription.action_cancel_subscriptionlsØ
G˜r4có*|jddi«y)NryrYTrrWs r2Úaction_draft_subscriptionz&Subscription.action_draft_subscriptionpsØ
G˜r4cóz|j«td«ddddd|jfgd|jidœS) Nrgzir.actions.act_windowrez tree,formrfúdefault_subscription_id)r*ÚtypeÚ res_modelÚ view_modeÚdomainÚcontext)Ú
ensure_onerr.rWs r2Úaction_view_invoicesz!Subscription.action_view_invoicestsCØ Ôäj“MØ)¨3°·±Ð1°4·7±7Ð

ð
r4cóŽ|D]¿}|jdk7rŒ|jr-|j|jkDr|jddi«ŒMd|jj