Merge branch 'update-ebill_paynet' into '2.0-fixed'

update ebill_paynet

See merge request flectra-community/l10n-switzerland-flectra!13
This commit is contained in:
Renzo Meister 2022-11-21 06:36:03 +00:00
commit 3adf99fff4
5 changed files with 8 additions and 7 deletions

View File

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8" ?> <?xml version="1.0" encoding="utf-8" ?>
<flectra noupdate="1"> <flectra noupdate="1">
<record model="ir.cron" id="cron_paynet_get_shipment"> <record model="ir.cron" id="cron_paynet_get_shipment">
<field name='name'>Paynet - Poll for shipments</field> <field name='name'>E-Bill - Poll for shipments</field>
<field name='interval_number'>1</field> <field name='interval_number'>1</field>
<field name='interval_type'>hours</field> <field name='interval_type'>hours</field>
<field name="numbercall">-1</field> <field name="numbercall">-1</field>

View File

@ -2,7 +2,7 @@
<flectra> <flectra>
<data noupdate="1"> <data noupdate="1">
<record id="mail_activity_dws_error" model="mail.activity.type"> <record id="mail_activity_dws_error" model="mail.activity.type">
<field name="name">Paynet System Error</field> <field name="name">E-Bill System Error</field>
<field name="icon">fa-warning</field> <field name="icon">fa-warning</field>
<field name="delay_count">0</field> <field name="delay_count">0</field>
<field name="sequence">99</field> <field name="sequence">99</field>

View File

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8" ?> <?xml version="1.0" encoding="utf-8" ?>
<flectra> <flectra>
<record id="paynet_transmit_method" model="transmit.method"> <record id="paynet_transmit_method" model="transmit.method">
<field name="name">Paynet</field> <field name="name">E-Bill</field>
<field name="code">paynet</field> <field name="code">paynet</field>
<field name="customer_ok" eval="True" /> <field name="customer_ok" eval="True" />
<field name="supplier_ok" eval="False" /> <field name="supplier_ok" eval="False" />

View File

@ -17,17 +17,17 @@
<MESSAGE-REFERENCE> <MESSAGE-REFERENCE>
<REFERENCE-DATE> <REFERENCE-DATE>
<Reference-No>{{ invoice.name }}</Reference-No> <Reference-No>{{ invoice.name }}</Reference-No>
<Date>{{ format_date() }}</Date> <Date>{{ format_date(invoice.invoice_date) }}</Date>
</REFERENCE-DATE> </REFERENCE-DATE>
</MESSAGE-REFERENCE> </MESSAGE-REFERENCE>
<PRINT-DATE> <PRINT-DATE>
<Date>{{ format_date(invoice.date_invoice) }}</Date> <Date>{{ format_date(invoice.invoice_date) }}</Date>
</PRINT-DATE> </PRINT-DATE>
<REFERENCE> <REFERENCE>
<INVOICE-REFERENCE> <INVOICE-REFERENCE>
<REFERENCE-DATE> <REFERENCE-DATE>
<Reference-No>{{ invoice.name }}</Reference-No> <Reference-No>{{ invoice.name }}</Reference-No>
<Date>{{ format_date(invoice.date_invoice) }}</Date> <Date>{{ format_date(invoice.invoice_date) }}</Date>
</REFERENCE-DATE> </REFERENCE-DATE>
</INVOICE-REFERENCE> </INVOICE-REFERENCE>
</REFERENCE> </REFERENCE>
@ -121,7 +121,7 @@
<PAYMENT-TERMS> <PAYMENT-TERMS>
<BASIC Payment-Type="{{ payment_type|upper }}" Terms-Type="5"> <BASIC Payment-Type="{{ payment_type|upper }}" Terms-Type="5">
<TERMS> <TERMS>
<Date>{{ format_date(invoice.date_due or invoice.date_invoice) }}</Date> <Date>{{ format_date(invoice.invoice_date_due or invoice.invoice_date) }}</Date>
</TERMS> </TERMS>
</BASIC> </BASIC>
</PAYMENT-TERMS> </PAYMENT-TERMS>

View File

@ -39,6 +39,7 @@ class AccountInvoice(models.Model):
raise UserError(_("Error generating Paynet message")) raise UserError(_("Error generating Paynet message"))
message.send_to_paynet() message.send_to_paynet()
self.invoice_exported = True self.invoice_exported = True
self.is_move_sent = True
return "Paynet invoice generated and in state {}".format(message.state) return "Paynet invoice generated and in state {}".format(message.state)
def create_paynet_message(self): def create_paynet_message(self):