IRC logs of #tryton for Thursday, 2011-10-20

chat.freenode.net #tryton log beginning Thu Oct 20 00:00:03 CEST 2011
2011-10-20 00:54 <zxq9> Python question. Why do I always see triple quotesd for __doc__ strings in Python documentation (at docs.python.org), but in Tryton code just single quotes?
2011-10-20 01:18 <ciupicri> zxq9, as long as the string is valid it doesn't matter
2011-10-20 01:19 <ciupicri> zxq9, triple quotes strings have the advantage of being able to include a quote, e.g. """He said "I love you!" yesterday."""
2011-10-20 01:38 <zxq9> ciupicri: Ah, that makes perfect sense now. Thanks!
2011-10-20 01:38 <ciupicri> zxq9, you're welcome
2011-10-20 07:14 <zxq9> Are there any other Tryton code branches currently linked/available from hg.tryton.org? I'm a little confused (used to the way GitHub and intranet Git repos work -- this project is a bit opaque to me at the moment...)
2011-10-20 07:18 <plantian> Here is some more information about the releases: http://code.google.com/p/tryton/wiki/ReleaseGeneral
2011-10-20 07:19 <plantian> Actually I guess I'm not sure what would tell you but there are repositories under the major version: http://hg.tryton.org/1.8/
2011-10-20 07:19 <plantian> for example
2011-10-20 07:19 <plantian> zxq9: see above
2011-10-20 07:20 <zxq9> But I mean individual developer repositories. Where you can say "hey, I just imped feature X, please pull from hg.tryton.org/plantian/repo/X and test" or whatever
2011-10-20 07:20 <plantian> Furthermore you can see the modules at urls such as http://hg.tryton.org/1.8/modules/
2011-10-20 07:20 <plantian> Right, not that I know of, usually patches are put up via codereview.
2011-10-20 07:20 <zxq9> So there is Trunk, and not really anything else?
2011-10-20 07:21 <plantian> I guess people could use bitbucket to clone the repos.
2011-10-20 07:21 <zxq9> hrm...
2011-10-20 07:21 <zxq9> I'm checking intuxication to see if it permits a slightly looser branching style.
2011-10-20 07:23 <plantian> oh yeah there are some repositories on intuxication but for the most part 3rd party development is usually in modules as far as I know
2011-10-20 07:23 <plantian> otherwise via patches put on codereview
2011-10-20 07:24 <zxq9> Modules is primarily what I'm interested in, but some may require adjustment to existing modules -- or definition of modules which would exclude existing ones (this is probably the better method)
2011-10-20 07:25 <plantian> Well most adjustment can be made to existing modules with other modules, although that isn't always completely true.
2011-10-20 07:25 <zxq9> Its not in this case.
2011-10-20 07:25 <plantian> I don't understand you second case... what do you mean exclude existing ones.
2011-10-20 07:26 <plantian> You can just not install modules.
2011-10-20 07:26 <zxq9> I am interested in shuffling some data definitions around to make the system model reality more closely.
2011-10-20 07:26 <plantian> *your second
2011-10-20 07:28 <zxq9> The current way that data is modeled in company, company.employee, res.user and party.* requires a lot of double-entry of data in a prime/subcontracting situation.
2011-10-20 07:29 <zxq9> The same entity (person) is very often a subcontractor, a customer, an employee and needs a Tryton account related to whatever the current contract is, and the way things work right now these relationships are cumbersome to form.
2011-10-20 07:31 <zxq9> So I want to move party back one level of abstraction, and permit a party to become a user, a "company", an employee, a manager of other employees (or managed), a supplier, a customer, etc.
2011-10-20 07:32 <zxq9> That way relationships can be determined by whatever the real (possibly changing from contract to contract) situation is instead of locked in a supplier <-> seller, user || employee situation.
2011-10-20 07:37 <plantian> So wait, is the problem that the model is redundant or just cannot model the data at all? The party model isn't that fresh in my mind, but I assumed that party could be the base for multiple roles.
2011-10-20 07:38 <zxq9> party *can* be the base for multiple roles. It is perfect for it. But using it correctly for this makes company.* redundant, and party needs to be linked to res.user and a few other things more closely to work well.
2011-10-20 07:38 <zxq9> I am interested in expanding the utility of party -- but in ways that will interfere with the current model of company and a few other things.
2011-10-20 07:39 <zxq9> I also want to make things like address records many2many, because all of the party records that are employees for a party that is a company would have the same work address -- so reusing that address record makes the most sense.
2011-10-20 07:39 <zxq9> etc.
2011-10-20 07:45 <udono> zxq9: Hi, for me the employee address is the address of the employee, not the company. When need the company address I use this. Many2many on addresses is very dangerous. Think about a big business center all shops have the same address. One shop moves away, you fix the address. Then all the other shops in the business center have a new address.
2011-10-20 07:46 <plantian> zxq9: I write modules and use tryton but I have tried really hard to avoid heavy changes to the core modules. You would have to convince the core devs. My rough guess would be that making these changes would be more of a pain than they would be worth.
2011-10-20 07:46 <zxq9> You can't just copy the record to a new one that is exclusive to the moved company?
2011-10-20 07:47 <zxq9> Addresses should be like locations, not easily changable. So an address record gets dropped or created, not changed.
2011-10-20 07:47 <udono> zxq9: You wanted to use a many2many relationship, not me ;-)
2011-10-20 07:47 <zxq9> In my way of thinking (and in other systems I've dealt with)
2011-10-20 07:48 <zxq9> So if one center moves, that center's association to the existing address is removed, and a new address created and associated with the record. The existing address is never edited, specifically for the reason you cite.
2011-10-20 07:48 <zxq9> This is a much better simulation of reality.
2011-10-20 07:49 <plantian> Well either way changing it I think will be a pain because anything that references address.party will be broken.
2011-10-20 07:49 <zxq9> And if linked to the googlemaps module could me easily made a pin-and-click feature.
2011-10-20 07:50 <zxq9> plantian: That was my point with easy branching methods. It will require a lot of reassociations to make the data models fit the way reality works better. So including my new module should exclude the existing company module, and vice versa.
2011-10-20 07:51 <zxq9> Because things would definitely break. Conversion rules would be pretty easy to write once everything is worked out, but installing both modules at the same time would be a disaster.
2011-10-20 07:51 <plantian> zxq9: Well in that case you might have to just copy and rewrite all the modules. Then your modules wouldn't work with other peoples and their modules wouldn't work for you. It is the pain of shared modules.
2011-10-20 07:52 <zxq9> Yeah... But not *everything* would break. I think I can limit the damage.
2011-10-20 07:52 <udono> zxq9: sounds interesting. Do you have a big picture?
2011-10-20 07:53 <zxq9> Yes.
2011-10-20 07:53 <udono> zxq9: anything public to read?
2011-10-20 07:53 <zxq9> The goal is to let Tryton move from being retail focused to being used for anything, including contract management and projects.
2011-10-20 07:53 <zxq9> Not yet.
2011-10-20 07:54 <plantian> Is Tryton retail focused?
2011-10-20 07:54 <plantian> I thought there was some sort of projects module.
2011-10-20 07:54 <zxq9> Tryton is an amazing framework. Cedrik and others have done some really great things. But it has some legacy underworkings that don't permit some uses well.
2011-10-20 07:54 <zxq9> There is a projects module, and it is a good beginning.
2011-10-20 07:55 <zxq9> But it doesn't let me create contracts as separate entities that "own" a project via a user/party/employee who is "owned" by another party/company, etc.
2011-10-20 07:55 <zxq9> The fact that company, party, user, employee and customer as completely different data sets is the thing I want to fix. Legal persons are legal person in reality, they should be in Tryton as well.
2011-10-20 07:56 <zxq9> ...and if they are it gives us huge flexibility in the way Tryton is used (while still being familiar to old users)
2011-10-20 07:57 <udono> zxq9: for the difference of person and organization we use party_type module
2011-10-20 07:57 <zxq9> And similarly locations on the map exist only one time, so they should in Tryton as well. They can't be easily "edited" in reality, so they shouldn't be edited in Tryton, either. Creation and reassignment is what happens in reality, so I think it makes the most sense to do that with many2many address records, etc.
2011-10-20 07:57 <zxq9> what about person and user?
2011-10-20 07:58 <zxq9> Or person and subcontractor? or employee?
2011-10-20 07:58 <udono> zxq9: connected via employee
2011-10-20 07:58 <udono> zxq9: user is connected to employee
2011-10-20 07:58 <zxq9> I think we're doing too many gymnastics around the existing data set because it isn't an accurate model.
2011-10-20 07:59 <udono> zxq9: we use the one from Silverston in Data Model Resource Book Part 1. Which you use?
2011-10-20 07:59 <zxq9> That is a Tryton module?
2011-10-20 08:00 <plantian> I think he is talking about the party schema used throughout tryton.
2011-10-20 08:02 <zxq9> I do not have a book reference. I do have a real-world problem that the current Tryton data model is not adequate to handle (but the GFEBS model recently deployed in USDoD is)
2011-10-20 08:05 <plantian> zxq9: I think it will be hard to change but people will look at a proposal. I have been looking at the code but still don't 100% understand the problems.
2011-10-20 08:05 <plantian> I understand the address problem.
2011-10-20 08:06 <zxq9> I think a working example is best.
2011-10-20 08:06 <zxq9> Its easiest to explain through working code to other programmers/data modelers.
2011-10-20 08:06 <plantian> It seems since everything but user inherits from party you could use the same party.
2011-10-20 08:06 <zxq9> I am going to try this way first.
2011-10-20 08:06 <zxq9> The existing party model is very close to what I need.
2011-10-20 08:07 <zxq9> I want to expand its use and make it more central.
2011-10-20 08:07 <plantian> I have found that it is easier to just work around the core than change it even if it isn't perfect.
2011-10-20 08:07 <zxq9> But that mkes it more difficult for the next person to understand the problems without a lot of study!
2011-10-20 08:08 <zxq9> The real problem with what I want to do is legacy databases already in production. Nobody will want to go to the trouble to write a clean conversion routine.
2011-10-20 08:09 <plantian> Well you can include conversions in modules but it will be hard to do cross-module conversions.
2011-10-20 08:09 <zxq9> Yes, very hard. So nobody will.
2011-10-20 08:10 <plantian> Actually that isn't entirely true it could be done between major versions.
2011-10-20 08:10 <plantian> List of changes needed to make to fit your model would be good to make though then we could look at them.
2011-10-20 08:10 <zxq9> This is the kind of change that would probably require a major version change.
2011-10-20 08:11 <zxq9> I think I should make a small repo somewhere to work on this publicly, but not in a place where it will bother you guys until I'm ready to show you something solid.
2011-10-20 08:12 <plantian> Yeah maybe start with just a list of the changes at a high level before drowing in the code and see if there is a better way to work around them.
2011-10-20 08:12 <plantian> *drowning
2011-10-20 08:13 <zxq9> Unfortunately mercurial.intuxication is a bit of a digital ghetto compared to GitHub... :-( The "help" link gives me "Forbidden 403" error, and other barriers exist to access repos.
2011-10-20 08:13 <zxq9> I
2011-10-20 08:13 <zxq9> Where should I post my change ideas?
2011-10-20 08:14 <zxq9> Is the mailinglist a good place to post ideas/get flamed?
2011-10-20 08:14 <plantian> Ha, you can post ideas and flaming should be avoided. Just don't cover yourself in gasoline. I use bitbucket sometimes to post code.
2011-10-20 08:15 <zxq9> I think that changes to or modules exclusive of something like company.company will probably attract some interested attention (and in this case I think that is a polite phrase for "flames")
2011-10-20 08:16 <plantian> Just coming back here and asking about the link works too. Remember that a lot of people are in europe too so you might get different level of discussions at different times.
2011-10-20 08:17 <zxq9> Ah, that is another issue. A lot of the defaults (like VAT and VIES) are very Euro-centric and don't make any sense here (I'm in Japan)
2011-10-20 08:17 <plantian> I think you should just try to express the ideas on a high level first though. Changing all the core modules will I think take forever without prior detailed discussion.
2011-10-20 08:17 <zxq9> But those are easy to turn off in the XML -- but a cleaner interface is a better answer, I think.
2011-10-20 08:17 <zxq9> I'll give it a shot and see what happens.
2011-10-20 08:18 <plantian> Ha 400 weeks later. Maybe you are better developer than me though.
2011-10-20 08:18 <zxq9> I doubt that.
2011-10-20 08:19 <zxq9> I do have a real set of project concerns, though, and Tryton is just a great framework. So even if I have to write a bunch of custom modules to lay over or replace existing ones, *something* will come out in workable form.
2011-10-20 08:22 <udono> ping
2011-10-20 08:23 <plantian> zxq9: Yeah sounds good, I have had to rewrite a few pieces myself but luckily they were on the perimeter of the core modules.
2011-10-20 08:23 <plantian> udono: pong?
2011-10-20 08:23 <zxq9> pang?
2011-10-20 08:23 <zxq9> bah! my pong is broken...
2011-10-20 08:24 <udono> yes thanks, didn't recognize I was offline :-)
2011-10-20 08:24 <udono> ACTION reading the log
2011-10-20 08:26 <zxq9> Hate it when that happens.
2011-10-20 08:28 <udono> So party_type is a module. Now it is on intuxication, but I will upload it to bitbucket today
2011-10-20 08:28 <udono> zxq9:
2011-10-20 08:28 <zxq9> How do I find it in intuxication? That site is a bit awkward to me at the moment.
2011-10-20 08:31 <udono> zxq9: http://mercurial.intuxication.org/tryton
2011-10-20 08:31 <udono> zxq9: but it is old. I'll upload a 2.0 Version to bitbucket.
2011-10-20 08:32 <zxq9> ok
2011-10-20 08:32 <zxq9> http://mercurial.intuxication.org/dev/wiki/FAQ Is this link working for you?
2011-10-20 08:32 <zxq9> I think intuxication is having some trouble right now...
2011-10-20 08:33 <udono> zxq9: Do you have a link describing the handling of parties in GFEBS?
2011-10-20 08:33 <zxq9> Not off hand. Let me look.
2011-10-20 08:34 <zxq9> Unfortunately I stopped working there just after we deployed the system, so I don't have access to the system myself anymore -- but it was pretty decent, just really, really huge.
2011-10-20 08:37 <zxq9> I can't find anything below the unit level -- and the unit -> soldier level was the most interesting part because GFEBS can handle everything from contracts to project execution to payroll and inter-unit billing across fiscal year cycles.
2011-10-20 08:38 <zxq9> And the user ID scheme works through the AKO UID/login process, which means the payroll/HR employee entities are the same as the UID entities.
2011-10-20 08:40 <zxq9> Of course, GFEBS has to work across all of DoD, so it must keep its own user database separate from AKO, DKO, NKO, AFO, etc. but the user end is fairly well unified and uniform -- and getting a cost of operation/period is relatively easy.
2011-10-20 08:42 <udono> zxq9: for me it sounds like the different roles a party can play in relationships...
2011-10-20 08:42 <zxq9> You're right.
2011-10-20 08:44 <zxq9> I need to make party a more universal idea, so that it can cover the role of employee, organization/company, and user.
2011-10-20 08:45 <zxq9> If that were the case, then project and contract management with really widely varying circumstances is easy and natural to handle.
2011-10-20 08:45 <zxq9> At the moment I cannot easily write a module to handle contracts where in one contract company A is a subcontractor, and on the next contract (maybe at the same time) they are a customer also.
2011-10-20 08:46 <zxq9> Without creating that entity twice, once as a party and once as a company -- which defeats the purpose of ERP.
2011-10-20 08:49 <udono> zxq9: but this does not depends to the party model. Isn't it more a missing feature from a party_role and a party_relationship module?
2011-10-20 08:50 <udono> zxq9: this functionality is not used always. Its customer or business-specific.
2011-10-20 08:51 <zxq9> Possibly.
2011-10-20 08:52 <zxq9> Where is party_role and party_relationship? I don't see them on hg.tryton.org/modules
2011-10-20 08:53 <zxq9> Perhaps the modules listed as the complete set is not complete, and this may have something to do with the apparent problem.
2011-10-20 08:53 <udono> zxq9: not existing yet. I've started some dev two years ago, but never finished, because the final solution would be to complicated for most users.
2011-10-20 08:54 <zxq9> lol
2011-10-20 08:54 <zxq9> well, this is getting to the root of my problem.
2011-10-20 08:54 <zxq9> I think there is a way to make this simpler for users than the way things are now.
2011-10-20 08:55 <zxq9> For example, it is confusing that I have these menu options: [Party -> Parties -> Paties associates to Sales] and also have [Party -> Categories -> Categories]
2011-10-20 08:55 <zxq9> Which is just one small example, but a lot of the Party relationships are pretty strange like this. Also having Company under Party when it is not treated as a Party in the data is a little strange. Etc.
2011-10-20 08:57 <zxq9> A clear separation between addresses and parties should be made (at least for the user), and parties should be made a universal class that can acquire the role(s) of user, employee, company, group, customer, supplier, sub-contractor, etc.
2011-10-20 08:58 <zxq9> I think doing this provides more freedom to extend the use of Tryton and make things a little more simple at the same time.
2011-10-20 08:58 <udono> zxq9: tryton is a framework. Its users are usually programmer who customize it for their "users". That's the reason why it feels so "unusable", raw and generic. It usually needs customization.
2011-10-20 08:59 <udono> The menu order try to follow the internal data model. That's good for the programmer, bad for the user...
2011-10-20 08:59 <zxq9> I understand, but then why do we have any modules at all? There are some business concepts that are universal because they happen in reality every time.
2011-10-20 09:00 <zxq9> Like parties are always legal persons, whether they are companies/corporations, or people doing business or working.
2011-10-20 09:01 <zxq9> The same with locations. Locations/addresses themselves don't change when a party moves, the party moves and assigns themselves a new address and disassociates from the old one. This happens the same way in reality, so why not in Tryton?
2011-10-20 09:01 <zxq9> Then we can move the requirement for customization down one step closer to the users, and clean up the interface.
2011-10-20 09:01 <udono> A tryton user is not a party. A tryton user is login credentials and access rules. A tryton user can be a system, which push or pull informations into tryton. This system is not nessessarily a legal busines party.
2011-10-20 09:02 <zxq9> This is not so different from how Unix users are defined. There are system users/daemons, PAM authentication routines and human users who have extensions for themselves that exist in their interface suite.
2011-10-20 09:03 <udono> zxq9: A person user in tryton is connected to an employee, which is an extended party.
2011-10-20 09:03 <zxq9> So the UID concept and a party concept are different, but not exclusive. Some daemons dont have a user, for example.
2011-10-20 09:03 <zxq9> ?
2011-10-20 09:03 <zxq9> That is not the way the data model looks to me.
2011-10-20 09:04 <zxq9> I can create a user in Tryton and it has no effect on party or employee.
2011-10-20 09:04 <zxq9> How do I find them in employee or party?
2011-10-20 09:05 <udono> zxq9: This is what I said. A user is not a party in tryton. A user is ... read above
2011-10-20 09:05 <zxq9> How do I connect a user to an employee?
2011-10-20 09:05 <udono> zxq9: You link it to an employee and a company. See user form.
2011-10-20 09:07 <udono> zxq9: A user can use Tryton. A party can be part of a business relation in tryton. This is a difference.
2011-10-20 09:08 <udono> zxq9: But a user is not necessarily a party.
2011-10-20 09:09 <zxq9> OK, the relationship works backwards to what I expected.
2011-10-20 09:10 <zxq9> How about parties being groups which own other parties?
2011-10-20 09:11 <udono> zxq9: I have just some writings about this: http://codereview.appspot.com/2001042/
2011-10-20 09:11 <udono> zxq9: you can put your comments into the reviewif you like.
2011-10-20 09:11 <zxq9> Maybe all I need to do is extend in a few places, like making party have a parent/child relationship to other parties?
2011-10-20 09:12 <udono> zxq9: yes, I guess
2011-10-20 09:12 <zxq9> And set creation/editing rules for some things like many2many addresses (to make them safe like the way you mentioned earlier)
2011-10-20 09:14 <zxq9> Does it seem like employee is an implied category that is just not listed?
2011-10-20 09:14 <udono> zxq9: possible. But the first step is planning what you exactly need.
2011-10-20 09:15 <zxq9> I should start with a definition of contract/sub-contract requirements and how that governs projects and interacts with parties, I think.
2011-10-20 09:16 <zxq9> Other things like pass/licensing expiration/recertification management should be pretty simple add-ons to existing party functionality.
2011-10-20 09:16 <udono> zxq9: employee is an extension to party model (Keyword: _inherits). Create an employee, look into the database table party_party and company_employee.
2011-10-20 09:22 <udono> zxq9: you will see, that the party-part of your employee is stored in the party table and the employee-part is stored in company_employee. Additionally in company_employee is a foreign key in column party, which refers to the party row.
2011-10-20 09:22 <zxq9> I can see that.
2011-10-20 09:22 <zxq9> And its very helpful.
2011-10-20 09:22 <zxq9> I was not realizing that company.employee points both ways.
2011-10-20 09:22 <zxq9> It still leaves some problems, but not as big as I thought.
2011-10-20 09:23 <zxq9> Which is VERY nice to discover. (^.^)
2011-10-20 09:25 <zxq9> Wow, this party_rollup discussion is very old.
2011-10-20 09:31 <zxq9> udono: Your party_rollup* and party_type idea accomplishes almost exactly the kind of thing I want to do. A little different way than I was thinking, but it is very close.
2011-10-20 12:40 -!- hoRn(~jan@dslb-178-005-049-070.pools.arcor-ip.net) has left #tryton
2011-10-20 12:58 -!- ciupicri(~ciupicri@unaffiliated/ciupicri) has joined #tryton
2011-10-20 16:28 -!- elbenfreund(~elbenfreu@p54B947EF.dip.t-dialin.net) has left #tryton
2011-10-20 18:22 <ndn_pit> hello
2011-10-20 18:22 <ndn_pit> where can I find examples about workflow?
2011-10-20 18:30 <cedk> ndn_pit: in modules: sale, purchase, account_invoice
2011-10-20 18:31 <ndn_pit> cedk: thank you
2011-10-20 18:32 <cedk> ndn_pit: perhaps sale_opportunity is simplier
2011-10-20 18:33 <ndn_pit> cedk: ok
2011-10-20 18:35 -!- pjstevns(~pjstevns@a83-163-46-103.adsl.xs4all.nl) has left #tryton
2011-10-20 20:50 <cedk> yangoon: did you have tested the patch for translation?

Generated by irclog2html.py 2.17.3 by Marius Gedminas - find it at https://mg.pov.lt/irclog2html/!