add sale commission

This commit is contained in:
Ivan Office
2024-03-27 18:30:31 +08:00
parent e603e94c6b
commit a0de3c2a45
4 changed files with 108 additions and 87 deletions

View File

@@ -1,22 +1,20 @@
<?xml version="1.0" encoding="UTF-8" ?>
<templates xml:space="preserve">
<t t-name="app_chatgpt.Message" t-inherit="mail.Message" t-inherit-mode="extension">
<xpath expr="//div[hasclass('o_Message_prettyBody')]//.." position="replace">
<t t-if="!messageView.composerViewInEditing">
<div class="o_Message_prettyBody" t-ref="prettyBody"/><!-- messageView.message.prettyBody is inserted here from _update() -->
<div name="bottom_operation" class="position-relative mt-8">
<div t-if="messageView.message.human_prompt_tokens &gt; 0 or messageView.message.ai_completion_tokens &gt;0"
class="o_Message_token text-muted" style="float:left;display:inline;font-size: 13px;">
<br/>
------------------
<br/>
<span title="提问/答复 消耗Token">
<t t-esc="messageView.message.human_prompt_tokens"/> / <t t-esc="messageView.message.ai_completion_tokens"/>
</span>
</div>
<xpath expr="//Composer[@composer='message.composer']" position="after">
<div t-if="state.isEditing" name="bottom_operation" class="position-relative mt-8">
<div t-if="message.human_prompt_tokens &gt; 0 or message.ai_completion_tokens &gt;0"
class="o_Message_token text-muted" style="float:left;display:inline;font-size: 13px;">
<br/>
------------------
<br/>
<span title="提问/答复 消耗Token">
<t t-esc="message.human_prompt_tokens"/>
/
<t t-esc="message.ai_completion_tokens"/>
</span>
</div>
</t>
</div>
</xpath>
</t>
</templates>