-
-
Notifications
You must be signed in to change notification settings - Fork 308
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[14.0][IMP] edi_oca: Add new model edi.configuration #1035
base: 14.0
Are you sure you want to change the base?
Conversation
More information would be awesome in order to understand why you did this. |
@etobella this origins from our discussion on OCA/edi-framework#39 |
@thienvh332 as it's draft, do you want us to wait for a review? |
hi @simahawk
|
89cc982
to
15a994e
Compare
Hello @simahawk , |
can you drop the pypdf fix? 15a994e |
): | ||
# Default action if not provided | ||
if ir_action is None: | ||
# `action_send_email` is just an action name I created |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't get what's the need for this ... there's no action_send_email
anywhere.
15a994e
to
497f4c4
Compare
Hi @simahawk ,
|
The idea is that everything should be explicit. You must explicitly declare which action you want to use.
Ok, you are right. Cannot be mandatory. Good point :) |
3ac4a93
to
6f64596
Compare
@etobella would you have time for a review? |
6f64596
to
6c41c30
Compare
edi_purchase_conf_ids = fields.Many2many( | ||
string="EDI Purchase Config Ids", | ||
comodel_name="edi.configuration", | ||
relation="res_partner_edi_configuration_rel", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
relation="res_partner_edi_configuration_rel", | |
relation="res_partner_edi_purchase_configuration_rel", |
_inherit = "res.partner" | ||
|
||
edi_purchase_conf_ids = fields.Many2many( | ||
string="EDI Purchase Config Ids", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
string="EDI Purchase Config Ids", | |
string="EDI Purchase configuration", |
Here's a full real life example #1067 TODO here:
|
Specs
In edi_oca
Add generic
edi.configuration
model with these characteristics:Fields
This model can then be used by conf consumers.
Other methods:
Backend / Exc. record
Then add edi.exchange.record.action_exchange_generate_send and use that method from backend.
Consumer mixin
Specific fields for configuration (eg: edi_purchase_conf_ids) will be added by glue modules on res.partner.
Default conf
NOTE:
sending emails is not really bound to edibut in real life it's handy to have a default way to send EDI docs via email.
You could even generate an exchange record to keep track of that
but the choice will be up to the implementers.
The key is that w/ this features they can do whatever they want.
Views
On edi_purchase_oca
Example of specific listener implementation: